# Beginner Questions

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

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

**Page:** 30

---

## [Linear transforms to displacement field](https://discourse.itk.org/t/linear-transforms-to-displacement-field/2992)

<div class="topic-metadata">

**Author:** [@alixchcl](https://discourse.itk.org/u/alixchcl)\
**Replies:** 1\
**Last updated:** [April 22, 2020, 6:27pm UTC](https://discourse.itk.org/t/linear-transforms-to-displacement-field/2992 "2020-04-22T18:27:32Z")

</div>

Hi! I would like to create a deformation field from 2 linear transforms, which are defined on different regions of my image. So, I have two different linear transforms (one for the right hemisphere, and one for the lef…

---

## [Extract an oblique plane using the direction matrix](https://discourse.itk.org/t/extract-an-oblique-plane-using-the-direction-matrix/2990)

<div class="topic-metadata">

**Author:** [@Helena](https://discourse.itk.org/u/Helena)\
**Replies:** 0\
**Last updated:** [April 22, 2020, 2:42pm UTC](https://discourse.itk.org/t/extract-an-oblique-plane-using-the-direction-matrix/2990 "2020-04-22T14:42:07Z")

</div>

I am new to ITK, but was using it to resample my volume into a new direction matrix of (-0.237453, -0.971399, 0.0, 0.971399, -0.237453, 0.0, 0.0, 0.0, 1.0). I would like to get the axial view at a specific mid point. I t…

---

## [BinaryReconstructionByErosion works on 2D but not 3D images](https://discourse.itk.org/t/binaryreconstructionbyerosion-works-on-2d-but-not-3d-images/2987)

<div class="topic-metadata">

**Author:** [@fnemmi](https://discourse.itk.org/u/fnemmi)\
**Replies:** 2\
**Last updated:** [April 22, 2020, 1:53pm UTC](https://discourse.itk.org/t/binaryreconstructionbyerosion-works-on-2d-but-not-3d-images/2987 "2020-04-22T13:53:11Z")

</div>

Hi, I guess this is indeed a beginner question, but here I go. I have a series of DICOM files of a Dixon sequence of the thigh. My first very simple task is to create a mask of the whole thigh against the background. T…

---

## [How to select a ROI on dicomseries?](https://discourse.itk.org/t/how-to-select-a-roi-on-dicomseries/2945)

<div class="topic-metadata">

**Author:** [@Amnesie](https://discourse.itk.org/u/Amnesie)\
**Replies:** 6\
**Last updated:** [April 21, 2020, 10:34pm UTC](https://discourse.itk.org/t/how-to-select-a-roi-on-dicomseries/2945 "2020-04-21T22:34:35Z")

</div>

Hi everyone, I want to know how to select a ROI on dicomseries? I knew how to read dicomseries and did it for a single dicom. but for dicomseries i have no idea. For example i have a dicom series,now i want to select a…

---

## [Hi I'm new to ITK & RTK, I have some questions.](https://discourse.itk.org/t/hi-im-new-to-itk-rtk-i-have-some-questions/2974)

<div class="topic-metadata">

**Author:** [@Yolkandwhite](https://discourse.itk.org/u/Yolkandwhite)\
**Replies:** 4\
**Last updated:** [April 21, 2020, 2:52am UTC](https://discourse.itk.org/t/hi-im-new-to-itk-rtk-i-have-some-questions/2974 "2020-04-21T02:52:07Z")

</div>

Hi I’m trying to use ITK and RTK with python. however I do not know anything about cmake. Is the cmake necessary to use ITK & RTK in python? and It is hard to find an python examples for RTK… most of them were written…

---

## [An error with curvature flow filter code](https://discourse.itk.org/t/an-error-with-curvature-flow-filter-code/2977)

<div class="topic-metadata">

**Author:** [@basal](https://discourse.itk.org/u/basal)\
**Replies:** 2\
**Last updated:** [April 20, 2020, 7:58pm UTC](https://discourse.itk.org/t/an-error-with-curvature-flow-filter-code/2977 "2020-04-20T19:58:13Z")

</div>

Hi, I wrote this code about curvature flow filter for 3D images but there is an error in this line: Writer-\>SetInput(Smoother-\>GetOutput()); Does any one know what is the problem? #include "itkImage.h" #include "itk…

---

## [How to configure beam characteristics such as filtration](https://discourse.itk.org/t/how-to-configure-beam-characteristics-such-as-filtration/2969)

<div class="topic-metadata">

**Author:** [@isuruwi](https://discourse.itk.org/u/isuruwi)\
**Replies:** 2\
**Last updated:** [April 20, 2020, 7:28pm UTC](https://discourse.itk.org/t/how-to-configure-beam-characteristics-such-as-filtration/2969 "2020-04-20T19:28:16Z")

</div>

I’m currently working on generating DRR image from 3D CT volumes. Is there a way to configure beam characteristics such as filtration ? That is for an example we use a 120kVp beam, and the filtration is given as 16.25m…

---

## [Load stacks of files into viewer](https://discourse.itk.org/t/load-stacks-of-files-into-viewer/2962)

<div class="topic-metadata">

**Author:** [@dpedrosac](https://discourse.itk.org/u/dpedrosac)\
**Replies:** 5\
**Last updated:** [April 18, 2020, 8:15am UTC](https://discourse.itk.org/t/load-stacks-of-files-into-viewer/2962 "2020-04-18T08:15:05Z")

</div>

Dear all, I think that’s a rather simple question but I just cannot get my head around how to solve this. I managed to use SimpleITK for displaying both DICOM files and folders and single Nifti (or other files) using s…

---

## [How to register 3D to 4D](https://discourse.itk.org/t/how-to-register-3d-to-4d/2957)

<div class="topic-metadata">

**Author:** [@mridev](https://discourse.itk.org/u/mridev)\
**Replies:** 1\
**Last updated:** [April 17, 2020, 12:02pm UTC](https://discourse.itk.org/t/how-to-register-3d-to-4d/2957 "2020-04-17T12:02:35Z")

</div>

Hi all, I have a 4D image X which is a stack of few 3D volumes. Let’s assume that these 3D volumes are already registered. I also have a 3D volume Y with a different contrast and would like to register it to the 4D imag…

---

## [Writting back the cropped volume](https://discourse.itk.org/t/writting-back-the-cropped-volume/2917)

<div class="topic-metadata">

**Author:** [@basal](https://discourse.itk.org/u/basal)\
**Replies:** 11\
**Last updated:** [April 16, 2020, 10:17pm UTC](https://discourse.itk.org/t/writting-back-the-cropped-volume/2917 "2020-04-16T22:17:15Z")

</div>

Hi, I have segmented the heart based on a cropped volume and now I want to write this cropped volume back to the original image size. How can I do that in ITK with c++? I really appreciate it if you could help me.

---

## [Mask (ROI) as NumPy array](https://discourse.itk.org/t/mask-roi-as-numpy-array/2933)

<div class="topic-metadata">

**Author:** [@3omarkamal](https://discourse.itk.org/u/3omarkamal)\
**Replies:** 8\
**Last updated:** [April 16, 2020, 1:47pm UTC](https://discourse.itk.org/t/mask-roi-as-numpy-array/2933 "2020-04-16T13:47:44Z")

</div>

I have a 3D nii image file. I have drawn a 3D label (ROI) in ITK snap. Now I want to analyze this ROI beyond the limited options in the labelIntensityStatistics. For example, I want to calculate the 10th, 20th, … percent…

---

## [DICOM Version supported by ITK 5.1](https://discourse.itk.org/t/dicom-version-supported-by-itk-5-1/2941)

<div class="topic-metadata">

**Author:** [@ShaneKirkbride](https://discourse.itk.org/u/ShaneKirkbride)\
**Replies:** 3\
**Last updated:** [April 15, 2020, 1:53pm UTC](https://discourse.itk.org/t/dicom-version-supported-by-itk-5-1/2941 "2020-04-15T13:53:56Z")

</div>

Hello, Can someone help me find where the documentation shows the DICOM version supported by ITK? Thanks, ~Shane

---

## [Aorta segmentation](https://discourse.itk.org/t/aorta-segmentation/2916)

<div class="topic-metadata">

**Author:** [@basal](https://discourse.itk.org/u/basal)\
**Replies:** 3\
**Last updated:** [April 14, 2020, 5:09pm UTC](https://discourse.itk.org/t/aorta-segmentation/2916 "2020-04-14T17:09:47Z")

</div>

Hi, I wanna segment the aorta in a 3D CT image. since aorta has circle shape in axial view, I chose Hough transform algorithm. However, because Hough transform filter in ITK is designed for 2D images, I went through all…

---

## [how to wirte the dicom tags?(update my code)](https://discourse.itk.org/t/how-to-wirte-the-dicom-tags-update-my-code/2896)

<div class="topic-metadata">

**Author:** [@Amnesie](https://discourse.itk.org/u/Amnesie)\
**Replies:** 4\
**Last updated:** [April 13, 2020, 8:05pm UTC](https://discourse.itk.org/t/how-to-wirte-the-dicom-tags-update-my-code/2896 "2020-04-13T20:05:00Z")

</div>

hello every one, i am a new user with itk, Here is my question : how to automatic put some dicom tags in dicom when i turn raw volume data into dicom .? I wrote some codes to make 3D volumen data in 2d slice , it work…

---

## [Simple ITK Write to File Resampled DICOM](https://discourse.itk.org/t/simple-itk-write-to-file-resampled-dicom/2937)

<div class="topic-metadata">

**Author:** [@nppatt](https://discourse.itk.org/u/nppatt)\
**Replies:** 1\
**Last updated:** [April 13, 2020, 1:00pm UTC](https://discourse.itk.org/t/simple-itk-write-to-file-resampled-dicom/2937 "2020-04-13T13:00:38Z")

</div>

Hi, The crude code written below is used to (1) read in a set of DICOM files, (2) resample and then (3)write back out the resampled data to DICOM files. Steps 1 and 2, seem to be OK, but step (3) fails with the followin…

---

## [How to write a custom Tag to an image (NRRD or other) header](https://discourse.itk.org/t/how-to-write-a-custom-tag-to-an-image-nrrd-or-other-header/565)

<div class="topic-metadata">

**Author:** [@fbudin](https://discourse.itk.org/u/fbudin)\
**Replies:** 5\
**Last updated:** [April 13, 2020, 11:54am UTC](https://discourse.itk.org/t/how-to-write-a-custom-tag-to-an-image-nrrd-or-other-header/565 "2020-04-13T11:54:51Z")

</div>

The following question was asked on the ITK user mailing list: I can’t find any possibility to add a field (custom or not) into a nrrd header. The NrrdImageIO doesn’t allow it (or I missed it). Is someone know how to…

---

## [Compiling SimpleITK](https://discourse.itk.org/t/compiling-simpleitk/2930)

<div class="topic-metadata">

**Author:** [@nppatt](https://discourse.itk.org/u/nppatt)\
**Replies:** 3\
**Last updated:** [April 12, 2020, 10:06am UTC](https://discourse.itk.org/t/compiling-simpleitk/2930 "2020-04-12T10:06:14Z")

</div>

Hi, I have been trying to compile SimpleITK, the source code pulled from the Git repository. The build stops at about 58% with the following:- In file included from /opt/SimpleITK/Code/Common/src/sitkTransform.cxx:20: …

---

## [Internal Boundary delineation](https://discourse.itk.org/t/internal-boundary-delineation/2931)

<div class="topic-metadata">

**Author:** [@basal](https://discourse.itk.org/u/basal)\
**Replies:** 2\
**Last updated:** [April 12, 2020, 12:20am UTC](https://discourse.itk.org/t/internal-boundary-delineation/2931 "2020-04-12T00:20:25Z")

</div>

Hi, I want to delineate the lowest and internal boundary of the attached image like the sample image I upload it (green line). Can anyone help me how I can do it?

---

## [error in opencv to itk image](https://discourse.itk.org/t/error-in-opencv-to-itk-image/2913)

<div class="topic-metadata">

**Author:** [@DP\_1991](https://discourse.itk.org/u/DP_1991)\
**Replies:** 6\
**Last updated:** [April 11, 2020, 1:13pm UTC](https://discourse.itk.org/t/error-in-opencv-to-itk-image/2913 "2020-04-11T13:13:05Z")

</div>

I have error can anyone help me ??

---

## [Support for 4D data type by ITK for Python?](https://discourse.itk.org/t/support-for-4d-data-type-by-itk-for-python/2925)

<div class="topic-metadata">

**Author:** [@mridev](https://discourse.itk.org/u/mridev)\
**Replies:** 0\
**Last updated:** [April 10, 2020, 8:46pm UTC](https://discourse.itk.org/t/support-for-4d-data-type-by-itk-for-python/2925 "2020-04-10T20:46:03Z")

</div>

Hi there, I need to use ITK in Python for loading 4D MRI (dynamic MRI, DWI, etc.). Does ITK in Python support 4D data type? I haven’t been able to process 4D data in ITK. SimpleITK in Python supports it, but I was wonde…

---

## [Problem in binary image](https://discourse.itk.org/t/problem-in-binary-image/2921)

<div class="topic-metadata">

**Author:** [@basal](https://discourse.itk.org/u/basal)\
**Replies:** 0\
**Last updated:** [April 10, 2020, 5:27pm UTC](https://discourse.itk.org/t/problem-in-binary-image/2921 "2020-04-10T17:27:48Z")

</div>

Hi, I used the following code for getting binary image, however, I am seeing some grayish spots on some slices. does anyone know what the problem is ? i also attached the resultant image. outbinary.nrrd (377.8 KB) #in…

---

## [Shape detection](https://discourse.itk.org/t/shape-detection/2922)

<div class="topic-metadata">

**Author:** [@basal](https://discourse.itk.org/u/basal)\
**Replies:** 0\
**Last updated:** [April 10, 2020, 5:48pm UTC](https://discourse.itk.org/t/shape-detection/2922 "2020-04-10T17:48:49Z")

</div>

Hi, I was wondering these two codes are applicable for 3D images ? CurvesLevelSetImageFilter.cxx and ShapeDetectionLevelSetFilter.cxx

---

## [Getting coronal view in each iteration](https://discourse.itk.org/t/getting-coronal-view-in-each-iteration/2912)

<div class="topic-metadata">

**Author:** [@basal](https://discourse.itk.org/u/basal)\
**Replies:** 1\
**Last updated:** [April 8, 2020, 9:44pm UTC](https://discourse.itk.org/t/getting-coronal-view-in-each-iteration/2912 "2020-04-08T21:44:15Z")

</div>

Hi, I want to go through all pixels in coronal plane on the 3D image and use sliceiterator. I was wondering how I can get coronal plane in each iteration for each slice? For instance, does the following code give me t…

---

## [Reading DICOM-RT files](https://discourse.itk.org/t/reading-dicom-rt-files/960)

<div class="topic-metadata">

**Author:** [@Fijoy\_Vadakkumpadan](https://discourse.itk.org/u/Fijoy_Vadakkumpadan)\
**Replies:** 13\
**Last updated:** [April 7, 2020, 5:11pm UTC](https://discourse.itk.org/t/reading-dicom-rt-files/960 "2020-04-07T17:11:54Z")

</div>

Hello, I’d like to read DICOM-RT Structure Set files in my application. Is the method described in the paper below the best way to do this using ITK? http://www.insight-journal.org/browse/publication/887 The paper use…

---

## [Is .PNG no longer supported?](https://discourse.itk.org/t/is-png-no-longer-supported/2893)

<div class="topic-metadata">

**Author:** [@Henco](https://discourse.itk.org/u/Henco)\
**Replies:** 15\
**Last updated:** [April 6, 2020, 5:10pm UTC](https://discourse.itk.org/t/is-png-no-longer-supported/2893 "2020-04-06T17:10:38Z")

</div>

Good Afternoon, I’m currently trying to create a program to read a given 3D image, perform one forward projection from a varying rotation (Only one slice is made), convert that to a 2D image and write it to a PNG file. …

---

## [Resampling PET, CT and binary mask images to resolution \[1,1,1\].](https://discourse.itk.org/t/resampling-pet-ct-and-binary-mask-images-to-resolution-1-1-1/2907)

<div class="topic-metadata">

**Author:** [@JakeKendrick](https://discourse.itk.org/u/JakeKendrick)\
**Replies:** 2\
**Last updated:** [April 6, 2020, 6:44am UTC](https://discourse.itk.org/t/resampling-pet-ct-and-binary-mask-images-to-resolution-1-1-1/2907 "2020-04-06T06:44:15Z")

</div>

Hello SimpleITK community, I am new to this community and python image processing using SimpleITK in general, so i hope that i have asked the question in the correct way, and i apologise if my question is trivial. As p…

---

## [Bottom Boundary of the lungs](https://discourse.itk.org/t/bottom-boundary-of-the-lungs/2900)

<div class="topic-metadata">

**Author:** [@basal](https://discourse.itk.org/u/basal)\
**Replies:** 11\
**Last updated:** [April 6, 2020, 1:34am UTC](https://discourse.itk.org/t/bottom-boundary-of-the-lungs/2900 "2020-04-06T01:34:42Z")

</div>

Hi all, I segmented the lungs in ITK. Now, I need to get the boundary of the most inferior part of the lungs, the same as pink and blue lines shown in the attached image. I am a beginner in ITK and I really need to get …

---

## [Increase WL intensity](https://discourse.itk.org/t/increase-wl-intensity/2899)

<div class="topic-metadata">

**Author:** [@flaviu2](https://discourse.itk.org/u/flaviu2)\
**Replies:** 1\
**Last updated:** [April 4, 2020, 11:19am UTC](https://discourse.itk.org/t/increase-wl-intensity/2899 "2020-04-04T11:19:17Z")

</div>

I have a sitk::Image rendered into a VTK viewer, which is seen well at W/L 242/1195. I noticed that after I apply BinaryThreshold filter, the sitk::Image result is seen well on my VTK viewer. But, if I apply a sitk::SLI…

---

## [Insert a 2D slice in a 3D image](https://discourse.itk.org/t/insert-a-2d-slice-in-a-3d-image/2888)

<div class="topic-metadata">

**Author:** [@basal](https://discourse.itk.org/u/basal)\
**Replies:** 9\
**Last updated:** [April 3, 2020, 6:33pm UTC](https://discourse.itk.org/t/insert-a-2d-slice-in-a-3d-image/2888 "2020-04-03T18:33:43Z")

</div>

Hi all, I created a 3D image with desirable spacing and origin, now I want to insert a 2D slice in one of the slices of this 3D image. Does anyone know how I can do it? Below, I also sent a code written for creating 3D …

---

## [Transform Hounsfield unit to intensity values](https://discourse.itk.org/t/transform-hounsfield-unit-to-intensity-values/2818)

<div class="topic-metadata">

**Author:** [@flaviu2](https://discourse.itk.org/u/flaviu2)\
**Replies:** 2\
**Last updated:** [March 11, 2020, 2:23pm UTC](https://discourse.itk.org/t/transform-hounsfield-unit-to-intensity-values/2818 "2020-03-11T14:23:20Z")

</div>

Hello all of you. can you tell me how to convert Hounsfield unit to intensity window level values ? I far I understand, there is standard mathematical way called windowing … But how can apply it when I have, let say bon…

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

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