SlicerProstate icon indicating copy to clipboard operation
SlicerProstate copied to clipboard

QuadEdgeSurfaceMesher fails on labelmap

Open pieper opened this issue 4 years ago • 3 comments

Slicer version '4.13.0-2021-10-22'

This labelmap Moving_Structure_Padded-Smoothed-label.nrrd fails with the output below. This causes the DistanceMapBasedRegistration process to fail.

Switch to module:  "QuadEdgeSurfaceMesher"
Found CommandLine Module, target is  /Applications/Slicer 11.app/Contents/Extensions-30329/SlicerProstate/lib/Slicer-4.13/cli-modules/QuadEdgeSurfaceMesher
ModuleType: CommandLineModule
QuadEdge Surface Mesher command line: 

/Applications/Slicer 11.app/Contents/Extensions-30329/SlicerProstate/lib/Slicer-4.13/cli-modules/QuadEdgeSurfaceMesher --label 1 --decimation 0.1 /private/var/folders/cn/kmqx4dm17gx4hrllqrmnkbp00000gn/T/Slicer-pieper/EFIDJ_vtkMRMLLabelMapVolumeNodeB.nrrd /private/var/folders/cn/kmqx4dm17gx4hrllqrmnkbp00000gn/T/Slicer-pieper/EFIDJ_vtkMRMLModelNodeE.ply 

QuadEdge Surface Mesher standard output:

MC surface points: 9350
MC surface cells: 18652
Target number of cells after decimation: 1865

QuadEdge Surface Mesher terminated with a fault.

pieper avatar Jan 30 '22 16:01 pieper

@fedorov I can probably work around this but I wondered if you know what the issue might be. This installation works for many other labels.

pieper avatar Jan 30 '22 16:01 pieper

After further testing is sees this work with a target of 0.5 or higher but fails with .4 or lower.

pieper avatar Jan 30 '22 17:01 pieper

Changing line 465 of DistanceMapBasedRegistration to:

    parameters = {'inputImageName':parameterNode.GetAttribute('FixedLabelSmoothedID'),'outputMeshName':fixedModel.GetID(), 'decimationConst': 1.0}

and line 480 to:

    parameters = {'inputImageName':parameterNode.GetAttribute('MovingLabelSmoothedID'),'outputMeshName':movingModel.GetID(), 'decimationConst': 1.0}

works around my issue for now.

pieper avatar Jan 30 '22 17:01 pieper