# Beginner Questions

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

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

**Page:** 15

---

## [Comparing ITK images efficiently.](https://discourse.itk.org/t/comparing-itk-images-efficiently/5203)

<div class="topic-metadata">

**Author:** [@Seun](https://discourse.itk.org/u/Seun)\
**Replies:** 9\
**Last updated:** [July 20, 2022, 8:27pm UTC](https://discourse.itk.org/t/comparing-itk-images-efficiently/5203 "2022-07-20T20:27:50Z")

</div>

Hello everyone, I was wondering what would be the fastest way in comparing 2 ITK images irrespective of how large the images are. For instance if I have 2 images both 1000x1000 and I would like to make sure they are exa…

---

## [shapeOpeningLabelMapFilter](https://discourse.itk.org/t/shapeopeninglabelmapfilter/5183)

<div class="topic-metadata">

**Author:** [@Oddone-Scatena](https://discourse.itk.org/u/Oddone-Scatena)\
**Replies:** 7\
**Last updated:** [July 20, 2022, 12:10pm UTC](https://discourse.itk.org/t/shapeopeninglabelmapfilter/5183 "2022-07-20T12:10:07Z")

</div>

I am using shapeOpeningLabelMapFilter and I am getting a strange message saying the attributes are not a member of ShapeOpeningLabelMapFilter. /usr/local/include/ITK-5.2/itkShapeOpeningLabelMapFilter.hxx:44:5: error: ‘…

---

## [Integrate itk-wasm with VTK example](https://discourse.itk.org/t/integrate-itk-wasm-with-vtk-example/5101)

<div class="topic-metadata">

**Author:** [@Albers\_Steven](https://discourse.itk.org/u/Albers_Steven)\
**Replies:** 2\
**Last updated:** [July 19, 2022, 2:11pm UTC](https://discourse.itk.org/t/integrate-itk-wasm-with-vtk-example/5101 "2022-07-19T14:11:43Z")

</div>

I want to try VTK C++ ClipUnstructuredGridWithPlane example with itk-wasm just like Hello World hello.cxx. After download ClipUnstructuredGridWithPlane example file and npm install itk-wasm globel. I run itk-wasm build …

---

## [ITK 5.2, WASM, itk-wasm, itk-wasm/emscripten, build example common/add noise to Binary Image, yinyang](https://discourse.itk.org/t/itk-5-2-wasm-itk-wasm-itk-wasm-emscripten-build-example-common-add-noise-to-binary-image-yinyang/5197)

<div class="topic-metadata">

**Author:** [@sag](https://discourse.itk.org/u/sag)\
**Replies:** 0\
**Last updated:** [July 19, 2022, 11:29am UTC](https://discourse.itk.org/t/itk-5-2-wasm-itk-wasm-itk-wasm-emscripten-build-example-common-add-noise-to-binary-image-yinyang/5197 "2022-07-19T11:29:10Z")

</div>

@matt.mccormick, Hi everyone, subject: extend HelloWorld web-build example so that i can build itk example common/add noise to Binary Image, yinyang.png using node. couple of questions please bear with me. itk-wasm i…

---

## [Reading in .ima 3D image files from CBCT](https://discourse.itk.org/t/reading-in-ima-3d-image-files-from-cbct/5184)

<div class="topic-metadata">

**Author:** [@gmm9uf](https://discourse.itk.org/u/gmm9uf)\
**Replies:** 1\
**Last updated:** [July 14, 2022, 10:32pm UTC](https://discourse.itk.org/t/reading-in-ima-3d-image-files-from-cbct/5184 "2022-07-14T22:32:07Z")

</div>

I have 3D CBCT images to analyze but am not sure how to read in these image files. Each image consists of about 400 .ima files (which I am assuming are 2D slices that together form the 3D image). I am able to read in eac…

---

## [Double Conversion Error](https://discourse.itk.org/t/double-conversion-error/5172)

<div class="topic-metadata">

**Author:** [@haochenz58](https://discourse.itk.org/u/haochenz58)\
**Replies:** 4\
**Last updated:** [July 12, 2022, 5:54pm UTC](https://discourse.itk.org/t/double-conversion-error/5172 "2022-07-12T17:54:31Z")

</div>

Hi! I’m trying to build and run my ITK from source on Ubuntu 20.04. I pulled from the repo, used cmake to configure and generate it, then ran the example/installation hello world example with a separate build folder unde…

---

## [Interpolate image physical points from DVF extracted from mesh points](https://discourse.itk.org/t/interpolate-image-physical-points-from-dvf-extracted-from-mesh-points/5164)

<div class="topic-metadata">

**Author:** [@isuruwi](https://discourse.itk.org/u/isuruwi)\
**Replies:** 3\
**Last updated:** [July 8, 2022, 1:38pm UTC](https://discourse.itk.org/t/interpolate-image-physical-points-from-dvf-extracted-from-mesh-points/5164 "2022-07-08T13:38:09Z")

</div>

I have extracted a volumetric mesh from a given nifti image. And then apply some deformation to that mesh points to create a deformed version of it. Now what I wanted is to apply the same deformation/DVF on the mesh poi…

---

## [Compute a MSE metric for a fixed and moving image (manual registration)](https://discourse.itk.org/t/compute-a-mse-metric-for-a-fixed-and-moving-image-manual-registration/5161)

<div class="topic-metadata">

**Author:** [@Lermontov](https://discourse.itk.org/u/Lermontov)\
**Replies:** 3\
**Last updated:** [July 8, 2022, 7:20am UTC](https://discourse.itk.org/t/compute-a-mse-metric-for-a-fixed-and-moving-image-manual-registration/5161 "2022-07-08T07:20:10Z")

</div>

Hi, I’m new to ITK and image registration in general. And I’m facing a problem I barely know how to solve. Before applying 2D/2D image registration on two images, I want to know if my registration is more likely to con…

---

## [How to remove CT bed/shadows in a CT image](https://discourse.itk.org/t/how-to-remove-ct-bed-shadows-in-a-ct-image/5162)

<div class="topic-metadata">

**Author:** [@DushiFdo](https://discourse.itk.org/u/DushiFdo)\
**Replies:** 5\
**Last updated:** [July 6, 2022, 3:32pm UTC](https://discourse.itk.org/t/how-to-remove-ct-bed-shadows-in-a-ct-image/5162 "2022-07-06T15:32:24Z")

</div>

I am working with 3D CT images and trying to remove the lines from the bed. I am reading my images with sitk and I know I do not need to convert to Hounsfield Units (I am not sure if thresholding is applicable for my pur…

---

## [Vulnerabilities and security issues.](https://discourse.itk.org/t/vulnerabilities-and-security-issues/5159)

<div class="topic-metadata">

**Author:** [@MartinPare](https://discourse.itk.org/u/MartinPare)\
**Replies:** 3\
**Last updated:** [July 6, 2022, 4:38am UTC](https://discourse.itk.org/t/vulnerabilities-and-security-issues/5159 "2022-07-06T04:38:34Z")

</div>

Hi all, I need to document known vulnerabilities and security related bugs and issues found in ITK. Do you have such a database somewhere? I have searched the CVE database but ITK does not return any hits, Or do you …

---

## [Import From buffer](https://discourse.itk.org/t/import-from-buffer/5158)

<div class="topic-metadata">

**Author:** [@Oddone-Scatena](https://discourse.itk.org/u/Oddone-Scatena)\
**Replies:** 1\
**Last updated:** [July 5, 2022, 2:16pm UTC](https://discourse.itk.org/t/import-from-buffer/5158 "2022-07-05T14:16:22Z")

</div>

I would like to import an image from buffer; is it right? const unsigned short numberOfPixels = pow(size\_import\_buffer\[0\] , 3); auto \* localBuffer = new PixelType\[numberOfPixels\]; PixelType \* it = localBuffer; for(int…

---

## [How to write implement Hello World from examples](https://discourse.itk.org/t/how-to-write-implement-hello-world-from-examples/5152)

<div class="topic-metadata">

**Author:** [@gmm9uf](https://discourse.itk.org/u/gmm9uf)\
**Replies:** 1\
**Last updated:** [July 4, 2022, 12:46pm UTC](https://discourse.itk.org/t/how-to-write-implement-hello-world-from-examples/5152 "2022-07-04T12:46:48Z")

</div>

Hello! I am a bit confused about when and where to be configuring and compiling ITK. I was under the impression that after compiling ITK once, I can then write my own separate code that utilizes ITK’s class structure, an…

---

## [Dumping image](https://discourse.itk.org/t/dumping-image/5138)

<div class="topic-metadata">

**Author:** [@Florian\_Bouillet](https://discourse.itk.org/u/Florian_Bouillet)\
**Replies:** 3\
**Last updated:** [June 30, 2022, 8:49am UTC](https://discourse.itk.org/t/dumping-image/5138 "2022-06-30T08:49:38Z")

</div>

Hello, is there a way to dump an image in an ostream& instead of directly to a file with itkImageFileWriter ? Best regards, Florian Bouillet

---

## [Registration and segmentation from a variety of FOV and orientations](https://discourse.itk.org/t/registration-and-segmentation-from-a-variety-of-fov-and-orientations/5082)

<div class="topic-metadata">

**Author:** [@Mitchellb16](https://discourse.itk.org/u/Mitchellb16)\
**Replies:** 26\
**Last updated:** [June 29, 2022, 9:23pm UTC](https://discourse.itk.org/t/registration-and-segmentation-from-a-variety-of-fov-and-orientations/5082 "2022-06-29T21:23:28Z")

</div>

Hello, I do work with non-human head CT and MRI. My goal is to allow users to load nifti images into my program to be segmented and output in stl format for 3d printing. I’m pulling a lot of code from Dave Chen’s dicom2s…

---

## [how to create itk image from buffered dicom data](https://discourse.itk.org/t/how-to-create-itk-image-from-buffered-dicom-data/4895)

<div class="topic-metadata">

**Author:** [@mmeltsner](https://discourse.itk.org/u/mmeltsner)\
**Replies:** 4\
**Last updated:** [June 28, 2022, 12:00am UTC](https://discourse.itk.org/t/how-to-create-itk-image-from-buffered-dicom-data/4895 "2022-06-28T00:00:08Z")

</div>

hello, i am currently able to nicely create itk images from dicom data by utilizing the gdcmimageio and the imagefilereader by reading a file from disk. However, i am writing an application in which the .dcm file is tr…

---

## [transform points between image pre/post registration](https://discourse.itk.org/t/transform-points-between-image-pre-post-registration/5130)

<div class="topic-metadata">

**Author:** [@Enrico\_Sarneri](https://discourse.itk.org/u/Enrico_Sarneri)\
**Replies:** 3\
**Last updated:** [June 27, 2022, 2:43pm UTC](https://discourse.itk.org/t/transform-points-between-image-pre-post-registration/5130 "2022-06-27T14:43:58Z")

</div>

Hello! Sorry for asking again :’) I basically have these two red points that identify the centres of the spheres (1st image). What I do then is to apply a registration (Euler2D) of the image on a reference one, getting…

---

## [SimpleITK python installation in windows container](https://discourse.itk.org/t/simpleitk-python-installation-in-windows-container/5129)

<div class="topic-metadata">

**Author:** [@Sowmya\_Rajesh](https://discourse.itk.org/u/Sowmya_Rajesh)\
**Replies:** 0\
**Last updated:** [June 23, 2022, 6:50pm UTC](https://discourse.itk.org/t/simpleitk-python-installation-in-windows-container/5129 "2022-06-23T18:50:53Z")

</div>

Hi all, I am trying to use simpleITK inside the docker windows container. The container is built without any error. But when I run the container, I am getting the following error. Traceback (most recent call last): F…

---

## [metric value registration](https://discourse.itk.org/t/metric-value-registration/5124)

<div class="topic-metadata">

**Author:** [@Enrico\_Sarneri](https://discourse.itk.org/u/Enrico_Sarneri)\
**Replies:** 6\
**Last updated:** [June 23, 2022, 2:18pm UTC](https://discourse.itk.org/t/metric-value-registration/5124 "2022-06-23T14:18:01Z")

</div>

Hey guys, I would ask you a question (maybe stupid or banal for someone). I applied the registration method exactly as illustrated here SimpleITK-Notebooks/60\_Registration\_Introduction.ipynb at master · InsightSoftwareCo…

---

## [Is there a way to read a DICOM from bytes in memory](https://discourse.itk.org/t/is-there-a-way-to-read-a-dicom-from-bytes-in-memory/5126)

<div class="topic-metadata">

**Author:** [@ktdiedrich](https://discourse.itk.org/u/ktdiedrich)\
**Replies:** 1\
**Last updated:** [June 23, 2022, 12:23pm UTC](https://discourse.itk.org/t/is-there-a-way-to-read-a-dicom-from-bytes-in-memory/5126 "2022-06-23T12:23:30Z")

</div>

Is there a way to read a DICOM from bytes in memory into a SimpleITK Image object? This is where the DICOM slice instances are each a binary memory blob. There is SimpleITK.GetImageFromArray(image\_volume) that can create…

---

## [Pixel manipulations in C#](https://discourse.itk.org/t/pixel-manipulations-in-c/5091)

<div class="topic-metadata">

**Author:** [@Ale\_Ballester](https://discourse.itk.org/u/Ale_Ballester)\
**Replies:** 14\
**Last updated:** [June 22, 2022, 3:49pm UTC](https://discourse.itk.org/t/pixel-manipulations-in-c/5091 "2022-06-22T15:49:00Z")

</div>

Hello, I am trying to implement the following example from SimpleITK’s notebook. The Python code is: img = logo # Generate random samples inside the image, we will obtain the intensity/color values at these points. n…

---

## [ITK Installation error: "ptrdiff\_t"](https://discourse.itk.org/t/itk-installation-error-ptrdiff-t/5118)

<div class="topic-metadata">

**Author:** [@chlee](https://discourse.itk.org/u/chlee)\
**Replies:** 1\
**Last updated:** [June 21, 2022, 7:59pm UTC](https://discourse.itk.org/t/itk-installation-error-ptrdiff-t/5118 "2022-06-21T19:59:29Z")

</div>

I am a beginner and I am following the ITK Software guide: https://github.com/InsightSoftwareConsortium/ITK/releases/download/v5.2.1/InsightSoftwareGuide-Book1-5.2.1.pdf Unfortunately, after setting up CMake and generat…

---

## [Registering a pair of binary masks](https://discourse.itk.org/t/registering-a-pair-of-binary-masks/5098)

<div class="topic-metadata">

**Author:** [@goofyduck](https://discourse.itk.org/u/goofyduck)\
**Replies:** 1\
**Last updated:** [June 17, 2022, 12:58pm UTC](https://discourse.itk.org/t/registering-a-pair-of-binary-masks/5098 "2022-06-17T12:58:05Z")

</div>

I’m trying to register a pair of binary masks, not a pair of images. To explain further, I’m trying to build a model that automatically strips the brain from the head skull. For the better model accuracy, I already have …

---

## [Registration evaluation](https://discourse.itk.org/t/registration-evaluation/5094)

<div class="topic-metadata">

**Author:** [@Enrico\_Sarneri](https://discourse.itk.org/u/Enrico_Sarneri)\
**Replies:** 2\
**Last updated:** [June 16, 2022, 2:12pm UTC](https://discourse.itk.org/t/registration-evaluation/5094 "2022-06-16T14:12:47Z")

</div>

Hello! I want to share this problem and ask for some advice. Basically I did a customized registration without using Simple ITK just based on the recognition of the “geometric” circle of the two spheres in the two images…

---

## [Extract multiple 2D slices from a 3D volume.](https://discourse.itk.org/t/extract-multiple-2d-slices-from-a-3d-volume/5058)

<div class="topic-metadata">

**Author:** [@mzukovec](https://discourse.itk.org/u/mzukovec)\
**Replies:** 3\
**Last updated:** [June 13, 2022, 3:59pm UTC](https://discourse.itk.org/t/extract-multiple-2d-slices-from-a-3d-volume/5058 "2022-06-13T15:59:44Z")

</div>

Hi all. I can’t solve the image extraction error (invalidRequestedRegionError) if I try to extract 2 different slices using the same ExtractImageFilter from a given volume. In my program, I want to use a single Extract…

---

## [Oblique 2D slices not properly oriented](https://discourse.itk.org/t/oblique-2d-slices-not-properly-oriented/5081)

<div class="topic-metadata">

**Author:** [@Ale\_Ballester](https://discourse.itk.org/u/Ale_Ballester)\
**Replies:** 2\
**Last updated:** [June 12, 2022, 10:28am UTC](https://discourse.itk.org/t/oblique-2d-slices-not-properly-oriented/5081 "2022-06-12T10:28:16Z")

</div>

Hello, I want to extract some oblique 2D slices from a 3D image. My current approach to do this is a resampling operation changing the output direction so one of the axis coincides with the normal of the slicing plane. …

---

## [Preserve datatype on a simple Reader--Writer pipeline](https://discourse.itk.org/t/preserve-datatype-on-a-simple-reader-writer-pipeline/5063)

<div class="topic-metadata">

**Author:** [@Rafael\_Palomar](https://discourse.itk.org/u/Rafael_Palomar)\
**Replies:** 14\
**Last updated:** [June 10, 2022, 10:27am UTC](https://discourse.itk.org/t/preserve-datatype-on-a-simple-reader-writer-pipeline/5063 "2022-06-10T10:27:37Z")

</div>

Hello. Linking a simple ImageReader\<type\> with a ImageWriter\<type\> seems to change the datatype at the output. I have tried to load a .nrrd image (short) and when I write it back it turns to int: type: short # This is…

---

## [Image Registration of volumetric CT scans with different patients](https://discourse.itk.org/t/image-registration-of-volumetric-ct-scans-with-different-patients/5073)

<div class="topic-metadata">

**Author:** [@DushiFdo](https://discourse.itk.org/u/DushiFdo)\
**Replies:** 4\
**Last updated:** [June 10, 2022, 7:13am UTC](https://discourse.itk.org/t/image-registration-of-volumetric-ct-scans-with-different-patients/5073 "2022-06-10T07:13:24Z")

</div>

Hello, I know that image registration can be done when we have two images (MR/CT or image/segmentation) on the same patient. Could someone please tell me if it is possible to perform image registration on different da…

---

## [get row from itk matrix](https://discourse.itk.org/t/get-row-from-itk-matrix/5071)

<div class="topic-metadata">

**Author:** [@stnava](https://discourse.itk.org/u/stnava)\
**Replies:** 1\
**Last updated:** [June 8, 2022, 6:30pm UTC](https://discourse.itk.org/t/get-row-from-itk-matrix/5071 "2022-06-08T18:30:54Z")

</div>

just trying to update some code for more recent itk version (latest release) Type definitions: Things that don’t compile b/c they use old vnl types: But - in brief - this is a question of how to replace old …

---

## [How to get datasets for the examples which get built in the ITK build?](https://discourse.itk.org/t/how-to-get-datasets-for-the-examples-which-get-built-in-the-itk-build/5069)

<div class="topic-metadata">

**Author:** [@Sumit\_Sharma](https://discourse.itk.org/u/Sumit_Sharma)\
**Replies:** 1\
**Last updated:** [June 8, 2022, 6:28pm UTC](https://discourse.itk.org/t/how-to-get-datasets-for-the-examples-which-get-built-in-the-itk-build/5069 "2022-06-08T18:28:51Z")

</div>

After building the ITK library, I tried to run the examples with the demo datasets which I suppose should come along with the library. However I am not able to find how to download these datasets. Also I downloaded the z…

---

## [How to get SLIC visualisation using SimpleITK SLICImageFilter?](https://discourse.itk.org/t/how-to-get-slic-visualisation-using-simpleitk-slicimagefilter/4992)

<div class="topic-metadata">

**Author:** [@aliabidi](https://discourse.itk.org/u/aliabidi)\
**Replies:** 15\
**Last updated:** [June 6, 2022, 5:53pm UTC](https://discourse.itk.org/t/how-to-get-slic-visualisation-using-simpleitk-slicimagefilter/4992 "2022-06-06T17:53:12Z")

</div>

Sorry if this is a basic question, I was just wondering how I could get a visualisation to show the result of a SLIC segmentation, such as: I would like to generate a few visualisations like this using different SLIC…

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

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