# \#simpleitk

**URL:** https://discourse.itk.org/tag/simpleitk/10.md?page=5

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

**Page:** 6

---

## [Explanation of principal axis and principal moments](https://discourse.itk.org/t/explanation-of-principal-axis-and-principal-moments/5882)

<div class="topic-metadata">

**Author:** [@marabuuu](https://discourse.itk.org/u/marabuuu)\
**Replies:** 4\
**Last updated:** [April 25, 2023, 4:57pm UTC](https://discourse.itk.org/t/explanation-of-principal-axis-and-principal-moments/5882 "2023-04-25T16:57:23Z")

</div>

Dear all, I am writing a blog post for biologists about different measurements including the ones provided by simpleITK and have problems to understand the measurements for principal axis and principal moments. I know t…

---

## [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…

---

## [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…

---

## [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…

---

## [Unable to get DICOM SQ tags from simpleITK series reader metadata keys](https://discourse.itk.org/t/unable-to-get-dicom-sq-tags-from-simpleitk-series-reader-metadata-keys/2321)

<div class="topic-metadata">

**Author:** [@Jigabytes](https://discourse.itk.org/u/Jigabytes)\
**Replies:** 8\
**Last updated:** [April 1, 2023, 12:36pm UTC](https://discourse.itk.org/t/unable-to-get-dicom-sq-tags-from-simpleitk-series-reader-metadata-keys/2321 "2023-04-01T12:36:35Z")

</div>

Hi, I am I read a dicom series using series reader. I wanted to read dicom metadata but I could not see metadata keys that further has collection of dicom tags in it. As an example I wish to read 0054|0016 which further …

---

## [How to co-register mask on neuroimage generated from RTStruct dicom file?](https://discourse.itk.org/t/how-to-co-register-mask-on-neuroimage-generated-from-rtstruct-dicom-file/5825)

<div class="topic-metadata">

**Author:** [@Sunita\_Patel](https://discourse.itk.org/u/Sunita_Patel)\
**Replies:** 4\
**Last updated:** [March 27, 2023, 1:58pm UTC](https://discourse.itk.org/t/how-to-co-register-mask-on-neuroimage-generated-from-rtstruct-dicom-file/5825 "2023-03-27T13:58:54Z")

</div>

Dear Simple ITK Team, We have two DICOM series and two RTSTRUCT masks which are converted into Nifti files. The original dimension of the nifti files are (256, 256, 216). We are trying to do registration and resampling …

---

## [FFT Correlation: Normalized Sum of Square Difference](https://discourse.itk.org/t/fft-correlation-normalized-sum-of-square-difference/5827)

<div class="topic-metadata">

**Author:** [@elapins](https://discourse.itk.org/u/elapins)\
**Replies:** 1\
**Last updated:** [March 24, 2023, 4:06pm UTC](https://discourse.itk.org/t/fft-correlation-normalized-sum-of-square-difference/5827 "2023-03-24T16:06:45Z")

</div>

Hello, I am wondering if it would be possible to extend the FFTNormalizedCrossCorrelation function to use Normalized Sum of Square Differences instead of Cross Correlation metric? Thank you!

---

## [Transform of points using Euler3DTransform](https://discourse.itk.org/t/transform-of-points-using-euler3dtransform/5830)

<div class="topic-metadata">

**Author:** [@jm\_nc](https://discourse.itk.org/u/jm_nc)\
**Replies:** 3\
**Last updated:** [March 24, 2023, 12:47pm UTC](https://discourse.itk.org/t/transform-of-points-using-euler3dtransform/5830 "2023-03-24T12:47:35Z")

</div>

Hey Everyone - simple question from a newbie, I’m using simple ITK. I know the registration transform between two (nifti) volumes - I did it manually in MITK and have read back in the offset and rotation. Then I created…

---

## [Apply deformation field on source image to get the target image](https://discourse.itk.org/t/apply-deformation-field-on-source-image-to-get-the-target-image/5821)

<div class="topic-metadata">

**Author:** [@Xinyue](https://discourse.itk.org/u/Xinyue)\
**Replies:** 1\
**Last updated:** [March 22, 2023, 5:45pm UTC](https://discourse.itk.org/t/apply-deformation-field-on-source-image-to-get-the-target-image/5821 "2023-03-22T17:45:24Z")

</div>

Hi all, I am working on generating my own data, I have the deformation fired and the source image, and try to generate the target image. I found somewhere mentioned that it should be done with DisplacementFieldTransform…

---

## [Resampling Image: Finding original point in new resampled Image](https://discourse.itk.org/t/resampling-image-finding-original-point-in-new-resampled-image/5818)

<div class="topic-metadata">

**Author:** [@elapins](https://discourse.itk.org/u/elapins)\
**Replies:** 1\
**Last updated:** [March 22, 2023, 1:04pm UTC](https://discourse.itk.org/t/resampling-image-finding-original-point-in-new-resampled-image/5818 "2023-03-22T13:04:51Z")

</div>

I have a smaller image that is (512x512). I resampled it to a new space (692x512) and am now wondering how I can determine of a point in the smaller image, for example: location 25,25, in the larger image. I tried using…

---

## [Passing mask argument in N4BiasFieldCorrection()](https://discourse.itk.org/t/passing-mask-argument-in-n4biasfieldcorrection/5793)

<div class="topic-metadata">

**Author:** [@Thomas\_Jeong](https://discourse.itk.org/u/Thomas_Jeong)\
**Replies:** 3\
**Last updated:** [March 19, 2023, 11:19pm UTC](https://discourse.itk.org/t/passing-mask-argument-in-n4biasfieldcorrection/5793 "2023-03-19T23:19:09Z")

</div>

Hello all, Trying to use the N4BiasFieldCorrection() method to fix the intensity inhomogeneity in Dixon MRI scans. I have used the function with success just passing the image as the only argument, such as below: sitk.…

---

## [Neglecting Edge Errors in FFT Cross Correlation Results](https://discourse.itk.org/t/neglecting-edge-errors-in-fft-cross-correlation-results/5810)

<div class="topic-metadata">

**Author:** [@elapins](https://discourse.itk.org/u/elapins)\
**Replies:** 2\
**Last updated:** [March 17, 2023, 6:54pm UTC](https://discourse.itk.org/t/neglecting-edge-errors-in-fft-cross-correlation-results/5810 "2023-03-17T18:54:46Z")

</div>

I have been using the sitk FFTNormalizedCrossCorrelation function to match the smaller image to its “best” location in the larger image. My results at the moment are indicating that the best match is at the edge (shown …

---

## [Reading .tif images: vector of 8-bit unsigned in vs. 8-bit unsigned int](https://discourse.itk.org/t/reading-tif-images-vector-of-8-bit-unsigned-in-vs-8-bit-unsigned-int/5809)

<div class="topic-metadata">

**Author:** [@elapins](https://discourse.itk.org/u/elapins)\
**Replies:** 4\
**Last updated:** [March 17, 2023, 5:03pm UTC](https://discourse.itk.org/t/reading-tif-images-vector-of-8-bit-unsigned-in-vs-8-bit-unsigned-int/5809 "2023-03-17T17:03:23Z")

</div>

I have come across this issue, where some .tif files that I read into SimpleITK load as “8-but unsigned int”, but others load as “vector of 8-bit unsigned int”. I have been reading in the .tif images using sitk.ReadImag…

---

## [Template Matching in SimpleITK](https://discourse.itk.org/t/template-matching-in-simpleitk/5735)

<div class="topic-metadata">

**Author:** [@elapins](https://discourse.itk.org/u/elapins)\
**Replies:** 10\
**Last updated:** [March 8, 2023, 4:35pm UTC](https://discourse.itk.org/t/template-matching-in-simpleitk/5735 "2023-03-08T16:35:45Z")

</div>

I have used template matching in previous code, and was wondering if template matching is available in SimpleITK? Or if there are specific functions that will achieve the same outcome? Thank you!

---

## [Getting Displacement Data for specific points](https://discourse.itk.org/t/getting-displacement-data-for-specific-points/5753)

<div class="topic-metadata">

**Author:** [@elapins](https://discourse.itk.org/u/elapins)\
**Replies:** 11\
**Last updated:** [March 1, 2023, 5:17pm UTC](https://discourse.itk.org/t/getting-displacement-data-for-specific-points/5753 "2023-03-01T17:17:23Z")

</div>

I successfully applied the following type of registration, and would like to query specific points within the image and get the corresponding displacement for each point in the image. I have a composite outTx and can’t …

---

## [Displacement field transform in 3D](https://discourse.itk.org/t/displacement-field-transform-in-3d/5759)

<div class="topic-metadata">

**Author:** [@mokshagna\_sai\_teja](https://discourse.itk.org/u/mokshagna_sai_teja)\
**Replies:** 6\
**Last updated:** [February 28, 2023, 1:10am UTC](https://discourse.itk.org/t/displacement-field-transform-in-3d/5759 "2023-02-28T01:10:05Z")

</div>

temp is a forward 3D displacement field of size DxMxNx3. displacement\_image = sitk.GetImageFromArray(np.double(temp),sitk.sitkVectorFloat64) tx = sitk.DisplacementFieldTransform(displacement\_image) tx.SetInterpolator(…

---

## [SimpleITK: Registration working but applying the transform to a single point does not](https://discourse.itk.org/t/simpleitk-registration-working-but-applying-the-transform-to-a-single-point-does-not/5728)

<div class="topic-metadata">

**Author:** [@Bouthros](https://discourse.itk.org/u/Bouthros)\
**Replies:** 6\
**Last updated:** [February 24, 2023, 11:58pm UTC](https://discourse.itk.org/t/simpleitk-registration-working-but-applying-the-transform-to-a-single-point-does-not/5728 "2023-02-24T23:58:20Z")

</div>

Hi! I hope I am putting this question in the proper category. I followed the Jupyter notebook concerning the 3D registration and I tried to apply it to my problem. Here is my problem: I have 2 axial series, 1 fixed an…

---

## [Edge Issues: Displacement Registration](https://discourse.itk.org/t/edge-issues-displacement-registration/5749)

<div class="topic-metadata">

**Author:** [@elapins](https://discourse.itk.org/u/elapins)\
**Replies:** 0\
**Last updated:** [February 23, 2023, 8:04pm UTC](https://discourse.itk.org/t/edge-issues-displacement-registration/5749 "2023-02-23T20:04:04Z")

</div>

I have been trying to register the images attached via the displacement registration method provided: Image Registration Method Displacement 1 — SimpleITK 2.0rc2 documentation However, it seems that the edges of my resu…

---

## [Registering binary mask to x-ray image (2D to 2D) rigid image registration SimpleITK](https://discourse.itk.org/t/registering-binary-mask-to-x-ray-image-2d-to-2d-rigid-image-registration-simpleitk/5741)

<div class="topic-metadata">

**Author:** [@isuruwi](https://discourse.itk.org/u/isuruwi)\
**Replies:** 3\
**Last updated:** [February 22, 2023, 11:44pm UTC](https://discourse.itk.org/t/registering-binary-mask-to-x-ray-image-2d-to-2d-rigid-image-registration-simpleitk/5741 "2023-02-22T23:44:04Z")

</div>

I have an xray image and it’s corresponding predicted binary mask image (2D). I’m currently using simpleITK to rigidly register the binary mask to the x-ray image. However, when I apply the final transform to the moving …

---

## [Digital Image Correlation](https://discourse.itk.org/t/digital-image-correlation/5745)

<div class="topic-metadata">

**Author:** [@elapins](https://discourse.itk.org/u/elapins)\
**Replies:** 0\
**Last updated:** [February 22, 2023, 3:54pm UTC](https://discourse.itk.org/t/digital-image-correlation/5745 "2023-02-22T15:54:55Z")

</div>

Can anyone help with getting a registration framework set up for the matching portion of a Digital image correlation program?? Please feel free to send me a message too! Thank you!!

---

## [Universal Registration Framework](https://discourse.itk.org/t/universal-registration-framework/5729)

<div class="topic-metadata">

**Author:** [@elapins](https://discourse.itk.org/u/elapins)\
**Replies:** 9\
**Last updated:** [February 21, 2023, 6:32pm UTC](https://discourse.itk.org/t/universal-registration-framework/5729 "2023-02-21T18:32:56Z")

</div>

Hello, Is it possible to write a registration framework that would work for any image pair? Meaning, the same inputs and framework would work on image pairs of different specimens? Or is the ITK registration framework …

---

## [SimpleITK & MetaIO: changing the .raw extension](https://discourse.itk.org/t/simpleitk-metaio-changing-the-raw-extension/5724)

<div class="topic-metadata">

**Author:** [@ingmar.voigt](https://discourse.itk.org/u/ingmar.voigt)\
**Replies:** 2\
**Last updated:** [February 20, 2023, 2:20pm UTC](https://discourse.itk.org/t/simpleitk-metaio-changing-the-raw-extension/5724 "2023-02-20T14:20:23Z")

</div>

Dear all, When I save MHD images using https://simpleitk.org/doxygen/latest/html/classitk\_1\_1simple\_1\_1ImageFileWriter.html, is there a way to save with a different extension other than “.raw”/“.zraw”? VTK does support…

---

## [Coordinate System and Registration Transform Results](https://discourse.itk.org/t/coordinate-system-and-registration-transform-results/5718)

<div class="topic-metadata">

**Author:** [@elapins](https://discourse.itk.org/u/elapins)\
**Replies:** 3\
**Last updated:** [February 20, 2023, 2:02pm UTC](https://discourse.itk.org/t/coordinate-system-and-registration-transform-results/5718 "2023-02-20T14:02:56Z")

</div>

When I print the parameters for a certain image registration, what point is this translating?? the top left? or the center? I understand that the resulting transform transforms the fixed image to the moving, but what exa…

---

## [Registration: Dimensional Differences in Images, Padding](https://discourse.itk.org/t/registration-dimensional-differences-in-images-padding/5723)

<div class="topic-metadata">

**Author:** [@elapins](https://discourse.itk.org/u/elapins)\
**Replies:** 3\
**Last updated:** [February 18, 2023, 6:43pm UTC](https://discourse.itk.org/t/registration-dimensional-differences-in-images-padding/5723 "2023-02-18T18:43:34Z")

</div>

How does ITK/SimpleITK account for dimensional differences between images during registration?? OR do they need to be padded accordingly?

---

## [Affine Transform: Offset vs. fixed center](https://discourse.itk.org/t/affine-transform-offset-vs-fixed-center/5721)

<div class="topic-metadata">

**Author:** [@elapins](https://discourse.itk.org/u/elapins)\
**Replies:** 2\
**Last updated:** [February 18, 2023, 4:12pm UTC](https://discourse.itk.org/t/affine-transform-offset-vs-fixed-center/5721 "2023-02-18T16:12:39Z")

</div>

When initializing an affine transform for a registration framework, what is the difference between the offset and the fixed center inputs?

---

## [SimpleITK Registration](https://discourse.itk.org/t/simpleitk-registration/5709)

<div class="topic-metadata">

**Author:** [@elapins](https://discourse.itk.org/u/elapins)\
**Replies:** 2\
**Last updated:** [February 17, 2023, 9:10pm UTC](https://discourse.itk.org/t/simpleitk-registration/5709 "2023-02-17T21:10:28Z")

</div>

Hello, I have been trying to implement a SimpleITK registration framework to register a reference image that has no change with a deformed image (warped image). I split the reference image up into subregions and try to…

---

## [Saving LabelOverlay Image as DICOM series](https://discourse.itk.org/t/saving-labeloverlay-image-as-dicom-series/5689)

<div class="topic-metadata">

**Author:** [@Franciska](https://discourse.itk.org/u/Franciska)\
**Replies:** 10\
**Last updated:** [February 17, 2023, 5:12am UTC](https://discourse.itk.org/t/saving-labeloverlay-image-as-dicom-series/5689 "2023-02-17T05:12:06Z")

</div>

Hi! I have a DICOM series, and with the segmentations I create a LabelOverlay Image. When I write it out as a DICOM series, I modified the following datatags in the created image, to get an RGB image.: image\_slice.Se…

---

## [Creating mask from rtstruct](https://discourse.itk.org/t/creating-mask-from-rtstruct/3826)

<div class="topic-metadata">

**Author:** [@roirodriguez](https://discourse.itk.org/u/roirodriguez)\
**Replies:** 4\
**Last updated:** [February 16, 2023, 5:45pm UTC](https://discourse.itk.org/t/creating-mask-from-rtstruct/3826 "2023-02-16T17:45:57Z")

</div>

Hi, I’m just beginning with SimpleITK and all other medical image related software. I’m actually loading some dicom series and their corresponding RTSTRUCT contours in python, manually with numpy, because as far as i kn…

---

## [sitk.WriteImage to multiple png files](https://discourse.itk.org/t/sitk-writeimage-to-multiple-png-files/5701)

<div class="topic-metadata">

**Author:** [@Sean\_Hatton](https://discourse.itk.org/u/Sean_Hatton)\
**Replies:** 3\
**Last updated:** [February 13, 2023, 6:25pm UTC](https://discourse.itk.org/t/sitk-writeimage-to-multiple-png-files/5701 "2023-02-13T18:25:38Z")

</div>

I can write a 3d sitk Image to a single png, is there a hidden switch to get multiple pngs per 3D image? Cheers, Sean Hatton, PhD UCSD

---

## [CenteredTransformInitializer with only TranslationTransform?](https://discourse.itk.org/t/centeredtransforminitializer-with-only-translationtransform/4635)

<div class="topic-metadata">

**Author:** [@sdbonte](https://discourse.itk.org/u/sdbonte)\
**Replies:** 2\
**Last updated:** [February 11, 2023, 1:20pm UTC](https://discourse.itk.org/t/centeredtransforminitializer-with-only-translationtransform/4635 "2023-02-11T13:20:10Z")

</div>

I am trying to register two 3D CT scans using SimpleITK. After checking they have the same orientation, I load them from .nii.gz files. Then they look like this (central axial slice displayed): Fixed image: Moving im…

[Previous page](https://discourse.itk.org/tag/simpleitk/10.md?match_all_tags=true&page=4&tags%5B%5D=simpleitk)

[Next page](https://discourse.itk.org/tag/simpleitk/10.md?match_all_tags=true&page=6&tags%5B%5D=simpleitk)
