The MPR Viewer with Segmentation is an interactive medical imaging viewer designed to visualize MRI scans in three orthogonal planes (Axial, Coronal, and Sagittal). This tool allows users to load medical image files (e.g., NIfTI format), navigate through slices, and explore volume rendering. It provides essential features such as brightness and contrast adjustments, crosshair navigation, playback of slices, and customizable colormaps for intuitive analysis.
The application is built using PyQt5, Matplotlib, SimpleITK, and VTK, ensuring a rich user interface and powerful 3D visualization.
- Three Viewports: Simultaneously view Axial, Coronal, and Sagittal slices.
- Volume Rendering: Visualize 3D volume data with interactive zoom and rotation.
- Colormap Selection: Choose from multiple colormaps for better visualization (e.g., Gray, Viridis, Plasma, Jet).
- Brightness & Contrast Adjustment: Fine-tune image visibility for each plane.
- Crosshair Navigation: Automatically synchronize slice navigation across all planes.
- Cine Mode: Play slices as an animated sequence.
- Mouse Interaction: Zoom, pan, and interact with the images directly using the mouse.
- Reset View: Instantly reset brightness, contrast, and crosshair positions to default.
Ensure you have the following dependencies installed on your system:
- Python 3.8+
- Libraries:
- PyQt5
- Matplotlib
- SimpleITK
- NumPy
- VTK
To install the required libraries, run:
pip install PyQt5 matplotlib SimpleITK vtk numpy-
Clone this repository:
git clone https://github.com/yourusername/mpr-viewer.git cd mpr-viewer -
Run the application:
python MPR_Viewer1.py
-
Use the Load MRI Scan button to load NIfTI (
.niior.nii.gz) files into the viewer. -
Explore features such as:
- Adjusting brightness and contrast for better visualization.
- Navigating slices with sliders or mouse clicks.
- Using the Play/Pause button to view slices in motion.
- Selecting colormaps from the dropdown menu.
- panning using arrow keys
- NIfTI:
.nii,.nii.gz - Directory-based DICOM series are also supported.
The MRI scan can be viewed in multiple slices. Below is an example of a slice view:
- Incorporate segmentation overlays for enhanced analysis.
- Add support for additional medical imaging formats.
- Improve volume rendering with advanced transfer functions.
This project is licensed under the MIT License. See the LICENSE file for details.
Contributions are welcome! Please open an issue or submit a pull request to help improve the MPR Viewer.
MPR-Viewer.mp4
- PyQt5 for the responsive user interface.
- SimpleITK for efficient medical image processing.
- VTK for interactive 3D volume rendering.
- Matplotlib for intuitive visualization in the 2D views.


