Error: DICOMSegmentationPlugin is not defined

I try with the segmentation export to file function. It does not work for the line “import DICOMScalarVolumePlugin”,
in the python console in 3d slicer, the error is like
Traceback (most recent call last):
File “”, line 1, in
NameError: name ‘DICOMSegmentationPlugin’ is not defined

Does this package still work. How can I install this ?
the code snippet is as follow:

Export a volume to DICOM file format

volumeNode = getNode(“CTChest”) outputFolder = “c:/tmp/dicom-output” # Create patient and study and put the volume under the study shNode = slicer.vtkMRMLSubjectHierarchyNode.GetSubjectHierarchyNode(slicer.mrmlScene) # set IDs. Note: these IDs are not specifying DICOM tags, but only the names that appear in the hierarchy tree patientItemID = shNode.CreateSubjectItem(shNode.GetSceneItemID(), “test patient”) studyItemID = shNode.CreateStudyItem(patientItemID, “test study”) volumeShItemID = shNode.GetItemByDataNode(volumeNode) shNode.SetItemParent(volumeShItemID, studyItemID) import DICOMScalarVolumePlugin exporter = DICOMScalarVolumePlugin.DICOMScalarVolumePluginClass() exportables = exporter.examineForExport(volumeShItemID) for exp in exportables: # set output folder = outputFolder # here we set DICOM PatientID and StudyID tags exp.setTag(‘PatientID’, “test patient”) exp.setTag(‘StudyID’, “test study”) exporter.export(exportables)

Yes for that example to work you have to have a Slicer extension installed. See the following thread about this:

Thanks so much,
It looks like the problem is solved. the icon of the dicomQR doesn’t work anyway