Skip to content

Commit 2174f38

Browse files
committed
Use simple series selection rule on modality and image type
Signed-off-by: M Q <mingmelvinq@nvidia.com>
1 parent 926bc9a commit 2174f38

File tree

1 file changed

+23
-2
lines changed
  • examples/apps/breast_density_classifer_app

1 file changed

+23
-2
lines changed

examples/apps/breast_density_classifer_app/app.py

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ def compose(self):
1919
"0.1",
2020
"Center for Augmented Intelligence in Imaging, Mayo Clinic, Florida",
2121
)
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")
2323
my_special_tags = {"SeriesDescription": "Not for clinical use"}
2424
study_loader_op = DICOMDataLoaderOperator()
25-
series_selector_op = DICOMSeriesSelectorOperator(rules="")
25+
series_selector_op = DICOMSeriesSelectorOperator(rules=Sample_Rules_Text)
2626
series_to_vol_op = DICOMSeriesToVolumeOperator()
2727
classifier_op = ClassifierOperator()
2828
sr_writer_op = DICOMTextSRWriterOperator(
@@ -39,6 +39,27 @@ def compose(self):
3939
self.add_flow(series_selector_op, sr_writer_op, {"study_selected_series_list": "study_selected_series_list"})
4040

4141

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+
4263
def test():
4364
app = BreastClassificationApp()
4465
image_dir = "./sampleDICOMs/1/BI_BREAST_SCREENING_BILATERAL_WITH_TOMOSYNTHESIS-2019-07-08/1/L_CC_C-View"

0 commit comments

Comments
 (0)