-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dog Atlas #26
Comments
I suspect the issue is that there is no WM atlas for this template, but @joshuacwnewton can you please double check? thank you |
Thank you for the ping, @jcohenadad. The lines of code that failed look like this: # [...]
elif os.path.isdir(path_label):
# Labels is an SCT atlas folder structure
# Parse labels according to the file info_label.txt
indiv_labels_ids, indiv_labels_names, indiv_labels_files, \
combined_labels_ids, combined_labels_names, combined_labels_id_groups, map_clusters \
= read_label_file(path_label, param_default.file_info_label)
label_struc = {}
# fill IDs for indiv labels
for i_label in range(len(indiv_labels_ids)):
label_struc[indiv_labels_ids[i_label]] = LabelStruc(id=indiv_labels_ids[i_label],
name=indiv_labels_names[i_label],
filename=indiv_labels_files[i_label],
map_cluster=[indiv_labels_ids[i_label] in map_cluster for
map_cluster in map_clusters].index(True)) You can see in the code above, because of the first conditional, the code will only be run if the condition
But, I am confused, because the dog template has no So, what I am curious about is: Why is there a non-empty Anyway, if you wish to extract DTI metrics from the full spinal cord mask, I would make sure the following conditions are true:
Since you are registering to the template, I would assume that you wish to use the file |
Some observations for SCT development:
|
Should the dog template have an atlas? I just did the following instructions:
|
Not that I know of... The contents of the
Given that there is no atlas, I am quite confused as to why the atlas-specific code is even executing. 🤔 |
@shinndvm Just to clarify: the dog template only consists of an averaged T2w MRI scans across 6 dogs and segmented spinal cord. There is no atlas of white matter, like there is for the PAM50 template. You could still use the template to extract metrics within the spinal cord. If you wish to create an atlas of specific tracts, this is something we could discuss. |
At the moment, we’re analyzing the entire spinal cord, but targeting specific tracts would be an ideal goal down the line. Below, I’ve included the workflow steps used in the terminal. However, I’m still unable to obtain the metrics—everything runs smoothly until reaching sct_dmri_compute_dti. I’ve included the entire process here to confirm if there might be an additional step that’s needed. Also, the dog template has been moved to the same folder, which is why there’s no path specified for it. For sct_extract_metric, I’ve tested with and without the -l option, but as the process stalls at compute_dti, I’m unsure of how much the -l option impacts the outcome at this stage.
|
Few comments here: Using flag If you want to register multiple dogs to the dog template, and then extract metrics within the spinal cord, then you can use replace
If you want to extract metric in the dog-specific space (ie, not the template), then you don't need to register to a template for that. You can simply use:
Hope that helps, |
Thank you. This is what I am imputing and seem to be getting values that would correlate to what they should be. sct_extract_metric -i dti_MD.nii.gz -f dmri_crop_moco_dwi_mean_seg.nii.gz -o MD.txt |
Well I thought things were running smoothly but now looking at a new patient when I run the following script:
I get the following error
I have run
because the sform and qform do not match up (using Sorry to keep bugging you but any suggestions would be appreciated. |
No worries at all, we're happy to help. (For future reference, it might be easier to post on the SCT Forum, which is a more "general" place to ask for usage help with SCT, rather than the "template-dog" repo, that way others can benefit from the problem-solving.) Anyway, you are correct, modifying the file in the temporary directory won't help because a new tmpdir will be used each time. Instead, I would recommend backing up the original image file used for mv T2w.nii.gz T2w_mismatched_xforms.nii.gz
sct_image -set-sform-to-qform -i T2w_mismatched_xforms.nii.gz -o T2w.nii.gz (Note: You may need to do this for the |
I am using the getting started instruction on the (https://spinalcordtoolbox.com/) main page. I get to the register multimodal and use the code as shown below but when I get to the extract method I get the following error. Any suggestions? I have tried it with the -l and without the -l for the extract metric as I thought 40 was the entire spinal cord.
The text was updated successfully, but these errors were encountered: