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
7
votes
3 answers

Where can I find the SimpleITK documentation and reference information?

I am interested in trying to use SimpleITK to solve my imaging problem. Can you please tell me where the documentation and training materials are?
Hans
  • 506
  • 3
  • 10
7
votes
3 answers

How can I make the composite of two images in OpenCV with Python?

I have one image that remains unchanged and another image which is the first one, but with a filter applied on it. I want to create the third image which should be the composite of these first two images. I know that in MATLAB there is a function…
drgs
  • 117
  • 1
  • 10
6
votes
0 answers

Is there a faster way to resize/resample 3d volumes other than scipy.ndimage.zoom?

I know there is a function scipy.ndimage.zoom to resize\resample 3D volumes, but that is for numpy.array and it is notoriously slow. Therefore, I use ResampleImageFilter from SimpleITK instead. I think base on C++ simpleitk work much faster. BUT…
yujuezhao
  • 1,015
  • 3
  • 11
  • 21
5
votes
2 answers

SimpleITK Resize images

I have a set o 3D volumes that I am reading with SimpleITK import SimpleITK as sitk for filename in filenames: image = sitk.ReadImage(filename) Each of the volumes has different size, spacing, origin and direction. This code yields different…
5
votes
3 answers

SimpleITK.Show() generates error in ImageJ on Linux

EDIT NOTE: This question was originally phrased as How to link SimpleITK.Show() to imageJ in linux? By upgrading SimpleITK 1.0.0 to 1.0.1, I was able to launch ImageJ from SimpleITK.Show(). However, ImageJ is unable to open "sample_mri.hdr". ImageJ…
DottedGlass
  • 335
  • 3
  • 11
4
votes
1 answer

What is the fastest and easiest way to resample a set of CT scans to same pixel spacing and volume size?

I have to train a neural net for semantic segmentation of kidney and his tumor, starting from the dataset available from the kiTS 19 Challenge. In this dataset, I have 100 CT scans for the training set, with a great variety in terms of size and…
4
votes
1 answer

Transform a third image w.r.t. the outcome of a registration

The Execute method of registration in SimpleElastix returns the registered (transformed) version moving image, but doesn't allow one to transform another image similarly. I have two CT-images and want to register based on the bones, therefore I…
Herbert
  • 5,279
  • 5
  • 44
  • 69
4
votes
3 answers

What direction do the DICOM instance numbers grow along?

By direction I mean for example from a patient's head to bottom or from his bottom to head. The CHEST CT scans I have seen so far indicates that Instance Number 1 slice is usually the first one down from the upper part of the body but I don't know…
user1206899
  • 1,564
  • 1
  • 11
  • 15
4
votes
1 answer

SimpleITK, read metadata without loading image array

I'm using SimpleITK to read MetaImage data. Sometimes I need to access only the metadata (which is stored in a key=value .mhd file) but the only way I found to do it is to call ReadImage which is pretty slow as it loads the whole array into…
filippo
  • 5,197
  • 2
  • 21
  • 44
4
votes
1 answer

SimpleITK - how to get maximum and minimum intensity in Image?

I have some DICOM images. I want to rescale them using IntensityWindowingImageFilter, but first, I need to know initial values of maximum and minimum intensities. Right now, I am building WPF UI, with which I want to have some sliders to allow user…
Paweł Mach
  • 705
  • 1
  • 11
  • 23
3
votes
1 answer

Decompress nifti medical image in gz format using python

I want to decompress a butch of nii.gz files in python so that they could be processed in sitk later on. When I decompress a single file manually by right-clicking the file and choosing 'Extract..', this file is then correctly interpreted by sitk (I…
Biba
  • 631
  • 9
  • 28
3
votes
2 answers

How to change the orientation of SimpleITK image in Python

I used this code to read a series for dicom images into python series_IDs = sitk.ImageSeriesReader.GetGDCMSeriesIDs(data_directory) series_file_names = sitk.ImageSeriesReader.GetGDCMSeriesFileNames(data_directory, series_IDs[0]) series_reader =…
S.EB
  • 1,966
  • 4
  • 29
  • 54
3
votes
1 answer

How to preserve UID while saving DICOM file using SimpleITK?

I am trying to read one single DICOM file using SimpleITK and save it somewhere else. I noticed that Series Instance UID changes regardless of the fact that I am explicitly setting it. How do I preserve the original UID? from pathlib import…
alex
  • 10,900
  • 15
  • 70
  • 100
3
votes
4 answers

DICOM Images read with GDCMSeriesFileNames or list of paths

I am using SimpleITK to analyse Dynamic PET Data. I have a folder with 148 * N images (with N the number of frames of my Dynamic PET) and I want to separate the images of each frames. Firstly, I created one subfolder for each frame with the…
3
votes
1 answer

3D Image Rotation Simple ITK Python

I'm trying to rotate a 3D-Image with Simple ITK. Here is my Code: imagetoresize is the original image. The size of the image is (512,512,149) targetimage = imagetoresize origin = imagetoresize.GetOrigin() targetimage =…
Noobie555
  • 33
  • 1
  • 4
1
2 3
14 15