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
1 answer

Can not "link"SimpleITK::Show() with FIJI

I am running on Ubuntu. When calling the Show method of SimpleITK I am not being able to view such image in my FIJI ( ImageJ2) window. Given that FIJI is a portable application, is it necessary to perform some more process in order to properly link…
Francisco Cunha
  • 355
  • 1
  • 4
  • 14
1
vote
1 answer

Image Registration accuracy evaluation (Hausdroff distance) using SimpleITK without segmenting the image

I have registered two images, let's say fixed and moving are Registered. After registration I want to measure overlap ratio etc. The SimpleITK has overlap measure filters and to use overlap_measures_filter.Execute(fixed, moving) and…
Subhajit
  • 43
  • 9
1
vote
2 answers

How to implement model-to-image registration in SimpleITK?

I installed SimpleITK for medical image registration. It works very well for 3D CT/CT and 3D CT/MRI image registration. Now I want to implement model/image registration. The model is a sphere. In ITK there are Spatial Objects like Box, Ellipse which…
David Lau
  • 11
  • 1
1
vote
2 answers

How to extract labels from a Binary Image in SimpleITK in python

I would like to extract the labels from the 2D Binary image I get using the following code: image2DThresh = sitk.Threshold(image2D, lower=stats.GetMinimum(), upper=127.500) cca = sitk.ConnectedComponentImageFilter() cca_image =…
Rick M.
  • 3,045
  • 1
  • 21
  • 39
1
vote
2 answers

How to use SimpleElastix as a reference of a new C# project?

I git clone SimpleElastix [1] project from https://github.com/kaspermarstal/SimpleElastix, and built and compiled it successfully on my PC. The WRAP_CSHARP option was set in CMAKE. I would like to use this project as a reference/framework to…
Siming
  • 11
  • 1
1
vote
2 answers

simpleITK with anaconda python

I am trying to install simpleITK on my macbook which has mavericks running on it. I have installed Anaconda python. When I try to import SimpleITK as sitk, I get the following error import SimpleITK as sitk Traceback (most recent call last): …
1
vote
2 answers

Display a Simpleitk image in a picture Box

I want to read a dicom or png image with simpleitk in a C# program and display the result in a pictureBox. I understand that picture Box allow only "system.drawing.image" and not itk. Is there a way to do it. Her is my code : OpenFileDialog fd =…
user2827482
  • 199
  • 1
  • 2
  • 9
0
votes
1 answer

How to decide the value of the sigma value to use for the SimpleITK Filter: SmoothingRecursiveGaussianImageFilter depending on the voxel size?

I am using a code similar to this example in order to smooth voxel volume data (so from a CTA scan): https://examples.itk.org/src/filtering/smoothing/computessmoothingwithgaussiankernel/documentation and wondering, what sigma value to use? Does it…
0
votes
1 answer

Simple ITK slicing on coronal direction ends up with an upside down image?

SimpleITK version '2.2.0'. Python version 3.9.3 Numpy version 1.24.2 I was using SimpleITK to read in an image and then slicing it on different direction. For example, the image is 'image.mhd', I read it in as: image =…
0
votes
0 answers

The execution of SimpleITK's STAPLE algorithm gets stuck in certain cases

I am running the STAPLE algorithm to ensemble 9 segmentations from several models (each segmentation has 3 labels (1,2,3) and the background (0)), but it is getting stuck in some cases (specifically 2 cases). I wonder if someone is having the same…
0
votes
0 answers

SimplyITK Size must be specified when trying to run N4BiasFieldCorrection

I am working on trying to get this function working in python, but i get Size must be specified error. # if input img is numpy array convert to sitk Image try: img_in = sitk.GetImageFromArray(img) except: img_in = img #…
JRowan
  • 6,824
  • 8
  • 40
  • 59
0
votes
0 answers

Change Direction of an image to match a reference, and obtain Origin, without changing the original voxel spacing

I apologize and thank you Ori I will have to edit my question since I wasn't so clear. What I try to do is to calculate the new origin for new direction. The images belong to the same patient, same study, T2 and ADC. import SimpleITK as…
HarryKa
  • 1
  • 1
0
votes
0 answers

SimpleITK copy headers/metadata to align segmentation with image

I am trying to copy all the metadata/header information from one image to another. I have a segmentation (original_image) that when I overlap it with the MRI image it comes from it overlaps as expected (comparing it in 3D Slicer, for instance). I…
0
votes
2 answers

Where do i get SimpleITK JNI Lib?

using intellij in windows and i'm getting this error: java.lang.UnsatisfiedLinkError: no SimpleITKJava in java.library.path reading this tutorial: https://itk.org/Wiki/SimpleITK/GettingStarted/A_visual_guide_to_SimpleITK_in_Java i find a…
Salu Ramos
  • 13
  • 3
0
votes
0 answers

no SimpleITKJava in java.library.path with intellij

i am trying to use simpleitk with java. already setup pom.xml and maven works with no error or warning. i can even import simpleitk in my scripts and run without problems. when trying to make something a little bit more complex, i bumped…