Open jcohenadad opened 6 months ago
@leelisae I'm using the data you sent me on 2024-05-15, but I neither see the PSIR image, nor the lesion segmentation. See for example the files for one subject:
julien-macbook:~/Desktop/canproco/data/CAN-01-RRM-133-M0 $ tree
.
├── mt
│ ├── mt0.nii.gz
│ ├── mt1.nii.gz
│ └── mt_t1.nii.gz
└── t2
└── t2.nii.gz
Wasn't the plan that you run @plbenveniste's model to get the lesion segmentation as per our discussion https://github.com/ivadomed/canproco/issues/88? Once you do it, you can send me the data that include the lesion segmentation, so I can work on the registration and metric extraction code. Given that the lesion masks are derivatives, I suggest you add them in your dataset as an extra folder 'derivatives'.
@jcohenadad - I understood that once we confirmed that there were no issues with the BIDS ID numbers within each site (#88), I can use the lesion masks that your team has already generated instead of having to redo the processing again. If I’m correct in my understanding, I have received the lesion masks and I’ve added both the lesion mask and the PSIR image to the data folder in our shared Dropbox.
I’m not sure if I understood the part re: “derivatives” folder. I added this folder as I understood, but if I’m misunderstood, please feel free to relocate it appropriately, and I will follow your instructions when analyzing non-lesional MTR of the SC using the lesion masks generated from the PSIR sequence for the rest of the subjects later.
I also found it interesting that lesion masks were generated for healthy controls, as shown in the example in Dropbox. Do you believe that the lesion masks are accurate for healthy controls, or would it be more reasonable to process non-lesional MTR in the SC for patients only?
Thank you for all your help! I'm excited to learn which command lines are optimal to use for the features you listed above.
Good, the example dataset version 2024-05-16_14h55min (@leelisae please always refer to the date/time of the dataset, to make sure we both refer to the same dataset when going back-and-forth with analysis debugging/interpretation) seems to have the PSIR and lesion masks:
.
├── CAN-01-CON-039-M0
│ ├── mt
│ │ ├── mt0.nii.gz
│ │ ├── mt1.nii.gz
│ │ └── mt_t1.nii.gz
│ ├── psir
│ │ └── psir.nii.gz
│ └── t2
│ └── t2.nii.gz
├── CAN-01-RRM-133-M0
│ ├── mt
│ │ ├── mt0.nii.gz
│ │ ├── mt1.nii.gz
│ │ └── mt_t1.nii.gz
│ ├── psir
│ │ └── psir.nii.gz
│ └── t2
│ └── t2.nii.gz
├── CAN-03-RRM-092-M0
│ ├── mt
│ │ ├── mt0.nii.gz
│ │ ├── mt1.nii.gz
│ │ └── mt_t1.nii.gz
│ ├── psir
│ │ └── psir.nii.gz
│ └── t2
│ └── t2.nii.gz
├── derivatives
│ └── lesion_masks
│ ├── CAN-01-CON-039-M0_lesion.nii.gz
│ ├── CAN-01-RRM-133-M0_lesion.nii.gz
│ └── CAN-03-RRM-092-M0_lesion.nii.gz
└── qc
I should be able to move forward with the analysis code.
I understood that once we confirmed that there were no issues with the BIDS ID numbers within each site (https://github.com/ivadomed/canproco/issues/88), I can use the lesion masks that your team has already generated instead of having to redo the processing again. If I’m correct in my understanding, I have received the lesion masks and I’ve added both the lesion mask and the PSIR image to the data folder in our shared Dropbox.
Yes, this is exactly it!
I’m not sure if I understood the part re: “derivatives” folder. I added this folder as I understood, but if I’m misunderstood, please feel free to relocate it appropriately, and I will follow your instructions when analyzing non-lesional MTR of the SC using the lesion masks generated from the PSIR sequence for the rest of the subjects later.
The derivatives folder is a BIDS requirement, and is a way to ensure reproducible pipeline (also see #92). The derivatives folder you produced does not completely follow BIDS convention, but since I understand you are pressed with time, this will be good enough for now.
I also found it interesting that lesion masks were generated for healthy controls, as shown in the example in Dropbox. Do you believe that the lesion masks are accurate for healthy controls, or would it be more reasonable to process non-lesional MTR in the SC for patients only?
That's an issue with the model, which is not perfect (no model is perfect). Tagging @plbenveniste
Testing lisa/spine.sh
version https://github.com/ivadomed/canproco/commit/8f7fbdbf5090e3d98c6202d2637523d0707061ee on data version 2024-05-16_14h55min, on subject CAN-01-RRM-133-M0
, I encountered some errors:
The first error is:
FileNotFoundError: No such file or no access: '/Users/julien/Desktop/canproco/data/CAN-01-RRM-133-M0/t2/mt_t1.nii.gz'
Apparently the code is expecting a file t2/mt_t1.nii.gz
, but this file is under mt/
and not under t2/
. @leelisae it seems that either the data or the code you sent me is faulty. Please send me a working version, so I can start implementing the requested feature.
@jcohenadad - This is strange. I tested lisa/spine.sh
using SCT 5.7 on data version 2024-05-16_14h55min, on subject CAN-01-RRM-133-M0
and CAN-03-RRM-092-M0
, and did not encounter any errors and generated all expected QCs too.
There is a line cd ${SUBJECT}/mt
prior to performing sct_image -i mt_t1.nii.gz -setorient RPI -o mt_t1.nii.gz;
so the code should know to change to the correct directory mt/
for mt/mt_t1.nii.gz
. I will add a ";" at the end of cd ${SUBJECT}/mt
but I don't think this is the issue as I was able to run the script without this.
Cause of the issue reported in https://github.com/ivadomed/canproco/issues/91#issuecomment-2123346566 is now explained in https://github.com/ivadomed/canproco/issues/93
After fixing https://github.com/ivadomed/canproco/issues/93 the script is running properly! I was able to fully process a subject 😊.
This issue is a followup from https://github.com/ivadomed/canproco/issues/88#issuecomment-2096425760. After merging #90 we want to modify @leelisae's code to add the following features: