Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion MEDiml/wrangling/DataManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ def load_mask(_id, file, medscan):
path_roi_data = self.paths._path_to_niftis

for file in self.__nifti.stack_path_roi:
_id = image_file.name.split("(")[0] if ("(") in image_file.name else image_file.name # id is PatientID__ImagingScanName
_id = file.name.split("(")[0] if ("(") in file.name else file.name # id is PatientID__ImagingScanName
load_mask(_id, file, medscan)
roi_index += 1
else:
Expand Down
16 changes: 6 additions & 10 deletions notebooks/tutorial/DataManager-Tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"## Introduction\n",
"\n",
"\n",
"This notebook is a tutorial for the *DataManager* class to give a detailed introduction & explanation on how to use this Python class. The *DataManager* class is the main object used in the *MEDimage* package when it comes to processing raw data in NIfTI and DICOM formats. This class can:\n",
"This notebook is a tutorial for the *DataManager* class to give a detailed introduction & explanation on how to use this Python class. The *DataManager* class is the main object used in the *MEDiml* package when it comes to processing raw data in NIfTI and DICOM formats. This class can:\n",
" - Create ``MEDscan`` class objects from the raw data and makes the manipulation of these objects easy.\n",
" - Help find the proper dimension and re-segmentation ranges options for radiomics analysis by running some pre-computation checks.\n",
"\n",
Expand All @@ -43,7 +43,7 @@
"id": "95b2b171",
"metadata": {},
"source": [
"The ``DataManager`` class is one of the first operation done in the radiomics analysis workflow, because it helps create the ``MEDscan`` class objects which is the main asset used in the *MEDimage* package.\n",
"The ``DataManager`` class is one of the first operation done in the radiomics analysis workflow, because it helps create the ``MEDscan`` class objects which is the main asset used in the *MEDiml* package.\n",
"\n",
"<img src=\"images/MEDimageFlowchart.png\"/>\n",
"\n",
Expand All @@ -66,7 +66,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"id": "af05f061",
"metadata": {},
"outputs": [
Expand All @@ -81,11 +81,7 @@
"source": [
"import os\n",
"import sys\n",
"\n",
"MODULE_DIR = os.path.dirname(os.path.abspath('../MEDimage/'))\n",
"sys.path.append(os.path.dirname(MODULE_DIR))\n",
"\n",
"import MEDimage"
"import MEDiml"
]
},
{
Expand Down Expand Up @@ -591,15 +587,15 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": null,
"id": "235fa073",
"metadata": {},
"outputs": [],
"source": [
"path_dicoms_data = Path(os.getcwd()) / \"data\" / \"DICOM-STS\"\n",
"path_save = Path(os.getcwd()) / \"data\" / \"npy\"\n",
"path_save.mkdir() if not path_save.exists() else path_save\n",
"dm = MEDimage.wrangling.DataManager(path_to_dicoms=path_dicoms_data,\n",
"dm = MEDiml.wrangling.DataManager(path_to_dicoms=path_dicoms_data,\n",
" path_save=path_save,\n",
" path_csv=path_csv,\n",
" n_batch=2)"
Expand Down