Uploaded October 2020 | Updated September 2026, 2 weeks ago
3D MRI (Magnetic Resonance Imaging) scans are being used in domains of Data Science and Artificial Intelligence in Medicine. MRI Scans are the material to implement Computer Vision (CV), Deep Learning (DL), and Machine Learning solutions for detecting tumors (with Object Detection). Data science in medicine is a new AI trend on current times, so visualise this kind of data becomes more and more important.
In this video tutorial I introduce how to interactively visualize MRI Scans data in Python Jupyter Notebook very easy.
Neuroimaging or brain imaging is the use of various techniques to either directly or indirectly image the structure, function, or pharmacology of the nervous system. It is a relatively new discipline within medicine, neuroscience, and psychology.
In this tutorial we will use: numpy, matplotlib and seaborn as well as some specific ones for reading (nibabel) and visualizing (itk, itkwidgets, ipywidgets) the 3D MRI data.
Before going into tutorial, install required Python modules in your environment:
- nibabel (Read / write access to some common neuroimaging file formats) : nipy.org/nibabel
- itkwidgets (Interactive Jupyter widgets to visualize images, point sets, and meshes in 2D and 3D) : pypi.org/project/itkwidgets
Data source used in video: Medical Segmentation Decathlon (https://decathlon-10.grand-challenge.org)
Content of the video:
0:00 - Intro
1:09 - Modules and Packages
2:51 - Data
2:54 - 3D MRI Image data
4:30 - 3D MRI Image data as Numpy array
3:52 - Visualize the data
7:01 - Exploration
7:05 - Single 3D MRI Sample
8:31 - 3D MRI Data Labels
10:45 - Visualize Labels
12:27 - Interactive 3D MRI Visuals
Python code (Jupyter Notebook) on Github: github.com/vb100/Visualize-3D-MRI-Scans-Brain-case.
#aimedicine
#brainscans
#pythonvisualization
3D MRI (Magnetic Resonance Imaging) scans are being used in domains of Data Science and Artificial Intelligence in Medicine. MRI Scans are the material to implement Computer Vision (CV), Deep Learning (DL), and Machine Learning solutions for detecting tumors (with Object Detection). Data science in medicine is a new AI trend on current times, so visualise this kind of data becomes more and more important.
In this video tutorial I introduce how to interactively visualize MRI Scans data in Python Jupyter Notebook very easy.
Neuroimaging or brain imaging is the use of various techniques to either directly or indirectly image the structure, function, or pharmacology of the nervous system. It is a relatively new discipline within medicine, neuroscience, and psychology.
In this tutorial we will use: numpy, matplotlib and seaborn as well as some specific ones for reading (nibabel) and visualizing (itk, itkwidgets, ipywidgets) the 3D MRI data.
Before going into tutorial, install required Python modules in your environment:
- nibabel (Read / write access to some common neuroimaging file formats) : nipy.org/nibabel
- itkwidgets (Interactive Jupyter widgets to visualize images, point sets, and meshes in 2D and 3D) : pypi.org/project/itkwidgets
Data source used in video: Medical Segmentation Decathlon (https://decathlon-10.grand-challenge.org)
Content of the video:
0:00 - Intro
1:09 - Modules and Packages
2:51 - Data
2:54 - 3D MRI Image data
4:30 - 3D MRI Image data as Numpy array
3:52 - Visualize the data
7:01 - Exploration
7:05 - Single 3D MRI Sample
8:31 - 3D MRI Data Labels
10:45 - Visualize Labels
12:27 - Interactive 3D MRI Visuals
Python code (Jupyter Notebook) on Github: github.com/vb100/Visualize-3D-MRI-Scans-Brain-case.
#aimedicine
#brainscans
#pythonvisualization





![Stop using range() for loops in Python. Use enumerate()
With this video I explain why in many cases we should use enumerate() instead of range() function in Python for loops.
The way of using range() is ugly: You either need a separate variable assignment to get the element or use a[i] all the time which could theoretically be an expensive operation. The point is that you generally dont want to use range(len(l)) when you want to iterate the elements of a list (although there may still be cases where it makes sense).
I think than enumerate is much more flexible and readable Python coding option than len(l) with range().
Thank you for watching. See you on other tutorials.
Vytautas.
#pythonfunctions
#pythonloops
#pythonbegineers Stop using range() for loops in Python. Use enumerate()](https://i.ytimg.com/vi/XUtAy9K0JSE/mqdefault.jpg)




