Skip to content
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

Improved CLI, fixed bug with the GUI and refactored into module #2459

Merged
merged 58 commits into from
Sep 30, 2019

Conversation

jcohenadad
Copy link
Member

@jcohenadad jcohenadad commented Sep 26, 2019

This PR introduces various improvements the sct_crop_image function, including:

This PR also deals with the resampling module:

The CLIs has changed, hence the compatibility flag.

Now using SCT's module: spinalcordtoolbox.gui.sagittal
Fixes #2458
@jcohenadad jcohenadad added enhancement category: improves performance/results of an existing feature sct_crop_image context: labels Sep 26, 2019
@jcohenadad jcohenadad added this to the 4.0.3 milestone Sep 26, 2019
@jcohenadad jcohenadad added the compatibility Incompatible API changes that necessitate a MAJOR version bump. Refer to https://semver.org/ label Sep 26, 2019
@jcohenadad
Copy link
Member Author

jcohenadad commented Sep 29, 2019

Results of batch_processing for commit fec7e49:

t2/CSA:          73.98363895856627
mt/MTR(WM):      54.29594350190386
t2s/CSA_GM:      12.487834828856178
t2s/CSA_WM:      64.97073246634238
dmri/FA(CST_r):  0.7933691461612653
dmri/FA(CST_l):  0.7673244817969983

@jcohenadad
Copy link
Member Author

jcohenadad commented Sep 30, 2019

Results of batch_processing on OSX for branch jca/2458-crop (commit 69e4156):

t2/CSA:          73.98363895856627
mt/MTR(WM):      54.29594350190386
t2s/CSA_GM:      12.487834828856178
t2s/CSA_WM:      64.97073246634238
dmri/FA(CST_r):  0.7934020965216604
dmri/FA(CST_l):  0.7673452412911614

on master (commit: 3da4b26):

t2/CSA:          73.98363895856627
mt/MTR(WM):      54.295941561767606
t2s/CSA_GM:      12.487834828856178
t2s/CSA_WM:      64.97073246634238
dmri/FA(CST_r):  0.7936834565979429
dmri/FA(CST_l):  0.7702644397647297

--> slight difference

@jcohenadad jcohenadad merged commit 91beb0b into master Sep 30, 2019
@jcohenadad jcohenadad deleted the jca/2458-crop branch September 30, 2019 22:25
jcohenadad added a commit that referenced this pull request Dec 18, 2019
* sct_crop_image: Refactored cropping with GUI (WIP)

Now using SCT's module: spinalcordtoolbox.gui.sagittal
Fixes #2458

* sct_crop_image: Cleanup

* sct_crop_image: Cleanup

* sct_crop_image: Modify usage (WIP)

* sct_crop_image: Refactored cropping with GUI (WIP)

Now using SCT's module: spinalcordtoolbox.gui.sagittal
Fixes #2458

* sct_crop_image: Cleanup

* sct_crop_image: Cleanup

* sct_crop_image: Made output filename optional

* sct_crop_image: FIxed output filename

* spinalcordtoolbox/cropping: Moved ImageCropper into python module

* cropping: Replaced printv with logger, cleanup

* sct_crop_image: Replaced cropping box param with ?min/?max

WIP
Fixes #1818

* cropping: Introduced class BoundingBox

* cropping: Further work on get_voxel_bbox (WIP)

* cropping: Replaced binary isct_crop_image with Python cropping

* sct_crop_image: Fixed type of input params

* cropping: Refactored to have several functions output bbox

* cropping: Implemented get_bbox_from_mask()

* sct_crop_image: Updated CLIs with recent changes in cropping

* test_sct_crop_image: Updated test

* sct_crop_image: Added entry for -ref option

* resampling: Now accepting nibabel and Image object

* resampling: Added 'mode' input parameter

* cropping: Added get_bbox_from_ref()

* sct_crop_image: Added entry for -ref option

* test_sct_crop_image: Added testing for cropping with ref

* cropping: Fixed origin

* sct_crop_image: Improved CLI, save output there, display fsleyes syntax

* cropping: Updated get_bbox_from_gui, few improvements

* cropping: Cleanup

* sct_crop_image: Cleanup, removed useless options

* sct_crop_image: Added examples to usage

* sct_crop_image: Clarified usage, prioritized cropping methods

* cropping: Clarified GUI usage

* sct_crop_image: Clarified usage

* make_binaries.sh: Removed isct_crop_image binary generation

* cropping: Removed useless input params

* test_sct_crop_image: Updated integrity testing values

* sct_apply_transfo: Updated with recent changes in ImageCropper

* msct_gmseg_utils: Updated with recent changes in ImageCropper

* sct_apply_transfo: Fixed if case typo

* resampling: Fixed wrong type for nibabel

* Fixed wrong input argument for nib_resampling()

* Updated files with recent changes in sct_crop_image CLI

* sct_detect_pmj: Fixed syntax for cropping image

* sct_crop_image: Re-established flag -b because it is used elsewhere

* Re-established sct_crop_image with flag -b

* cropping: Fixed index error

* sct_apply_transfo: Fixed wrongly commented line

* cropping: get_bbox_from_ref() now checking dims for img_in and img_ref

* cropping: Fixed wrong array assignment

* cropping: Added useful verbose

* test_sct_apply_transfo: Made test more sensitive

* test_sct_apply_transfo: Now testing for 4D input

* sct_apply_transfo: Fixed if cases

* make_binaries.sh: removed isct_orientation3d

* sct_download_data: Updated links to binaries


Former-commit-id: 59da3093cd04609da5b6c0a51efb7ea887b284ea [formerly 88e0d74 [formerly 91beb0b]]
Former-commit-id: e5c02a3a33bde11ffa719a6276e7264cc2230cc0
Former-commit-id: 8dfcf40
jcohenadad added a commit that referenced this pull request Dec 18, 2019
* sct_crop_image: Refactored cropping with GUI (WIP)

Now using SCT's module: spinalcordtoolbox.gui.sagittal
Fixes #2458

* sct_crop_image: Cleanup

* sct_crop_image: Cleanup

* sct_crop_image: Modify usage (WIP)

* sct_crop_image: Refactored cropping with GUI (WIP)

Now using SCT's module: spinalcordtoolbox.gui.sagittal
Fixes #2458

* sct_crop_image: Cleanup

* sct_crop_image: Cleanup

* sct_crop_image: Made output filename optional

* sct_crop_image: FIxed output filename

* spinalcordtoolbox/cropping: Moved ImageCropper into python module

* cropping: Replaced printv with logger, cleanup

* sct_crop_image: Replaced cropping box param with ?min/?max

WIP
Fixes #1818

* cropping: Introduced class BoundingBox

* cropping: Further work on get_voxel_bbox (WIP)

* cropping: Replaced binary isct_crop_image with Python cropping

* sct_crop_image: Fixed type of input params

* cropping: Refactored to have several functions output bbox

* cropping: Implemented get_bbox_from_mask()

* sct_crop_image: Updated CLIs with recent changes in cropping

* test_sct_crop_image: Updated test

* sct_crop_image: Added entry for -ref option

* resampling: Now accepting nibabel and Image object

* resampling: Added 'mode' input parameter

* cropping: Added get_bbox_from_ref()

* sct_crop_image: Added entry for -ref option

* test_sct_crop_image: Added testing for cropping with ref

* cropping: Fixed origin

* sct_crop_image: Improved CLI, save output there, display fsleyes syntax

* cropping: Updated get_bbox_from_gui, few improvements

* cropping: Cleanup

* sct_crop_image: Cleanup, removed useless options

* sct_crop_image: Added examples to usage

* sct_crop_image: Clarified usage, prioritized cropping methods

* cropping: Clarified GUI usage

* sct_crop_image: Clarified usage

* make_binaries.sh: Removed isct_crop_image binary generation

* cropping: Removed useless input params

* test_sct_crop_image: Updated integrity testing values

* sct_apply_transfo: Updated with recent changes in ImageCropper

* msct_gmseg_utils: Updated with recent changes in ImageCropper

* sct_apply_transfo: Fixed if case typo

* resampling: Fixed wrong type for nibabel

* Fixed wrong input argument for nib_resampling()

* Updated files with recent changes in sct_crop_image CLI

* sct_detect_pmj: Fixed syntax for cropping image

* sct_crop_image: Re-established flag -b because it is used elsewhere

* Re-established sct_crop_image with flag -b

* cropping: Fixed index error

* sct_apply_transfo: Fixed wrongly commented line

* cropping: get_bbox_from_ref() now checking dims for img_in and img_ref

* cropping: Fixed wrong array assignment

* cropping: Added useful verbose

* test_sct_apply_transfo: Made test more sensitive

* test_sct_apply_transfo: Now testing for 4D input

* sct_apply_transfo: Fixed if cases

* make_binaries.sh: removed isct_orientation3d

* sct_download_data: Updated links to binaries


Former-commit-id: 91beb0b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility Incompatible API changes that necessitate a MAJOR version bump. Refer to https://semver.org/ enhancement category: improves performance/results of an existing feature sct_crop_image context:
Projects
None yet
1 participant