-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add cropping methods from FMCIB pipeline #113
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
Closed
Closed
Changes from 35 commits
Commits
Show all changes
50 commits
Select commit
Hold shift + click to select a range
7cd7cf1
refactor: make process code dir, move label, select, and split to it
strixy16 4cd15e1
style: remove whitespace for ruff check
strixy16 e772dd0
style: make docstrings imperative, add return type annotations
strixy16 c45ba60
style: docstring spacing for ruff
strixy16 21eaee7
refactor: change event column value mapping to use dictionary compreh…
strixy16 932b713
style: fixes for ruff config, whitespace, imperative format, etc.
strixy16 6f75b7d
refactor: in selectByColumnValue, update error handling to include lo…
strixy16 6e27c2e
refactor/style: ruff config fixes
strixy16 97881c3
feat: add readii logger for errors
strixy16 264f888
refactor: update dictionary iteration in replaceColumnValues
strixy16 3e1cb34
refactor: update dictionary iteration for split_col_data in splitData…
strixy16 86b5481
feat: set up init file for process directory
strixy16 38c38c8
feat: add process to the ruff config
strixy16 727cd1a
build: latest pixi lock
strixy16 ee091ed
feat: add resize/resampling function
strixy16 0ab0eb7
feat: add dataclasses to use for bounding box stuff in crop
strixy16 f892474
feat: add findBoundingBox function
strixy16 4c283d0
feat/docs: add findCentroid function, add comments to findBoundingBox
strixy16 d61e1f4
feat: add cropToCentroid function and validateNewDimensions function …
strixy16 75f1adb
refactor: use validateNewDimensions in resizeImage
strixy16 e72bc45
docs: add docstrings and return types for ruff
strixy16 7e56d35
refactor: remove new code from this PR
strixy16 435da76
feat: add cropping methods from FMCIB pipeline
strixy16 5a6fe99
style: sort imports for ruff
strixy16 857defe
feat: add init file for process/images
strixy16 2ce580f
feat: add Bounding Box class for eventual use in crop methods
strixy16 1f02329
feat: add pyradiomics cropping and crop the mask in all crop methods …
strixy16 1f5fd98
fix: apply fixes for instance checking, order of coordinates in crop …
strixy16 4b9b11c
test: start test functions for crop, have test for crop image to mask…
strixy16 23a1c34
fix: add error handling for invalid crop methods in crop_image_to_mas…
jjjermiah b1e03b6
test: add some parameterized tests for quick testing of the find - bo…
jjjermiah 596b497
refactor: replace resize_image with resize function from med-imagetools
strixy16 bcb2fba
fix: fix return types and input bounding box types to be tuples consi…
strixy16 107ded7
refactor: add None type for mask_label in pyradiomics crop
strixy16 0e0ac80
feat: make resize_dimensions optional in crop_image_to_mask since pyr…
strixy16 b934f0f
Merge remote-tracking branch 'origin/main' into katys/feature/add-fmc…
strixy16 3edf4c4
fix: fixed ordering of bounding box tuple so it is consistent throughout
strixy16 2f23865
feat: add check for resize_dimensions existence in crop_image_to_mask
strixy16 4630fac
refactor: replace is not with !=
strixy16 2b870f9
fix: fix bounding box case name
strixy16 267ebd6
refactor: change is not to is None
strixy16 eca1bf3
feat: make variable for current image dimensions
strixy16 11c8468
refactor: replace tuple of individual coordinate values with Coordina…
strixy16 2fec2fe
feat: when a Size3D object is added to a Coordinate, it returns anoth…
strixy16 71f456c
refactor: change centroid from tuple to Centroid object
strixy16 b8419cf
feat: add subtraction function to Coordinate
strixy16 b30edc8
fix: update bounding box crop_method spelling
strixy16 fd0f294
refactor: change donut and square mask colors to match negative contr…
strixy16 3b367d0
build: latest pixi update
strixy16 ee6eac3
feat: notebook for developing crop section for FMCIB addition
strixy16 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Empty file.
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
"""Module for processing and manipulating data.""" | ||
|
||
from .label import ( | ||
addOutcomeLabels, | ||
convertDaysToYears, | ||
eventOutcomeColumnSetup, | ||
getPatientIdentifierLabel, | ||
setPatientIdAsIndex, | ||
survivalStatusToNumericMapping, | ||
timeOutcomeColumnSetup, | ||
) | ||
from .select import ( | ||
dropUpToFeature, | ||
getOnlyPyradiomicsFeatures, | ||
selectByColumnValue, | ||
) | ||
from .split import ( | ||
replaceColumnValues, | ||
splitDataByColumnValue, | ||
) | ||
|
||
__all__ = [ | ||
"addOutcomeLabels", | ||
"convertDaysToYears", | ||
"getPatientIdentifierLabel", | ||
"setPatientIdAsIndex", | ||
"timeOutcomeColumnSetup", | ||
"survivalStatusToNumericMapping", | ||
"eventOutcomeColumnSetup", | ||
"replaceColumnValues", | ||
"splitDataByColumnValue", | ||
"dropUpToFeature", | ||
"selectByColumnValue", | ||
"getOnlyPyradiomicsFeatures", | ||
] |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
"""Module for processing and manipulating images.""" | ||
|
||
from .crop import ( | ||
apply_bounding_box_limits, | ||
check_bounding_box_single_dimension, | ||
crop_image_to_mask, | ||
crop_to_bounding_box, | ||
crop_to_centroid, | ||
crop_to_maxdim_cube, | ||
find_bounding_box, | ||
find_centroid, | ||
validate_new_dimensions, | ||
) | ||
|
||
__all__ = [ | ||
"crop_image_to_mask", | ||
"find_bounding_box", | ||
"find_centroid", | ||
"validate_new_dimensions", | ||
"apply_bounding_box_limits", | ||
"check_bounding_box_single_dimension", | ||
"crop_to_maxdim_cube", | ||
"crop_to_bounding_box", | ||
"crop_to_centroid", | ||
] |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.