# Beginner Questions

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

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

**Page:** 9

---

## [Positioning of CT volume for DRR generation](https://discourse.itk.org/t/positioning-of-ct-volume-for-drr-generation/6133)

<div class="topic-metadata">

**Author:** [@Vojtech\_Benda](https://discourse.itk.org/u/Vojtech_Benda)\
**Replies:** 2\
**Last updated:** [August 10, 2023, 2:25pm UTC](https://discourse.itk.org/t/positioning-of-ct-volume-for-drr-generation/6133 "2023-08-10T14:25:02Z")

</div>

Hello, I’m trying to generate DRR images from CT slices at certain angles (0°, 45°, 90°…). I’m using this C++ DRR example rewrote in Python: https://github.com/Vojtech-Benda/DRR\_generation/blob/main/drrGen.py I managed …

---

## [Pixel Representation](https://discourse.itk.org/t/pixel-representation/6129)

<div class="topic-metadata">

**Author:** [@mmeltsner](https://discourse.itk.org/u/mmeltsner)\
**Replies:** 4\
**Last updated:** [August 10, 2023, 8:41am UTC](https://discourse.itk.org/t/pixel-representation/6129 "2023-08-10T08:41:53Z")

</div>

Hi, I am reading in a dicom image via GDCM as unsigned short. The pixel representation of the imported dicom image is 0 (unsigned short). I confirmed that the component type and internal component types are USHORT. …

---

## [Question regarding masked registration with different shapes](https://discourse.itk.org/t/question-regarding-masked-registration-with-different-shapes/6127)

<div class="topic-metadata">

**Author:** [@kenrickmoke](https://discourse.itk.org/u/kenrickmoke)\
**Replies:** 1\
**Last updated:** [August 7, 2023, 12:37pm UTC](https://discourse.itk.org/t/question-regarding-masked-registration-with-different-shapes/6127 "2023-08-07T12:37:39Z")

</div>

Heya, I’m wondering how the sampling works when performing registration with masks. In the elastix manual its written its sufficient to provide a image for the fixed image when there is no severe noise in the moving im…

---

## [Centering an Image](https://discourse.itk.org/t/centering-an-image/6126)

<div class="topic-metadata">

**Author:** [@VHK](https://discourse.itk.org/u/VHK)\
**Replies:** 2\
**Last updated:** [August 4, 2023, 8:33am UTC](https://discourse.itk.org/t/centering-an-image/6126 "2023-08-04T08:33:44Z")

</div>

Hello, I have implemented the following code to move the center of gravity to the center of the image. The resulting image does not appear to be properly centered as expected. import itk import SimpleITK as sitk commo…

---

## [Transform DVF from one patient to another](https://discourse.itk.org/t/transform-dvf-from-one-patient-to-another/5976)

<div class="topic-metadata">

**Author:** [@RT\_newbie](https://discourse.itk.org/u/RT_newbie)\
**Replies:** 1\
**Last updated:** [August 2, 2023, 12:17pm UTC](https://discourse.itk.org/t/transform-dvf-from-one-patient-to-another/5976 "2023-08-02T12:17:11Z")

</div>

Hi I have a question regarding mapping DVFs from one patient to another. I have two different patients. My patient A has a DVF that I would like to bring to the other patient to deform the patient with this DVF. I reg…

---

## [Unit of Vectors in a Deformation/displacement Vector Field](https://discourse.itk.org/t/unit-of-vectors-in-a-deformation-displacement-vector-field/6101)

<div class="topic-metadata">

**Author:** [@RT\_newbie](https://discourse.itk.org/u/RT_newbie)\
**Replies:** 2\
**Last updated:** [August 1, 2023, 8:05am UTC](https://discourse.itk.org/t/unit-of-vectors-in-a-deformation-displacement-vector-field/6101 "2023-08-01T08:05:42Z")

</div>

Hi I have a basic question that I cannot wrap my head around because I might have thought about a problem to solve for too long. When I non-rigidly register two images and look at the deformation field array, are the v…

---

## [is there a way that itk read sitk format ParameterFile to get DeformationField?](https://discourse.itk.org/t/is-there-a-way-that-itk-read-sitk-format-parameterfile-to-get-deformationfield/6115)

<div class="topic-metadata">

**Author:** [@zx-lhb](https://discourse.itk.org/u/zx-lhb)\
**Replies:** 2\
**Last updated:** [August 1, 2023, 3:23am UTC](https://discourse.itk.org/t/is-there-a-way-that-itk-read-sitk-format-parameterfile-to-get-deformationfield/6115 "2023-08-01T03:23:02Z")

</div>

hi, i use elastix, which implemented by sitk, to do registration, and get the ParameterFile txt, like this: (BSplineTransformSplineOrder 3) (Direction 1 0 0 0 0.9999999315500054 -0.000369999979306246 0 0.000369999980499…

---

## [how can I build simpleITK c++ windows version ?](https://discourse.itk.org/t/how-can-i-build-simpleitk-c-windows-version/6116)

<div class="topic-metadata">

**Author:** [@zx-lhb](https://discourse.itk.org/u/zx-lhb)\
**Replies:** 2\
**Last updated:** [August 1, 2023, 3:18am UTC](https://discourse.itk.org/t/how-can-i-build-simpleitk-c-windows-version/6116 "2023-08-01T03:18:45Z")

</div>

hi, I fllowed the instructions here build sitk to get simpleitk, but cmake came out errors like: Could NOT find LuaInterp. But I am working on Windows, how can I build SimpleITK on windows? Thank you ! Building SimpleIT…

---

## [Composite Transform error](https://discourse.itk.org/t/composite-transform-error/6108)

<div class="topic-metadata">

**Author:** [@CrownMella](https://discourse.itk.org/u/CrownMella)\
**Replies:** 8\
**Last updated:** [July 28, 2023, 8:24pm UTC](https://discourse.itk.org/t/composite-transform-error/6108 "2023-07-28T20:24:33Z")

</div>

Hello, I have two transforms: affine and displacementfield. When I apply them affine then df, it works well. I would like to create a composite transform. I read that they are in reverse order with the back being applie…

---

## [How to change classes labels](https://discourse.itk.org/t/how-to-change-classes-labels/6111)

<div class="topic-metadata">

**Author:** [@NimaY](https://discourse.itk.org/u/NimaY)\
**Replies:** 2\
**Last updated:** [July 28, 2023, 6:47pm UTC](https://discourse.itk.org/t/how-to-change-classes-labels/6111 "2023-07-28T18:47:16Z")

</div>

Hi, I have 3 different labels in each masks where the classes order is like that: 0 - background, 1 - left lung, 2 - right lung. Is there a way to change it to: 0 - background, 1 - both lung? All of these masks a…

---

## [Multi-scale Registration itk-elastix](https://discourse.itk.org/t/multi-scale-registration-itk-elastix/6104)

<div class="topic-metadata">

**Author:** [@calici](https://discourse.itk.org/u/calici)\
**Replies:** 2\
**Last updated:** [July 28, 2023, 2:54pm UTC](https://discourse.itk.org/t/multi-scale-registration-itk-elastix/6104 "2023-07-28T14:54:02Z")

</div>

Hi! I have a pair of pretreatment CT and posttreatment CT. I am especially interested in the registration accuracy close to the tumor region in the lungs. My previous algorithm is based on extracting lungs and register…

---

## [A gotcha in using ITK from Python](https://discourse.itk.org/t/a-gotcha-in-using-itk-from-python/6025)

<div class="topic-metadata">

**Author:** [@shai-ikko](https://discourse.itk.org/u/shai-ikko)\
**Replies:** 1\
**Last updated:** [July 28, 2023, 1:33am UTC](https://discourse.itk.org/t/a-gotcha-in-using-itk-from-python/6025 "2023-07-28T01:33:19Z")

</div>

Well, as is often obnoxiously said in conference talks – this is not really a question, more of a comment… One of the things that raise worries when working with ITK from Python, is the issue of types. In most cases, Py…

---

## [Reading GIFTI file in Python](https://discourse.itk.org/t/reading-gifti-file-in-python/6052)

<div class="topic-metadata">

**Author:** [@mcespedes99](https://discourse.itk.org/u/mcespedes99)\
**Replies:** 4\
**Last updated:** [July 27, 2023, 8:56pm UTC](https://discourse.itk.org/t/reading-gifti-file-in-python/6052 "2023-07-27T20:56:41Z")

</div>

Hi, I’m currently trying to develop an extension for 3D Slicer to read, import and convert GIFTI images. I’m developing this module in Python and I’m currently using nibabel to read the gifti files (both containing surf…

---

## [Errors While launching ITK](https://discourse.itk.org/t/errors-while-launching-itk/6106)

<div class="topic-metadata">

**Author:** [@Roro82](https://discourse.itk.org/u/Roro82)\
**Replies:** 1\
**Last updated:** [July 27, 2023, 6:29pm UTC](https://discourse.itk.org/t/errors-while-launching-itk/6106 "2023-07-27T18:29:56Z")

</div>

Hello everyone, In order to use the RTK software, I tried to create the ITK software thanks to the CMake tool. Therefore, I uploaded the ITK sources in the CMake software after creating two distinct folders for the sour…

---

## [Coregistration of DICOM series with different resolutions](https://discourse.itk.org/t/coregistration-of-dicom-series-with-different-resolutions/6091)

<div class="topic-metadata">

**Author:** [@vstevensf](https://discourse.itk.org/u/vstevensf)\
**Replies:** 2\
**Last updated:** [July 25, 2023, 3:26pm UTC](https://discourse.itk.org/t/coregistration-of-dicom-series-with-different-resolutions/6091 "2023-07-25T15:26:33Z")

</div>

Hi – was just looking through the documentation for ITK/SimpleITK, with the goal of coregistering two DICOM series, but with different numbers of “slices” (images) per series. For example, coregistering a series of T2 Fl…

---

## [RuntimeError with number of expected elements for DisplacementFieldTransform](https://discourse.itk.org/t/runtimeerror-with-number-of-expected-elements-for-displacementfieldtransform/6076)

<div class="topic-metadata">

**Author:** [@rtlim](https://discourse.itk.org/u/rtlim)\
**Replies:** 1\
**Last updated:** [July 18, 2023, 5:54pm UTC](https://discourse.itk.org/t/runtimeerror-with-number-of-expected-elements-for-displacementfieldtransform/6076 "2023-07-18T17:54:48Z")

</div>

I’m trying to create a DisplacementFieldTransform using a MetaImage that I’ve saved, but I’m getting a runtime error and I haven’t found anything online related to it. This is what the error says: RuntimeError: Exceptio…

---

## [How to initialize CenteredTransformInitializer for 3D-3D image registration for exhaustive search optimizer](https://discourse.itk.org/t/how-to-initialize-centeredtransforminitializer-for-3d-3d-image-registration-for-exhaustive-search-optimizer/6054)

<div class="topic-metadata">

**Author:** [@thanuja](https://discourse.itk.org/u/thanuja)\
**Replies:** 2\
**Last updated:** [July 15, 2023, 2:25am UTC](https://discourse.itk.org/t/how-to-initialize-centeredtransforminitializer-for-3d-3d-image-registration-for-exhaustive-search-optimizer/6054 "2023-07-15T02:25:11Z")

</div>

Hi All, I’m following the 2D image registration example(python) for exhaustive search optimizer: https://examples.itk.org/src/numerics/optimizers/exhaustiveoptimizer/documentation I want to do the same for 3D-3D image …

---

## [Using CMake for Configuring and Building ITK vs Using the Python Wrapper for journal paper ITK code.](https://discourse.itk.org/t/using-cmake-for-configuring-and-building-itk-vs-using-the-python-wrapper-for-journal-paper-itk-code/6061)

<div class="topic-metadata">

**Author:** [@jzhangaps](https://discourse.itk.org/u/jzhangaps)\
**Replies:** 2\
**Last updated:** [July 12, 2023, 1:28pm UTC](https://discourse.itk.org/t/using-cmake-for-configuring-and-building-itk-vs-using-the-python-wrapper-for-journal-paper-itk-code/6061 "2023-07-12T13:28:51Z")

</div>

Hi ITK discussion forum! I’m new to ITK and am going through the ITK software guide in order to be able to try this code: https://github.com/midas-journal/midas-journal-154/tree/master/DiffeomorphicDemons-2009-06-Vercau…

---

## [Implementation of a Custom ImageToImage Similarity Metric for Registration](https://discourse.itk.org/t/implementation-of-a-custom-imagetoimage-similarity-metric-for-registration/6047)

<div class="topic-metadata">

**Author:** [@JRopers](https://discourse.itk.org/u/JRopers)\
**Replies:** 5\
**Last updated:** [July 10, 2023, 3:07pm UTC](https://discourse.itk.org/t/implementation-of-a-custom-imagetoimage-similarity-metric-for-registration/6047 "2023-07-10T15:07:35Z")

</div>

Hello ITK community! I am in desperate need for help as I am finding no resources on this. I am trying to implement a custom ImageToImage similarity metric for the purpose of registration. For a project, I want to regis…

---

## [How can I find coordinates of a point after resampling?](https://discourse.itk.org/t/how-can-i-find-coordinates-of-a-point-after-resampling/6046)

<div class="topic-metadata">

**Author:** [@Eloy\_Schultz](https://discourse.itk.org/u/Eloy_Schultz)\
**Replies:** 2\
**Last updated:** [July 10, 2023, 11:52am UTC](https://discourse.itk.org/t/how-can-i-find-coordinates-of-a-point-after-resampling/6046 "2023-07-10T11:52:42Z")

</div>

Suppose I apply a resampling operation to my image as below: resampler = sitk.ResampleImageFilter() resampler.SetSize(target\_size) resampler.SetOutputSpacing(target\_spacing) resampler.SetOutputOrigin(ori…

---

## [Java Convert int\[\] to VectorUInt32](https://discourse.itk.org/t/java-convert-int-to-vectoruint32/6037)

<div class="topic-metadata">

**Author:** [@Salu\_Ramos](https://discourse.itk.org/u/Salu_Ramos)\
**Replies:** 9\
**Last updated:** [July 7, 2023, 10:17pm UTC](https://discourse.itk.org/t/java-convert-int-to-vectoruint32/6037 "2023-07-07T22:17:55Z")

</div>

The SImpleITK.extract method requires 3 parameters: first is org.itk.simple.Image second is org.itk.simple.VectorUInt32 third is org.itk.simple.VectorInt32 i know whats are this parameters, i was able to reproduce this…

---

## [Convert TIFF to ITK](https://discourse.itk.org/t/convert-tiff-to-itk/6040)

<div class="topic-metadata">

**Author:** [@itkusers](https://discourse.itk.org/u/itkusers)\
**Replies:** 1\
**Last updated:** [July 6, 2023, 7:16pm UTC](https://discourse.itk.org/t/convert-tiff-to-itk/6040 "2023-07-06T19:16:33Z")

</div>

Hi everyone: My lab group is interested in using ITK-compatible files for the image segmentation platform VesSAP: GitHub - vessap/vessap: Experimental code and examples for: Automated analysis of whole brain vasculature…

---

## [VTK to simpleITK conversion in Python](https://discourse.itk.org/t/vtk-to-simpleitk-conversion-in-python/4028)

<div class="topic-metadata">

**Author:** [@Andrea\_Borsic](https://discourse.itk.org/u/Andrea_Borsic)\
**Replies:** 6\
**Last updated:** [July 3, 2023, 8:35pm UTC](https://discourse.itk.org/t/vtk-to-simpleitk-conversion-in-python/4028 "2023-07-03T20:35:23Z")

</div>

Hello All, Does anyone has any tip or code snippet for converting a vtk image to simpleITK and vice-versa in memory using python? Thanks in advance for any tip / advice. Best Regards, Andrea

---

## [Slice 3D volume along a specific axis using python ITK](https://discourse.itk.org/t/slice-3d-volume-along-a-specific-axis-using-python-itk/6005)

<div class="topic-metadata">

**Author:** [@zemmyang](https://discourse.itk.org/u/zemmyang)\
**Replies:** 7\
**Last updated:** [June 29, 2023, 2:00pm UTC](https://discourse.itk.org/t/slice-3d-volume-along-a-specific-axis-using-python-itk/6005 "2023-06-29T14:00:41Z")

</div>

I found Read DICOM Series and Write 3D Image — v5.3.0 and it works, but I can only get slices from one axis (along z in my case). Is there a way to specify which axis I’m slicing along (I need x and y as well). I saw a …

---

## [Registration with ITK not working - Unexplainable Erros](https://discourse.itk.org/t/registration-with-itk-not-working-unexplainable-erros/6021)

<div class="topic-metadata">

**Author:** [@JRopers](https://discourse.itk.org/u/JRopers)\
**Replies:** 2\
**Last updated:** [June 27, 2023, 8:40am UTC](https://discourse.itk.org/t/registration-with-itk-not-working-unexplainable-erros/6021 "2023-06-27T08:40:38Z")

</div>

Hello everyone! I have come here as a last resort as I am really struggling to get ITK to run. First of all, some information on my system: OS: Windows 11 Visual Studio: 2017 Architecture: x64 C++ Standard: v141 No…

---

## [Resampling volume to axial view with SimpleITK](https://discourse.itk.org/t/resampling-volume-to-axial-view-with-simpleitk/6010)

<div class="topic-metadata">

**Author:** [@mortifiedpenguin](https://discourse.itk.org/u/mortifiedpenguin)\
**Replies:** 2\
**Last updated:** [June 26, 2023, 12:38pm UTC](https://discourse.itk.org/t/resampling-volume-to-axial-view-with-simpleitk/6010 "2023-06-26T12:38:24Z")

</div>

Hi all, I want to resample medical volume datasets such that they are always oriented axial. I’ve managed to get it to work more or less using the following code (C# but should be clear enough:) Image l…

---

## [Elastix, Parameter files and scales](https://discourse.itk.org/t/elastix-parameter-files-and-scales/6002)

<div class="topic-metadata">

**Author:** [@Lermontov](https://discourse.itk.org/u/Lermontov)\
**Replies:** 1\
**Last updated:** [June 20, 2023, 1:21pm UTC](https://discourse.itk.org/t/elastix-parameter-files-and-scales/6002 "2023-06-20T13:21:26Z")

</div>

Hey, I’m doing rigid registration task using elastix, I want to set constraints on some degree of freedom, as far as I understood, I must use the following parameter : (Scales 10000 10000 …) As far as I understood, if …

---

## [Rotate an image without cropping effect](https://discourse.itk.org/t/rotate-an-image-without-cropping-effect/5986)

<div class="topic-metadata">

**Author:** [@Lermontov](https://discourse.itk.org/u/Lermontov)\
**Replies:** 8\
**Last updated:** [June 20, 2023, 1:18pm UTC](https://discourse.itk.org/t/rotate-an-image-without-cropping-effect/5986 "2023-06-20T13:18:28Z")

</div>

Hi, I’m trying to rotate an image around the gravity center of the binary mask of the ROI. To do that, I use in the python version of ITK the following functions : itk.CenteredEuler3DTransfrom to define my the paramet…

---

## [a question aobout itkSimilarityIndexImageFilter](https://discourse.itk.org/t/a-question-aobout-itksimilarityindeximagefilter/5995)

<div class="topic-metadata">

**Author:** [@xiaohoua](https://discourse.itk.org/u/xiaohoua)\
**Replies:** 0\
**Last updated:** [June 16, 2023, 4:57pm UTC](https://discourse.itk.org/t/a-question-aobout-itksimilarityindeximagefilter/5995 "2023-06-16T16:57:00Z")

</div>

Recently, I was studying about ITK and used itksimilarityimageindexfilter 。 I wonder if this filter has any requirements for two input images? For example, does it need two images to be the same size?And What would it d…

---

## [How to automatically refine segmentation warped by deformation field (from voxelmorph).](https://discourse.itk.org/t/how-to-automatically-refine-segmentation-warped-by-deformation-field-from-voxelmorph/5901)

<div class="topic-metadata">

**Author:** [@BraveDistribution](https://discourse.itk.org/u/BraveDistribution)\
**Replies:** 12\
**Last updated:** [June 15, 2023, 5:22am UTC](https://discourse.itk.org/t/how-to-automatically-refine-segmentation-warped-by-deformation-field-from-voxelmorph/5901 "2023-06-15T05:22:56Z")

</div>

Hello, I work on cardiac cycle analysis (TEE). We want to obtain a mask of the left ventricle (or any other region of interest) during the whole cycle based on the mask manually annotated in ED/ES (end of diastole/systo…

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

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