# Algorithms

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

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

**Page:** 18

---

## [Performing ABAS and MBS segmentations by ITK](https://discourse.itk.org/t/performing-abas-and-mbs-segmentations-by-itk/1292)

<div class="topic-metadata">

**Author:** [@rasoul](https://discourse.itk.org/u/rasoul)\
**Replies:** 16\
**Last updated:** [November 17, 2018, 3:26pm UTC](https://discourse.itk.org/t/performing-abas-and-mbs-segmentations-by-itk/1292 "2018-11-17T15:26:27Z")

</div>

Hi every one, I want to start a project which is contouring CT images using Atlas Based Auto Segmentation (ABAS) and Model Based Segmentation (MBS). As you probably know most of the state of the art contouring softwares…

---

## [Reinitialize seed parameter in image similarity metrics](https://discourse.itk.org/t/reinitialize-seed-parameter-in-image-similarity-metrics/1420)

<div class="topic-metadata">

**Author:** [@c.spanakis83](https://discourse.itk.org/u/c.spanakis83)\
**Replies:** 0\
**Last updated:** [November 16, 2018, 10:10am UTC](https://discourse.itk.org/t/reinitialize-seed-parameter-in-image-similarity-metrics/1420 "2018-11-16T10:10:34Z")

</div>

Hello. In the similarity metrics of ITK, we can use a smaller number of spatial samples used for estimation of similarity, hoping to reduce the time needed for a single estimation. In case of not using the UseAllPixelOn(…

---

## [Connected component image filter example.](https://discourse.itk.org/t/connected-component-image-filter-example/1390)

<div class="topic-metadata">

**Author:** [@hothao](https://discourse.itk.org/u/hothao)\
**Replies:** 7\
**Last updated:** [November 12, 2018, 9:12am UTC](https://discourse.itk.org/t/connected-component-image-filter-example/1390 "2018-11-12T09:12:32Z")

</div>

I’m running this example about labeling connected components and it gives good results: https://itk.org/Wiki/ITK/Examples/ImageProcessing/ScalarConnectedComponentImageFilter . I would like to ask you a few places I do …

---

## [Beautiful display of 3d Segmentation on MPR view!](https://discourse.itk.org/t/beautiful-display-of-3d-segmentation-on-mpr-view/1343)

<div class="topic-metadata">

**Author:** [@rasoul](https://discourse.itk.org/u/rasoul)\
**Replies:** 2\
**Last updated:** [November 10, 2018, 5:05am UTC](https://discourse.itk.org/t/beautiful-display-of-3d-segmentation-on-mpr-view/1343 "2018-11-10T05:05:07Z")

</div>

Hi every one, I have a set of binary images which are output of my segmentation. I want to display the output in MPR view. Sth like what I attached to this post (Which comes from itk.org main page!). For this purpose…

---

## [Image registration metric derivative](https://discourse.itk.org/t/image-registration-metric-derivative/1200)

<div class="topic-metadata">

**Author:** [@ibr](https://discourse.itk.org/u/ibr)\
**Replies:** 7\
**Last updated:** [October 11, 2018, 2:49pm UTC](https://discourse.itk.org/t/image-registration-metric-derivative/1200 "2018-10-11T14:49:38Z")

</div>

I am using image registration for some time now but I am still trying to understand things in more deep. It seems tracing ITK code is not that easy. What is the math behind the metric derivative and where can I find the…

---

## [Run length matrix using mask](https://discourse.itk.org/t/run-length-matrix-using-mask/1340)

<div class="topic-metadata">

**Author:** [@pfreire](https://discourse.itk.org/u/pfreire)\
**Replies:** 7\
**Last updated:** [October 9, 2018, 4:59pm UTC](https://discourse.itk.org/t/run-length-matrix-using-mask/1340 "2018-10-09T16:59:06Z")

</div>

Hello, everyone. I’m using the itkScalarImageToRunLengthMatrixFilter to extract texture features from brain images. I know that this particular class has the method SetMaskImage that can be used to constrain the region …

---

## [OtsuMultipleThresholdsImageFilter creates asymmetric classes for a symmetric distribution](https://discourse.itk.org/t/otsumultiplethresholdsimagefilter-creates-asymmetric-classes-for-a-symmetric-distribution/354)

<div class="topic-metadata">

**Author:** [@hellman](https://discourse.itk.org/u/hellman)\
**Replies:** 18\
**Last updated:** [September 25, 2018, 9:46pm UTC](https://discourse.itk.org/t/otsumultiplethresholdsimagefilter-creates-asymmetric-classes-for-a-symmetric-distribution/354 "2018-09-25T21:46:55Z")

</div>

Hi, (This thread was started already in the old list at: http://itk-users.7.n7.nabble.com/ITK-users-OtsuMultipleThresholdsImageFilter-creates-asymmetric-classes-for-symmetric-a-distribution-td38761.html) I have investi…

---

## [Watershed control](https://discourse.itk.org/t/watershed-control/1287)

<div class="topic-metadata">

**Author:** [@picettour](https://discourse.itk.org/u/picettour)\
**Replies:** 4\
**Last updated:** [September 18, 2018, 10:20pm UTC](https://discourse.itk.org/t/watershed-control/1287 "2018-09-18T22:20:22Z")

</div>

Hello. I am trying using itk::WatershedImageFilter (https://itk.org/Doxygen/html/classitk\_1\_1WatershedImageFilter.html), and I have some question about the parameter. I would like to control precisely the number of reg…

---

## [A question about SSLIC genericity](https://discourse.itk.org/t/a-question-about-sslic-genericity/1288)

<div class="topic-metadata">

**Author:** [@ocommowi](https://discourse.itk.org/u/ocommowi)\
**Replies:** 1\
**Last updated:** [September 13, 2018, 2:26pm UTC](https://discourse.itk.org/t/a-question-about-sslic-genericity/1288 "2018-09-13T14:26:46Z")

</div>

Hello, I have just seen today the beta release of ITK 5 and was happy to see that SLIC was included in the future release. I have not tested yet but looking at the code, it misses something for an application I have lon…

---

## [Signed distance map generation](https://discourse.itk.org/t/signed-distance-map-generation/1264)

<div class="topic-metadata">

**Author:** [@TearsOfMyLoves\_Lee](https://discourse.itk.org/u/TearsOfMyLoves_Lee)\
**Replies:** 1\
**Last updated:** [September 8, 2018, 2:39pm UTC](https://discourse.itk.org/t/signed-distance-map-generation/1264 "2018-09-08T14:39:48Z")

</div>

Hi, I am new to ITK. I have used ITK ApproximateSignedDistanceMapImageFilter example to generate the signed distance map for an input binary image, where pixels inside of the object have negative distance while pixels ou…

---

## [GDCMSeriesFileNames SetRecursive](https://discourse.itk.org/t/gdcmseriesfilenames-setrecursive/1211)

<div class="topic-metadata">

**Author:** [@Athius](https://discourse.itk.org/u/Athius)\
**Replies:** 6\
**Last updated:** [August 22, 2018, 3:33pm UTC](https://discourse.itk.org/t/gdcmseriesfilenames-setrecursive/1211 "2018-08-22T15:33:41Z")

</div>

Hello everyone, I try to read all my dicoms recursively. For this I try to use itk::GDCMSeriesFileNames class (itk version 4.13.1). itk::GDCMSeriesFileNames::Pointer nameGenerator = itk::GDCMSeriesFileNames::New(); na…

---

## [Details of itk::RayCastInterpolateImageFunction](https://discourse.itk.org/t/details-of-itk-raycastinterpolateimagefunction/1202)

<div class="topic-metadata">

**Author:** [@zhuangming.shen](https://discourse.itk.org/u/zhuangming.shen)\
**Replies:** 0\
**Last updated:** [August 15, 2018, 1:15am UTC](https://discourse.itk.org/t/details-of-itk-raycastinterpolateimagefunction/1202 "2018-08-15T01:15:23Z")

</div>

Hi all, I’d like to figure out some details of itk::RayCastInterpolateImageFunction. Dose anyone know which papers/materials describe its algorithm? Thanks in advance. Regards, Zhuangming Shen

---

## [ImageRegistrationMethodv4 VirtualImage with SparseSampling](https://discourse.itk.org/t/imageregistrationmethodv4-virtualimage-with-sparsesampling/1159)

<div class="topic-metadata">

**Author:** [@blowekamp](https://discourse.itk.org/u/blowekamp)\
**Replies:** 6\
**Last updated:** [August 6, 2018, 6:08pm UTC](https://discourse.itk.org/t/imageregistrationmethodv4-virtualimage-with-sparsesampling/1159 "2018-08-06T18:08:29Z")

</div>

When using the ImageRegistrationMethod with a virtual image and a sampling strategy, there is a serious problem with the spaces. -\>The ImageRegistrationMethod generate a sampled point set by iterating on the virtual ima…

---

## [Inverse displacement field](https://discourse.itk.org/t/inverse-displacement-field/580)

<div class="topic-metadata">

**Author:** [@Ray](https://discourse.itk.org/u/Ray)\
**Replies:** 3\
**Last updated:** [August 6, 2018, 5:18pm UTC](https://discourse.itk.org/t/inverse-displacement-field/580 "2018-08-06T17:18:40Z")

</div>

Given a displacement field (not a transform), is there a method that can be used to compute its inverse displacement field? Thanks, -Ray

---

## [Create RicianMixtureModelComponent statistical module](https://discourse.itk.org/t/create-ricianmixturemodelcomponent-statistical-module/1177)

<div class="topic-metadata">

**Author:** [@mer17mm](https://discourse.itk.org/u/mer17mm)\
**Replies:** 0\
**Last updated:** [August 3, 2018, 7:54pm UTC](https://discourse.itk.org/t/create-ricianmixturemodelcomponent-statistical-module/1177 "2018-08-03T19:54:53Z")

</div>

Hi, Is anyone who I can speak with about a code I want to implement regarding a Rician classifier for Mixture model component? I am trying to understand better the structure of the GaussianMixtureModelComponent and Gaus…

---

## [Where can I get code for the FuzzyConnectednessImageFilter?](https://discourse.itk.org/t/where-can-i-get-code-for-the-fuzzyconnectednessimagefilter/1154)

<div class="topic-metadata">

**Author:** [@adjuric](https://discourse.itk.org/u/adjuric)\
**Replies:** 2\
**Last updated:** [July 26, 2018, 3:23pm UTC](https://discourse.itk.org/t/where-can-i-get-code-for-the-fuzzyconnectednessimagefilter/1154 "2018-07-26T15:23:20Z")

</div>

I’m interested in implementing a fuzzy connectedness filter but I can’t seem to find the relevant classes in the current documentation. There is a category under region-based segmentation for fuzzy connectedness here bu…

---

## [Does an efficient cloning of multiple different classes with an override of InternalClone() exist?](https://discourse.itk.org/t/does-an-efficient-cloning-of-multiple-different-classes-with-an-override-of-internalclone-exist/1109)

<div class="topic-metadata">

**Author:** [@Gordian](https://discourse.itk.org/u/Gordian)\
**Replies:** 8\
**Last updated:** [July 19, 2018, 6:57am UTC](https://discourse.itk.org/t/does-an-efficient-cloning-of-multiple-different-classes-with-an-override-of-internalclone-exist/1109 "2018-07-19T06:57:25Z")

</div>

Hello, i am looking for a way to clone object with all parameters.I want to use this on multiple class objects like metrics, optimizer, interpolator etc. and I dont want to write new derived classes just for the cloning…

---

## [How to use a total variation regularisation with richardson lucy deconvolution ?](https://discourse.itk.org/t/how-to-use-a-total-variation-regularisation-with-richardson-lucy-deconvolution/1094)

<div class="topic-metadata">

**Author:** [@drcjaudet](https://discourse.itk.org/u/drcjaudet)\
**Replies:** 3\
**Last updated:** [July 17, 2018, 3:12pm UTC](https://discourse.itk.org/t/how-to-use-a-total-variation-regularisation-with-richardson-lucy-deconvolution/1094 "2018-07-17T15:12:39Z")

</div>

Hello, i would like to use a Richardson Lucy deconvolution algorithm with TV regularisation with ITK. There is already a RL algorithm implemented: https://itk.org/Doxygen44/html/classitk\_1\_1RichardsonLucyDeconvolutionI…

---

## [Error in using filter](https://discourse.itk.org/t/error-in-using-filter/1048)

<div class="topic-metadata">

**Author:** [@lee](https://discourse.itk.org/u/lee)\
**Replies:** 1\
**Last updated:** [July 2, 2018, 10:53pm UTC](https://discourse.itk.org/t/error-in-using-filter/1048 "2018-07-02T22:53:47Z")

</div>

import SimpleITK as sitk image = sitk.ReadImage(“f.png”) from skimage import filters edges = filters.scharr(image) UserWarning: Possible precision loss when converting from int64 to float64 .format(dtypeobj\_in, dt…

---

## [How to save slices of the image from nifti image?](https://discourse.itk.org/t/how-to-save-slices-of-the-image-from-nifti-image/1044)

<div class="topic-metadata">

**Author:** [@lee](https://discourse.itk.org/u/lee)\
**Replies:** 2\
**Last updated:** [June 29, 2018, 1:08pm UTC](https://discourse.itk.org/t/how-to-save-slices-of-the-image-from-nifti-image/1044 "2018-06-29T13:08:42Z")

</div>

I have read an image and converted into array. then I took a slice. but it seems to work.But when I apply RescaleIntensity or any other function I’m getting error import SimpleITK as sitk img = sitk.ReadImage(“S1.nii”) …

---

## [Sampling strategy in ImageRegistrationMethodv4](https://discourse.itk.org/t/sampling-strategy-in-imageregistrationmethodv4/1038)

<div class="topic-metadata">

**Author:** [@HsuehWen](https://discourse.itk.org/u/HsuehWen)\
**Replies:** 3\
**Last updated:** [June 29, 2018, 8:48am UTC](https://discourse.itk.org/t/sampling-strategy-in-imageregistrationmethodv4/1038 "2018-06-29T08:48:06Z")

</div>

Hi, I see user can set sampling rate for image registration by the function “SetMetricSamplingPercentage” If I understand correctly, after setting the sample rate, ITK will randomly choose a set of points and evaluate …

---

## [Index out of range error in LiThresholdCalculator](https://discourse.itk.org/t/index-out-of-range-error-in-lithresholdcalculator/997)

<div class="topic-metadata">

**Author:** [@lassoan](https://discourse.itk.org/u/lassoan)\
**Replies:** 7\
**Last updated:** [June 20, 2018, 8:20pm UTC](https://discourse.itk.org/t/index-out-of-range-error-in-lithresholdcalculator/997 "2018-06-20T20:20:49Z")

</div>

I’ve added automatic thresholding to 3D Slicer’s segment editor and while testing it, I’ve got index out of range errors due to writing past the last element in a vector in LiThresholdCalculator\<THistogram, TOutput\>::Gen…

---

## [Problem with the stochastic fractal filter](https://discourse.itk.org/t/problem-with-the-stochastic-fractal-filter/855)

<div class="topic-metadata">

**Author:** [@pfreire](https://discourse.itk.org/u/pfreire)\
**Replies:** 7\
**Last updated:** [May 28, 2018, 5:37pm UTC](https://discourse.itk.org/t/problem-with-the-stochastic-fractal-filter/855 "2018-05-28T17:37:12Z")

</div>

Hello, everyone! I’m trying to make use of the Stochastic Fractal Dimension Image Filter, but I’ve been unable to get any results in 2D or 3D images. All the outputs are blank (actually, black). Could anyone please poin…

---

## [No SimpleITK GeodesicActiveContourShapePriorLevelSetImageFilter](https://discourse.itk.org/t/no-simpleitk-geodesicactivecontourshapepriorlevelsetimagefilter/947)

<div class="topic-metadata">

**Author:** [@ibr](https://discourse.itk.org/u/ibr)\
**Replies:** 2\
**Last updated:** [May 24, 2018, 7:21pm UTC](https://discourse.itk.org/t/no-simpleitk-geodesicactivecontourshapepriorlevelsetimagefilter/947 "2018-05-24T19:21:14Z")

</div>

Dear all, I couldn’t find a SimpleITK filter of GeodesicActiveContourShapePriorLevelSetImageFilter. I only found GeodesicActiveContourLevelSetImageFilter which does not use shape information. If it is not implemented,…

---

## [Compute deformation field smoothness](https://discourse.itk.org/t/compute-deformation-field-smoothness/788)

<div class="topic-metadata">

**Author:** [@c.spanakis83](https://discourse.itk.org/u/c.spanakis83)\
**Replies:** 1\
**Last updated:** [March 21, 2018, 2:53pm UTC](https://discourse.itk.org/t/compute-deformation-field-smoothness/788 "2018-03-21T14:53:47Z")

</div>

Hello. I am trying to develop and algorithm for deformable image registration and I want to know if there is a way to calculate the smoothness of the deformation field that warps an image. Thank you in advance

---

## [Running multiple optimizers in parallell, and getting them to "speak" to eachother](https://discourse.itk.org/t/running-multiple-optimizers-in-parallell-and-getting-them-to-speak-to-eachother/911)

<div class="topic-metadata">

**Author:** [@asertyuio](https://discourse.itk.org/u/asertyuio)\
**Replies:** 3\
**Last updated:** [May 9, 2018, 10:55am UTC](https://discourse.itk.org/t/running-multiple-optimizers-in-parallell-and-getting-them-to-speak-to-eachother/911 "2018-05-09T10:55:22Z")

</div>

Hi all, One problem I want to address lies for example in the following cases: I have one large reference image, and two images that I want to register to the reference image. The two images needs to have the same sca…

---

## [Bspline grid size per level](https://discourse.itk.org/t/bspline-grid-size-per-level/892)

<div class="topic-metadata">

**Author:** [@Adi\_Zholkover](https://discourse.itk.org/u/Adi_Zholkover)\
**Replies:** 3\
**Last updated:** [May 7, 2018, 2:04pm UTC](https://discourse.itk.org/t/bspline-grid-size-per-level/892 "2018-05-07T14:04:13Z")

</div>

Does SimpleITK support specifying bspline transform grid size per level? For example, for the first level use a 4x4 grid, and for the second level use a 8x8 grid. Thanks

---

## [Image gradients and resampling](https://discourse.itk.org/t/image-gradients-and-resampling/898)

<div class="topic-metadata">

**Author:** [@beastwood](https://discourse.itk.org/u/beastwood)\
**Replies:** 0\
**Last updated:** [May 3, 2018, 7:33pm UTC](https://discourse.itk.org/t/image-gradients-and-resampling/898 "2018-05-03T19:33:05Z")

</div>

Hi All, I’m hoping someone can explain to some behavior I didn’t expect. I am computing the gradient magnitude of a 3D image along the first two dimensions by using a collection of itk::RecursiveGaussianImageFilters, w…

---

## [sitk.ConnectedComponent](https://discourse.itk.org/t/sitk-connectedcomponent/876)

<div class="topic-metadata">

**Author:** [@Giuseppe\_Amatulli](https://discourse.itk.org/u/Giuseppe_Amatulli)\
**Replies:** 1\
**Last updated:** [April 27, 2018, 3:32pm UTC](https://discourse.itk.org/t/sitk-connectedcomponent/876 "2018-04-27T15:32:25Z")

</div>

Hi , I had a scripting procedure that was using SimpleITK 0.10.0 marker\_img = sitk.ConnectedComponent(peak, fullyConnected=True) , where peak is an image 0 , 1. The sitk.ConnectedComponent was run correctly with no e…

---

## [\[solved\] Padding without extending image size](https://discourse.itk.org/t/solved-padding-without-extending-image-size/847)

<div class="topic-metadata">

**Author:** [@antoine.letouzey](https://discourse.itk.org/u/antoine.letouzey)\
**Replies:** 6\
**Last updated:** [April 18, 2018, 2:18pm UTC](https://discourse.itk.org/t/solved-padding-without-extending-image-size/847 "2018-04-18T14:18:14Z")

</div>

Hi, I’m trying to add an uniform (in color and size) margin to a 3D image and the only filter that always comes up in google is itk::ConstantPadImageFilter. https://itk.org/Doxygen/html/classitk\_1\_1ConstantPadImageFilte…

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

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