# Beginner Questions

**URL:** https://discourse.itk.org/c/beginner-questions/9.md?no_subcategories=false&page=21

[Latest](https://discourse.itk.org/latest.md) · [Categories](https://discourse.itk.org/categories.md) · [Tags](https://discourse.itk.org/tags.md)

**Page:** 22

---

## [Bilinear interpolation behavior SimpleITK](https://discourse.itk.org/t/bilinear-interpolation-behavior-simpleitk/4123)

<div class="topic-metadata">

**Author:** [@nhjnhjnhj](https://discourse.itk.org/u/nhjnhjnhj)\
**Replies:** 2\
**Last updated:** [May 12, 2021, 12:59pm UTC](https://discourse.itk.org/t/bilinear-interpolation-behavior-simpleitk/4123 "2021-05-12T12:59:07Z")

</div>

Hi, This code bilinear\_inter.py · GitHub compares how linear interpolation is implemented in opencv, pytorch and simpleitk libraries. The input array is: \[\[1, 2\], \[3, 4\]\] The output of this script is the following: …

---

## [Visualize registered images?](https://discourse.itk.org/t/visualize-registered-images/4114)

<div class="topic-metadata">

**Author:** [@Aya\_Hassan](https://discourse.itk.org/u/Aya_Hassan)\
**Replies:** 3\
**Last updated:** [May 10, 2021, 7:38pm UTC](https://discourse.itk.org/t/visualize-registered-images/4114 "2021-05-10T19:38:56Z")

</div>

I want to visualize the two registered images to show more details … How can I do that?

---

## [long run-time issues medical image registration](https://discourse.itk.org/t/long-run-time-issues-medical-image-registration/2811)

<div class="topic-metadata">

**Author:** [@moeez](https://discourse.itk.org/u/moeez)\
**Replies:** 26\
**Last updated:** [March 13, 2020, 9:12am UTC](https://discourse.itk.org/t/long-run-time-issues-medical-image-registration/2811 "2020-03-13T09:12:04Z")

</div>

Hello, I am a beginner at coding in python and using Simple ITK. I am doing a non-rigid registration of 2 set of CT from differents patients and I am facing severals issues… The first one is the error : “Failed to all…

---

## [Save parameters for N4 bias field correction](https://discourse.itk.org/t/save-parameters-for-n4-bias-field-correction/3530)

<div class="topic-metadata">

**Author:** [@federico\_nemmi](https://discourse.itk.org/u/federico_nemmi)\
**Replies:** 3\
**Last updated:** [October 23, 2020, 12:31pm UTC](https://discourse.itk.org/t/save-parameters-for-n4-bias-field-correction/3530 "2020-10-23T12:31:31Z")

</div>

Hi, I have acquired a 6 points MRI Dixon sequence from which I have derived Water, Fat and Fat Fraction images. Since the derived images all come from the same original sequence, they all share the same field bias (at le…

---

## [itk-snap build from source needs older versions of ITK](https://discourse.itk.org/t/itk-snap-build-from-source-needs-older-versions-of-itk/4103)

<div class="topic-metadata">

**Author:** [@colinbannister](https://discourse.itk.org/u/colinbannister)\
**Replies:** 2\
**Last updated:** [May 6, 2021, 2:24pm UTC](https://discourse.itk.org/t/itk-snap-build-from-source-needs-older-versions-of-itk/4103 "2021-05-06T14:24:12Z")

</div>

Trying to build ITK-snap from source, as binaries do not run on our system. Looking at guide at BuildingITK-SNAP, it specifies versions of ITK that are needed. I have version 4.13.1 and 4.13.3, but not the actual versio…

---

## [Apply Demons transformation onto an image.](https://discourse.itk.org/t/apply-demons-transformation-onto-an-image/4094)

<div class="topic-metadata">

**Author:** [@eyalol](https://discourse.itk.org/u/eyalol)\
**Replies:** 3\
**Last updated:** [May 4, 2021, 12:58pm UTC](https://discourse.itk.org/t/apply-demons-transformation-onto-an-image/4094 "2021-05-04T12:58:35Z")

</div>

Hello, This is my first time using SimpleITK, I’m interested in using the Demons registration algorithm, I’m using the python version of this: DemonsRegistration1 — SimpleITK 2.0rc2 documentation after applying the alg…

---

## [How to get output of HoughTransform2DLinesImageFilter() ?](https://discourse.itk.org/t/how-to-get-output-of-houghtransform2dlinesimagefilter/4059)

<div class="topic-metadata">

**Author:** [@YMarth](https://discourse.itk.org/u/YMarth)\
**Replies:** 7\
**Last updated:** [May 4, 2021, 3:00am UTC](https://discourse.itk.org/t/how-to-get-output-of-houghtransform2dlinesimagefilter/4059 "2021-05-04T03:00:51Z")

</div>

I am trying to use Hough Lines transform on some iage with itk on python (spyder). I used the given example here: How to deal with HoughTransform2DLinesImageFilter GetLines() method in python - Beginner Questions - ITK …

---

## [(coarse) point set registration in python](https://discourse.itk.org/t/coarse-point-set-registration-in-python/4044)

<div class="topic-metadata">

**Author:** [@Johannes](https://discourse.itk.org/u/Johannes)\
**Replies:** 3\
**Last updated:** [May 3, 2021, 8:39pm UTC](https://discourse.itk.org/t/coarse-point-set-registration-in-python/4044 "2021-05-03T20:39:06Z")

</div>

Hey there! I am a young researcher-to-be and I am currently working on my bachelor’s thesis. The problem, because of which I reach out to you, boils down to a point set registration of one xy and one xyz image with litt…

---

## [FastSymmetricForcesDemonsRegistrationFilter.SetUseImageSpacing() not working?](https://discourse.itk.org/t/fastsymmetricforcesdemonsregistrationfilter-setuseimagespacing-not-working/4080)

<div class="topic-metadata">

**Author:** [@Arthur\_Masson](https://discourse.itk.org/u/Arthur_Masson)\
**Replies:** 3\
**Last updated:** [April 27, 2021, 5:16pm UTC](https://discourse.itk.org/t/fastsymmetricforcesdemonsregistrationfilter-setuseimagespacing-not-working/4080 "2021-04-27T17:16:26Z")

</div>

It seems that FastSymmetricForcesDemonsRegistrationFilter.SetUseImageSpacing() does not work, I get the same result when setting it to True or False, and same thing with FastSymmetricForcesDemonsRegistrationFilter.UseIm…

---

## [Display displacement field with SimpleITK](https://discourse.itk.org/t/display-displacement-field-with-simpleitk/4078)

<div class="topic-metadata">

**Author:** [@Arthur\_Masson](https://discourse.itk.org/u/Arthur_Masson)\
**Replies:** 6\
**Last updated:** [April 27, 2021, 2:54pm UTC](https://discourse.itk.org/t/display-displacement-field-with-simpleitk/4078 "2021-04-27T14:54:02Z")

</div>

How could I display a displacement field (in physical space) with arrows on an image slice with SimpleITK ? I tried using quiver in matplotlib, but I had troubles with the physical to voxel space conversions. Is there …

---

## [inter-patient Registration](https://discourse.itk.org/t/inter-patient-registration/4063)

<div class="topic-metadata">

**Author:** [@Michel\_Atieh](https://discourse.itk.org/u/Michel_Atieh)\
**Replies:** 5\
**Last updated:** [April 26, 2021, 6:04pm UTC](https://discourse.itk.org/t/inter-patient-registration/4063 "2021-04-26T18:04:09Z")

</div>

Dear All, I have two CT scans, one is truncated it has only part of the abdomen and the thorax, the other one is of the whole body. Whenever I try to do the registration the resulting image is a truncated image whether…

---

## [Could not run basic example code from ITK Resample Image filter](https://discourse.itk.org/t/could-not-run-basic-example-code-from-itk-resample-image-filter/4071)

<div class="topic-metadata">

**Author:** [@fonis](https://discourse.itk.org/u/fonis)\
**Replies:** 1\
**Last updated:** [April 26, 2021, 8:57pm UTC](https://discourse.itk.org/t/could-not-run-basic-example-code-from-itk-resample-image-filter/4071 "2021-04-26T20:57:20Z")

</div>

Using ITK v5.2. The basic resample filter example fails. Error: “Requested region is (at least partially) outside the largest possible region.” The code below is basically a cleaned up version of ResampleImageFilter.c…

---

## [Jacobian determinant](https://discourse.itk.org/t/jacobian-determinant/4060)

<div class="topic-metadata">

**Author:** [@Fleur](https://discourse.itk.org/u/Fleur)\
**Replies:** 4\
**Last updated:** [April 26, 2021, 7:59pm UTC](https://discourse.itk.org/t/jacobian-determinant/4060 "2021-04-26T19:59:56Z")

</div>

Dear all, I’m trying to compute the Jacobian Determinant of a deformation field. The transformation and its deformation field were not computed with simple ITK. I simply applied sitk.DisplacementFieldJacobianDeterminan…

---

## [Nifti: ImageFileReader + ImageFileWriter changes orientation matrix](https://discourse.itk.org/t/nifti-imagefilereader-imagefilewriter-changes-orientation-matrix/4064)

<div class="topic-metadata">

**Author:** [@crossmanith](https://discourse.itk.org/u/crossmanith)\
**Replies:** 3\
**Last updated:** [April 26, 2021, 12:48pm UTC](https://discourse.itk.org/t/nifti-imagefilereader-imagefilewriter-changes-orientation-matrix/4064 "2021-04-26T12:48:22Z")

</div>

Hi, I’m reading a Nifti File and writing it back without applying any other filter: using ReaderType = itk::ImageFileReader; ReaderType::Pointer in=ReaderType::New(); in-\>SetFileName( ifname ); in-\>Update(); using …

---

## [Get path of the mhd's data file](https://discourse.itk.org/t/get-path-of-the-mhds-data-file/4049)

<div class="topic-metadata">

**Author:** [@reox](https://discourse.itk.org/u/reox)\
**Replies:** 6\
**Last updated:** [April 22, 2021, 1:32pm UTC](https://discourse.itk.org/t/get-path-of-the-mhds-data-file/4049 "2021-04-22T13:32:10Z")

</div>

I use MetaImage files (mhd) a lot and sometimes need the path of the data file. Usually, I have the file loaded via SimpleITK already. Thus, is there a way to retrieve the name of the data file from the python interface …

---

## [How lightweight can this software be? (Plus few other questions...)](https://discourse.itk.org/t/how-lightweight-can-this-software-be-plus-few-other-questions/4051)

<div class="topic-metadata">

**Author:** [@JamesBrown57](https://discourse.itk.org/u/JamesBrown57)\
**Replies:** 1\
**Last updated:** [April 20, 2021, 5:50pm UTC](https://discourse.itk.org/t/how-lightweight-can-this-software-be-plus-few-other-questions/4051 "2021-04-20T17:50:47Z")

</div>

How lightweight can this software be until it loses all main functionality? For example, if I were to find an implementation of ITK (a library) within an application/software that processes pictures of tree roots to det…

---

## [How to set the "Method" in ThresholdImageFilter in sitk](https://discourse.itk.org/t/how-to-set-the-method-in-thresholdimagefilter-in-sitk/4053)

<div class="topic-metadata">

**Author:** [@Floowey](https://discourse.itk.org/u/Floowey)\
**Replies:** 2\
**Last updated:** [April 20, 2021, 5:18pm UTC](https://discourse.itk.org/t/how-to-set-the-method-in-thresholdimagefilter-in-sitk/4053 "2021-04-20T17:18:19Z")

</div>

Hello, I’m trying to work my way around the ThresholdImageFilter class. My goal is to “cap” the image at some lower and upper bound (lb, ub). Everything below lb shall be set to lb and everything above ub shall be set t…

---

## [Issue with reading mhd image file](https://discourse.itk.org/t/issue-with-reading-mhd-image-file/4038)

<div class="topic-metadata">

**Author:** [@spb](https://discourse.itk.org/u/spb)\
**Replies:** 4\
**Last updated:** [April 17, 2021, 6:28am UTC](https://discourse.itk.org/t/issue-with-reading-mhd-image-file/4038 "2021-04-17T06:28:19Z")

</div>

Hi, I am reading mhd image file in python using SimpleITK as follows. sitkimage = sitk.ReadImage(mhdFile) The issue is, after reading image, size is changed. Original Image (width, height, depth) → (1024, 512, 128) …

---

## [How to upsample two coregistered images ?](https://discourse.itk.org/t/how-to-upsample-two-coregistered-images/4025)

<div class="topic-metadata">

**Author:** [@Hugo](https://discourse.itk.org/u/Hugo)\
**Replies:** 10\
**Last updated:** [April 15, 2021, 12:51pm UTC](https://discourse.itk.org/t/how-to-upsample-two-coregistered-images/4025 "2021-04-15T12:51:10Z")

</div>

Hello, I have two images 1 PET and 1 MRI that are perfectly aligned (they are acquired simultaneously). MRI shape is (512, 512, 1312) PET shape is (192, 192, 566) I would like to upsample the PET image so it matches …

---

## [No module named '\_SimpleITK' after installing SimpleElastix #424](https://discourse.itk.org/t/no-module-named-simpleitk-after-installing-simpleelastix-424/4022)

<div class="topic-metadata">

**Author:** [@Fleur](https://discourse.itk.org/u/Fleur)\
**Replies:** 3\
**Last updated:** [April 13, 2021, 12:26pm UTC](https://discourse.itk.org/t/no-module-named-simpleitk-after-installing-simpleelastix-424/4022 "2021-04-13T12:26:10Z")

</div>

Dear all, I apologize in advance if this forum is the wrong place to raise this issue, which is more related to SimpleElastix than simpleITK. I did not get any answer from the SimpleElastix community, so I’m trying here…

---

## [large size when saving image using SimpleITK WriteImage](https://discourse.itk.org/t/large-size-when-saving-image-using-simpleitk-writeimage/3509)

<div class="topic-metadata">

**Author:** [@ibr](https://discourse.itk.org/u/ibr)\
**Replies:** 2\
**Last updated:** [April 12, 2021, 3:30pm UTC](https://discourse.itk.org/t/large-size-when-saving-image-using-simpleitk-writeimage/3509 "2021-04-12T15:30:28Z")

</div>

Dear all, when I save image using SimpleITK the file size are larger than the one are saved using in 3D Slicer e.g. imoprt SimpleITK as sitk img = sitk.ReadImage("imageFilename.nii.gz") img = sitk.Cast(img, sitk.sitkIn…

---

## [How to get a smoother region combining all the islands of my segmentationmask?](https://discourse.itk.org/t/how-to-get-a-smoother-region-combining-all-the-islands-of-my-segmentationmask/4026)

<div class="topic-metadata">

**Author:** [@unicorn](https://discourse.itk.org/u/unicorn)\
**Replies:** 2\
**Last updated:** [April 12, 2021, 4:09am UTC](https://discourse.itk.org/t/how-to-get-a-smoother-region-combining-all-the-islands-of-my-segmentationmask/4026 "2021-04-12T04:09:08Z")

</div>

As shown here, I have multiple components of small regions. I don’t want to remove any islands. But I want to combine all of them into a single region. I have been using SimpleITK for a while and tried various hole fi…

---

## [MultiLabelSTAPLEImageFilter does not work](https://discourse.itk.org/t/multilabelstapleimagefilter-does-not-work/4003)

<div class="topic-metadata">

**Author:** [@Fleur](https://discourse.itk.org/u/Fleur)\
**Replies:** 2\
**Last updated:** [April 6, 2021, 5:03pm UTC](https://discourse.itk.org/t/multilabelstapleimagefilter-does-not-work/4003 "2021-04-06T17:03:56Z")

</div>

Dear all, I’m trying to use MultiLabelSTAPLEImageFilter to combine several segmentations. However, when I run the code, nothing happens. The code seems to be running for hours, and calling ctrl + C to stop it does not …

---

## [How to install an earlier release of ITK](https://discourse.itk.org/t/how-to-install-an-earlier-release-of-itk/4013)

<div class="topic-metadata">

**Author:** [@arswitze](https://discourse.itk.org/u/arswitze)\
**Replies:** 3\
**Last updated:** [April 6, 2021, 12:49pm UTC](https://discourse.itk.org/t/how-to-install-an-earlier-release-of-itk/4013 "2021-04-06T12:49:59Z")

</div>

Hello, I am trying to use a tool called PETPVC which requires the insight toolkit. I built and installed ITK version 5.1 on MacOSX15, however, I am unable to build PETPVC in Cmake because of a missing CylinderSpatialObj…

---

## [Split/Crop 3d Image slices into 3d small objects.](https://discourse.itk.org/t/split-crop-3d-image-slices-into-3d-small-objects/4001)

<div class="topic-metadata">

**Author:** [@Ali009](https://discourse.itk.org/u/Ali009)\
**Replies:** 1\
**Last updated:** [April 1, 2021, 1:31pm UTC](https://discourse.itk.org/t/split-crop-3d-image-slices-into-3d-small-objects/4001 "2021-04-01T13:31:19Z")

</div>

Hi. I have grayscale images 720x720x300(image size where 300 slices of 3d image). To generate more examples from available data i cropped the images into multiple small objects. But i just use WxH and i need Z too. I don…

---

## [JPEG 2000 Part 2 and Multicomponent images](https://discourse.itk.org/t/jpeg-2000-part-2-and-multicomponent-images/3994)

<div class="topic-metadata">

**Author:** [@agirault](https://discourse.itk.org/u/agirault)\
**Replies:** 3\
**Last updated:** [April 1, 2021, 8:32am UTC](https://discourse.itk.org/t/jpeg-2000-part-2-and-multicomponent-images/3994 "2021-04-01T08:32:07Z")

</div>

I’m attempting to generate test DICOM data in all the supported transfer syntaxes that PACS systems could send to a service consuming DICOM: http://dicom.nema.org/medical/dicom/current/output/chtml/part18/sect\_8.7.3.htm…

---

## [Reading 2d png image stack to 3d volume rendering](https://discourse.itk.org/t/reading-2d-png-image-stack-to-3d-volume-rendering/3914)

<div class="topic-metadata">

**Author:** [@Saptarshi\_Paul](https://discourse.itk.org/u/Saptarshi_Paul)\
**Replies:** 3\
**Last updated:** [March 29, 2021, 1:40pm UTC](https://discourse.itk.org/t/reading-2d-png-image-stack-to-3d-volume-rendering/3914 "2021-03-29T13:40:16Z")

</div>

Hello Everyone, I am new to itk.js and volume rendering as a whole. I was able to create a 3d volume from 2d png image stack in vtk python. Now i want to run the same thing in vtk.js and use itk.js to read the image sta…

---

## [Writing dicom file through using ImageSeriesReader](https://discourse.itk.org/t/writing-dicom-file-through-using-imageseriesreader/2563)

<div class="topic-metadata">

**Author:** [@tatsuaki](https://discourse.itk.org/u/tatsuaki)\
**Replies:** 5\
**Last updated:** [March 29, 2021, 12:32pm UTC](https://discourse.itk.org/t/writing-dicom-file-through-using-imageseriesreader/2563 "2021-03-29T12:32:14Z")

</div>

Hi, please help. I cannot write correctly dicom. I did following step, # load L40t1 = "path/to/dcm image dir" series\_IDsT1 = sitk.ImageSeriesReader.GetGDCMSeriesIDs(L40t1) if not series\_IDsT1: print("ERROR: given …

---

## [SimpleITK Image registration 4.13 vs 5.1](https://discourse.itk.org/t/simpleitk-image-registration-4-13-vs-5-1/3649)

<div class="topic-metadata">

**Author:** [@Nick\_Rubert](https://discourse.itk.org/u/Nick_Rubert)\
**Replies:** 8\
**Last updated:** [March 25, 2021, 9:19pm UTC](https://discourse.itk.org/t/simpleitk-image-registration-4-13-vs-5-1/3649 "2021-03-25T21:19:31Z")

</div>

Hi message board, I’ve got some code running in SimpleITK v4.13.1 that I would like to make compatible with SimpleITK 5.1.1. (This is old code that I’m updating to run with Ubuntu 20.0 and the default SimpleITK version …

---

## [Crash on calling ImageFileReader::New() MSVS 2019](https://discourse.itk.org/t/crash-on-calling-imagefilereader-new-msvs-2019/3984)

<div class="topic-metadata">

**Author:** [@ljubak](https://discourse.itk.org/u/ljubak)\
**Replies:** 2\
**Last updated:** [March 25, 2021, 3:32pm UTC](https://discourse.itk.org/t/crash-on-calling-imagefilereader-new-msvs-2019/3984 "2021-03-25T15:32:13Z")

</div>

Hello everyone! I have recently compiled ITK on Windows 7 using Community MSVS 2019. Now I am trying to get myself acquainted with ITK and I am trying out to compile the first examples. And immediately I run into a prob…

[Previous page](https://discourse.itk.org/c/beginner-questions/9.md?no_subcategories=false&page=20)

[Next page](https://discourse.itk.org/c/beginner-questions/9.md?no_subcategories=false&page=22)
