The vmtklevelsetsegmentation.py script in the VMTK module encounters unexpected behavior when handling input initial level set images of types other than float.
Currently, the script includes checks and type conversions for the input medical image (Image) and the creation of the feature image. For example, it verifies if the medical image is of type float using the condition if self.Image.GetScalarTypeAsString() != 'float' and converts it to float when generating the feature image using vtkImageCast.
However, similar checks and type conversions are not implemented for the InitialLevelSets input, leading to inconsistent behavior when providing input images of types other than float. I expected the script to handle input images of various types consistently and produce segmentation results that reflect the features of the initial level set input. When providing an initial level set image of type double, the segmentation results were unexpected. They either repeated segmentation patterns throughout the volume or did not resemble the initial level set input at all.
The vmtklevelsetsegmentation.py script in the VMTK module encounters unexpected behavior when handling input initial level set images of types other than float.
Currently, the script includes checks and type conversions for the input medical image (Image) and the creation of the feature image. For example, it verifies if the medical image is of type float using the condition if self.Image.GetScalarTypeAsString() != 'float' and converts it to float when generating the feature image using vtkImageCast.
However, similar checks and type conversions are not implemented for the InitialLevelSets input, leading to inconsistent behavior when providing input images of types other than float. I expected the script to handle input images of various types consistently and produce segmentation results that reflect the features of the initial level set input. When providing an initial level set image of type double, the segmentation results were unexpected. They either repeated segmentation patterns throughout the volume or did not resemble the initial level set input at all.