-
-
Notifications
You must be signed in to change notification settings - Fork 101
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
Refactoring to allow use of im AND seg in the registration process #2218
Conversation
sct_axial_rotation will aim to detect the axial rotation (xy plane) of the spinal cord, first version is based on histogram of gradient orientation sct_test_axial_rotation is a function to process the sct_axial_rotation to multiple subjects and output all figures necessary to quality visualisation in a selected directory
added 3D visualisation of the convolution of histogram made testing retrieve file and work the sct_axial_rotation script on a large dataset (sct_large or any with the same structure) test_sym is just for testing purpose
added weighting by the gradient magnitude, otherwise we have way too much votes for the 0th degree
added different filtering
The old scripts will be deleted in the future
added possibility to generate a mask
probability seg map now based on pixdim angles now translated for visualisation purpose added mask output
# Conflicts: # scripts/msct_register.py
I have looked at the new philosophy of the approach and really like it: To use a list of file for Look forward to hearing about your approach based on symmetry / HOG! |
On 366fd4c I got this error:
|
Has to do with upper case letter thing, I did call my method "HOG" and not "hog", will change that to lowercase. (same for pca PCA) |
@Nicolas-Pinon can you run |
@jcohenadad check Travis no env config (remove it temporarily) |
ok that's what i suspected, probably due to a new py2k deprecation, Travis is now failing on master (while it was passing a week ago, on the same commit): https://travis-ci.org/neuropoly/spinalcordtoolbox/builds/521741144?utm_medium=notification&utm_source=email @Nicolas-Pinon i'll modify the .travis.yml config file to "fix" it |
likely due to py2k deprecation
Results of master (1251241) @ubuntu (
git-nipin/msct_reg-refactoring (9d4b59a) @ubuntu (
git-nipin/msct_reg-refactoring (9d4b59a) @osx (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great contribution 👍
Thanks a lot for the testing @jcohenadad ! |
…2218) * Creation of 2 scripts : sct_axial_rotation will aim to detect the axial rotation (xy plane) of the spinal cord, first version is based on histogram of gradient orientation sct_test_axial_rotation is a function to process the sct_axial_rotation to multiple subjects and output all figures necessary to quality visualisation in a selected directory * little script converting to nii (just for testing purpose) added 3D visualisation of the convolution of histogram made testing retrieve file and work the sct_axial_rotation script on a large dataset (sct_large or any with the same structure) test_sym is just for testing purpose * corrected errors added weighting by the gradient magnitude, otherwise we have way too much votes for the 0th degree * corrected errors added different filtering * created script to test on T2* images * work in progress * work in progress * Created new scripts to make the whole thing clearer and easier to use The old scripts will be deleted in the future * Modified the "raise" statement * error in extract_slice * minor changes, adjustments * minor changes, adjustments * minor changes, added figures for debbuguing (and understanding) * cleaning of old functions * added weighting map based on segmentation of sc * added graphical output, safeguards, function to generate 2D dataset, * changed names for clarity added possibility to generate a mask * added new test to compare PCA to hogancest probability seg map now based on pixdim angles now translated for visualisation purpose added mask output * added angle range * Created function to compute metrics for the method implemented * Modified existing scripts to be able to have im + seg on a registration step * Created script to run evaluate_hogancest in terminal directly * Added function to directly evaluate angle * Added computation of Dice coefficient * Added computation of Dice coefficient function * Modified computation of Dice coefficient and added output csv and png * quick divide by zero fix * verbose fix * test script * multiproc setting in args * Quick modif to have sym axis as mask also quick bug fix * added TODO * Add files via upload Images to explain the method to evaluate the quality of a registration * read me with figures * update to do and added line to uncomment to have method without improvement * updated figure names * Imported msct_register file from axial rot branch * Imported sct_register_{multimodal | to_template} files from axial rot branch * changed the name of the bool, small adjustements and comments * small adjustements and comments * fixed the poly/polydeg problem (backward compatibility) * added the rot_method flag and everything ensued in the 3 files * minor fix * added rot param equal to 0, 1, 2 or more * comment * documentation * changed file input as list for the im and seg case * changed the bool and deleted files that should not be here * merged master * minor fix * minor fix * sct_register_multimodal: Clarified usage * supressing warning not relevant anymore * changed upper case to lower case for rot_method * added error for not implemented error and fixed stuff * minor fixes * .travis.yml: Removed a config that was failing likely due to py2k deprecation Former-commit-id: b0bc30b
For now, in the registration process (namely in
msct_register
) it is not possible to implement a new method that uses both the image and the segmentation of the source and destination MRI. The contributor is forced to either develop a method that register based on segmentations or on images but cannot use both. This can be easily understood when looking at the parametertype
which must be equal toim
orseg
(orlabel
).In this PR we introduce the possibility to use both
im
andseg
, without breaking compatibility, which will allow further development of registration methods, in particular a method based on the symmetry of the SC, discussed in #2204 and #836.