Questions tagged [simpleitk]

SimpleITK is a simplified, open-source interface to the United States National Library of Medicine’s Insight Segmentation and Registration Toolkit. The SimpleITK image analysis library is available in multiple programming languages including C++, Python, R, Java, C#, Lua, Ruby and Tcl.

221 questions
2
votes
1 answer

Install SimpleElastix for Python3 on macOS

I am using macOS Sierra 10.12.6, trying to install the SimpleElastix extension of SimpleITK. I have been following the instructions here. After I got it to work, it turned out the extension seems to be only included in SimpleITK when I use Python…
TomD
  • 21
  • 2
2
votes
3 answers

Compute symmetric surface distances [Python]

I want to compute surface distance metrics between 2 binary objects, aka segmentations of liver tumors. I am looking to compute: Average symmetric surface distance Root mean square symmetric distance Hausdorff distance (also known as maximum…
RMS
  • 1,350
  • 5
  • 18
  • 35
2
votes
1 answer

sitk.GetArrayFromImage returns empty numpy array?

I am working with 3D MR image data. In order to calculate the histogram, I converted from sitk.Image to an numpy arrray of dimension 3. While I am able to display each axial slice using matplotlib, the numpy array is completely empty in all three…
DottedGlass
  • 335
  • 3
  • 11
2
votes
2 answers

Error reading mhd files with SimpleITK in Python

I'm here again with another question regarding SimpleITK in python. I want to plot a .mhd image but I don't know how. I'm trying the function described here Reading *.mhd/*.raw format in…
user
  • 87
  • 1
  • 10
2
votes
1 answer

sudo easy_install for SimpleITK not that easy

So... I've tried several ways to download SimpleITK (pip install) on Python but it's not working at all! (Here: SimpleITK python 2.7.12 installation issue) Now I'm using easy_install and I get this error: Searching for simpleitk Reading…
user
  • 87
  • 1
  • 10
2
votes
2 answers

SimpleITK Selectively Alter Pixels / Slicing

I've loaded a CT scan in SimpleITK. I'd like to do a few things that are pretty simple in NumPy, but haven't figured out how to do them in SimpleITK. I'd like to do them in SimpleITK for speed. # NumPy: Changes all values of 100 to now become…
Authman Apatira
  • 3,994
  • 1
  • 26
  • 33
1
vote
0 answers

SimpleITK ImportError with fresh conda env

I have been having an issue installing SimpleITK>2.2. Fully reinstalled miniconda and I am still having issues. However, it works for SimpleITK<=2.1.1.1 Not sure what the issue is, but I’ve never had this sort of issue before. Not sure if it’s a…
krolic
  • 51
  • 2
1
vote
1 answer

Images sizes not matched when downsampling then upsampling images

I am trying to downsample an image (for speed), run prediction, then upsample it back. Due to rounding, I get mismatches with the original image size for some pixel dimensions/voxel sizes. What is the best way to handle this? Forward…
illan
  • 163
  • 1
  • 13
1
vote
2 answers

SimpleITK Filtering with sitk.ConnectedThresholdImageFilter() wrong output

I have tried many things to segment gray_matter, white_matter and cs_fluid images using sitk.ConnectedThresholdImageFilter(). unfortunately, I couldn't. Please, let me know what I am doing wrong. Here is the example code: data_dir = "
Burak
  • 29
  • 1
  • 9
1
vote
2 answers

read nifti files 3d slicer vs other methods

I have some nii.gz files which, when I open using imajeJ , or any python library such as SimpleITK or Monai I get a stack of MRI images, as if taken from top to bottom. That being said, when I open the same file with slicer, I also get a stack of…
Iliasp
  • 143
  • 8
1
vote
1 answer

SimpleITK Python apply BinaryMorphologicalClosingImageFilter to a TIFF image

I am trying to apply a BinaryMorphologicalClosingImageFilter to a binary TIFF image to fill empty spaces between structures (where ImageJ Fill Holes doesn't help). Here is the code I use: import SimpleITK as sitk #Import TIFF image image =…
Chris
  • 33
  • 4
1
vote
0 answers

How to read a Multiframe Dicom file and display it as video using an UI

I am looking to find a way to read a DICOM file and display the multi frame DICOM file as a video in an UI, I tried reading the multi frame DICOM file using pydicom and I was able to get each frame and appended it into a list and I created a gif out…
RonKing
  • 31
  • 3
1
vote
1 answer

3D Image co-registration between multiple subjects

When preforming image co-registration of multiple subjects, how should we select the reference image? Can a randomly selected image form one dataset could be the reference image for an image from the other dataset? If we do that, should all the…
Dushi Fdz
  • 161
  • 3
  • 22
1
vote
1 answer

SimpleITK.Show() generates error in ImageJ on Macbook

I'm struggling with imagej on Jupyter. This is part of the code that i'm running: def ImageGen(a,b,x_0,y_0, sigma_x, sigma_y, theta ): g=GaussianFunc(x_0,y_0,sigma_x,sigma_y,theta) g2=sitk.GetImageFromArray(g) res=a*g2+b if…
1
vote
2 answers

Skull stripping with python/simpleITK

I'm trying to perform a skull stripping with simpleITK in python. I'm using the StripTsImageFilter function as follows: #upload data # Path of nii img path = r'C:\Users\Kate\Jupyter\DataThesis\PROGRESSION\0003\fet.nii.gz' # Read the .nii image with…
Kate
  • 13
  • 3
1 2
3
14 15