-
-
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
Improved CLI, fixed bug with the GUI and refactored into module #2459
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Now using SCT's module: spinalcordtoolbox.gui.sagittal Fixes #2458
jcohenadad
added
enhancement
category: improves performance/results of an existing feature
sct_crop_image
context:
labels
Sep 26, 2019
jcohenadad
added
the
compatibility
Incompatible API changes that necessitate a MAJOR version bump. Refer to https://semver.org/
label
Sep 26, 2019
Now using SCT's module: spinalcordtoolbox.gui.sagittal Fixes #2458
…rdtoolbox into jca/2458-crop
Results of
|
Results of
on master (commit: 3da4b26):
--> slight difference |
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
This was referenced Oct 15, 2020
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:
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces various improvements the
sct_crop_image
function, including:-dim
,-start
and-end
with the more intuitive-xmin -xmax -ymin -ymax -zmin -zmax
. See function usage. Fixes Enhancement sct_crop_image documentation #1818isct_crop_image
with Python-only cropping method. Fixes replace isct_crop_image with Python (i.e. no binary) #470ImageCropper()
from CLI to new Python modulespinalcordtoolbox.cropping
-mesh
and-shift
because unused (I think).isct_crop_image
andisct_orientation3d
. Fixes Remove binaries isct_crop_image and isct_orientation3d #2460.This PR also deals with the resampling module:
Image
object (previously only nibabel was allowed).resample_nib()
toresample()
and passImage
objects instead ofNifti1Images
#2461) will take care of related refactoring.The CLIs has changed, hence the compatibility flag.