# Latest

**URL:** https://discourse.itk.org/latest.md?page=18

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

**Page:** 19

---

## [How to read .img file in SimpleITK?](https://discourse.itk.org/t/how-to-read-img-file-in-simpleitk/6265)

<div class="topic-metadata">

**Author:** [@debapriya](https://discourse.itk.org/u/debapriya)\
**Replies:** 2\
**Last updated:** [October 27, 2023, 8:38pm UTC](https://discourse.itk.org/t/how-to-read-img-file-in-simpleitk/6265 "2023-10-27T20:38:14Z")

</div>

I have downloaded 4D CT data from DIRLAB image database. The images are in .img format. I tried to read these images using sitk.ReadImage method. sitk.ReadImage(image\_file\_name, sitk.sitkFloat32). I am getting the …

---

## [Point indices after 3D rotation](https://discourse.itk.org/t/point-indices-after-3d-rotation/6249)

<div class="topic-metadata">

**Author:** [@Eloy\_Schultz](https://discourse.itk.org/u/Eloy_Schultz)\
**Replies:** 10\
**Last updated:** [October 24, 2023, 8:07pm UTC](https://discourse.itk.org/t/point-indices-after-3d-rotation/6249 "2023-10-24T20:07:41Z")

</div>

Hello there, I am trying to rotate a CT-scan and then locate the centroid of a segmented lesion. I have a SITK image named image and a SITK image containing a binary segmentation mask named ann. The idea is as follows: …

---

## [Writing a nrrd segmentation file in SimpleITK](https://discourse.itk.org/t/writing-a-nrrd-segmentation-file-in-simpleitk/3903)

<div class="topic-metadata">

**Author:** [@Diego\_C](https://discourse.itk.org/u/Diego_C)\
**Replies:** 13\
**Last updated:** [October 24, 2023, 3:55pm UTC](https://discourse.itk.org/t/writing-a-nrrd-segmentation-file-in-simpleitk/3903 "2023-10-24T15:55:09Z")

</div>

Hi! How can I save my connected components to a nrrd segmentation file that I can visualize in Slicer? Thanks, Diego

---

## [Are there any instances about the registration of 3D medical image by landmark?](https://discourse.itk.org/t/are-there-any-instances-about-the-registration-of-3d-medical-image-by-landmark/6256)

<div class="topic-metadata">

**Author:** [@SeanHan](https://discourse.itk.org/u/SeanHan)\
**Replies:** 7\
**Last updated:** [October 23, 2023, 2:32pm UTC](https://discourse.itk.org/t/are-there-any-instances-about-the-registration-of-3d-medical-image-by-landmark/6256 "2023-10-23T14:32:11Z")

</div>

When I set LandmarkBasedTransformInitializer instead of CenteredTransformInitializer, it seems a wrong result. Any suggestions?

---

## [replacement for CylinderSpatialObject?](https://discourse.itk.org/t/replacement-for-cylinderspatialobject/3771)

<div class="topic-metadata">

**Author:** [@KrisThielemans](https://discourse.itk.org/u/KrisThielemans)\
**Replies:** 6\
**Last updated:** [October 18, 2023, 7:03pm UTC](https://discourse.itk.org/t/replacement-for-cylinderspatialobject/3771 "2023-10-18T19:03:51Z")

</div>

ITK 4 had CylinderSpatialObject. However, this was (silently?) removed in SpatialObject Refactoring for ITKv5 · Pull Request #613. Is there a replacement for it?

---

## [Partial Volume and (linear) interpolation](https://discourse.itk.org/t/partial-volume-and-linear-interpolation/6254)

<div class="topic-metadata">

**Author:** [@Romain\_Valabregue](https://discourse.itk.org/u/Romain_Valabregue)\
**Replies:** 1\
**Last updated:** [October 17, 2023, 1:41pm UTC](https://discourse.itk.org/t/partial-volume-and-linear-interpolation/6254 "2023-10-17T13:41:45Z")

</div>

Hello I am trying to construct a ground truth partial volume map (of brain region) For instance I start with a high resolution (0.25 mm³) binnary mask of Gray Matter (GM) and I want to compute the partial volume at 1mm…

---

## [Non-rigid registration using BSpline transform throwing error](https://discourse.itk.org/t/non-rigid-registration-using-bspline-transform-throwing-error/6248)

<div class="topic-metadata">

**Author:** [@debapriya](https://discourse.itk.org/u/debapriya)\
**Replies:** 3\
**Last updated:** [October 13, 2023, 4:47pm UTC](https://discourse.itk.org/t/non-rigid-registration-using-bspline-transform-throwing-error/6248 "2023-10-13T16:47:41Z")

</div>

I am trying to register the POPI model using BSpline Transform (Code given in SimpleITK Tutorial - 06\_advanced\_registration.ipynb). However instead of TRE used in the Tutorial, I am trying to compute other accuracy metri…

---

## [where itk-wasm tutorial, itk-wasm labeling, registration, etc are moved?](https://discourse.itk.org/t/where-itk-wasm-tutorial-itk-wasm-labeling-registration-etc-are-moved/6246)

<div class="topic-metadata">

**Author:** [@sag](https://discourse.itk.org/u/sag)\
**Replies:** 2\
**Last updated:** [October 13, 2023, 1:12pm UTC](https://discourse.itk.org/t/where-itk-wasm-tutorial-itk-wasm-labeling-registration-etc-are-moved/6246 "2023-10-13T13:12:48Z")

</div>

@matt.mccormick hi, i have been out in webassembly world for couple of months and now i am back and all my links to itk-wasm , tutorial and etc. are gone and removed, could you please tell me where are they moved? BR …

---

## [TransformToDisplacementField Affine outputting similar but different transformation](https://discourse.itk.org/t/transformtodisplacementfield-affine-outputting-similar-but-different-transformation/6245)

<div class="topic-metadata">

**Author:** [@CrownMella](https://discourse.itk.org/u/CrownMella)\
**Replies:** 6\
**Last updated:** [October 5, 2023, 7:27pm UTC](https://discourse.itk.org/t/transformtodisplacementfield-affine-outputting-similar-but-different-transformation/6245 "2023-10-05T19:27:50Z")

</div>

Hi all, I’m trying to convert an affine transformation into a displacement field using the code below: sitk.WriteTransform(aft1, 'aft1.txt') df = sitk.TransformToDisplacementFieldFilter() df.SetReferenceImage(moving\_im…

---

## [Incorrect registered image](https://discourse.itk.org/t/incorrect-registered-image/6243)

<div class="topic-metadata">

**Author:** [@pratibha](https://discourse.itk.org/u/pratibha)\
**Replies:** 3\
**Last updated:** [October 5, 2023, 1:07pm UTC](https://discourse.itk.org/t/incorrect-registered-image/6243 "2023-10-05T13:07:17Z")

</div>

I have moving image of size 256x256x11 and fixed image of 512x512x512 which is the template image. I just want to register the moving to fixed space. I am getting improper registered image. The sample of the output is gi…

---

## [Using an image as a mask](https://discourse.itk.org/t/using-an-image-as-a-mask/3921)

<div class="topic-metadata">

**Author:** [@Diego\_C](https://discourse.itk.org/u/Diego_C)\
**Replies:** 8\
**Last updated:** [October 4, 2023, 11:31pm UTC](https://discourse.itk.org/t/using-an-image-as-a-mask/3921 "2023-10-04T23:31:51Z")

</div>

Hi! I want to retrieve the original intensities of image but only if the voxel is 1 in the foreground mask My code looks like this: # compute foreground image # ------------------------------------- bg\_data = sitk.Get…

---

## [RegionOfInterestImageFilter preserving indices](https://discourse.itk.org/t/regionofinterestimagefilter-preserving-indices/6228)

<div class="topic-metadata">

**Author:** [@GeorgeStetten](https://discourse.itk.org/u/GeorgeStetten)\
**Replies:** 8\
**Last updated:** [October 3, 2023, 1:50pm UTC](https://discourse.itk.org/t/regionofinterestimagefilter-preserving-indices/6228 "2023-10-03T13:50:53Z")

</div>

I am using RegionOfInterestImageFilter and want to preserve the indices of the original image in the resampled image. The default seems to be that the sampled region starts at (0,0,0). I have tried roiFilter-\>SetRegio…

---

## [SimpleITK and Python 3.11](https://discourse.itk.org/t/simpleitk-and-python-3-11/6234)

<div class="topic-metadata">

**Author:** [@Wallesss](https://discourse.itk.org/u/Wallesss)\
**Replies:** 18\
**Last updated:** [September 29, 2023, 2:01pm UTC](https://discourse.itk.org/t/simpleitk-and-python-3-11/6234 "2023-09-29T14:01:03Z")

</div>

Hello, the SimpleITK 1.2.4 library does not connect to the project and the error keeps appearing: ModuleNotFoundError: no module named ‘simpleitk.\_simpleitk’. Python version is 3.11. Spyder version is 5.4. When using the…

---

## [Image metrics that incorporate segmentation into registration](https://discourse.itk.org/t/image-metrics-that-incorporate-segmentation-into-registration/6223)

<div class="topic-metadata">

**Author:** [@beastwood](https://discourse.itk.org/u/beastwood)\
**Replies:** 1\
**Last updated:** [September 27, 2023, 8:18pm UTC](https://discourse.itk.org/t/image-metrics-that-incorporate-segmentation-into-registration/6223 "2023-09-27T20:18:33Z")

</div>

I am looking for a way to incorporate the results of image segmentation into an image registration framework and would love some feedback or advice on several possible avenues to pursue. Similar to @dyoll’s question (Me…

---

## [Direction of images not matching](https://discourse.itk.org/t/direction-of-images-not-matching/6232)

<div class="topic-metadata">

**Author:** [@sdesutter](https://discourse.itk.org/u/sdesutter)\
**Replies:** 1\
**Last updated:** [September 26, 2023, 5:36pm UTC](https://discourse.itk.org/t/direction-of-images-not-matching/6232 "2023-09-26T17:36:52Z")

</div>

Hi, I’ve been using a dataset of registered brain MRI’s (T1, T2, FLAIR and T1ce) as input for a CNN implemented in MONAI. The different modalities have been registered using BRAINSFIT. After registration, segmentations …

---

## [Got the runtime error, Did not get requested region!](https://discourse.itk.org/t/got-the-runtime-error-did-not-get-requested-region/6226)

<div class="topic-metadata">

**Author:** [@pratibha](https://discourse.itk.org/u/pratibha)\
**Replies:** 2\
**Last updated:** [September 25, 2023, 4:10pm UTC](https://discourse.itk.org/t/got-the-runtime-error-did-not-get-requested-region/6226 "2023-09-25T16:10:00Z")

</div>

Hello, I am new to itk-elastix and the registration process. I am doing the rigid registration, the data type for both moving and fixed is float and I have used the already defined parameter file for registration. The pa…

---

## [What is the structure of HDF5 / h5 file](https://discourse.itk.org/t/what-is-the-structure-of-hdf5-h5-file/6200)

<div class="topic-metadata">

**Author:** [@m.ded](https://discourse.itk.org/u/m.ded)\
**Replies:** 4\
**Last updated:** [September 22, 2023, 8:43pm UTC](https://discourse.itk.org/t/what-is-the-structure-of-hdf5-h5-file/6200 "2023-09-22T20:43:48Z")

</div>

I use ANTs GitHub - ANTsX/ANTs: Advanced Normalization Tools (ANTs) to to create deformation fields in HDF5 format. ANTs h5 transform files come from the ITK underlying IO system. I would like to understand the struct…

---

## [ITK is now on the map of Open Source Science (OSSci)](https://discourse.itk.org/t/itk-is-now-on-the-map-of-open-source-science-ossci/6224)

<div class="topic-metadata">

**Author:** [@matt.mccormick](https://discourse.itk.org/u/matt.mccormick)\
**Replies:** 0\
**Last updated:** [September 22, 2023, 8:30pm UTC](https://discourse.itk.org/t/itk-is-now-on-the-map-of-open-source-science-ossci/6224 "2023-09-22T20:30:59Z")

</div>

See: OSSci MOSS • Kumu

---

## [ITKModuleExternal.cmake is not published with sudo make install](https://discourse.itk.org/t/itkmoduleexternal-cmake-is-not-published-with-sudo-make-install/6208)

<div class="topic-metadata">

**Author:** [@yziquel](https://discourse.itk.org/u/yziquel)\
**Replies:** 2\
**Last updated:** [September 22, 2023, 8:27pm UTC](https://discourse.itk.org/t/itkmoduleexternal-cmake-is-not-published-with-sudo-make-install/6208 "2023-09-22T20:27:06Z")

</div>

Hi. I’ve got an issue that is reported in the following github issues: Roughly put: I am trying to build ITK and itk-wasm from source, living on the git repo head. The ITKModuleExternal.cmake file is supposed to com…

---

## [How to remove CT bed from 3D CT image?](https://discourse.itk.org/t/how-to-remove-ct-bed-from-3d-ct-image/6219)

<div class="topic-metadata">

**Author:** [@debapriya](https://discourse.itk.org/u/debapriya)\
**Replies:** 6\
**Last updated:** [September 22, 2023, 3:52pm UTC](https://discourse.itk.org/t/how-to-remove-ct-bed-from-3d-ct-image/6219 "2023-09-22T15:52:01Z")

</div>

I have 3D CT image of the head (DICOM image). It looks like the following. I want to remove the imaging machine from the image. Is there any function in SimpleITK, which does this? I saw a previous query similar to …

---

## [Arrays of individual connected components](https://discourse.itk.org/t/arrays-of-individual-connected-components/6065)

<div class="topic-metadata">

**Author:** [@Sean\_Hatton](https://discourse.itk.org/u/Sean_Hatton)\
**Replies:** 13\
**Last updated:** [September 22, 2023, 3:06pm UTC](https://discourse.itk.org/t/arrays-of-individual-connected-components/6065 "2023-09-22T15:06:16Z")

</div>

Using connected components, I am iterating through a 3D image with several blobs. I need the array/mesh of each components, how can I do this without writing too much to disk? I can get individual stats, I need the indiv…

---

## [Metrics for registration of labelmaps](https://discourse.itk.org/t/metrics-for-registration-of-labelmaps/5755)

<div class="topic-metadata">

**Author:** [@dyoll](https://discourse.itk.org/u/dyoll)\
**Replies:** 1\
**Last updated:** [September 22, 2023, 3:02pm UTC](https://discourse.itk.org/t/metrics-for-registration-of-labelmaps/5755 "2023-09-22T15:02:42Z")

</div>

With the availability of machine learning it is now often possible to obtain reasonable guesses for segmentations. However, ML-based inference usually does not provide topological/connectivity guarantees for the resultin…

---

## [SimpleITK 2.3.0 Release](https://discourse.itk.org/t/simpleitk-2-3-0-release/6222)

<div class="topic-metadata">

**Author:** [@blowekamp](https://discourse.itk.org/u/blowekamp)\
**Replies:** 0\
**Last updated:** [September 21, 2023, 8:12pm UTC](https://discourse.itk.org/t/simpleitk-2-3-0-release/6222 "2023-09-21T20:12:21Z")

</div>

Announcement Announcing the SimpleITK 2.3.0 Release! The release includes new features, behavior changes, documentation updates and bug fixes. Installing SimpleITK Complete instructions on getting started with SimpleIT…

---

## [How to turn off ImageSeriesReader Warnings? (SimpleITK JAVA)](https://discourse.itk.org/t/how-to-turn-off-imageseriesreader-warnings-simpleitk-java/6217)

<div class="topic-metadata">

**Author:** [@Salu\_Ramos](https://discourse.itk.org/u/Salu_Ramos)\
**Replies:** 4\
**Last updated:** [September 21, 2023, 5:36pm UTC](https://discourse.itk.org/t/how-to-turn-off-imageseriesreader-warnings-simpleitk-java/6217 "2023-09-21T17:36:46Z")

</div>

the ImageSeriesReader are printing Warnings in my console when opening certain series. i’m using debugOff() method but is not working for this warnings.

---

## [Is there a v4 version of the itkVersorTransformOptimizer class available？](https://discourse.itk.org/t/is-there-a-v4-version-of-the-itkversortransformoptimizer-class-available/6221)

<div class="topic-metadata">

**Author:** [@ma1282029525](https://discourse.itk.org/u/ma1282029525)\
**Replies:** 0\
**Last updated:** [September 21, 2023, 8:46am UTC](https://discourse.itk.org/t/is-there-a-v4-version-of-the-itkversortransformoptimizer-class-available/6221 "2023-09-21T08:46:43Z")

</div>

When I was reviewing the documentation for itkVersorTransform, I saw that it is recommended to use the itk:: VersorRigid3DTransformOptimizer class. However, it is the v3 version, and I have temporarily used a RegularStep…

---

## [Is there no binary type '01' in the pixel type of SimpleItk?](https://discourse.itk.org/t/is-there-no-binary-type-01-in-the-pixel-type-of-simpleitk/6211)

<div class="topic-metadata">

**Author:** [@jumbojing](https://discourse.itk.org/u/jumbojing)\
**Replies:** 9\
**Last updated:** [September 15, 2023, 10:47pm UTC](https://discourse.itk.org/t/is-there-no-binary-type-01-in-the-pixel-type-of-simpleitk/6211 "2023-09-15T22:47:51Z")

</div>

Is there no binary type ‘01’ in the pixel type of SimpleItk?

---

## [How to read resting state fMRI image using SimpleITK?](https://discourse.itk.org/t/how-to-read-resting-state-fmri-image-using-simpleitk/6209)

<div class="topic-metadata">

**Author:** [@debapriya](https://discourse.itk.org/u/debapriya)\
**Replies:** 0\
**Last updated:** [September 15, 2023, 7:47am UTC](https://discourse.itk.org/t/how-to-read-resting-state-fmri-image-using-simpleitk/6209 "2023-09-15T07:47:09Z")

</div>

I have a fMRI image of size 64,64,39,192. It is in nii.gz format. What is the process to read this image in SimpleITK? sitk.ReadImage is showing the following error. TypeError: Invalid shape (39, 64, 64) for image data

---

## [How to convert .nii image to dicom?](https://discourse.itk.org/t/how-to-convert-nii-image-to-dicom/6197)

<div class="topic-metadata">

**Author:** [@debapriya](https://discourse.itk.org/u/debapriya)\
**Replies:** 15\
**Last updated:** [September 14, 2023, 5:16pm UTC](https://discourse.itk.org/t/how-to-convert-nii-image-to-dicom/6197 "2023-09-14T17:16:31Z")

</div>

I have downloaded a brain image dataset, where images are in .nii format. Please tell me how to convert these images to .dicom format, without any loss of image information.

---

## [how to label MRI images for classification task?](https://discourse.itk.org/t/how-to-label-mri-images-for-classification-task/6203)

<div class="topic-metadata">

**Author:** [@Uljibuh](https://discourse.itk.org/u/Uljibuh)\
**Replies:** 2\
**Last updated:** [September 14, 2023, 2:10pm UTC](https://discourse.itk.org/t/how-to-label-mri-images-for-classification-task/6203 "2023-09-14T14:10:57Z")

</div>

Hi all, I am working on a prostate cancer classification task using both ADC and DWI images for each patient in nii format. the task is to tell whether the patient has the cancer or not, ie, positive or negative. and…

---

## [Are there some methods to smooth a displacement vector field?](https://discourse.itk.org/t/are-there-some-methods-to-smooth-a-displacement-vector-field/6149)

<div class="topic-metadata">

**Author:** [@guo7212](https://discourse.itk.org/u/guo7212)\
**Replies:** 4\
**Last updated:** [September 14, 2023, 6:42am UTC](https://discourse.itk.org/t/are-there-some-methods-to-smooth-a-displacement-vector-field/6149 "2023-09-14T06:42:16Z")

</div>

Hi, I got a displacement vector filed after the non-rigid registration. I want to smooth the displacement vector field. Are there some methods in ITK?

[Previous page](https://discourse.itk.org/latest.md?page=17)

[Next page](https://discourse.itk.org/latest.md?page=19)
