monai.deploy.operators.DICOMDataLoaderOperator¶
- class monai.deploy.operators.DICOMDataLoaderOperator(*args, **kwargs)[source]¶
Bases:
monai.deploy.core.operator.OperatorThis operator loads a collection of DICOM Studies in memory given a directory which contains a list of SOP Instances.
Constructor of the base operator.
It creates an instance of Data Store which holds on to all inputs and outputs relavant for this operator.
- Parameters
args – Arguments.
kwargs – Keyword arguments.
Methods
__init__(*args, **kwargs)Constructor of the base operator.
add_input(label, data_type, storage_type)add_output(label, data_type, storage_type)compute(input, output, context)Performs computation for this operator.
Ensures that the operator is valid.
populate_series_attributes(series, sop_instance)Populates series level attributes in the study data structure.
populate_study_attributes(study, sop_instance)Populates study level attributes in the study data structure.
This method gets executed after “compute()” of an operator is called.
This method gets executed before compute() of an operator is called.
Attributes
Gives access to the environment.
Returns the name of this operator.
Retrieves the operator info.
Gives access to the UID of the operator.
- __init__(*args, **kwargs)¶
Constructor of the base operator.
It creates an instance of Data Store which holds on to all inputs and outputs relavant for this operator.
- Parameters
args – Arguments.
kwargs – Keyword arguments.
- compute(input, output, context)[source]¶
Performs computation for this operator.
It scans through the input directory for all SOP instances. It groups them by a collection of studies where each study contains one or more series. This method returns a set of studies.
- ensure_valid()¶
Ensures that the operator is valid.
This method needs to be executed by add_operator() and add_flow() methods in the compose() method of the application. This sets default values for the operator in the graph if necessary. (e.g., set default value for the operator’s input port, set default value for the operator’s output port, etc.)
- property env: monai.deploy.core.operator.OperatorEnv¶
Gives access to the environment.
This sets a default value for the operator’s environment if not set.
- Return type
OperatorEnv- Returns
An instance of OperatorEnv.
- property name: str¶
Returns the name of this operator.
- Return type
str
- property op_info: monai.deploy.core.operator_info.OperatorInfo¶
Retrieves the operator info.
Args:
- Return type
OperatorInfo- Returns
An instance of OperatorInfo.
- populate_series_attributes(series, sop_instance)[source]¶
Populates series level attributes in the study data structure.
- Parameters
study – A DICOM Series instance that needs to be filled-in with series level attribute values
sop_instance – A sample DICOM SOP Instance that contains the list of attributed which will be parsed
- populate_study_attributes(study, sop_instance)[source]¶
Populates study level attributes in the study data structure.
- Parameters
study – A DICOM Study instance that needs to be filled-in with study level attribute values
sop_instance – A sample DICOM SOP Instance that contains the list of attributed which will be parsed
- post_compute()¶
This method gets executed after “compute()” of an operator is called.
This is a post-execution step before the operator is done doing its main action. This needs to be overridden by a base class for any meaningful action.
- pre_compute()¶
This method gets executed before compute() of an operator is called.
This is a preperatory step before the operator executes its main job. This needs to be overridden by a base class for any meaningful action.
- property uid: uuid.UUID¶
Gives access to the UID of the operator.
- Return type
UUID- Returns
UID of the operator.