# Uncategorized

**URL:** https://discourse.itk.org/c/uncategorized/1.md?no_subcategories=false&page=4

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

**Page:** 5

---

## [two label map registration. Bad results.](https://discourse.itk.org/t/two-label-map-registration-bad-results/5670)

<div class="topic-metadata">

**Author:** [@banikr](https://discourse.itk.org/u/banikr)\
**Replies:** 16\
**Last updated:** [February 8, 2023, 11:07pm UTC](https://discourse.itk.org/t/two-label-map-registration-bad-results/5670 "2023-02-08T23:07:55Z")

</div>

I have a mask that has 2 labels. I want to register it on a segmentation map that has 3 labels(both cases background 0). I have run the following method but getting bad result outputs: mask\_itk = sitk.GetImageFromA…

---

## [PhyCV](https://discourse.itk.org/t/phycv/5662)

<div class="topic-metadata">

**Author:** [@Jon](https://discourse.itk.org/u/Jon)\
**Replies:** 2\
**Last updated:** [February 2, 2023, 11:42am UTC](https://discourse.itk.org/t/phycv/5662 "2023-02-02T11:42:20Z")

</div>

PhyCV is a physics-based public domain package for computer vision recently released. See https://github.com/JalaliLabUCLA/phycv/blob/main/README.md I’m now using the VEViD routine to preprocess under-stained H&E histo…

---

## [Squeeze dicom ITK image from 4D to 3D](https://discourse.itk.org/t/squeeze-dicom-itk-image-from-4d-to-3d/4300)

<div class="topic-metadata">

**Author:** [@banikr](https://discourse.itk.org/u/banikr)\
**Replies:** 4\
**Last updated:** [July 30, 2021, 4:53pm UTC](https://discourse.itk.org/t/squeeze-dicom-itk-image-from-4d-to-3d/4300 "2021-07-30T16:53:02Z")

</div>

I have Dicom images in an unusual format. For example, usually, Dicom images are saved in a casepath/folder in multiple slices. IM-0001-0240-0001.dcm I use the following helper function to read the dicom images: def d…

---

## [registration of histological hne image on segmentation label.](https://discourse.itk.org/t/registration-of-histological-hne-image-on-segmentation-label/5659)

<div class="topic-metadata">

**Author:** [@banikr](https://discourse.itk.org/u/banikr)\
**Replies:** 2\
**Last updated:** [January 30, 2023, 9:10pm UTC](https://discourse.itk.org/t/registration-of-histological-hne-image-on-segmentation-label/5659 "2023-01-30T21:10:11Z")

</div>

Hello, I am trying to register a high resolution H & E stained image(RGB) on a segmentation image. The RGB image size is: (620, 734, 3) and label image is: (96, 73) The problems are: Is it possible to register 3 ch…

---

## [Is there a way to get the dicom slice index number of the slice which contains the ROI?](https://discourse.itk.org/t/is-there-a-way-to-get-the-dicom-slice-index-number-of-the-slice-which-contains-the-roi/5637)

<div class="topic-metadata">

**Author:** [@DushiFdo](https://discourse.itk.org/u/DushiFdo)\
**Replies:** 1\
**Last updated:** [January 20, 2023, 2:27pm UTC](https://discourse.itk.org/t/is-there-a-way-to-get-the-dicom-slice-index-number-of-the-slice-which-contains-the-roi/5637 "2023-01-20T14:27:30Z")

</div>

Hello, I am working with 3D Dicom images. I would like to get the index of the slices which contains the liver region (ROI) as some slices do not show liver or full black. Is it possible to do it in sitk?

---

## [Compute TRE after image registration for 4DCT lung images](https://discourse.itk.org/t/compute-tre-after-image-registration-for-4dct-lung-images/5558)

<div class="topic-metadata">

**Author:** [@VHK](https://discourse.itk.org/u/VHK)\
**Replies:** 3\
**Last updated:** [January 17, 2023, 2:26pm UTC](https://discourse.itk.org/t/compute-tre-after-image-registration-for-4dct-lung-images/5558 "2023-01-17T14:26:46Z")

</div>

Hello, I am doing a deformable image registration for 4DCT lung images. I want to evaluate the registration accuracy by calculating the TRE in SITK. I did Elastix registration in 3D-Slicer and got the transformation as …

---

## [Resampling results in an all black images](https://discourse.itk.org/t/resampling-results-in-an-all-black-images/5624)

<div class="topic-metadata">

**Author:** [@DushiFdo](https://discourse.itk.org/u/DushiFdo)\
**Replies:** 6\
**Last updated:** [January 12, 2023, 9:57pm UTC](https://discourse.itk.org/t/resampling-results-in-an-all-black-images/5624 "2023-01-12T21:57:46Z")

</div>

I have two CT volumetric scans for the same patient (for arterial and venous) with different number of slices. e.g. arterial scan has ~146 dicom images whereas venous scan has ~156 dicom images. I want to resample one p…

---

## [About Mask Registration](https://discourse.itk.org/t/about-mask-registration/5606)

<div class="topic-metadata">

**Author:** [@ma1282029525](https://discourse.itk.org/u/ma1282029525)\
**Replies:** 0\
**Last updated:** [January 4, 2023, 10:08am UTC](https://discourse.itk.org/t/about-mask-registration/5606 "2023-01-04T10:08:25Z")

</div>

I want to complete a mask registration and add a mask to the dicom sequence(3D) to speed up the registration. I found an example, but it is 2d and does not explain how to get the mask(I do not know how to create the mask…

---

## [Merge different labels in a single image](https://discourse.itk.org/t/merge-different-labels-in-a-single-image/5584)

<div class="topic-metadata">

**Author:** [@EneaP](https://discourse.itk.org/u/EneaP)\
**Replies:** 1\
**Last updated:** [December 21, 2022, 5:13pm UTC](https://discourse.itk.org/t/merge-different-labels-in-a-single-image/5584 "2022-12-21T17:13:34Z")

</div>

Hi, I have 7 different labels in each 7 different binary images. All of these images are 3D images provided by CT scan, they have a number of slices and 512x512 number of pixels for each slices. I want to merge these sev…

---

## [In the registration process, an iteration is ended without starting](https://discourse.itk.org/t/in-the-registration-process-an-iteration-is-ended-without-starting/5577)

<div class="topic-metadata">

**Author:** [@ma1282029525](https://discourse.itk.org/u/ma1282029525)\
**Replies:** 0\
**Last updated:** [December 19, 2022, 7:33am UTC](https://discourse.itk.org/t/in-the-registration-process-an-iteration-is-ended-without-starting/5577 "2022-12-19T07:33:46Z")

</div>

What may be the reason?The measurement is MattesMutualInformationImageToImageMetricv4

---

## [Can't compile ITKElastix with python bindings:](https://discourse.itk.org/t/cant-compile-itkelastix-with-python-bindings/5546)

<div class="topic-metadata">

**Author:** [@eric](https://discourse.itk.org/u/eric)\
**Replies:** 4\
**Last updated:** [December 8, 2022, 7:22pm UTC](https://discourse.itk.org/t/cant-compile-itkelastix-with-python-bindings/5546 "2022-12-08T19:22:48Z")

</div>

Hi, I started compiling ITKElastix with python bindings but I keep getting errors like these: elxParameterObject: warning(4): ITK type not wrapped, or currently not known: itk::DataObject elxParameterObject: warnin…

---

## [How to use ITK multi threading primitives to do parallel execution of loop iteration](https://discourse.itk.org/t/how-to-use-itk-multi-threading-primitives-to-do-parallel-execution-of-loop-iteration/5531)

<div class="topic-metadata">

**Author:** [@br\_cpvc](https://discourse.itk.org/u/br_cpvc)\
**Replies:** 6\
**Last updated:** [December 7, 2022, 9:34am UTC](https://discourse.itk.org/t/how-to-use-itk-multi-threading-primitives-to-do-parallel-execution-of-loop-iteration/5531 "2022-12-07T09:34:58Z")

</div>

I am currently working on a patch which accelerates the execution speed of the ANTs Atropos application. I have until now been using openmp to implement the acceleration. The suggested code changes and initial related di…

---

## [Pre-processing segmentation mask](https://discourse.itk.org/t/pre-processing-segmentation-mask/5530)

<div class="topic-metadata">

**Author:** [@DushiFdo](https://discourse.itk.org/u/DushiFdo)\
**Replies:** 9\
**Last updated:** [December 6, 2022, 7:31pm UTC](https://discourse.itk.org/t/pre-processing-segmentation-mask/5530 "2022-12-06T19:31:30Z")

</div>

I am working with 3D CT images (Dicoms), and I performed several pre-processing steps on the input images such as resampling, normalizing, removing noise, crop image, resizing, crop center and reshaping to (128, 128, 128…

---

## [What is the code for sitk.Tramsform()?](https://discourse.itk.org/t/what-is-the-code-for-sitk-tramsform/5495)

<div class="topic-metadata">

**Author:** [@pranoy-ray](https://discourse.itk.org/u/pranoy-ray)\
**Replies:** 8\
**Last updated:** [November 17, 2022, 9:13pm UTC](https://discourse.itk.org/t/what-is-the-code-for-sitk-tramsform/5495 "2022-11-17T21:13:55Z")

</div>

def make\_isotropicBCC( image, interpolator=sitk.sitkLinear, spacing=None, default\_value=0, standardize\_axes=False,): original\_spacing = image.GetSpacing() # Make image isotropic via r…

---

## ['itk' has no attribute 'structure\_preserving\_color\_normalization\_filter'](https://discourse.itk.org/t/itk-has-no-attribute-structure-preserving-color-normalization-filter/5498)

<div class="topic-metadata">

**Author:** [@Jon](https://discourse.itk.org/u/Jon)\
**Replies:** 2\
**Last updated:** [November 17, 2022, 11:58am UTC](https://discourse.itk.org/t/itk-has-no-attribute-structure-preserving-color-normalization-filter/5498 "2022-11-17T11:58:22Z")

</div>

The Python 3.8 script below fails with: AttributeError: module ‘itk’ has no attribute ‘structure\_preserving\_color\_normalization\_filter’ # https://www.kitware.com/new-insight-toolkit-itk-module-for-structure-preserving-…

---

## [How can I keep the association between input image coordinate (z-axis) and segmentation mask?](https://discourse.itk.org/t/how-can-i-keep-the-association-between-input-image-coordinate-z-axis-and-segmentation-mask/5467)

<div class="topic-metadata">

**Author:** [@DushiFdo](https://discourse.itk.org/u/DushiFdo)\
**Replies:** 7\
**Last updated:** [November 11, 2022, 1:46pm UTC](https://discourse.itk.org/t/how-can-i-keep-the-association-between-input-image-coordinate-z-axis-and-segmentation-mask/5467 "2022-11-11T13:46:35Z")

</div>

Hello, I am working with 3D CT images which are consists of a series of 2D slices. I resized them into (128 x 128 x 128) My segmentation masks are provided as xml files and have segmentations only for like 3 or 4 slice…

---

## [RuntimeError: Exception thrown in SimpleITK ImageSeriesReader\_Execute](https://discourse.itk.org/t/runtimeerror-exception-thrown-in-simpleitk-imageseriesreader-execute/5484)

<div class="topic-metadata">

**Author:** [@DushiFdo](https://discourse.itk.org/u/DushiFdo)\
**Replies:** 0\
**Last updated:** [November 11, 2022, 1:50am UTC](https://discourse.itk.org/t/runtimeerror-exception-thrown-in-simpleitk-imageseriesreader-execute/5484 "2022-11-11T01:50:42Z")

</div>

I am trying to read a 3D dicom image with sitk as follows: def read\_first\_series\_in\_dir(dir): series\_reader = sitk.ImageSeriesReader() series\_IDs = sitk.ImageSeriesReader.GetGDCMSeriesIDs(dir) series\_file\_na…

---

## [How to output label map in C++?](https://discourse.itk.org/t/how-to-output-label-map-in-c/5459)

<div class="topic-metadata">

**Author:** [@SummerZ2020](https://discourse.itk.org/u/SummerZ2020)\
**Replies:** 5\
**Last updated:** [November 4, 2022, 12:55am UTC](https://discourse.itk.org/t/how-to-output-label-map-in-c/5459 "2022-11-04T00:55:47Z")

</div>

hello, I am using label map to remove some undesirable regions in binary image. first, call BinaryImageToShapeLabelMapFilter to get label map, then output the label map and all the objects’ centroids. I have checked t…

---

## [Adding support for customizing ITK namespace](https://discourse.itk.org/t/adding-support-for-customizing-itk-namespace/5170)

<div class="topic-metadata">

**Author:** [@jcfr](https://discourse.itk.org/u/jcfr)\
**Replies:** 13\
**Last updated:** [October 11, 2022, 2:09pm UTC](https://discourse.itk.org/t/adding-support-for-customizing-itk-namespace/5170 "2022-10-11T14:09:29Z")

</div>

Plan We propose to update ITK to support customizing the ITK namespace. Motivation These change will allow importing itk python modules into application themselves built against ITK and ensure filter execution return va…

---

## [difference between resample result in c++ version and python version](https://discourse.itk.org/t/difference-between-resample-result-in-c-version-and-python-version/5374)

<div class="topic-metadata">

**Author:** [@SummerZ2020](https://discourse.itk.org/u/SummerZ2020)\
**Replies:** 2\
**Last updated:** [September 30, 2022, 2:49am UTC](https://discourse.itk.org/t/difference-between-resample-result-in-c-version-and-python-version/5374 "2022-09-30T02:49:05Z")

</div>

Hello all, I am using ITK to resample CT 3D volume. I have done two version, one is c++, one is python. The difference between their result is not small. The bigger difference is existed in boundary part in the image.BT…

---

## [ChangeInformationImageFilter missing from Pip-installed ITK 5.3rc4post3](https://discourse.itk.org/t/changeinformationimagefilter-missing-from-pip-installed-itk-5-3rc4post3/5375)

<div class="topic-metadata">

**Author:** [@mchinand](https://discourse.itk.org/u/mchinand)\
**Replies:** 2\
**Last updated:** [September 29, 2022, 7:21pm UTC](https://discourse.itk.org/t/changeinformationimagefilter-missing-from-pip-installed-itk-5-3rc4post3/5375 "2022-09-29T19:21:44Z")

</div>

When I try to use ChangeInformationImageFilter I get attributeError: module 'itk' has no attribute 'ChangeInformationImageFilter' after upgrading to ITK5.3rc4. I’m trying to use it with code that worked with 5.2.1. I ra…

---

## [How to combine images](https://discourse.itk.org/t/how-to-combine-images/5359)

<div class="topic-metadata">

**Author:** [@cnkhanh](https://discourse.itk.org/u/cnkhanh)\
**Replies:** 1\
**Last updated:** [September 26, 2022, 1:08pm UTC](https://discourse.itk.org/t/how-to-combine-images/5359 "2022-09-26T13:08:14Z")

</div>

I have four images (1 channel): CT, airtree, vessels, lobes. I tried to combine as below, ref\_img = sitk.ReadImage("data/ct.hdr", sitk.sitkInt8) vessel\_img = sitk.ReadImage("data/vessels.hdr", sitk.sitkInt8) airway\_img …

---

## [Normalized mutual information combined with gradient descent as a similarity measure function for 2D/3D registration](https://discourse.itk.org/t/normalized-mutual-information-combined-with-gradient-descent-as-a-similarity-measure-function-for-2d-3d-registration/5351)

<div class="topic-metadata">

**Author:** [@12qew](https://discourse.itk.org/u/12qew)\
**Replies:** 0\
**Last updated:** [September 21, 2022, 12:00pm UTC](https://discourse.itk.org/t/normalized-mutual-information-combined-with-gradient-descent-as-a-similarity-measure-function-for-2d-3d-registration/5351 "2022-09-21T12:00:18Z")

</div>

Hello everyone, I have been working on 2D/3D registration recently and encountered a problem. In this project of mine, the sum function of normalized mutual information and gradient descent is used as the similarity meas…

---

## [HU value in dcm series files and itk::Image](https://discourse.itk.org/t/hu-value-in-dcm-series-files-and-itk-image/5333)

<div class="topic-metadata">

**Author:** [@liguangops](https://discourse.itk.org/u/liguangops)\
**Replies:** 4\
**Last updated:** [September 14, 2022, 1:51am UTC](https://discourse.itk.org/t/hu-value-in-dcm-series-files-and-itk-image/5333 "2022-09-14T01:51:26Z")

</div>

I am a little confused about HU value in dcm series. When I use ITK\_SNAP or 3d slicer to read dcm series files, it shows that the range of HU is \[-1000, 4.303e+004\] But when I use itk::ImageSeriesReader and get it to ou…

---

## [SimpleITK writing NIfTI with invalid header](https://discourse.itk.org/t/simpleitk-writing-nifti-with-invalid-header/2498)

<div class="topic-metadata">

**Author:** [@fepegar](https://discourse.itk.org/u/fepegar)\
**Replies:** 12\
**Last updated:** [August 26, 2022, 6:07pm UTC](https://discourse.itk.org/t/simpleitk-writing-nifti-with-invalid-header/2498 "2022-08-26T18:07:17Z")

</div>

Hello, I’m using SimpleITK 1.2.4 to read and write NIfTI images. NIfTI docs say that it “should not occur” that qfac is 0. qfac is the first value of the pixdim array in the header and is expected to be -1 or 1. When I…

---

## [Thanks](https://discourse.itk.org/t/thanks/5284)

<div class="topic-metadata">

**Author:** [@edgar](https://discourse.itk.org/u/edgar)\
**Replies:** 3\
**Last updated:** [August 23, 2022, 1:51pm UTC](https://discourse.itk.org/t/thanks/5284 "2022-08-23T13:51:12Z")

</div>

Hello, dear users and developers, I just want to thank the ITK team, because I was just able to calculate the displacement field of a non-rigid deformation (simple 3D registration). Then applied that displacement to the…

---

## [calling itk from javascript in nodejs (without using C++)](https://discourse.itk.org/t/calling-itk-from-javascript-in-nodejs-without-using-c/4783)

<div class="topic-metadata">

**Author:** [@vincenzoml](https://discourse.itk.org/u/vincenzoml)\
**Replies:** 2\
**Last updated:** [August 23, 2022, 12:20am UTC](https://discourse.itk.org/t/calling-itk-from-javascript-in-nodejs-without-using-c/4783 "2022-08-23T00:20:52Z")

</div>

I would like to use some itk filters server-side from nodejs. I would like if possible to avoid writing bits of the code in C++. The web site of itk-wasm seems to only document the process of using C++. Is there a javasc…

---

## [Turning on the log for ITKElastix](https://discourse.itk.org/t/turning-on-the-log-for-itkelastix/5281)

<div class="topic-metadata">

**Author:** [@edgar](https://discourse.itk.org/u/edgar)\
**Replies:** 0\
**Last updated:** [August 21, 2022, 4:30pm UTC](https://discourse.itk.org/t/turning-on-the-log-for-itkelastix/5281 "2022-08-21T16:30:00Z")

</div>

Hi! I just want to share a tip. If you get something like Internal elastix error: See elastix log (use LogToConsoleOn() or LogToFileOn()) try to use this option log\_to\_console=True (from help(itk.elastix\_registr…

---

## [Backwards incompatibility with (pip) itk-5.3rc4.post2 and itk-elastix-0.14.1](https://discourse.itk.org/t/backwards-incompatibility-with-pip-itk-5-3rc4-post2-and-itk-elastix-0-14-1/5272)

<div class="topic-metadata">

**Author:** [@edgar](https://discourse.itk.org/u/edgar)\
**Replies:** 2\
**Last updated:** [August 18, 2022, 3:25pm UTC](https://discourse.itk.org/t/backwards-incompatibility-with-pip-itk-5-3rc4-post2-and-itk-elastix-0-14-1/5272 "2022-08-18T15:25:24Z")

</div>

Hi! I just want to report that if I install: pip uninstall -y itk{,-{,elastix,tubetk,strain,core,filtering,io,minimalpathextraction,numerics,registration,segmentation}} && pip install -U pip && pip cache purge && pip i…

---

## [download javascript index.js, access denied](https://discourse.itk.org/t/download-javascript-index-js-access-denied/5270)

<div class="topic-metadata">

**Author:** [@sag](https://discourse.itk.org/u/sag)\
**Replies:** 2\
**Last updated:** [August 17, 2022, 7:25pm UTC](https://discourse.itk.org/t/download-javascript-index-js-access-denied/5270 "2022-08-17T19:25:51Z")

</div>

Hi @dzenanz , do you know why i cannot download javascript file upploaded by ITK member, I click on the download symbol in my message and access denied pops up, there are two screen shots to make the issue clear. …

[Previous page](https://discourse.itk.org/c/uncategorized/1.md?no_subcategories=false&page=3)

[Next page](https://discourse.itk.org/c/uncategorized/1.md?no_subcategories=false&page=5)
