parameters: (self, subjectHierarchyItemID)
return_statement: return [exportable]
docstring: Return a list of DICOMExportable instances that describe the
      available techniques that this plugin offers to convert MRML
      data into DICOM data
docstring_summary: Return a list of DICOMExportable instances that describe the
      available techniques that this plugin offers to convert MRML
      data into DICOM data
docstring_tokens: Return a list of DICOMExportable instances that describe the available techniques that this plugin offers to convert MRML data into DICOM data
function: def examineForExport(self, subjectHierarchyItemID):
      """Return a list of DICOMExportable instances that describe the
      available techniques that this plugin offers to convert MRML
      data into DICOM data
      """
  
      # Check if setting of DICOM UIDs is supported (if not, then we cannot export to sequence)
      dicomUIDSettingSupported = False
      createDicomSeriesParameterNode = slicer.modules.createdicomseries.cliModuleLogic().CreateNode()
      # CreateNode() factory method incremented the reference count, we decrement now prevent memory leaks
      # (a reference is still kept by createDicomSeriesParameterNode Python variable).
      createDicomSeriesParameterNode.UnRegister(None)
      for groupIndex in range(createDicomSeriesParameterNode.GetNumberOfParameterGroups()):
        if createDicomSeriesParameterNode.GetParameterGroupLabel(groupIndex) == "Unique Identifiers (UIDs)":
          dicomUIDSettingSupported = True
      if not dicomUIDSettingSupported:
        # This version of Slicer does not allow setting DICOM UIDs for export
        return []
  
      # cannot export if there is no data node or the data node is not a volume
      shn = slicer.vtkMRMLSubjectHierarchyNode.GetSubjectHierarchyNode(slicer.mrmlScene)
      dataNode = shn.GetItemDataNode(subjectHierarchyItemID)
      if dataNode is None or not dataNode.IsA('vtkMRMLScalarVolumeNode'):
        # not a volume node
        return []
  
      sequenceBrowserNode = self.getSequenceBrowserNodeForMasterOutputNode(dataNode)
      if not sequenceBrowserNode:
        # this seems to be a simple volume node (not a proxy node of a volume
        # sequence). This plugin only deals with volume sequences.
        return []
  
      sequenceItemCount = sequenceBrowserNode.GetMasterSequenceNode().GetNumberOfDataNodes()
      if sequenceItemCount <= 1:
        # this plugin is only relevant if there are multiple items in the sequence
        return []
  
      # Define basic properties of the exportable
      exportable = slicer.qSlicerDICOMExportable()
      exportable.name = self.loadType
      exportable.tooltip = "Creates a series of DICOM files from volume sequences"
      exportable.subjectHierarchyItemID = subjectHierarchyItemID
      exportable.pluginClass = self.__module__
      exportable.confidence = 0.6 # Simple volume has confidence of 0.5, use a slightly higher value here
  
      # Define required tags and default values
      exportable.setTag('SeriesDescription', f'Volume sequence of {sequenceItemCount} frames')
      exportable.setTag('Modality', 'CT')
      exportable.setTag('Manufacturer', 'Unknown manufacturer')
      exportable.setTag('Model', 'Unknown model')
      exportable.setTag('StudyID', '1')
      exportable.setTag('SeriesNumber', '1')
      exportable.setTag('SeriesDate', '')
      exportable.setTag('SeriesTime', '')
  
      return [exportable]
function_tokens: def examineForExport ( self , subjectHierarchyItemID ) : # Check if setting of DICOM UIDs is supported (if not, then we cannot export to sequence) dicomUIDSettingSupported = False createDicomSeriesParameterNode = slicer . modules . createdicomseries . cliModuleLogic ( ) . CreateNode ( ) # CreateNode() factory method incremented the reference count, we decrement now prevent memory leaks # (a reference is still kept by createDicomSeriesParameterNode Python variable). createDicomSeriesParameterNode . UnRegister ( None ) for groupIndex in range ( createDicomSeriesParameterNode . GetNumberOfParameterGroups ( ) ) : if createDicomSeriesParameterNode . GetParameterGroupLabel ( groupIndex ) == "Unique Identifiers (UIDs)" : dicomUIDSettingSupported = True if not dicomUIDSettingSupported : # This version of Slicer does not allow setting DICOM UIDs for export return [ ] # cannot export if there is no data node or the data node is not a volume shn = slicer . vtkMRMLSubjectHierarchyNode . GetSubjectHierarchyNode ( slicer . mrmlScene ) dataNode = shn . GetItemDataNode ( subjectHierarchyItemID ) if dataNode is None or not dataNode . IsA ( 'vtkMRMLScalarVolumeNode' ) : # not a volume node return [ ] sequenceBrowserNode = self . getSequenceBrowserNodeForMasterOutputNode ( dataNode ) if not sequenceBrowserNode : # this seems to be a simple volume node (not a proxy node of a volume # sequence). This plugin only deals with volume sequences. return [ ] sequenceItemCount = sequenceBrowserNode . GetMasterSequenceNode ( ) . GetNumberOfDataNodes ( ) if sequenceItemCount <= 1 : # this plugin is only relevant if there are multiple items in the sequence return [ ] # Define basic properties of the exportable exportable = slicer . qSlicerDICOMExportable ( ) exportable . name = self . loadType exportable . tooltip = "Creates a series of DICOM files from volume sequences" exportable . subjectHierarchyItemID = subjectHierarchyItemID exportable . pluginClass = self . __module__ exportable . confidence = 0.6 # Simple volume has confidence of 0.5, use a slightly higher value here # Define required tags and default values exportable . setTag ( 'SeriesDescription' , f'Volume sequence of {sequenceItemCount} frames' ) exportable . setTag ( 'Modality' , 'CT' ) exportable . setTag ( 'Manufacturer' , 'Unknown manufacturer' ) exportable . setTag ( 'Model' , 'Unknown model' ) exportable . setTag ( 'StudyID' , '1' ) exportable . setTag ( 'SeriesNumber' , '1' ) exportable . setTag ( 'SeriesDate' , '' ) exportable . setTag ( 'SeriesTime' , '' ) return [ exportable ]