Skip to main content

Simple slice viewer for Simple ITK images

Project description

README

Overview

A viewer to scroll through slices of 2D, 3D and 4D medical data sets (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
simple-slice-viewer ct.nii
simple-slice-viewer ct.nii --fusion pet.nii

or use ssv as shorthand: ssv 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

import SimpleITK as sitk
import simple_slice_viewer as ssv
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

simple-slice-viewer-0.97.tar.gz (44.5 kB view details)

Uploaded Source

File details

Details for the file simple-slice-viewer-0.97.tar.gz.

File metadata

  • Download URL: simple-slice-viewer-0.97.tar.gz
  • Upload date:
  • Size: 44.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for simple-slice-viewer-0.97.tar.gz
Algorithm Hash digest
SHA256 f7ecee22d14fa61845a71d7fc139e02aa1ddab0147a3b2df486be6127d14146c
MD5 5bc272c6029021eed440a69a8e0fb67d
BLAKE2b-256 1c7d0a377593a87f33e4cd54ecc7edd2e7db0e48e64191c164324a9e7f4904b1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page