Simple slice viewer for Simple ITK images
Project description
README
Overview
A viewer to scroll through slices of 3D medical data set (CT, PET, MRI...)
Supports files than can be read by SimpleITK:
- Nifti: .nii .nii.gz .nia .img .img.gz .hdr
- Nrrd: .nrrd .nhdr
- Meta Image: .mhd .mha
And probably some more types as long as they are supported by the SimpleITK file reader.
In addition there is support for reading folders with dicom data. Sorting dicom data into 3D volume is tricky and may depend on modality, vendor and model of the imaging device. Basic support is offered that works well with CT, PET and MRI. For Siemens PET the PET data is read in SUV.
A second image can be loaded and is displayed as fusion on top of the first. Works well with PET/CT and PET/MRI data.
##Usage
pip install simple-slice-viewer
Command Line
simple-slice-viewer ct.nii
simple-slice-viewer ct.nii --fusion pet.nii
simple-slice-viewer --image ct.nii --fusion pet.nii
or use ssv as shorthand:
ssv ct.nii
ssv ct.nii --fusion pet.nii
ssv --image ct.nii --fusion pet.nii
Inside Python
In Python images should be read to SimpleITK Image objects first.
import simple_slice_viewer as ssv
import SimpleITK as sikt
image = sitk.ReadImage('ct.nii')
fusion = sitk.ReadImage('pet.nii')
ssv.display(image=image, fusion=fusion)
To display a numpy array convert it to SimpleITK first
image = sitk.GetImageFromArray(np_array) ssv.display(image)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file simple-slice-viewer-0.14.tar.gz
.
File metadata
- Download URL: simple-slice-viewer-0.14.tar.gz
- Upload date:
- Size: 24.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 29f41a6f9b07f94a3fc3e3d456353952ffe5993319f785ba55422b4614483e1c |
|
MD5 | 3a6b00e5a70b5a5f331c01232bfc0994 |
|
BLAKE2b-256 | 4af2bb688b686cec700a2106f8d30397d4c96036edcaa886d14437b0f0256867 |