Skip to content

Usage of private methods of DICOMSegmentationPlugin #13

@LennyN95

Description

@LennyN95
importer = DICOMSegmentationPlugin.DICOMSegmentationPluginClass()

segmentationNode = importer._initializeSegmentation(loadable)

for labelNode in segmentLabelNodes:
   importer._importSegmentAndRemoveLabel(labelNode, segmentationNode)

The method _load_segmentation_manually calls private methods from the DICOMSegmentationPlugin (_initializeSegmentation and _importSegmentAndRemoveLabel) at lines 3307 and 3310. Using private methods (indicated by the leading underscore) from external classes is fragile as these are not part of the public API and may change without notice in future versions. Consider using the public API of DICOMSegmentationPlugin if available, or documenting this dependency clearly if no public API exists.
Originally posted by @Copilot in #12

@fedorov what do you think; what's the correct way to load dicomsegs using the plugin's module?

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