Skip to content

Unexpected Behavior with Initial Level Set Images of Non-float Type in vmtklevelsetsegmentation.py #466

@tuingc159

Description

@tuingc159

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions