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
1
vote
3 answers

How to adjust the viewing window of .mhd file to get a better look at medical images?

I load some .mdh and .raw files for medical images, but one thing bothers me. I understand that in .dicom file, you can convert pixel intensity to HU by using rescale.slope and rescale.intercept, which .mhd file fail to include. Therefore, I am…
yujuezhao
  • 1,015
  • 3
  • 11
  • 21
1
vote
2 answers

SimpleITK.ImageFileWriter in Python has no method "SetImageIO" but C++ docs say it has

I'm using SimpleITK for Python and have created an empty image using NumPy as follows: import SimpleITK as sitk import numpy as np pixels = np.zeros((64, 64)) image = sitk.GetImageFromArray(pixels) Then, when I try to write the image to file in…
Ralph
  • 151
  • 11
1
vote
1 answer

SimpleITK not working with any data type, be it 3D or 2D

I'm using SimpleITK to load in a layered tiff image, its a volumetric image having 30 planes/slices. After playing around a lot with skimage and imageio Ive found out that SimpleITK is the best way to handle volumetric images but the problem is that…
StuckInPhDNoMore
  • 2,507
  • 4
  • 41
  • 73
1
vote
1 answer

Why doesn't SimpleITK display image with imageJ?

I am new in ITK. I wrote a small program to read image using sitk and display the image using imageJ. import os import SimpleITK as sitk pathDicom = 'C://Users//clouds.png' input = sitk.ReadImage(pathDicom) sitk.Show( input , debugOn=True) To link…
Hari
  • 111
  • 1
  • 1
  • 8
1
vote
1 answer

Get Matrix and Translation from a SimpleITK transform

I am reading an ITK transform from a file. I cannot figure out the API for getting the Translation or the Matrix directly from the transform. t = sitk.ReadTransform('sample_transform.h5') print(t) Here is the result of…
mehrtash
  • 910
  • 3
  • 9
  • 16
1
vote
1 answer

Registering non-isotropic CT scans with different field of view

I am very new to medical image registration. I am trying to register two CT volumes, the first is axial with size of (384,384,31) and spacing of (0.57,0.57,4.8) and the second is a sagittal scan with size of (384,384,15) and spacing (0.67,0.67,2.2)…
1
vote
1 answer

GUI module not found

I'm trying to run the following code: # To use interactive plots (mouse clicks, zooming, panning) we use the nbagg back end. We want our graphs # to be embedded in the notebook, inline mode, this combination is defined by the magic "%matplotlib…
Damian
  • 11
  • 3
1
vote
0 answers

SimpleITK, Can't open image Viewer even if Environmental Variable si linke

I want to make Slicer my default Image viewer for SimpleITK. My Environmental Variable looks like this : SITK_SHOW_COMMAND=C:\Program Files\Slicer 4.8.1\Slicer.exe But i get this Error Message: sitk.Show(y, "image", debugOn=True) File…
Simon
  • 11
  • 2
1
vote
1 answer

SimpleITK - Manipulating pixel of the buffer image

I am currently using SimpleITK libraries for manipulating 3d images. I have been able to read my .mhd meta image and perform thresholding, erotion, dilation, etc. The input image is 3D image (or stacked 2D images) with one component per pixel. Now I…
Tompel
  • 23
  • 2
1
vote
1 answer

simple-itk: reading a sequence from a single tiff file

I've got a tif file which contains a series of images. It is a 3D volume of pixels, produced by a CT-scan. But after reading the image with simple-itk, there is only a single layer: reader =…
lhk
  • 27,458
  • 30
  • 122
  • 201
1
vote
1 answer

Catch warnings during registration with simpleITK (python)

I'm performing image registration with simpleITK (python) using ImageRegistrationMethod.Execute() approach. The purpose is to collect some statistics of the image registration process (e.g. find out when it succeeds and when it fails), so I…
Hennadii Madan
  • 1,573
  • 1
  • 14
  • 30
1
vote
1 answer

How to get Meta data of Dicom image in SimpleITK using Python

I recently started using SimpleITK to modify some Dicom images. I am however unable to modify the meta data. As a matter of fact I can't even access it. I know thanks to a script i found here:…
ThaNoob
  • 520
  • 7
  • 23
1
vote
1 answer

SimpleITK::ERROR: Error in administrating child process: [No such file or directory]

My Python Code is: import SimpleITK as sitk resultImage = sitk.Elastix(sitk.ReadImage("fixedImage.nii"), \ sitk.ReadImage("movingImage.nii"), \ "translation") sitk.Show(resultImage, 'test',…
dieKoderin
  • 1,552
  • 3
  • 19
  • 39
1
vote
1 answer

Why is ConnectedThresholdImageFilter class not labeling pixels within threshold?

I am trying to use the ConnectedThresholdImageFilter class to segment the "C" looking white region of a binary image ('slice87.jpg'). The idea was to pick a seed value that was lies within the region and only add neighboring pixels that also have an…
DottedGlass
  • 335
  • 3
  • 11
1
vote
1 answer

Python - Write a three dimensional image from 3D array

I'm trying to obtain an image from 3D array and convert it to TIF 3D. I'm using simple ITK but it doesn't work. I obtain this error message : 'in method 'WriteImage', argument 1 of type 'itk::simple::Image const &' Here's my code: import numpy as…
user3601754
  • 3,792
  • 11
  • 43
  • 77