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?
@fedorov what do you think; what's the correct way to load dicomsegs using the plugin's module?