# Beginner Questions

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

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

**Page:** 31

---

## [How to change the information of image after padding? Is it required?](https://discourse.itk.org/t/how-to-change-the-information-of-image-after-padding-is-it-required/2882)

<div class="topic-metadata">

**Author:** [@Sara\_Caffe](https://discourse.itk.org/u/Sara_Caffe)\
**Replies:** 2\
**Last updated:** [March 31, 2020, 2:25pm UTC](https://discourse.itk.org/t/how-to-change-the-information-of-image-after-padding-is-it-required/2882 "2020-03-31T14:25:26Z")

</div>

Hi, I need to create a mesh from a closed surface. What I did is that to pad the image with tolerance level of 3 pixels padSize, // pad the input intensity image PadFilterType::Pointer padFilter=PadFilterType::…

---

## [SimpleITK registration: how to adjust the image by patient orientation?](https://discourse.itk.org/t/simpleitk-registration-how-to-adjust-the-image-by-patient-orientation/2828)

<div class="topic-metadata">

**Author:** [@zhang-qiang-github](https://discourse.itk.org/u/zhang-qiang-github)\
**Replies:** 9\
**Last updated:** [March 29, 2020, 2:22pm UTC](https://discourse.itk.org/t/simpleitk-registration-how-to-adjust-the-image-by-patient-orientation/2828 "2020-03-29T14:22:38Z")

</div>

I want to registration two images by SimpleITK. The image1 is axially acquired, while the image2 is coronary acquired. I find the result is poor. I wonder if it is possible to adjust the image1 and image2 by the patient …

---

## [THEORY FOR MEDICAL IMAGES REGISTRATION](https://discourse.itk.org/t/theory-for-medical-images-registration/2879)

<div class="topic-metadata">

**Author:** [@Dodox](https://discourse.itk.org/u/Dodox)\
**Replies:** 1\
**Last updated:** [March 28, 2020, 9:22pm UTC](https://discourse.itk.org/t/theory-for-medical-images-registration/2879 "2020-03-28T21:22:07Z")

</div>

Hello everyone, I am a student in the last year in medical imaging,for my internship I have to register medical images using simple ITK library, I have theoretical notions on this kind of problem but apparently on this …

---

## [Python wrapped itk.Image - What type to use for int](https://discourse.itk.org/t/python-wrapped-itk-image-what-type-to-use-for-int/617)

<div class="topic-metadata">

**Author:** [@Besler](https://discourse.itk.org/u/Besler)\
**Replies:** 11\
**Last updated:** [March 27, 2020, 8:17pm UTC](https://discourse.itk.org/t/python-wrapped-itk-image-what-type-to-use-for-int/617 "2020-03-27T20:17:03Z")

</div>

I was trying to convert a DICOM stack to a NifTI in Python when I realized itk.Image is not wrapped for pixel type int. I installed itk through Anaconda. It is my understanding that if I defined a variable of type int i…

---

## [Registration on CT and phantom](https://discourse.itk.org/t/registration-on-ct-and-phantom/2875)

<div class="topic-metadata">

**Author:** [@moeez](https://discourse.itk.org/u/moeez)\
**Replies:** 3\
**Last updated:** [March 26, 2020, 3:53pm UTC](https://discourse.itk.org/t/registration-on-ct-and-phantom/2875 "2020-03-26T15:53:48Z")

</div>

Hello itk community, My goals is to create a code in simple itk to perform registration on an whole body phantom and on a CT of a patient (from head to chest) CT: 1x1x3.3mm^3 phantom: 1x1x5mm^3 At first, I write a co…

---

## [Extract bone](https://discourse.itk.org/t/extract-bone/2869)

<div class="topic-metadata">

**Author:** [@flaviu2](https://discourse.itk.org/u/flaviu2)\
**Replies:** 8\
**Last updated:** [March 25, 2020, 8:37pm UTC](https://discourse.itk.org/t/extract-bone/2869 "2020-03-25T20:37:32Z")

</div>

I have few pieces of ideas/code, but I cannot connect them to achieve extraction / removing of a bone from a volume (vtkVolume), with SimpleITK. I know that I need to make a segmentation on the initial image. And I have…

---

## [Remove small component](https://discourse.itk.org/t/remove-small-component/2858)

<div class="topic-metadata">

**Author:** [@flaviu2](https://discourse.itk.org/u/flaviu2)\
**Replies:** 8\
**Last updated:** [March 26, 2020, 3:43pm UTC](https://discourse.itk.org/t/remove-small-component/2858 "2020-03-26T15:43:34Z")

</div>

I intend to remove from sitk::Image the smallest component from it (in the first stage). For that, I wrote: BOOL CMyDoc::Segement(sitk::Image& img) { sitk::Image imgTemp(img); int64\_t nMaxLabel = 0, nMaxSize = 0; …

---

## [Reading image series](https://discourse.itk.org/t/reading-image-series/2867)

<div class="topic-metadata">

**Author:** [@basal](https://discourse.itk.org/u/basal)\
**Replies:** 16\
**Last updated:** [March 26, 2020, 12:51pm UTC](https://discourse.itk.org/t/reading-image-series/2867 "2020-03-26T12:51:52Z")

</div>

Hi all, How can I read images series in ITK which are in NRRD format ?

---

## [Ellipse shapr detection in hough transform](https://discourse.itk.org/t/ellipse-shapr-detection-in-hough-transform/2865)

<div class="topic-metadata">

**Author:** [@basal](https://discourse.itk.org/u/basal)\
**Replies:** 0\
**Last updated:** [March 21, 2020, 1:42am UTC](https://discourse.itk.org/t/ellipse-shapr-detection-in-hough-transform/2865 "2020-03-21T01:42:35Z")

</div>

Hi all, Does anyone know how I can detect ellipse shape and edit Hough transform code in ITK for this purpose? since the written code is for detecting circles. Can anyone help me? I want to segment descending aorta in 3…

---

## [Cast/Create DisplacementField Python](https://discourse.itk.org/t/cast-create-displacementfield-python/2610)

<div class="topic-metadata">

**Author:** [@SiPyWiFi](https://discourse.itk.org/u/SiPyWiFi)\
**Replies:** 2\
**Last updated:** [March 20, 2020, 1:41pm UTC](https://discourse.itk.org/t/cast-create-displacementfield-python/2610 "2020-03-20T13:41:40Z")

</div>

Dear All! I have only been using ITK for a short time. In my project the goal is to transform an input image with a displacement field. For this I want to use the Python version. My problems is/are (They are linked): …

---

## [LabelIntensityStatisticsImageFilter error](https://discourse.itk.org/t/labelintensitystatisticsimagefilter-error/2852)

<div class="topic-metadata">

**Author:** [@flaviu2](https://discourse.itk.org/u/flaviu2)\
**Replies:** 7\
**Last updated:** [March 19, 2020, 4:33pm UTC](https://discourse.itk.org/t/labelintensitystatisticsimagefilter-error/2852 "2020-03-19T16:33:15Z")

</div>

I have tried the following code: sitk::Image imgTemp(img); sitk::Image cc = sitk::ConnectedComponent(imgTemp, true); sitk::LabelIntensityStatisticsImageFilter statistics; statistics.Execute(cc, imgTemp); std::vector\<int…

---

## [Can't find "ITKVtkGlueExport.h" file included in "QuickView.h"](https://discourse.itk.org/t/cant-find-itkvtkglueexport-h-file-included-in-quickview-h/2854)

<div class="topic-metadata">

**Author:** [@Come](https://discourse.itk.org/u/Come)\
**Replies:** 3\
**Last updated:** [March 19, 2020, 5:37pm UTC](https://discourse.itk.org/t/cant-find-itkvtkglueexport-h-file-included-in-quickview-h/2854 "2020-03-19T17:37:41Z")

</div>

Hi, I am trying to use the QuickView object to display a 3d image but I can’t find the ITKVtkGlueExport.h file anywhere even though it’s included in the QuickView.h file. Am I missing something? Côme

---

## [Read image and metada from folder full of dicom image](https://discourse.itk.org/t/read-image-and-metada-from-folder-full-of-dicom-image/2841)

<div class="topic-metadata">

**Author:** [@drcjaudet](https://discourse.itk.org/u/drcjaudet)\
**Replies:** 4\
**Last updated:** [March 19, 2020, 3:20pm UTC](https://discourse.itk.org/t/read-image-and-metada-from-folder-full-of-dicom-image/2841 "2020-03-19T15:20:56Z")

</div>

Hello high tea key, i am trying to read image and metadata from a folder with the following code. It succeed to open the image but find no metadata and i sure they are. How can i access to them? from \_main\_import vtk,…

---

## [constraining parameters during optimization](https://discourse.itk.org/t/constraining-parameters-during-optimization/2848)

<div class="topic-metadata">

**Author:** [@reox](https://discourse.itk.org/u/reox)\
**Replies:** 7\
**Last updated:** [March 19, 2020, 12:55pm UTC](https://discourse.itk.org/t/constraining-parameters-during-optimization/2848 "2020-03-19T12:55:07Z")

</div>

For example, I’m using the Similarity2DTransform. Here, I would like to enforce that the scale must be non-zero and positive, however I would like to allow for negative translation. Is it correct, that the only optimize…

---

## [Rotation angle of Z-axis](https://discourse.itk.org/t/rotation-angle-of-z-axis/2817)

<div class="topic-metadata">

**Author:** [@spinicist](https://discourse.itk.org/u/spinicist)\
**Replies:** 3\
**Last updated:** [March 18, 2020, 4:55pm UTC](https://discourse.itk.org/t/rotation-angle-of-z-axis/2817 "2020-03-18T16:55:12Z")

</div>

Hello, I have an itk::Transform (specifically an itk::AffineTransform). I would like to know how much this transform rotates the Z-axis - i.e. the angle between (0,0,1) and the result of applying the transform to (0,0,1…

---

## [Can ITK extract the skeleton for a 3D mask?](https://discourse.itk.org/t/can-itk-extract-the-skeleton-for-a-3d-mask/2816)

<div class="topic-metadata">

**Author:** [@qiang-zhang-neu](https://discourse.itk.org/u/qiang-zhang-neu)\
**Replies:** 8\
**Last updated:** [March 18, 2020, 1:23pm UTC](https://discourse.itk.org/t/can-itk-extract-the-skeleton-for-a-3d-mask/2816 "2020-03-18T13:23:58Z")

</div>

Now, I need to extract the skeleton for a 3D mask. And I find the itkBinaryThinningImageFilter is useful for 2D mask, and it doesn’t work for a 3D mask. Can ITK extract the skeleton for a 3D mask?

---

## [sitk::Image adding / multiplying](https://discourse.itk.org/t/sitk-image-adding-multiplying/2845)

<div class="topic-metadata">

**Author:** [@flaviu2](https://discourse.itk.org/u/flaviu2)\
**Replies:** 3\
**Last updated:** [March 18, 2020, 11:26am UTC](https://discourse.itk.org/t/sitk-image-adding-multiplying/2845 "2020-03-18T11:26:34Z")

</div>

Hello. I saw here a little python code: https://itk.org/SimpleITKDoxygen/html/Python\_2BoarderSegmentation\_8py-example.html And I want to try it, in C++. How can convert this code: image = image \* ~boundary image = imag…

---

## [Registering two Images](https://discourse.itk.org/t/registering-two-images/2821)

<div class="topic-metadata">

**Author:** [@cntontis](https://discourse.itk.org/u/cntontis)\
**Replies:** 3\
**Last updated:** [March 12, 2020, 2:06pm UTC](https://discourse.itk.org/t/registering-two-images/2821 "2020-03-12T14:06:55Z")

</div>

Hello everyone, I am new with Image Registration and i am trying to register images similar to the following ones. In most cases it works really well but in cases like this the algorithm stops after a few steps. …

---

## [register stack of images](https://discourse.itk.org/t/register-stack-of-images/2794)

<div class="topic-metadata">

**Author:** [@kayarre](https://discourse.itk.org/u/kayarre)\
**Replies:** 3\
**Last updated:** [March 7, 2020, 4:27pm UTC](https://discourse.itk.org/t/register-stack-of-images/2794 "2020-03-07T16:27:12Z")

</div>

I have mention this data stack I have before, but just had an epiphany and am looking for additional insight. I wan to register a sparse stack of images to a 3d volume. fixed 3d volume. I have a set of ordered 2d image…

---

## [Account for non-uniform spacing](https://discourse.itk.org/t/account-for-non-uniform-spacing/2797)

<div class="topic-metadata">

**Author:** [@trypag](https://discourse.itk.org/u/trypag)\
**Replies:** 8\
**Last updated:** [March 7, 2020, 4:06pm UTC](https://discourse.itk.org/t/account-for-non-uniform-spacing/2797 "2020-03-07T16:06:51Z")

</div>

Hello, When loading a DICOM series in Slicer I noticed a warning related to the spacing of the images, so I manually checked if the spacing was the same between each slices, it’s not. Converting the DICOM series with S…

---

## [Register head CT to common template](https://discourse.itk.org/t/register-head-ct-to-common-template/2787)

<div class="topic-metadata">

**Author:** [@trypag](https://discourse.itk.org/u/trypag)\
**Replies:** 13\
**Last updated:** [March 6, 2020, 3:33pm UTC](https://discourse.itk.org/t/register-head-ct-to-common-template/2787 "2020-03-06T15:33:20Z")

</div>

Hello, I have a large dataset of head CTs I would like to normalize : 1/ Same size 512x512x40 2/ Same RAI Orientation 3/ Same centering 4/ Same head alignment I have a head CT template that I could use to center an…

---

## [SWIG TypeError when using the python version of ITKIsotropicWavelets](https://discourse.itk.org/t/swig-typeerror-when-using-the-python-version-of-itkisotropicwavelets/2791)

<div class="topic-metadata">

**Author:** [@joe-from-mtl](https://discourse.itk.org/u/joe-from-mtl)\
**Replies:** 4\
**Last updated:** [March 5, 2020, 11:45pm UTC](https://discourse.itk.org/t/swig-typeerror-when-using-the-python-version-of-itkisotropicwavelets/2791 "2020-03-05T23:45:41Z")

</div>

Hi, I am trying to reproduce the example runRieszWaveletAnalysis from the ITKIsotropicWavelets repository using Python. I installed the package using the pip command. I ran into an error when trying to generate a monoge…

---

## [Why ITK v 5.0.1 can not find the fuzzy connectedness method?](https://discourse.itk.org/t/why-itk-v-5-0-1-can-not-find-the-fuzzy-connectedness-method/2780)

<div class="topic-metadata">

**Author:** [@qiang-zhang-neu](https://discourse.itk.org/u/qiang-zhang-neu)\
**Replies:** 3\
**Last updated:** [March 5, 2020, 3:49pm UTC](https://discourse.itk.org/t/why-itk-v-5-0-1-can-not-find-the-fuzzy-connectedness-method/2780 "2020-03-05T15:49:37Z")

</div>

I want to use fuzzy connectedness method in my project. In the network, it shows that the itk::SimpleFuzzyConnectednessScalarImageFilter is available. However, I can not find a itkSimpleFuzzyConnectednessScalarImageFilte…

---

## [Effect of setting orientation on CenteredTransformInitializer](https://discourse.itk.org/t/effect-of-setting-orientation-on-centeredtransforminitializer/2786)

<div class="topic-metadata">

**Author:** [@trypag](https://discourse.itk.org/u/trypag)\
**Replies:** 3\
**Last updated:** [March 5, 2020, 3:43pm UTC](https://discourse.itk.org/t/effect-of-setting-orientation-on-centeredtransforminitializer/2786 "2020-03-05T15:43:23Z")

</div>

Hello, I am a complete beginner in image registration, much more I am lacking experience in debugging and tuning a registration pipeline. Goal : Translate a head CT to the center and rotate based on a CT template image…

---

## [ExhaustiveOptimizerv4 missing in python interface](https://discourse.itk.org/t/exhaustiveoptimizerv4-missing-in-python-interface/2764)

<div class="topic-metadata">

**Author:** [@Pavel\_Smal](https://discourse.itk.org/u/Pavel_Smal)\
**Replies:** 1\
**Last updated:** [March 5, 2020, 3:08am UTC](https://discourse.itk.org/t/exhaustiveoptimizerv4-missing-in-python-interface/2764 "2020-03-05T03:08:19Z")

</div>

I’m using python itk package 5.0.1 from pypi on windows I notices that ExhaustiveOptimizerv4 is missing, only ExhaustiveOptimizer (which is v3) is present. Is that intentional?

---

## [SWIG in SimpleITK architecture](https://discourse.itk.org/t/swig-in-simpleitk-architecture/2782)

<div class="topic-metadata">

**Author:** [@kayarre](https://discourse.itk.org/u/kayarre)\
**Replies:** 5\
**Last updated:** [March 5, 2020, 2:52am UTC](https://discourse.itk.org/t/swig-in-simpleitk-architecture/2782 "2020-03-05T02:52:01Z")

</div>

Can someone point me to the design of how swig is being used in ITK/SimpleITK? Or explain that succinctly in terms of the architecture, merits and limitations? I asked a similar question about vtk not knowing that SWIG …

---

## [interpolate stack of images](https://discourse.itk.org/t/interpolate-stack-of-images/2725)

<div class="topic-metadata">

**Author:** [@kayarre](https://discourse.itk.org/u/kayarre)\
**Replies:** 13\
**Last updated:** [March 3, 2020, 2:57pm UTC](https://discourse.itk.org/t/interpolate-stack-of-images/2725 "2020-03-03T14:57:42Z")

</div>

I have a stack of images where the thickness of each slice is known and there is a gap of known distance between each slice. I have used and seen where image resampling is used to create isotropic volumes from image sli…

---

## [Binary closing slower than grayscale closing](https://discourse.itk.org/t/binary-closing-slower-than-grayscale-closing/2770)

<div class="topic-metadata">

**Author:** [@Come](https://discourse.itk.org/u/Come)\
**Replies:** 2\
**Last updated:** [March 2, 2020, 6:56pm UTC](https://discourse.itk.org/t/binary-closing-slower-than-grayscale-closing/2770 "2020-03-02T18:56:18Z")

</div>

Hi, Context : I have a binary input image of type itk::Image\<unsigned char, 2\> (the image is a 512x512 pixels) and I am applying a closing filter on it using a itk::FlatStructuringElement\<2\>. The type of the structuring…

---

## [ensuring correct data type of image](https://discourse.itk.org/t/ensuring-correct-data-type-of-image/2767)

<div class="topic-metadata">

**Author:** [@kayarre](https://discourse.itk.org/u/kayarre)\
**Replies:** 3\
**Last updated:** [February 28, 2020, 4:25am UTC](https://discourse.itk.org/t/ensuring-correct-data-type-of-image/2767 "2020-02-28T04:25:44Z")

</div>

I am creating an image gridImage = sitk.Image(\[2, 2, slices\], sitk.sitkVectorFloat64, 3) then modifying the contents: displacements = sitk.GetArrayFromImage(gridImage) # modify displacements contents displacementImage…

---

## [how to get the 0-th component for vector image](https://discourse.itk.org/t/how-to-get-the-0-th-component-for-vector-image/2759)

<div class="topic-metadata">

**Author:** [@zhang-qiang-github](https://discourse.itk.org/u/zhang-qiang-github)\
**Replies:** 6\
**Last updated:** [February 26, 2020, 1:08am UTC](https://discourse.itk.org/t/how-to-get-the-0-th-component-for-vector-image/2759 "2020-02-26T01:08:41Z")

</div>

Let’s I have a vector image: using VectorPixelType = itk::Vector\< float, 3\>; using DisplacementFieldType = itk::Image\< VectorPixelType, 3\>; DisplacementFieldType ::Pointer displacementField = DisplacementFieldType ::New…

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

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