# Algorithms

**URL:** https://discourse.itk.org/c/algorithms/7.md?no_subcategories=false&page=16

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

**Page:** 17

---

## [BSpline deformable transformation](https://discourse.itk.org/t/bspline-deformable-transformation/248)

<div class="topic-metadata">

**Author:** [@sadegh.riyahi](https://discourse.itk.org/u/sadegh.riyahi)\
**Replies:** 4\
**Last updated:** [April 11, 2019, 9:01pm UTC](https://discourse.itk.org/t/bspline-deformable-transformation/248 "2019-04-11T21:01:46Z")

</div>

Hello ITK community, I’m trying to understand how BSpline grid is defined over two images during a multi-resolution registration process. I just need the confirmation for the following thoughts: BSpline grids are unif…

---

## [MRFImageFilter vector image input](https://discourse.itk.org/t/mrfimagefilter-vector-image-input/1764)

<div class="topic-metadata">

**Author:** [@Courtney\_Ambrozic](https://discourse.itk.org/u/Courtney_Ambrozic)\
**Replies:** 0\
**Last updated:** [April 9, 2019, 3:24pm UTC](https://discourse.itk.org/t/mrfimagefilter-vector-image-input/1764 "2019-04-09T15:24:01Z")

</div>

Hello, I have a few questions about the inputs to the MRFImageFilter. I understand that the filter takes both the original image and a labeled image. I am, however, confused about how to input both of these images int…

---

## [converting pixel type of dicom series and saving them](https://discourse.itk.org/t/converting-pixel-type-of-dicom-series-and-saving-them/1763)

<div class="topic-metadata">

**Author:** [@Marco\_Festugato](https://discourse.itk.org/u/Marco_Festugato)\
**Replies:** 4\
**Last updated:** [April 9, 2019, 2:11pm UTC](https://discourse.itk.org/t/converting-pixel-type-of-dicom-series-and-saving-them/1763 "2019-04-09T14:11:34Z")

</div>

Hello there, for my purposes I had to load a 2D dicom series (I used the example DicomSeriesReadSeriesWrite) and create a volume, then I had to change pixel format because my filter accepts only ‘float’ type. I used th…

---

## [liver segmentation](https://discourse.itk.org/t/liver-segmentation/1752)

<div class="topic-metadata">

**Author:** [@Marco\_Festugato](https://discourse.itk.org/u/Marco_Festugato)\
**Replies:** 4\
**Last updated:** [April 7, 2019, 12:02pm UTC](https://discourse.itk.org/t/liver-segmentation/1752 "2019-04-07T12:02:10Z")

</div>

Hi guys, I have to segment the liver in 199 different images of the same patient, any ideas/code/example about the classes/methods i should use? Thanks in advance!

---

## [Applying clustering algorithms to a volume surface](https://discourse.itk.org/t/applying-clustering-algorithms-to-a-volume-surface/1736)

<div class="topic-metadata">

**Author:** [@LVittorelli](https://discourse.itk.org/u/LVittorelli)\
**Replies:** 2\
**Last updated:** [April 2, 2019, 9:18pm UTC](https://discourse.itk.org/t/applying-clustering-algorithms-to-a-volume-surface/1736 "2019-04-02T21:18:32Z")

</div>

Hello, I’m trying to compare some OpenFOAM CFD simulations that reproduce the flow through an almost spherical object(the object is a reconstruction, with an irregular shape), searching for the one with the smallest clu…

---

## [InterpolateImageFunction of templated PixelType](https://discourse.itk.org/t/interpolateimagefunction-of-templated-pixeltype/1729)

<div class="topic-metadata">

**Author:** [@Gordian](https://discourse.itk.org/u/Gordian)\
**Replies:** 3\
**Last updated:** [April 2, 2019, 4:26pm UTC](https://discourse.itk.org/t/interpolateimagefunction-of-templated-pixeltype/1729 "2019-04-02T16:26:34Z")

</div>

Hello, if I want to use an ImageInterpolatorFunction (Linear or NearestNeighbor) for an image with PixelType that can be either scalar or a vector. The PixelType is determined at compile time because the function templ…

---

## [PyRadiomics for 2D Images](https://discourse.itk.org/t/pyradiomics-for-2d-images/1723)

<div class="topic-metadata">

**Author:** [@machadoL](https://discourse.itk.org/u/machadoL)\
**Replies:** 1\
**Last updated:** [April 2, 2019, 3:17am UTC](https://discourse.itk.org/t/pyradiomics-for-2d-images/1723 "2019-04-02T03:17:09Z")

</div>

Hi everyone, I am trying to extract radiomic features from 2D images (PNG or Nrrd) but I start to get a series of errors saying basically “3D array expected”. I’ve been adding “force2D”, “force2Dextraction”, and “force…

---

## [Geometric Medial Axis Representation from Binary Thinning](https://discourse.itk.org/t/geometric-medial-axis-representation-from-binary-thinning/1702)

<div class="topic-metadata">

**Author:** [@aWilson41](https://discourse.itk.org/u/aWilson41)\
**Replies:** 5\
**Last updated:** [April 1, 2019, 1:22pm UTC](https://discourse.itk.org/t/geometric-medial-axis-representation-from-binary-thinning/1702 "2019-04-01T13:22:22Z")

</div>

How can I turn the medial axis produced by ITKs binary thinning into a mesh? Isosurface extraction methods would not be able to generate such a non manifold mesh. I can sort of imagine a way to do it but was hoping there…

---

## [SetSigma in sitk.SmoothingRecursiveGaussianImageFilter()](https://discourse.itk.org/t/setsigma-in-sitk-smoothingrecursivegaussianimagefilter/1721)

<div class="topic-metadata">

**Author:** [@Diego\_C](https://discourse.itk.org/u/Diego_C)\
**Replies:** 3\
**Last updated:** [April 1, 2019, 6:26pm UTC](https://discourse.itk.org/t/setsigma-in-sitk-smoothingrecursivegaussianimagefilter/1721 "2019-04-01T18:26:36Z")

</div>

According to the documentation SetSigma is measured in the units of image spacing. If I have 3D image with spacing = \[0.5, 0.5, 3\] (mm) and sigma is set to 3, does this mean that I am smoothing 3mm isotropically? Or doe…

---

## [itk:GradientDescentOptimizer seems not to return deterministic results with identical start conditions](https://discourse.itk.org/t/itk-gradientdescentoptimizer-seems-not-to-return-deterministic-results-with-identical-start-conditions/1684)

<div class="topic-metadata">

**Author:** [@donelron](https://discourse.itk.org/u/donelron)\
**Replies:** 1\
**Last updated:** [March 19, 2019, 12:57pm UTC](https://discourse.itk.org/t/itk-gradientdescentoptimizer-seems-not-to-return-deterministic-results-with-identical-start-conditions/1684 "2019-03-19T12:57:02Z")

</div>

I am using the following pieceo of code which is basically copied from the ITK examples in order to perform a registration with an itk:GradientDescentOptimizer: #include "itkImageRegistrationMethod.h" #include "itkTrans…

---

## [itk::ImageRegistrationMethod does not return the best value from all iterations](https://discourse.itk.org/t/itk-imageregistrationmethod-does-not-return-the-best-value-from-all-iterations/1681)

<div class="topic-metadata">

**Author:** [@donelron](https://discourse.itk.org/u/donelron)\
**Replies:** 1\
**Last updated:** [March 19, 2019, 1:28pm UTC](https://discourse.itk.org/t/itk-imageregistrationmethod-does-not-return-the-best-value-from-all-iterations/1681 "2019-03-19T13:28:26Z")

</div>

I am using the following lines of code (basically copied from an the ITK example https://itk.org/Wiki/ITK/Examples/Registration/MutualInformation) to register two synthetic images with Mutual information: #include "itkI…

---

## [Problem in combine axial, sagittal, coronal images to 3d image(.mha)](https://discourse.itk.org/t/problem-in-combine-axial-sagittal-coronal-images-to-3d-image-mha/1389)

<div class="topic-metadata">

**Author:** [@guojunjie4SD](https://discourse.itk.org/u/guojunjie4SD)\
**Replies:** 8\
**Last updated:** [March 18, 2019, 3:19pm UTC](https://discourse.itk.org/t/problem-in-combine-axial-sagittal-coronal-images-to-3d-image-mha/1389 "2019-03-18T15:19:40Z")

</div>

Hi everyone: I need some help! I make my demo and test data. (download from http://www.insight-journal.org/midas/bitstream/download/3527). It works well. But when i use axial, sagittal, coronal dicom images in thre…

---

## [Create sagittal, coronal and axial views using series of DICOM images](https://discourse.itk.org/t/create-sagittal-coronal-and-axial-views-using-series-of-dicom-images/953)

<div class="topic-metadata">

**Author:** [@rasoul](https://discourse.itk.org/u/rasoul)\
**Replies:** 4\
**Last updated:** [March 15, 2019, 7:31pm UTC](https://discourse.itk.org/t/create-sagittal-coronal-and-axial-views-using-series-of-dicom-images/953 "2019-03-15T19:31:59Z")

</div>

Hi every one, How can I create sagittal ,coronal and axial views using series of DICOM images? I can read them but now I want to create different views. Thanks a lot

---

## [Filter DICOM images with a 3d vtk model](https://discourse.itk.org/t/filter-dicom-images-with-a-3d-vtk-model/1662)

<div class="topic-metadata">

**Author:** [@siaeleni](https://discourse.itk.org/u/siaeleni)\
**Replies:** 1\
**Last updated:** [March 13, 2019, 6:28pm UTC](https://discourse.itk.org/t/filter-dicom-images-with-a-3d-vtk-model/1662 "2019-03-13T18:28:17Z")

</div>

Hello all, I would like to filter my dicom files using vtk model. Is that possible? If not is there any other workaround? Thanks a lot, Helen

---

## [Mattes et al. vs Viola and Wells Mutual Information](https://discourse.itk.org/t/mattes-et-al-vs-viola-and-wells-mutual-information/1645)

<div class="topic-metadata">

**Author:** [@ibr](https://discourse.itk.org/u/ibr)\
**Replies:** 0\
**Last updated:** [March 8, 2019, 9:07pm UTC](https://discourse.itk.org/t/mattes-et-al-vs-viola-and-wells-mutual-information/1645 "2019-03-08T21:07:41Z")

</div>

Hi, Can someone please explain the difference between Mattes et al Mutual Information MMI and Viola and Wells Mutual Information VMI? From the description in the links, I understand that MMI uses Parzen histogram with …

---

## [Scaling HU values after image loading](https://discourse.itk.org/t/scaling-hu-values-after-image-loading/1629)

<div class="topic-metadata">

**Author:** [@danelliottster](https://discourse.itk.org/u/danelliottster)\
**Replies:** 1\
**Last updated:** [March 4, 2019, 2:22pm UTC](https://discourse.itk.org/t/scaling-hu-values-after-image-loading/1629 "2019-03-04T14:22:46Z")

</div>

Hello. Thank you for the excellent work on ITK. Is there a set of built-in functions for scaling the HU values read from the DICOM images? E.g. are there bone, lung, etc defaults? Are there methods for balancing the …

---

## [ShapeLabelMapFilter floating point exception](https://discourse.itk.org/t/shapelabelmapfilter-floating-point-exception/1397)

<div class="topic-metadata">

**Author:** [@Fijoy\_Vadakkumpadan](https://discourse.itk.org/u/Fijoy_Vadakkumpadan)\
**Replies:** 8\
**Last updated:** [February 22, 2019, 2:49pm UTC](https://discourse.itk.org/t/shapelabelmapfilter-floating-point-exception/1397 "2019-02-22T14:49:54Z")

</div>

Hello, I’m getting a floating point exception at line #364 of: crashing the application. The reason seems to be numerical precision issues in principal moments calculation, resulting in a call to std::sqrt() with a …

---

## [Uncompress failed when reading image via sitk.ReadImage](https://discourse.itk.org/t/uncompress-failed-when-reading-image-via-sitk-readimage/1613)

<div class="topic-metadata">

**Author:** [@sedghi](https://discourse.itk.org/u/sedghi)\
**Replies:** 2\
**Last updated:** [February 20, 2019, 6:39pm UTC](https://discourse.itk.org/t/uncompress-failed-when-reading-image-via-sitk-readimage/1613 "2019-02-20T18:39:57Z")

</div>

I’m trying to read an image that I downloaded from RIRE website with sitk.ReadImage() but I get “Uncompress failed” message and the resulting image intensity values looks wrong. I have also tried loading the image insid…

---

## [Demons Displacement Field Backwards?](https://discourse.itk.org/t/demons-displacement-field-backwards/1598)

<div class="topic-metadata">

**Author:** [@aWilson41](https://discourse.itk.org/u/aWilson41)\
**Replies:** 3\
**Last updated:** [February 14, 2019, 10:28pm UTC](https://discourse.itk.org/t/demons-displacement-field-backwards/1598 "2019-02-14T22:28:10Z")

</div>

When rendering my demons displacement field as polygonal arrows they point backwards. Additionally, if I manually investigate the values of the image, they point backwards. So I’ve been considering if demons even produce…

---

## [Neighborhood / cutoff distance of smoothing with itkSmoothingRecursiveGaussianImageFilter](https://discourse.itk.org/t/neighborhood-cutoff-distance-of-smoothing-with-itksmoothingrecursivegaussianimagefilter/1570)

<div class="topic-metadata">

**Author:** [@cookpa](https://discourse.itk.org/u/cookpa)\
**Replies:** 2\
**Last updated:** [February 6, 2019, 9:06pm UTC](https://discourse.itk.org/t/neighborhood-cutoff-distance-of-smoothing-with-itksmoothingrecursivegaussianimagefilter/1570 "2019-02-06T21:06:39Z")

</div>

In the itkGaussianInterpolateImageFunction filter, we set sigma, the standard deviation of the Gaussian smoothing and alpha, the cutoff distance from the center voxel, over which the kernel is sampled. Is there an equiv…

---

## [Perimetre computation using itkShapeLabelObject](https://discourse.itk.org/t/perimetre-computation-using-itkshapelabelobject/1574)

<div class="topic-metadata">

**Author:** [@pauline](https://discourse.itk.org/u/pauline)\
**Replies:** 2\
**Last updated:** [February 5, 2019, 5:06pm UTC](https://discourse.itk.org/t/perimetre-computation-using-itkshapelabelobject/1574 "2019-02-05T17:06:10Z")

</div>

Hi all, I am using itkShapeLabelObject to compute the surface area of a segmented object, in a 3D image. However, I have trouble understanding the computation process from the code in ITK/Modules/Filtering/LabelMap/incl…

---

## [How to render an ITK spatial object?](https://discourse.itk.org/t/how-to-render-an-itk-spatial-object/1516)

<div class="topic-metadata">

**Author:** [@TaoH](https://discourse.itk.org/u/TaoH)\
**Replies:** 10\
**Last updated:** [January 18, 2019, 4:28pm UTC](https://discourse.itk.org/t/how-to-render-an-itk-spatial-object/1516 "2019-01-18T16:28:34Z")

</div>

Dear everyone, I want to render an ITK spatial object. Is there a convenient to make it? Best and thanks, Tao Han

---

## [How to use SymmetricEigenAnalysisImageFilter to generate eigen vector image?](https://discourse.itk.org/t/how-to-use-symmetriceigenanalysisimagefilter-to-generate-eigen-vector-image/1521)

<div class="topic-metadata">

**Author:** [@TaoH](https://discourse.itk.org/u/TaoH)\
**Replies:** 2\
**Last updated:** [January 12, 2019, 6:28pm UTC](https://discourse.itk.org/t/how-to-use-symmetriceigenanalysisimagefilter-to-generate-eigen-vector-image/1521 "2019-01-12T18:28:41Z")

</div>

I try to compute eigen vectors of the symmetric matrix corresponding to every input pixel. So, I try to add m\_Calculator.ComputeEigenValuesAndVectors(x, eigenValues,eigenvectors) in itkSymmetricEigenAnalysisImageFilter.h.…

---

## [FastMarchingImageFilter for multiple-labels?](https://discourse.itk.org/t/fastmarchingimagefilter-for-multiple-labels/1446)

<div class="topic-metadata">

**Author:** [@yannick\_s](https://discourse.itk.org/u/yannick_s)\
**Replies:** 2\
**Last updated:** [January 9, 2019, 11:57am UTC](https://discourse.itk.org/t/fastmarchingimagefilter-for-multiple-labels/1446 "2019-01-09T11:57:32Z")

</div>

Dear all, I would like to refine/vary a given multi-label segmentation with the multi-label fast marching algorithm. For a single label, I was able to use the FastMarchingImageFilter in python ITK. Is it possible to us…

---

## [itkMath FloatAlmostEqual question](https://discourse.itk.org/t/itkmath-floatalmostequal-question/1493)

<div class="topic-metadata">

**Author:** [@mihail.isakov](https://discourse.itk.org/u/mihail.isakov)\
**Replies:** 4\
**Last updated:** [December 24, 2018, 2:48pm UTC](https://discourse.itk.org/t/itkmath-floatalmostequal-question/1493 "2018-12-24T14:48:26Z")

</div>

It looks like FloatAlmostEqual function (itkMath.h) does rather similar thing twice, in particular if floats are not almost equal - subtract, abs, compare (first to epsilon, then unit of least precision), isn’t it? It is…

---

## [Post-reconstruction suppression of CT streaking artifacts?](https://discourse.itk.org/t/post-reconstruction-suppression-of-ct-streaking-artifacts/1487)

<div class="topic-metadata">

**Author:** [@dzenanz](https://discourse.itk.org/u/dzenanz)\
**Replies:** 2\
**Last updated:** [December 18, 2018, 9:38pm UTC](https://discourse.itk.org/t/post-reconstruction-suppression-of-ct-streaking-artifacts/1487 "2018-12-18T21:38:23Z")

</div>

Is there some source code available to deal with streaking artifacts arising from high contrast in CT images? Here is an example axial slice: The bright blob is a cross-section of carotid artery, and the streaks eman…

---

## [Itk or SimpleItk for PyRadiomics (in python, of course) ](https://discourse.itk.org/t/itk-or-simpleitk-for-pyradiomics-in-python-of-course/1478)

<div class="topic-metadata">

**Author:** [@machadoL](https://discourse.itk.org/u/machadoL)\
**Replies:** 3\
**Last updated:** [December 13, 2018, 8:49pm UTC](https://discourse.itk.org/t/itk-or-simpleitk-for-pyradiomics-in-python-of-course/1478 "2018-12-13T20:49:29Z")

</div>

Hey guys… what up? I am working with PyRadiomics in some python scripts and I saw that the examples use SimpleITK for leading the images into the processing pipeline… I’ve tried doing the same with whole ITK pack (imrea…

---

## [Add internal third party module Eigen3](https://discourse.itk.org/t/add-internal-third-party-module-eigen3/1429)

<div class="topic-metadata">

**Author:** [@phcerdan](https://discourse.itk.org/u/phcerdan)\
**Replies:** 7\
**Last updated:** [December 10, 2018, 3:07pm UTC](https://discourse.itk.org/t/add-internal-third-party-module-eigen3/1429 "2018-12-10T15:07:17Z")

</div>

I am glad to announce that after a few force-pushes, the pull request to add Eigen3 as an internal third party module is ready for review. Kudos to @matt.mccormick @jcfr and @bpaniagua for the support :pick::balloon:! …

---

## [Filter output as input for the same filter](https://discourse.itk.org/t/filter-output-as-input-for-the-same-filter/1464)

<div class="topic-metadata">

**Author:** [@Gordian](https://discourse.itk.org/u/Gordian)\
**Replies:** 1\
**Last updated:** [December 10, 2018, 2:41pm UTC](https://discourse.itk.org/t/filter-output-as-input-for-the-same-filter/1464 "2018-12-10T14:41:29Z")

</div>

Hello, just a question of good practice: It is okay to use the output of a filter as input for the same filter instance? (non-functional) Example: auto AddFilter = itk::AddImageFilter::New(); AddFilter-\>SetInput1(Ima…

---

## [Distance map filter with speed image? Computing the minimal path to boundary with obstacles.](https://discourse.itk.org/t/distance-map-filter-with-speed-image-computing-the-minimal-path-to-boundary-with-obstacles/1457)

<div class="topic-metadata">

**Author:** [@aWilson41](https://discourse.itk.org/u/aWilson41)\
**Replies:** 3\
**Last updated:** [December 5, 2018, 7:23pm UTC](https://discourse.itk.org/t/distance-map-filter-with-speed-image-computing-the-minimal-path-to-boundary-with-obstacles/1457 "2018-12-05T19:23:53Z")

</div>

I’m looking for an operation (hopefully an itk filter) that computes the minimal distance to a boundary/surface with obstacles (like how the speed function is used in fast marching). Basically I have two polygons. I wan…

[Previous page](https://discourse.itk.org/c/algorithms/7.md?no_subcategories=false&page=15)

[Next page](https://discourse.itk.org/c/algorithms/7.md?no_subcategories=false&page=17)
