@@ -19,10 +19,10 @@ def compose(self):
19
19
"0.1" ,
20
20
"Center for Augmented Intelligence in Imaging, Mayo Clinic, Florida" ,
21
21
)
22
- my_equipment = EquipmentInfo (manufacturer = "MONAI Deploy App SD " , manufacturer_model = "DICOM SR Writer" )
22
+ my_equipment = EquipmentInfo (manufacturer = "MONAI Deploy App SDK " , manufacturer_model = "DICOM SR Writer" )
23
23
my_special_tags = {"SeriesDescription" : "Not for clinical use" }
24
24
study_loader_op = DICOMDataLoaderOperator ()
25
- series_selector_op = DICOMSeriesSelectorOperator (rules = "" )
25
+ series_selector_op = DICOMSeriesSelectorOperator (rules = Sample_Rules_Text )
26
26
series_to_vol_op = DICOMSeriesToVolumeOperator ()
27
27
classifier_op = ClassifierOperator ()
28
28
sr_writer_op = DICOMTextSRWriterOperator (
@@ -39,6 +39,27 @@ def compose(self):
39
39
self .add_flow (series_selector_op , sr_writer_op , {"study_selected_series_list" : "study_selected_series_list" })
40
40
41
41
42
+ # This is a sample series selection rule in JSON, simply selecting a MG series.
43
+ # If the study has more than 1 MG series, then all of them will be selected.
44
+ # Please see more detail in DICOMSeriesSelectorOperator.
45
+ # For list of string values, e.g. "ImageType": ["PRIMARY", "ORIGINAL"], it is a match if all elements
46
+ # are all in the multi-value attribute of the DICOM series.
47
+
48
+ Sample_Rules_Text = """
49
+ {
50
+ "selections": [
51
+ {
52
+ "name": "MG Series",
53
+ "conditions": {
54
+ "Modality": "(?i)MG",
55
+ "ImageType": ["PRIMARY"]
56
+ }
57
+ }
58
+ ]
59
+ }
60
+ """
61
+
62
+
42
63
def test ():
43
64
app = BreastClassificationApp ()
44
65
image_dir = "./sampleDICOMs/1/BI_BREAST_SCREENING_BILATERAL_WITH_TOMOSYNTHESIS-2019-07-08/1/L_CC_C-View"
0 commit comments