Skip to content
Closed
Show file tree
Hide file tree
Changes from 31 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 Jan 17, 2025
4cd15e1
style: remove whitespace for ruff check
strixy16 Jan 17, 2025
e772dd0
style: make docstrings imperative, add return type annotations
strixy16 Jan 17, 2025
c45ba60
style: docstring spacing for ruff
strixy16 Jan 17, 2025
21eaee7
refactor: change event column value mapping to use dictionary compreh…
strixy16 Jan 17, 2025
932b713
style: fixes for ruff config, whitespace, imperative format, etc.
strixy16 Jan 17, 2025
6f75b7d
refactor: in selectByColumnValue, update error handling to include lo…
strixy16 Jan 17, 2025
6e27c2e
refactor/style: ruff config fixes
strixy16 Jan 17, 2025
97881c3
feat: add readii logger for errors
strixy16 Jan 17, 2025
264f888
refactor: update dictionary iteration in replaceColumnValues
strixy16 Jan 17, 2025
3e1cb34
refactor: update dictionary iteration for split_col_data in splitData…
strixy16 Jan 17, 2025
86b5481
feat: set up init file for process directory
strixy16 Jan 17, 2025
38c38c8
feat: add process to the ruff config
strixy16 Jan 17, 2025
727cd1a
build: latest pixi lock
strixy16 Jan 17, 2025
ee091ed
feat: add resize/resampling function
strixy16 Jan 17, 2025
0ab0eb7
feat: add dataclasses to use for bounding box stuff in crop
strixy16 Jan 17, 2025
f892474
feat: add findBoundingBox function
strixy16 Jan 17, 2025
4c283d0
feat/docs: add findCentroid function, add comments to findBoundingBox
strixy16 Jan 17, 2025
d61e1f4
feat: add cropToCentroid function and validateNewDimensions function …
strixy16 Jan 17, 2025
75f1adb
refactor: use validateNewDimensions in resizeImage
strixy16 Jan 17, 2025
e72bc45
docs: add docstrings and return types for ruff
strixy16 Jan 20, 2025
7e56d35
refactor: remove new code from this PR
strixy16 Jan 20, 2025
435da76
feat: add cropping methods from FMCIB pipeline
strixy16 Jan 20, 2025
5a6fe99
style: sort imports for ruff
strixy16 Jan 20, 2025
857defe
feat: add init file for process/images
strixy16 Jan 20, 2025
2ce580f
feat: add Bounding Box class for eventual use in crop methods
strixy16 Jan 20, 2025
1f02329
feat: add pyradiomics cropping and crop the mask in all crop methods …
strixy16 Jan 20, 2025
1f5fd98
fix: apply fixes for instance checking, order of coordinates in crop …
strixy16 Jan 20, 2025
4b9b11c
test: start test functions for crop, have test for crop image to mask…
strixy16 Jan 20, 2025
23a1c34
fix: add error handling for invalid crop methods in crop_image_to_mas…
jjjermiah Jan 21, 2025
b1e03b6
test: add some parameterized tests for quick testing of the find - bo…
jjjermiah Jan 21, 2025
596b497
refactor: replace resize_image with resize function from med-imagetools
strixy16 Jan 21, 2025
bcb2fba
fix: fix return types and input bounding box types to be tuples consi…
strixy16 Jan 21, 2025
107ded7
refactor: add None type for mask_label in pyradiomics crop
strixy16 Jan 21, 2025
0e0ac80
feat: make resize_dimensions optional in crop_image_to_mask since pyr…
strixy16 Jan 21, 2025
b934f0f
Merge remote-tracking branch 'origin/main' into katys/feature/add-fmc…
strixy16 Jan 21, 2025
3edf4c4
fix: fixed ordering of bounding box tuple so it is consistent throughout
strixy16 Jan 21, 2025
2f23865
feat: add check for resize_dimensions existence in crop_image_to_mask
strixy16 Jan 21, 2025
4630fac
refactor: replace is not with !=
strixy16 Jan 21, 2025
2b870f9
fix: fix bounding box case name
strixy16 Jan 21, 2025
267ebd6
refactor: change is not to is None
strixy16 Jan 21, 2025
eca1bf3
feat: make variable for current image dimensions
strixy16 Jan 21, 2025
11c8468
refactor: replace tuple of individual coordinate values with Coordina…
strixy16 Jan 22, 2025
2fec2fe
feat: when a Size3D object is added to a Coordinate, it returns anoth…
strixy16 Jan 22, 2025
71f456c
refactor: change centroid from tuple to Centroid object
strixy16 Jan 22, 2025
b8419cf
feat: add subtraction function to Coordinate
strixy16 Jan 22, 2025
b30edc8
fix: update bounding box crop_method spelling
strixy16 Jan 22, 2025
fd0f294
refactor: change donut and square mask colors to match negative contr…
strixy16 Feb 5, 2025
3b367d0
build: latest pixi update
strixy16 Feb 5, 2025
ee6eac3
feat: notebook for developing crop section for FMCIB addition
strixy16 Feb 5, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion config/ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ include = [
"src/readii/cli/**/*.py",
"src/readii/negative_controls_refactor/**.py",
"src/readii/io/**/**.py",
"src/readii/analyze/**.py"
"src/readii/analyze/**.py",
"src/readii/process/**.py"
]

# extend-exclude is used to exclude directories from the flake8 checks
Expand Down
4 changes: 2 additions & 2 deletions pixi.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file removed src/readii/data/__init__.py
Empty file.
35 changes: 35 additions & 0 deletions src/readii/process/__init__.py
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",
]
27 changes: 27 additions & 0 deletions src/readii/process/images/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
"""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,
resize_image,
validate_new_dimensions,
)

__all__ = [
"crop_image_to_mask",
"find_bounding_box",
"find_centroid",
"resize_image",
"validate_new_dimensions",
"apply_bounding_box_limits",
"check_bounding_box_single_dimension",
"crop_to_maxdim_cube",
"crop_to_bounding_box",
"crop_to_centroid",
]
Loading
Loading