Skip to content Skip to sidebar Skip to footer

Image Segmentation And Registration Using Simpleitk

I have some doubts regarding 3D image registration and segmentation: Load dicom images: In DCE-MRI there are 4000 slices and total 100 stacks, so 40 in each stack. How can I load

Solution 1:

I am not sure whether SimpleITK supports 4D images in its default configuration. If not, you would have to compile it yourself, after having it configured to support dimension 4 (and not just 2 and 3). Even with that, I am not sure it would work right away - DICOM is notorious making simple things not so easy, and complicated things super-hard.

ITK-SNAP is a tool for manual and manually assisted segmentation.

Visualization is more a VTK question. Here is an example which uses 3D visualization.

Solution 2:

1) GetImageFromArray, simpleITK in python> convert a 4d numpy array to a SimpleITK image.

import numpy as np
import SimpleITK as sitk

np_array = np.zeros( (a,b,c,d) )
tdim = np_array.shape[3]
slices = []

for i inrange(tdim):
    slices.append( sitk.GetImageFromArray( np_array[i], False ) )

im = sitk.JoinSeries(slices)

sitk.WriteImage(im, "imageresult.mha") 

2) You can first select you VOI using ITKsnap, or in your python code and instead of performing all your experiments on the whole image data, you can only include that ROI.

3) use> from myshow import myshow

myshow(sitk.LabelToRGB(img), title='img')

Solution 3:

3D Slicer has functionality to load DCE MRI series as 4D volumes. You can find the tutorial how to use this functionality of 3D Slicer in this post: https://discourse.slicer.org/t/how-to-analyze-dce-mri-data/622.

Post a Comment for "Image Segmentation And Registration Using Simpleitk"