Preprocessing Saving Images
Closed this issue · 3 comments
Hi,
I'm going through the tutorial, starting with preprocessing, but it appears that subdirectories are not being created in Step 0: read the dicom images
My mage_list_preprocessing.txt file looks like this:
C:/temp/demo_knee/inputs/original
01/DESS/01
right
01/DESS/02
right
01/cubeQuant/01
right
01/cubeQuant/02
right
01/cubeQuant/03
right
01/cubeQuant/04
right
Reading the image data using: image_data = io.load_image_data_preprocessing(input_file_name)
is ok and works
However, the next step: prep.read_dicom_stack(image_data, n_of_cores), gives me the error:
RuntimeError: Exception thrown in SimpleITK WriteImage: D:\a\1\sitk-build\ITK\Modules\IO\Meta\src\itkMetaImageIO.cxx:1129:
itk::ERROR: MetaImageIO(000001BD1FFB0080): File cannot be written: C:/temp/demo_knee/inputs\preprocessed\01/DESS/01_temp.mha
Reason: No such file or directory
When I manually create /demo_knee/inputs/preprocessed/01/DESS, then it puts in the 2 files: 01_temp.mha and 02_temp.mha.
Similarly, I need to manually create the /demo_knee/inputs/preprocessed/01/cubeQuant, where it places 01_temp.mha, 02_temp.mha, 03_temp.mha, 04_temp.mha.
Should all of these subdirectories be created automatically?
Looking forward to using the software!
Hi Matt,
Since you have C:
, I guess you are using Windows. In your input file, change all the /
to \
. Your input file should become like this:
C:\temp\demo_knee\inputs\original
01\DESS\01
right
01\DESS\02
right
01\cubeQuant\01
right
01\cubeQuant\02
right
01\cubeQuant\03
right
01\cubeQuant\04
right
Please, let me know if it works.
Thanks,
Serena
yes, that should work!