ANTsX / ANTs

Advanced Normalization Tools (ANTs)
Apache License 2.0
1.21k stars 381 forks source link

BUG: Address degenerate case. #1767

Closed ntustison closed 4 months ago

ntustison commented 4 months ago

Proposed solution to https://github.com/ANTsX/ANTs/issues/1765.

ntustison commented 4 months ago

This results in the following exception:

Running Atropos for 3-dimensional images.

Progress: 
WARNING: In /Users/ntustison/Pkg/ANTs/ImageSegmentation/antsGaussianListSampleFunction.hxx, line 106
GaussianListSampleFunction (0x6000026bc180): The input list sample has <= 1 element.  Function evaluations will be equal to 0.

  Iteration 0 (of 5): posterior probability = 0 (annealing temperature = 1)

itk::ExceptionObject (0x6000039b4ee0)
Location: "unknown" 
File: /Users/ntustison/Pkg/ANTs/ImageSegmentation/antsAtroposSegmentationImageFilter.hxx
Line: 1319
Description: ITK ERROR: AtroposSegmentationImageFilter(0x11de090c0): Updating the class labeling resulted in 2 non-zero label sets but 3 is requested.