Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

K-Particles: A visual journey into the heart of magnetic resonance imaging #47

Open
ofgulban opened this issue Oct 15, 2023 · 6 comments
Assignees

Comments

@ofgulban
Copy link

ofgulban commented Oct 15, 2023

Authors

Omer Faruk Gulban faruk.gulban@maastrichtuniversity.nl
Kenshu Koiso k.koiso@maastrichtuniversity.nl
Thomas Maullin-Sapey thomas.maullin-sapey@bdi.ox.ac.uk
Jeff Mentch jsmentch@mit.edu
Alessandra Pizzuti a.pizzuti@maastrichtuniversity.nl
Fernanda Ponce | <TO_BE_FILLED_IN_LATER_WE_COULD_NOT_REACH_HER>
Kevin R. Sitek kevin.sitek@northwestern.edu
Paul A. Taylor paul.taylor@nih.gov

Summary

Introduction

The primary objective of this project is to leverage particle animations to provide insights into the journey of traveling and sampling the k-space. By generating captivating visualizations, we aim to demystify the concept of k-space and the role it plays in magnetic resonance imaging (MRI), engaging both the scientific community and the general public in a delightful exploration of this fundamental aspect of imaging. This project builds on our previous Brainhack experiences that focused on generating 3D geodesic distance computation animations [CITE Brainhack2021] and particle simulation based brain explosions [CITE Brainhack2022].

Methods

Our methodology is as follows. First, we start from a 2D brain image (e.g. selecting a slice from a 3D anatomical MRI data [CITE Nibabel, Numpy, Scipy]). Then, we take its Fourier Transform and subsequently perform masking (or magnitude scaling) operations on k-space data [CITE Bernstein2004], the transform. We then create simultaneous visualizations of the k-space magnitude and corresponding image-space magnitude data. Note that the masking of k-space data is where the participants of this project exercised their creativity, by setting up various initial conditions and a set of rules to animate the mask data. In the final step, animated frames are compiled into movies to inform (and entertain). The scripts we have used to program these steps are available at: https://github.com/ofgulban/k_particles . Note that, we have also included several animations where no brain images were used, but instead, we generated k-space data directly in k-space to guide the unfamiliar participants with the concepts (see Figure 1, Panel A).

Results

As a result of this hackathon project, a compilation of our progress (Figure 1, Panel B) can be seen at https://youtu.be/_5ZDctWv5X4 as a video. Some of the highlights are:

  1. Audiovisualizer that maps audio features (e.g. amplitude) to k-space mask diameters
  2. Game of life [CITE Gardner1970] simulation in k-space with Hermitian symmetry.
  3. Pacman moving in k-space is implemented as a series of radial sector masks.
  4. Semi-random initialization of particle positions and semi-randomly reassigned velocities that look like an emerging butterfly.
  5. Randomized game of life initialization with vanishing trails of the previous simulation steps that look like stars, clouds, and comets orbiting frequency bands in k-space.
  6. Semi-random initialization of particle positions and velocities that look like explosions.
  7. Predetermined initialization of particle positions (e.g. at the center) and semi-randomized velocities that look like fireworks.
  8. Dancing text animations where the positions of text pixels are manipulated by wave functions.
  9. Picture based (e.g. cropped faces of the authors) moving within the k space where each pixel’s grayscale value is mapped onto a mask coefficient between 0-1.

Our future efforts will involve sophisticating the k-space simulations to generate more entertaining and educational content. For instance, instead of only visualizing the magnitude images, we can generate four panel animations showing real and imaginary (or magnitude and phase) components of the data.

Figure Caption

Figure 1: Our compilation of k-space animations generated during the brainhack can be seen at https://youtu.be/XS0LEQExGU8?si=I5Zufp3AcCbdhYIR .

References (Bibtex)

@book{Bernstein2004,
title = {Handbook of {MRI} {Pulse} {Sequences}},
isbn = {978-0-12-092861-3},
url = {https://linkinghub.elsevier.com/retrieve/pii/B9780120928613X50006},
abstract = {Magnetic Resonance Imaging (MRI) is among the most important medical imaging techniques available today. There is an installed base of approximately 15,000 MRI scanners worldwide. Each of these scanners is capable of running many different "pulse sequences", which are governed by physics and engineering principles, and implemented by software programs that control the MRI hardware. To utilize an MRI scanner to the fullest extent, a conceptual understanding of its pulse sequences is crucial. This book offers a complete guide that can help the scientists, engineers, clinicians, and technologists in the field of MRI understand and better employ their scanner. • Explains pulse sequences, their components, and the associated image reconstruction methods commonly used in MRI • Provides self-contained sections for individual techniques • Can be used as a quick reference guide or as a resource for deeper study • Includes both non-mathematical and mathematical descriptions • Contains numerous figures, tables, references, and worked example problems.},
publisher = {Elsevier},
author = {Bernstein, Matt A. and King, Kevin F. and Zhou, Xiaohong Joe},
year = {2004},
doi = {10.1016/B978-0-12-092861-3.X5000-6},
note = {Publication Title: Handbook of MRI Pulse Sequences
ISSN: 1053-1807},
}

@Article{Brainhack2021,
title = {Proceedings of the {OHBM} {Brainhack} 2021},
copyright = {All rights reserved},
url = {https://apertureneuro.org/article/77464-proceedings-of-the-ohbm-brainhack-2021},
doi = {10.52294/258801b4-a9a9-4d30-a468-c43646391211},
language = {en},
urldate = {2023-10-15},
journal = {Aperture Neuro},
author = {Nikolaidis, Aki and Manchini, Matteo and Auer, Tibor and L. Bottenhorn, Katherine and Alonso-Ortiz, Eva and Gonzalez-Escamilla, Gabriel and Valk, Sofie and Glatard, Tristan and Selim Atay, Melvin and M.M. Bayer, Johanna and Bijsterbosch, Janine and Algermissen, Johannes and Beck, Natacha and Bermudez, Patrick and Poyraz Bilgin, Isil and Bollmann, Steffen and Bradley, Claire and E.J. Campbell, Megan and Caron, Bryan and Civier, Oren and Pedro Coelho, Luis and El Damaty, Shady and Das, Samir and Dugré, Mathieu and Earl, Eric and Evas, Stefanie and Lopes Fischer, Nastassja and Fu Yap, De and G. Garner, Kelly and Gau, Remi and Ganis, Giorgio and G. E. Gomes, Dylan and Grignard, Martin and Guay, Samuel and Faruk Gulban, Omer and Hamburg, Sarah and O. Halchenko, Yaroslav and Hayot-Sasson, Valerie and Liu Holford, Dawn and Huber, Laurentius and Illanes, Manuel and Johnstone, Tom and Kalyani, Avinash and Kashyap, Kinshuk and Ke, Han and Khormi, Ibrahim and Kiar, Gregory and Ković, Vanja and Kuehn, Tristan and Kumar, Achintya and Lecours-Boucher, Xavier and Lührs, Michael and Luke, Robert and Madjar, Cecile and Mansour L., Sina and Markeweicz, Chris and Andrea Martinez, Paula and McCarroll, Alexandra and Michel, Léa and Moia, Stefano and Narayanan, Aswin and Niso, Guiomar and A. O’Brien, Emmet and Oudyk, Kendra and Paugam, François and G. Pavlov, Yuri and Poline, Jean-Baptiste and A. Poser, Benedikt and Provins, Céline and Reddy Raamana, Pradeep and Rioux, Pierre and Romero-Bascones, David and Sareen, Ekansh and Schettino, Antonio and Shaw, Alec and Shaw, Thomas and A. Smout, Cooper and Šoškié, Anđdela and Stone, Jessica and J Styles, Suzy and Sullivan, Ryan and Sunami, Naoyuki and Sundaray, Shamala and Wei Rou, Jasmine and Thanh Thuy, Dao and Tourbier, Sebastien and Urch, Sebastián and De La Vega, Alejandro and Viswarupan, Niruhan and Wagner, Adina and Walger, Lennart and Wang, Hao-Ting and Ting Woon, Fei and White, David and Wiggins, Christopher and Woods, Will and Yang, Yu-Fang and Zaytseva, Ksenia and D. Zhu, Judy and P. Zwiers, Marcel},
month = mar,
year = {2023},
pages = {87},
file = {Nikolaidis et al. - 2023 - Proceedings of the OHBM Brainhack 2021.pdf:/Users/faruk/Zotero/storage/MUBSB5NX/Nikolaidis et al. - 2023 - Proceedings of the OHBM Brainhack 2021.pdf:application/pdf},
}

@Article{Scipy,
title = {{SciPy} 1.0: {Fundamental} {Algorithms} for {Scientific} {Computing} in {Python}},
volume = {17},
doi = {10.1038/s41592-019-0686-2},
journal = {Nature Methods},
author = {Virtanen, Pauli and Gommers, Ralf and Oliphant, Travis E. and Haberland, Matt and Reddy, Tyler and Cournapeau, David and Burovski, Evgeni and Peterson, Pearu and Weckesser, Warren and Bright, Jonathan and van der Walt, Stéfan J. and Brett, Matthew and Wilson, Joshua and Millman, K. Jarrod and Mayorov, Nikolay and Nelson, Andrew R. J. and Jones, Eric and Kern, Robert and Larson, Eric and Carey, C J and Polat, İlhan and Feng, Yu and Moore, Eric W. and VanderPlas, Jake and Laxalde, Denis and Perktold, Josef and Cimrman, Robert and Henriksen, Ian and Quintero, E. A. and Harris, Charles R. and Archibald, Anne M. and Ribeiro, Antônio H. and Pedregosa, Fabian and van Mulbregt, Paul and {SciPy 1.0 Contributors}},
year = {2020},
pages = {261--272},
}

@Article{Numpy,
title = {Array programming with {NumPy}},
volume = {585},
url = {https://doi.org/10.1038/s41586-020-2649-2},
doi = {10.1038/s41586-020-2649-2},
number = {7825},
journal = {Nature},
author = {Harris, Charles R. and Millman, K. Jarrod and Walt, Stéfan J. van der and Gommers, Ralf and Virtanen, Pauli and Cournapeau, David and Wieser, Eric and Taylor, Julian and Berg, Sebastian and Smith, Nathaniel J. and Kern, Robert and Picus, Matti and Hoyer, Stephan and Kerkwijk, Marten H. van and Brett, Matthew and Haldane, Allan and Río, Jaime Fernández del and Wiebe, Mark and Peterson, Pearu and Gérard-Marchant, Pierre and Sheppard, Kevin and Reddy, Tyler and Weckesser, Warren and Abbasi, Hameer and Gohlke, Christoph and Oliphant, Travis E.},
month = sep,
year = {2020},
note = {Publisher: Springer Science and Business Media LLC},
pages = {357--362},
}

@misc{Nibabel,
title = {nipy/nibabel: 5.1.0},
publisher = {Zenodo},
author = {Brett, Matthew and Markiewicz, Christopher J. and Hanke, Michael and Côté, Marc-Alexandre and Cipollini, Ben and McCarthy, Paul and Jarecka, Dorota and Cheng, Christopher P. and Halchenko, Yaroslav O. and Cottaar, Michiel and Larson, Eric and Ghosh, Satrajit and Wassermann, Demian and Gerhard, Stephan and Lee, Gregory R. and Baratz, Zvi and Wang, Hao-Ting and Kastman, Erik and Kaczmarzyk, Jakub and Guidotti, Roberto and Daniel, Jonathan and Duek, Or and Rokem, Ariel and Madison, Cindee and Papadopoulos Orfanos, Dimitri and Sólon, Anibal and Moloney, Brendan and Morency, Félix C. and Goncalves, Mathias and Markello, Ross and Riddell, Cameron and Burns, Christopher and Millman, Jarrod and Gramfort, Alexandre and Leppäkangas, Jaakko and van den Bosch, Jasper J.F. and Vincent, Robert D. and Braun, Henry and Subramaniam, Krish and Van, Andrew and Gorgolewski, Krzysztof J. and Raamana, Pradeep Reddy and Klug, Julian and Nichols, B. Nolan and Baker, Eric M. and Hayashi, Soichi and Pinsard, Basile and Haselgrove, Christian and Hymers, Mark and Esteban, Oscar and Koudoro, Serge and Pérez-García, Fernando and Dockès, Jérôme and Oosterhof, Nikolaas N. and Amirbekian, Bago and Christian, Horea and Nimmo-Smith, Ian and Nguyen, Ly and Reddigari, Samir and St-Jean, Samuel and Panfilov, Egor and Garyfallidis, Eleftherios and Varoquaux, Gael and Legarreta, Jon Haitz and Hahn, Kevin S. and Waller, Lea and Hinds, Oliver P. and Fauber, Bennet and Perez, Fabian and Roberts, Jacob and Poline, Jean-Baptiste and Stutters, Jon and Jordan, Kesshi and Cieslak, Matthew and Moreno, Miguel Estevan and Hrnčiar, Tomáš and Haenel, Valentin and Schwartz, Yannick and Darwin, Benjamin C and Thirion, Bertrand and Gauthier, Carl and Solovey, Igor and Gonzalez, Ivan and Palasubramaniam, Jath and Lecher, Justin and Leinweber, Katrin and Raktivan, Konstantinos and Calábková, Markéta and Fischer, Peter and Gervais, Philippe and Gadde, Syam and Ballinger, Thomas and Roos, Thomas and Reddam, Venkateswara Reddy and {freec84}},
month = apr,
year = {2023},
}

@Article{Gardner1970,
title = {Mathematical {Games}: {The} fantastic combinations of {John} {Conway}’s new solitaire game “life”},
volume = {4},
journal = {Scientific American},
author = {Gardner, M.},
year = {1970},
pages = {120--123},
}

@misc{Brainhack2022,
title = {Proceedings of the {OHBM} {Brainhack} 2022},
}

@anibalsolon
Copy link
Member

That's great, thank you @ofgulban

May I download the video from youtube and add it to Google Drive? We will add it to OSF, so to have a DOI with all the material.

@ofgulban
Copy link
Author

ofgulban commented Dec 4, 2023

@anibalsolon thanks! Yes of course, please feel free to download the video. If there are any issues let me know.

@ufangYang
Copy link
Collaborator

Hi @ofgulban We are currently compiling author information for our upcoming proceeding paper. Could you please take a moment to fill out your team member's details using the form provided here: https://forms.gle/XB4EKospj1PqkVBi7? Cheers!

@ofgulban
Copy link
Author

ofgulban commented May 2, 2024

@ufangYang , done thank you! Ah I just noticed that I should do it for every member. Will do!

@ofgulban
Copy link
Author

ofgulban commented May 2, 2024

Ok fully completed now, thanks again :)

@ufangYang
Copy link
Collaborator

@ofgulban thanks a bunch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants