# Beginner Questions

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

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

**Page:** 10

---

## [Ordering of BSplineTransform Parameters](https://discourse.itk.org/t/ordering-of-bsplinetransform-parameters/5989)

<div class="topic-metadata">

**Author:** [@reox](https://discourse.itk.org/u/reox)\
**Replies:** 2\
**Last updated:** [June 13, 2023, 7:10pm UTC](https://discourse.itk.org/t/ordering-of-bsplinetransform-parameters/5989 "2023-06-13T19:10:09Z")

</div>

I got myself confused with the ordering of the parameters of the BSplineTransform. At some point I wrote it down but cannot find that anymore, and now I’m looking at some code that I have written some years ago and don’t…

---

## [Get a neighborhood around a specific point](https://discourse.itk.org/t/get-a-neighborhood-around-a-specific-point/5987)

<div class="topic-metadata">

**Author:** [@Lermontov](https://discourse.itk.org/u/Lermontov)\
**Replies:** 1\
**Last updated:** [June 12, 2023, 3:24pm UTC](https://discourse.itk.org/t/get-a-neighborhood-around-a-specific-point/5987 "2023-06-12T15:24:01Z")

</div>

Hi, Is there a method on ITK that can, given a physical point, define a ball-shaped neighborhood of physical points within a given raduis ? I try to study the ability of an optimisation algorithm to converge on the good…

---

## [Can't load a transform file](https://discourse.itk.org/t/cant-load-a-transform-file/5984)

<div class="topic-metadata">

**Author:** [@eddyod](https://discourse.itk.org/u/eddyod)\
**Replies:** 0\
**Last updated:** [June 9, 2023, 2:06am UTC](https://discourse.itk.org/t/cant-load-a-transform-file/5984 "2023-06-09T02:06:50Z")

</div>

Hi, I’m trying to save and load a transform but keep getting an error when I try to open it: ITK ERROR: HDF5TransformIOTemplate(0x55708c136680): Could not create an instance of “MatrixOffsetTransformBase\_double\_3\_3” T…

---

## [is it possilbe to change RefineMontage default TransformType to itk::Rigid2DTransform](https://discourse.itk.org/t/is-it-possilbe-to-change-refinemontage-default-transformtype-to-itk-rigid2dtransform/5971)

<div class="topic-metadata">

**Author:** [@allen](https://discourse.itk.org/u/allen)\
**Replies:** 1\
**Last updated:** [May 30, 2023, 1:25pm UTC](https://discourse.itk.org/t/is-it-possilbe-to-change-refinemontage-default-transformtype-to-itk-rigid2dtransform/5971 "2023-05-30T13:25:01Z")

</div>

hello, as i know the default Registration method is B-Spline Registration in CompleteMontage or RefineMontage, right. B-Spline Registration is flexiable that allows local distortion and non-rigid deformation, but it cos…

---

## [Parts of registered images missing.](https://discourse.itk.org/t/parts-of-registered-images-missing/5969)

<div class="topic-metadata">

**Author:** [@RobertTheSquirrel](https://discourse.itk.org/u/RobertTheSquirrel)\
**Replies:** 3\
**Last updated:** [May 29, 2023, 10:09pm UTC](https://discourse.itk.org/t/parts-of-registered-images-missing/5969 "2023-05-29T22:09:10Z")

</div>

Greetings! I am a uni student relatively new to image/file processing. I am encountering something which I view as an issue during the processing of my 3D images. For the record, what I do with the original DICOM images…

---

## [got OpenCL Error when using itkGPUDemonsRegistrationFilter](https://discourse.itk.org/t/got-opencl-error-when-using-itkgpudemonsregistrationfilter/5961)

<div class="topic-metadata">

**Author:** [@zx-lhb](https://discourse.itk.org/u/zx-lhb)\
**Replies:** 6\
**Last updated:** [May 27, 2023, 1:57am UTC](https://discourse.itk.org/t/got-opencl-error-when-using-itkgpudemonsregistrationfilter/5961 "2023-05-27T01:57:32Z")

</div>

hi, I used DemonsRegistrationFilter to do registration, and it workd fine. Then I noticed there has GPUDemonsRegistrationFilter, So I replaced the itkImage to itkGPUImage, everything runs well until it came to the code “…

---

## [NVCC compilation error for ITK 5.3](https://discourse.itk.org/t/nvcc-compilation-error-for-itk-5-3/5612)

<div class="topic-metadata">

**Author:** [@mzukovec](https://discourse.itk.org/u/mzukovec)\
**Replies:** 5\
**Last updated:** [May 27, 2023, 1:55am UTC](https://discourse.itk.org/t/nvcc-compilation-error-for-itk-5-3/5612 "2023-05-27T01:55:46Z")

</div>

Hello. When I try to use image reading functionality inside .cu file, I get compilation errors, whereas if I put the same code inside .cpp file, which is compiler using regular host compiler, the code normally compiles. …

---

## [SetShrinkFactorsPerLevel anisotropically](https://discourse.itk.org/t/setshrinkfactorsperlevel-anisotropically/5964)

<div class="topic-metadata">

**Author:** [@ktdiedrich](https://discourse.itk.org/u/ktdiedrich)\
**Replies:** 2\
**Last updated:** [May 25, 2023, 7:42pm UTC](https://discourse.itk.org/t/setshrinkfactorsperlevel-anisotropically/5964 "2023-05-25T19:42:08Z")

</div>

Is there a way to set shrink factors anisotropically? This would be for cases when one dimension of an image is much thinner than the others so it doesn’t need as much shrinking. In Simple ITK it doesn’t work to pass Se…

---

## [itk:GPUImage::Graft cannot access protected member declared in class itk::GPUImage](https://discourse.itk.org/t/itk-graft-cannot-access-protected-member-declared-in-class-itk-gpuimage/2715)

<div class="topic-metadata">

**Author:** [@zhang-qiang-github](https://discourse.itk.org/u/zhang-qiang-github)\
**Replies:** 1\
**Last updated:** [May 23, 2023, 1:59am UTC](https://discourse.itk.org/t/itk-graft-cannot-access-protected-member-declared-in-class-itk-gpuimage/2715 "2023-05-23T01:59:53Z")

</div>

I am starting my registration project. I modify the code: Examples/RegistrationITKv4/DeformableRegistration16, and it work. Then, I want to use GPU to accelarate the program, and replace the DemonsRegistrationFilter wit…

---

## [how to assign value to small region in a big image?](https://discourse.itk.org/t/how-to-assign-value-to-small-region-in-a-big-image/5950)

<div class="topic-metadata">

**Author:** [@zx-lhb](https://discourse.itk.org/u/zx-lhb)\
**Replies:** 4\
**Last updated:** [May 19, 2023, 1:15am UTC](https://discourse.itk.org/t/how-to-assign-value-to-small-region-in-a-big-image/5950 "2023-05-19T01:15:17Z")

</div>

hi, i have a image buffer pointer, whose size is : \[64,64,64\], now I want to assign the buffer values to start \[0,0,64\] to end \[63,63, 127\] in a big image whose size is \[256,256,103\]. Is there any filter can do this? Th…

---

## [I would like to ask a question about the dicom image center](https://discourse.itk.org/t/i-would-like-to-ask-a-question-about-the-dicom-image-center/5955)

<div class="topic-metadata">

**Author:** [@ma1282029525](https://discourse.itk.org/u/ma1282029525)\
**Replies:** 1\
**Last updated:** [May 18, 2023, 12:47pm UTC](https://discourse.itk.org/t/i-would-like-to-ask-a-question-about-the-dicom-image-center/5955 "2023-05-18T12:47:42Z")

</div>

cbct origin\[-140, -140, -140\] cbct spacing\[0.5, 0.5, 0.5\] cbct size\[560, 560, 560\] cbct centerPoint\[-280, -280, 0\] cbct direction-1 0 0 0 -1 0 0 0 1 This is a CBCT image, and I don’t know if the information in thi…

---

## [Computing distance from point to first non-zero voxel in an image](https://discourse.itk.org/t/computing-distance-from-point-to-first-non-zero-voxel-in-an-image/5944)

<div class="topic-metadata">

**Author:** [@reox](https://discourse.itk.org/u/reox)\
**Replies:** 2\
**Last updated:** [May 15, 2023, 3:52pm UTC](https://discourse.itk.org/t/computing-distance-from-point-to-first-non-zero-voxel-in-an-image/5944 "2023-05-15T15:52:09Z")

</div>

Given an voxel based image, a point in physical space and a direction vector (i.e., unit vector): can I somehow compute the distance from that point to the first non-zero voxel in the image in the given direction? Ideal…

---

## [Register two binary Images of different size and resolution](https://discourse.itk.org/t/register-two-binary-images-of-different-size-and-resolution/5936)

<div class="topic-metadata">

**Author:** [@Flo\_Van\_Wickeren](https://discourse.itk.org/u/Flo_Van_Wickeren)\
**Replies:** 6\
**Last updated:** [May 14, 2023, 9:32am UTC](https://discourse.itk.org/t/register-two-binary-images-of-different-size-and-resolution/5936 "2023-05-14T09:32:01Z")

</div>

Hello everyone, I am currently working on project, where i want to register 2 images of different modality. One image is a MALDI image with a low resolution (5um). The other image is an fluorescence image of the same se…

---

## [I need to extract only the brain portion excluding the skull from the CTA image. How can I do it using simpleITK filters? I tried otsu thresholding filters followed by connected components largest label but haven't got result i expected. Can someone help?](https://discourse.itk.org/t/i-need-to-extract-only-the-brain-portion-excluding-the-skull-from-the-cta-image-how-can-i-do-it-using-simpleitk-filters-i-tried-otsu-thresholding-filters-followed-by-connected-components-largest-label-but-havent-got-result-i-expected-can-someone-help/5935)

<div class="topic-metadata">

**Author:** [@arpan56](https://discourse.itk.org/u/arpan56)\
**Replies:** 4\
**Last updated:** [May 12, 2023, 5:10am UTC](https://discourse.itk.org/t/i-need-to-extract-only-the-brain-portion-excluding-the-skull-from-the-cta-image-how-can-i-do-it-using-simpleitk-filters-i-tried-otsu-thresholding-filters-followed-by-connected-components-largest-label-but-havent-got-result-i-expected-can-someone-help/5935 "2023-05-12T05:10:10Z")

</div>

otsu\_filter = sitk.OtsuThresholdImageFilter() otsu\_filter.SetInsideValue(0) otsu\_filter.SetOutsideValue(1) binary\_image = otsu\_filter.Execute(input\_image) cc\_filter = sitk.ConnectedComponentImageFilter() brain\_mask = cc…

---

## [PyQt6 conversion to pixmap](https://discourse.itk.org/t/pyqt6-conversion-to-pixmap/5919)

<div class="topic-metadata">

**Author:** [@CaptainHaddock](https://discourse.itk.org/u/CaptainHaddock)\
**Replies:** 2\
**Last updated:** [May 3, 2023, 12:52pm UTC](https://discourse.itk.org/t/pyqt6-conversion-to-pixmap/5919 "2023-05-03T12:52:53Z")

</div>

How do I convert a DICOM image to a QPixmap in memory? I found an example of writing to disk in e.g. png (Resample and Convert DICOM to Common Image Formats — SimpleITK 2.0rc2 documentation), but looking to be able to co…

---

## [Gantry tilt correction for list of DICOM images](https://discourse.itk.org/t/gantry-tilt-correction-for-list-of-dicom-images/5907)

<div class="topic-metadata">

**Author:** [@EthanHarvey98](https://discourse.itk.org/u/EthanHarvey98)\
**Replies:** 3\
**Last updated:** [May 1, 2023, 7:47pm UTC](https://discourse.itk.org/t/gantry-tilt-correction-for-list-of-dicom-images/5907 "2023-05-01T19:47:25Z")

</div>

Hello, I am working on writing my own gantry tilt correction function in Python. The function takes in a list of correctly ordered DICOM images loaded by pydicom, corrects each slice, and returns a corrected 3D image. d…

---

## [reads DCM volume with grid transform, python](https://discourse.itk.org/t/reads-dcm-volume-with-grid-transform-python/5878)

<div class="topic-metadata">

**Author:** [@Thirawat](https://discourse.itk.org/u/Thirawat)\
**Replies:** 2\
**Last updated:** [April 28, 2023, 4:38am UTC](https://discourse.itk.org/t/reads-dcm-volume-with-grid-transform-python/5878 "2023-04-28T04:38:25Z")

</div>

Hi all, I have Dicom file that contains Dicom volume grid transform so, I want to read Dicom with that transformation. now I can only read raw Dicom My code: def readDCM(folder\_path, win\_level=50, win\_width=100): …

---

## [Loading .bin files originated from OCTA devices](https://discourse.itk.org/t/loading-bin-files-originated-from-octa-devices/5900)

<div class="topic-metadata">

**Author:** [@aliyavari](https://discourse.itk.org/u/aliyavari)\
**Replies:** 1\
**Last updated:** [April 26, 2023, 1:00pm UTC](https://discourse.itk.org/t/loading-bin-files-originated-from-octa-devices/5900 "2023-04-26T13:00:47Z")

</div>

Dear All, I hope you are doing well. I am a PhD student and working on a project related to medical image segmentation. one of my tasks is to compare annotation/segmentation tools. To compare the tools, first I should …

---

## [ITK examples, datasets](https://discourse.itk.org/t/itk-examples-datasets/5889)

<div class="topic-metadata">

**Author:** [@kalpathi60](https://discourse.itk.org/u/kalpathi60)\
**Replies:** 1\
**Last updated:** [April 23, 2023, 8:57pm UTC](https://discourse.itk.org/t/itk-examples-datasets/5889 "2023-04-23T20:57:00Z")

</div>

Havent used ITK in a very long time. I was interested in the levelsets example in the User guide. Are those examples part of the distribution? I dont see the source and the image used as part of that. Similar question …

---

## [How to modify an array of a SITK object](https://discourse.itk.org/t/how-to-modify-an-array-of-a-sitk-object/5872)

<div class="topic-metadata">

**Author:** [@javidx](https://discourse.itk.org/u/javidx)\
**Replies:** 2\
**Last updated:** [April 17, 2023, 8:38pm UTC](https://discourse.itk.org/t/how-to-modify-an-array-of-a-sitk-object/5872 "2023-04-17T20:38:02Z")

</div>

Hi, I’m a beginner in using SITK. I imagine this should be an easy thing to do but I couldn’t find anything that worked. Basically, I have a DICOM image that I’m loading with SITK. I also have a binary mask for this DICO…

---

## [Image Registration with no translation](https://discourse.itk.org/t/image-registration-with-no-translation/5874)

<div class="topic-metadata">

**Author:** [@csoconnor](https://discourse.itk.org/u/csoconnor)\
**Replies:** 3\
**Last updated:** [April 17, 2023, 3:48pm UTC](https://discourse.itk.org/t/image-registration-with-no-translation/5874 "2023-04-17T15:48:46Z")

</div>

Is it possible to register two images off of a point (not the center of the image) without translation? As in I have two images that are fixed at one point but I need to align the moving image using 3d rotation only. I …

---

## [Problem in image and its mask superposition](https://discourse.itk.org/t/problem-in-image-and-its-mask-superposition/5867)

<div class="topic-metadata">

**Author:** [@Sunita\_Patel](https://discourse.itk.org/u/Sunita_Patel)\
**Replies:** 3\
**Last updated:** [April 14, 2023, 8:52am UTC](https://discourse.itk.org/t/problem-in-image-and-its-mask-superposition/5867 "2023-04-14T08:52:16Z")

</div>

Dear SITK team, We are trying to generate image and its mask from RTStruct file. The dimension of the image is: 256 256 216 The dimension of the mask is: 256 256 216 While visualizing we observed that mask is not sup…

---

## [\[Help wanted\] Want to registrate two images and merge them (like tutorial notebook7)](https://discourse.itk.org/t/help-wanted-want-to-registrate-two-images-and-merge-them-like-tutorial-notebook7/5863)

<div class="topic-metadata">

**Author:** [@caolonghao](https://discourse.itk.org/u/caolonghao)\
**Replies:** 2\
**Last updated:** [April 11, 2023, 12:27pm UTC](https://discourse.itk.org/t/help-wanted-want-to-registrate-two-images-and-merge-them-like-tutorial-notebook7/5863 "2023-04-11T12:27:24Z")

</div>

Hello, I’m new to SimpleITK. My goal is to registrate two 2D image and merge them into a bigger one. I noticed that it is similar to the function of Tutorial notebook7, the only difference is that the fixed image is not …

---

## [SimpleITK tutorial not able to read images.](https://discourse.itk.org/t/simpleitk-tutorial-not-able-to-read-images/5859)

<div class="topic-metadata">

**Author:** [@Ilias\_P](https://discourse.itk.org/u/Ilias_P)\
**Replies:** 1\
**Last updated:** [April 9, 2023, 11:39am UTC](https://discourse.itk.org/t/simpleitk-tutorial-not-able-to-read-images/5859 "2023-04-09T11:39:11Z")

</div>

I am following the simpleITK tutorial and these two lines of code throw this error. image\_viewer = sitk.ImageViewer() image\_viewer.Execute(sitk.ReadImage(fetch\_data(“SimpleITK.jpg”))) Exception thrown in SimpleITK Ima…

---

## [No module named ‘download data’](https://discourse.itk.org/t/no-module-named-download-data/5852)

<div class="topic-metadata">

**Author:** [@jp13579](https://discourse.itk.org/u/jp13579)\
**Replies:** 1\
**Last updated:** [April 5, 2023, 12:58am UTC](https://discourse.itk.org/t/no-module-named-download-data/5852 "2023-04-05T00:58:00Z")

</div>

Hello all, I am new to using SITK and I’m trying to follow the Environment setup tutorial but when I try to run the following “from download data import fetch\_data, fetch\_data\_all” I get an error saying: “No module name…

---

## [Transforming Points by using ScaleSkewVersor3DTransform](https://discourse.itk.org/t/transforming-points-by-using-scaleskewversor3dtransform/5845)

<div class="topic-metadata">

**Author:** [@miaomiaomiao](https://discourse.itk.org/u/miaomiaomiao)\
**Replies:** 1\
**Last updated:** [April 2, 2023, 9:51pm UTC](https://discourse.itk.org/t/transforming-points-by-using-scaleskewversor3dtransform/5845 "2023-04-02T21:51:23Z")

</div>

Hello dear community, I register MRI images (moving) with different spacings and shapes to a template MRI (fixed) with spacing \[1.0; 1.0; 1.0\] and Shape\[193, 229, 193\]. I also have points for each moving MRI that repres…

---

## [Get dimensions of mask from .nii file](https://discourse.itk.org/t/get-dimensions-of-mask-from-nii-file/5842)

<div class="topic-metadata">

**Author:** [@mik.ro](https://discourse.itk.org/u/mik.ro)\
**Replies:** 3\
**Last updated:** [March 31, 2023, 5:53pm UTC](https://discourse.itk.org/t/get-dimensions-of-mask-from-nii-file/5842 "2023-03-31T17:53:35Z")

</div>

Hello, I have to extract mask dimension from .nii files. There are two files, one is with medical image, second with mask created in 3D-slicer. t1\_fn = 'first\_file.nii' t2\_fn = 'second\_file\_with\_mask.nii' sitk\_t1 = sit…

---

## [How to correct for mask volume in ITK?](https://discourse.itk.org/t/how-to-correct-for-mask-volume-in-itk/3252)

<div class="topic-metadata">

**Author:** [@3omarkamal](https://discourse.itk.org/u/3omarkamal)\
**Replies:** 11\
**Last updated:** [March 31, 2023, 2:46pm UTC](https://discourse.itk.org/t/how-to-correct-for-mask-volume-in-itk/3252 "2023-03-31T14:46:46Z")

</div>

I use: shape\_stats = sitk.LabelShapeStatisticsImageFilter() shape\_stats.Execute(ROI) vol\_roi = shape\_stats.GetPhysicalSize(1) to get a Region of interest volume. However, I am not sure of the unit. I looked at the sa…

---

## [how to disable blend in itk montage CompleteMontage](https://discourse.itk.org/t/how-to-disable-blend-in-itk-montage-completemontage/5839)

<div class="topic-metadata">

**Author:** [@allen](https://discourse.itk.org/u/allen)\
**Replies:** 1\
**Last updated:** [March 30, 2023, 6:13pm UTC](https://discourse.itk.org/t/how-to-disable-blend-in-itk-montage-completemontage/5839 "2023-03-30T18:13:20Z")

</div>

hello, i want to disable the blend behavior to save some time, only locate the tiles to the location PhaseCorrelation gets, but not calculate the overlap area pixel DistanceFromEdge etc, is it possible by edit the itkTi…

---

## [How to save the output of StrainImageFilter (Tensor) with ITK?](https://discourse.itk.org/t/how-to-save-the-output-of-strainimagefilter-tensor-with-itk/5834)

<div class="topic-metadata">

**Author:** [@edgar](https://discourse.itk.org/u/edgar)\
**Replies:** 2\
**Last updated:** [March 29, 2023, 7:25pm UTC](https://discourse.itk.org/t/how-to-save-the-output-of-strainimagefilter-tensor-with-itk/5834 "2023-03-29T19:25:32Z")

</div>

1 How to save the output of StrainImageFilter (Tensor)? Hello! I am trying to save the output of the examples/numpy\_to\_strain.py (on the ITKStrain repo). I tried the naïve itk.imwrite, but I got the following issue. …

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

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