# Beginner Questions

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

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

**Page:** 29

---

## [Problem in registration of two .mat file](https://discourse.itk.org/t/problem-in-registration-of-two-mat-file/3085)

<div class="topic-metadata">

**Author:** [@basal](https://discourse.itk.org/u/basal)\
**Replies:** 0\
**Last updated:** [May 17, 2020, 9:01pm UTC](https://discourse.itk.org/t/problem-in-registration-of-two-mat-file/3085 "2020-05-17T21:01:42Z")

</div>

Hi, I am using the following code for registering two sets of points. my input fixed and moving images are in .mat file but code is giving me the error. does anyone know the solution ? // Last used for diaphragm registr…

---

## [Transfinite interpolation](https://discourse.itk.org/t/transfinite-interpolation/3079)

<div class="topic-metadata">

**Author:** [@basal](https://discourse.itk.org/u/basal)\
**Replies:** 1\
**Last updated:** [May 17, 2020, 5:38pm UTC](https://discourse.itk.org/t/transfinite-interpolation/3079 "2020-05-17T17:38:27Z")

</div>

Hi, I want to use transfinite interpolation to fill the region inside the image. I want to know if there is any function or code in ITK that could do this? I already had the positions of the white points. Thanks.

---

## [Find the location of points of the 2D projection on 3D image](https://discourse.itk.org/t/find-the-location-of-points-of-the-2d-projection-on-3d-image/3081)

<div class="topic-metadata">

**Author:** [@basal](https://discourse.itk.org/u/basal)\
**Replies:** 1\
**Last updated:** [May 17, 2020, 5:22pm UTC](https://discourse.itk.org/t/find-the-location-of-points-of-the-2d-projection-on-3d-image/3081 "2020-05-17T17:22:22Z")

</div>

Hi, I used this code to get the projection of my 3D image on the axial plane. I did some image processing on the 2D projection and I got some points on the 2D image. Now I want to find the coordinates of those points on …

---

## [Convert 3D image into 4D image with time](https://discourse.itk.org/t/convert-3d-image-into-4d-image-with-time/3074)

<div class="topic-metadata">

**Author:** [@Zhehao\_Zhang](https://discourse.itk.org/u/Zhehao_Zhang)\
**Replies:** 2\
**Last updated:** [May 15, 2020, 5:42pm UTC](https://discourse.itk.org/t/convert-3d-image-into-4d-image-with-time/3074 "2020-05-15T17:42:33Z")

</div>

I am using ITK and RTK to generate several 3D images (x,y,z) with different time. I want to save them into one .mha file, that’s to say, the desired data format is (x,y,z,t). I am doing this on Python and I hope ‘itk.Jo…

---

## [Set Photometric Interpretation for GDCMImageIO as MONOCHROME2 in SimpleITK](https://discourse.itk.org/t/set-photometric-interpretation-for-gdcmimageio-as-monochrome2-in-simpleitk/3073)

<div class="topic-metadata">

**Author:** [@theo-barfoot](https://discourse.itk.org/u/theo-barfoot)\
**Replies:** 8\
**Last updated:** [May 15, 2020, 3:30pm UTC](https://discourse.itk.org/t/set-photometric-interpretation-for-gdcmimageio-as-monochrome2-in-simpleitk/3073 "2020-05-15T15:30:27Z")

</div>

I am trying to read diffusion MRI scans using SimpleITK in Python. I am using the ImageFileReader with the GDCMImageIO interface. In the DICOM header the tag (0028, 0004) Photometric Interpretation is set as MONOCHROME1.…

---

## [ITK python itkMeshF3\_Pointer](https://discourse.itk.org/t/itk-python-itkmeshf3-pointer/3061)

<div class="topic-metadata">

**Author:** [@cg2](https://discourse.itk.org/u/cg2)\
**Replies:** 6\
**Last updated:** [May 14, 2020, 5:43pm UTC](https://discourse.itk.org/t/itk-python-itkmeshf3-pointer/3061 "2020-05-14T17:43:07Z")

</div>

Hi, One of the module interface method I’m working on takes an itk::SmartPointer\<itk::Mesh\<float, 3\>\> as parameter. In python, this translates to itkMeshF3\_Pointer. I tries to convert the output of itk.MeshFileReader t…

---

## [Monitoring registration progress in python - and status of itk vs simpleitk for registration](https://discourse.itk.org/t/monitoring-registration-progress-in-python-and-status-of-itk-vs-simpleitk-for-registration/3051)

<div class="topic-metadata">

**Author:** [@tvercaut](https://discourse.itk.org/u/tvercaut)\
**Replies:** 7\
**Last updated:** [May 14, 2020, 2:54am UTC](https://discourse.itk.org/t/monitoring-registration-progress-in-python-and-status-of-itk-vs-simpleitk-for-registration/3051 "2020-05-14T02:54:24Z")

</div>

As I started to discuss in a different thread (Can I use conjugate gradient optimizer for registration in python?How can I do ?), I wanted to try out performing image registration in python with itk. While the initial ex…

---

## [Python ITK convert mha image to png image](https://discourse.itk.org/t/python-itk-convert-mha-image-to-png-image/3060)

<div class="topic-metadata">

**Author:** [@jo\_jo](https://discourse.itk.org/u/jo_jo)\
**Replies:** 2\
**Last updated:** [May 14, 2020, 2:22am UTC](https://discourse.itk.org/t/python-itk-convert-mha-image-to-png-image/3060 "2020-05-14T02:22:15Z")

</div>

Hello, I am using itk with python for the first time. I am trying to convert a mha image (2d) to a png image. To be perfectly honest I am not sure how to use pixel types, I hope you can point me into the right direction …

---

## [use dicom's Physical Delta X as spacing?](https://discourse.itk.org/t/use-dicoms-physical-delta-x-as-spacing/1839)

<div class="topic-metadata">

**Author:** [@hubutui](https://discourse.itk.org/u/hubutui)\
**Replies:** 10\
**Last updated:** [May 13, 2020, 7:15pm UTC](https://discourse.itk.org/t/use-dicoms-physical-delta-x-as-spacing/1839 "2020-05-13T19:15:33Z")

</div>

Hi, I’m trying to deal with the ultrasound images. And there is a Physical Delta X attribute (see here) in the DICOM files. Should it be used as spacing? I read the DICOM files with simpleitk, but the spacing is not the …

---

## [Similarity2DTransform moves image out of boundaries](https://discourse.itk.org/t/similarity2dtransform-moves-image-out-of-boundaries/2829)

<div class="topic-metadata">

**Author:** [@reox](https://discourse.itk.org/u/reox)\
**Replies:** 12\
**Last updated:** [May 13, 2020, 3:03pm UTC](https://discourse.itk.org/t/similarity2dtransform-moves-image-out-of-boundaries/2829 "2020-05-13T15:03:42Z")

</div>

I’m using Similarity2DTransform on binary image masks to pre-align the images before performing a B-spline registration step. In the majority of the images it works fine but there are a few examples where the Similarity2…

---

## [Function which calculates the determinant of an itk::Affine transform?](https://discourse.itk.org/t/function-which-calculates-the-determinant-of-an-itk-affine-transform/3057)

<div class="topic-metadata">

**Author:** [@gdevenyi](https://discourse.itk.org/u/gdevenyi)\
**Replies:** 4\
**Last updated:** [May 11, 2020, 7:01pm UTC](https://discourse.itk.org/t/function-which-calculates-the-determinant-of-an-itk-affine-transform/3057 "2020-05-11T19:01:18Z")

</div>

Is there a function to compute the determinant of the affine family of transforms?

---

## [Building GATE with ITKImageIO support](https://discourse.itk.org/t/building-gate-with-itkimageio-support/3005)

<div class="topic-metadata">

**Author:** [@somayehasadi](https://discourse.itk.org/u/somayehasadi)\
**Replies:** 18\
**Last updated:** [May 11, 2020, 1:17pm UTC](https://discourse.itk.org/t/building-gate-with-itkimageio-support/3005 "2020-05-11T13:17:11Z")

</div>

Dear ITK users I work with the Monte Carlo based Code of GATE and work on hyperthermia. So I need to use the ITK for running the program related to the optic and thermal output and take the output with the format of .mh…

---

## [Convert .nii, .img to .dcm](https://discourse.itk.org/t/convert-nii-img-to-dcm/3056)

<div class="topic-metadata">

**Author:** [@TWK](https://discourse.itk.org/u/TWK)\
**Replies:** 2\
**Last updated:** [May 10, 2020, 11:10am UTC](https://discourse.itk.org/t/convert-nii-img-to-dcm/3056 "2020-05-10T11:10:16Z")

</div>

Hello, I’m trying to convert .nii, .img files with double precision values to .dcm format. Due to the limit of .dcm format, I had to multiply pixel value of original image x 10000 and cast to the 16bit integer in order…

---

## [Maintain physical location with registration?](https://discourse.itk.org/t/maintain-physical-location-with-registration/3043)

<div class="topic-metadata">

**Author:** [@radiplab](https://discourse.itk.org/u/radiplab)\
**Replies:** 6\
**Last updated:** [May 8, 2020, 9:34pm UTC](https://discourse.itk.org/t/maintain-physical-location-with-registration/3043 "2020-05-08T21:34:40Z")

</div>

Hello - I’m trying to register a CT head to a CT head template, but I want the final registered image to maintain the same physical location as the original head CT. I used the method from introduction to registration (h…

---

## [Can I use conjugate gradient optimizer for registration in python?How can I do ?](https://discourse.itk.org/t/can-i-use-conjugate-gradient-optimizer-for-registration-in-python-how-can-i-do/2561)

<div class="topic-metadata">

**Author:** [@EdwardPeng](https://discourse.itk.org/u/EdwardPeng)\
**Replies:** 3\
**Last updated:** [May 8, 2020, 2:58pm UTC](https://discourse.itk.org/t/can-i-use-conjugate-gradient-optimizer-for-registration-in-python-how-can-i-do/2561 "2020-05-08T14:58:27Z")

</div>

I followed the examples in Doxygen Docutment, but failed. There is no ConjugateGradientLineSearchOptimizerv4Template member in itk, and the itk.ConjugateGradientOptimizer can not be used by itk.ImageRegistrationMethodv4…

---

## [What are the differences between the definitions of mesh traits?](https://discourse.itk.org/t/what-are-the-differences-between-the-definitions-of-mesh-traits/3044)

<div class="topic-metadata">

**Author:** [@Sara\_Caffe](https://discourse.itk.org/u/Sara_Caffe)\
**Replies:** 1\
**Last updated:** [May 8, 2020, 11:53am UTC](https://discourse.itk.org/t/what-are-the-differences-between-the-definitions-of-mesh-traits/3044 "2020-05-08T11:53:19Z")

</div>

I am seeing two types of mesh trait definition in ITK example codes. Could you please explain what are the differences? What is the mesh trait? what is it exactly showing for a mesh? Based on my understanding, it is th…

---

## [final registration results](https://discourse.itk.org/t/final-registration-results/3041)

<div class="topic-metadata">

**Author:** [@Dodox](https://discourse.itk.org/u/Dodox)\
**Replies:** 5\
**Last updated:** [May 8, 2020, 1:48am UTC](https://discourse.itk.org/t/final-registration-results/3041 "2020-05-08T01:48:38Z")

</div>

Hello everyone, can someone of you explain to me why every time i run this program it gives me differents results (see picture) Cordially =================================================================== def mu…

---

## [Problem in adding two images](https://discourse.itk.org/t/problem-in-adding-two-images/3042)

<div class="topic-metadata">

**Author:** [@basal](https://discourse.itk.org/u/basal)\
**Replies:** 1\
**Last updated:** [May 7, 2020, 11:08pm UTC](https://discourse.itk.org/t/problem-in-adding-two-images/3042 "2020-05-07T23:08:25Z")

</div>

Hi, I used the following code to add two attached images; however, it does not work. Does any one know the problem with that? it set the startx and starty to 0. #include "itkImageFileReader.h" #include "itkImageFileWri…

---

## [Target links to target "hdf5::hdf5-shared" but the target was not found](https://discourse.itk.org/t/target-links-to-target-hdf5-hdf5-shared-but-the-target-was-not-found/3018)

<div class="topic-metadata">

**Author:** [@hubutui](https://discourse.itk.org/u/hubutui)\
**Replies:** 12\
**Last updated:** [May 6, 2020, 11:53pm UTC](https://discourse.itk.org/t/target-links-to-target-hdf5-hdf5-shared-but-the-target-was-not-found/3018 "2020-05-06T23:53:24Z")

</div>

Hi, I test helloword itk project on Windows 10, MSYS2, but failed. Here is my code: // main.cpp #include "itkImage.h" #include "itkImageFileWriter.h" int main(int argc, char \*argv\[\]) { std::cout \<\< "ITK Hello W…

---

## [Different deformation energy for image segments in non-rigid registration](https://discourse.itk.org/t/different-deformation-energy-for-image-segments-in-non-rigid-registration/3024)

<div class="topic-metadata">

**Author:** [@Michael\_Ef](https://discourse.itk.org/u/Michael_Ef)\
**Replies:** 4\
**Last updated:** [May 4, 2020, 8:33pm UTC](https://discourse.itk.org/t/different-deformation-energy-for-image-segments-in-non-rigid-registration/3024 "2020-05-04T20:33:06Z")

</div>

Hi all, I have a question regarding masking in non-rigid registration. So I have already done a rigid registration of two histological slices, that are now globally well-disposed (at the first glance). However, due to t…

---

## [Issue when calling readImageDICOMFileSeries twice](https://discourse.itk.org/t/issue-when-calling-readimagedicomfileseries-twice/2993)

<div class="topic-metadata">

**Author:** [@JC\_Buisson](https://discourse.itk.org/u/JC_Buisson)\
**Replies:** 7\
**Last updated:** [April 30, 2020, 4:37am UTC](https://discourse.itk.org/t/issue-when-calling-readimagedicomfileseries-twice/2993 "2020-04-30T04:37:58Z")

</div>

Hi, I’m developing a DICOM files volume rendering web application using vtk.js and itk.js I use the very handy and efficient readImageDICOMFileSeries function. However, this function returns an undefined image when it …

---

## [Is possible to get the study description using DICOMSeriesFileNames ?](https://discourse.itk.org/t/is-possible-to-get-the-study-description-using-dicomseriesfilenames/3017)

<div class="topic-metadata">

**Author:** [@zandarina](https://discourse.itk.org/u/zandarina)\
**Replies:** 0\
**Last updated:** [April 29, 2020, 9:58am UTC](https://discourse.itk.org/t/is-possible-to-get-the-study-description-using-dicomseriesfilenames/3017 "2020-04-29T09:58:58Z")

</div>

Hello, I am using DICOMSeriesFileNames to iterate through directories and find all the dicom files. I see that it gives the following information from the metadata GetSeriesScanOptions GetSeriesUIDs GetSeriesDescri…

---

## [Setup ITK](https://discourse.itk.org/t/setup-itk/3007)

<div class="topic-metadata">

**Author:** [@c.spanakis83](https://discourse.itk.org/u/c.spanakis83)\
**Replies:** 7\
**Last updated:** [April 28, 2020, 5:05pm UTC](https://discourse.itk.org/t/setup-itk/3007 "2020-04-28T17:05:50Z")

</div>

Hello, i want to setup ITK using cmake and Visual studio 2019 Community edition. I want to install ITK so that I can create code that can be compiled and create exe that contain all the needed libraries and be able to ex…

---

## [Convert VTK image to ITK image without itk-vtkglue](https://discourse.itk.org/t/convert-vtk-image-to-itk-image-without-itk-vtkglue/3009)

<div class="topic-metadata">

**Author:** [@finetjul](https://discourse.itk.org/u/finetjul)\
**Replies:** 2\
**Last updated:** [April 28, 2020, 3:27pm UTC](https://discourse.itk.org/t/convert-vtk-image-to-itk-image-without-itk-vtkglue/3009 "2020-04-28T15:27:31Z")

</div>

How can I convert a VTK image into an ITK image without itk-vtkglue in Python ? (see current issue) Is there a solution as simple as converting from ITK to VTK ? data = itk.GetArrayViewFromImage(myITKImage).tos…

---

## [Building ITK with emscripten](https://discourse.itk.org/t/building-itk-with-emscripten/2919)

<div class="topic-metadata">

**Author:** [@prashanth.dumpuri](https://discourse.itk.org/u/prashanth.dumpuri)\
**Replies:** 9\
**Last updated:** [April 27, 2020, 4:19pm UTC](https://discourse.itk.org/t/building-itk-with-emscripten/2919 "2020-04-27T16:19:43Z")

</div>

All, 'am trying to build ITK-4.9 on Windows 10 machine using emscripten. I’ve written a few filters in C++ using ITK but I now have to run them from a browser. I do not know javascript and therefore cannot use itk-js. M…

---

## [\[solved\] VTK IterativeClosestPointTransform to ITK AffineTransform](https://discourse.itk.org/t/solved-vtk-iterativeclosestpointtransform-to-itk-affinetransform/3010)

<div class="topic-metadata">

**Author:** [@reox](https://discourse.itk.org/u/reox)\
**Replies:** 1\
**Last updated:** [April 27, 2020, 11:24am UTC](https://discourse.itk.org/t/solved-vtk-iterativeclosestpointtransform-to-itk-affinetransform/3010 "2020-04-27T11:24:19Z")

</div>

Is it possible to transform the result of a VTK IterativeClosestPointTransform into an ITK AffineTransformation? My intention was to apply the ICP to some points, then use the transformation and apply it to images in ITK…

---

## [Anisotropic Diffusion Perona Malik](https://discourse.itk.org/t/anisotropic-diffusion-perona-malik/2999)

<div class="topic-metadata">

**Author:** [@michael](https://discourse.itk.org/u/michael)\
**Replies:** 2\
**Last updated:** [April 25, 2020, 12:43pm UTC](https://discourse.itk.org/t/anisotropic-diffusion-perona-malik/2999 "2020-04-25T12:43:35Z")

</div>

Hi there, I have two questions related to the anisotropic diffusion filters (gradient and curvature) in the SimpleITK library. Specifically, Do the filters do any scaling to the conductance parameter, K, that you pro…

---

## [Anatomical orientation change when converting from MHD/RAW to NRRD](https://discourse.itk.org/t/anatomical-orientation-change-when-converting-from-mhd-raw-to-nrrd/3000)

<div class="topic-metadata">

**Author:** [@mattwarkentin](https://discourse.itk.org/u/mattwarkentin)\
**Replies:** 4\
**Last updated:** [April 24, 2020, 8:17pm UTC](https://discourse.itk.org/t/anatomical-orientation-change-when-converting-from-mhd-raw-to-nrrd/3000 "2020-04-24T20:17:58Z")

</div>

Hi, I am trying to convert a series of MHD/ZRAW file-pairs to a single NRRD file that contains both the header meta-data and the array data. However, I notice that when I convert the files the orientation does not seem …

---

## [Simple ITK Shrink and Smoothing Factors](https://discourse.itk.org/t/simple-itk-shrink-and-smoothing-factors/2982)

<div class="topic-metadata">

**Author:** [@pmontijo](https://discourse.itk.org/u/pmontijo)\
**Replies:** 6\
**Last updated:** [April 23, 2020, 3:43pm UTC](https://discourse.itk.org/t/simple-itk-shrink-and-smoothing-factors/2982 "2020-04-23T15:43:19Z")

</div>

Hello all, I’m a new user of simple ITK and I’m trying to register CT images and high resolution images from a camera. When I run the registration with the following code, I get the error that joint pdf summed to zero: …

---

## [How to quickly obtain the pixel type of a nifti file?](https://discourse.itk.org/t/how-to-quickly-obtain-the-pixel-type-of-a-nifti-file/2998)

<div class="topic-metadata">

**Author:** [@fangc](https://discourse.itk.org/u/fangc)\
**Replies:** 1\
**Last updated:** [April 23, 2020, 3:12pm UTC](https://discourse.itk.org/t/how-to-quickly-obtain-the-pixel-type-of-a-nifti-file/2998 "2020-04-23T15:12:11Z")

</div>

Hello, I am using ITK C++. My project requires me to load the header information named data\_type in a nifti file. I know how to get the image such as using ImageReaderType = itk::ImageFileReader\<ImageType\>; ImageRe…

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

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