Skip to content

Commit

Permalink
Bumps version to 1.0.15
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxenceLarose committed Mar 16, 2023
1 parent 51ac4b8 commit 9ac70db
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion delia/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
logging.getLogger(__name__).addHandler(stream_handler)

__author__ = "Maxence Larose"
__version__ = "1.0.14"
__version__ = "1.0.15"
__copyright__ = "Copyright 2022, Maxence Larose"
__credits__ = ["Maxence Larose"]
__license__ = "Apache License 2.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ class MatchingCentroidSpatialCropd(ArraySpaceTransform):
"""
Performs crop around the centroid of a segmentation, get the used coordinates of the spatial bounding box and apply
this crop on other matching images.
WARNING! The first segmentation (that has the required key) contained in the list of segmentations of a given image
is used to compute the centroid. For example, if there is multiple 'Prostate' segmentation of the same CT scan, the
first segmentation in the files is used to compute the centroid.
"""

def __init__(
Expand Down Expand Up @@ -81,7 +85,8 @@ def __call__(self, data: Dict[Hashable, np.ndarray]) -> Dict[str, np.ndarray]:
elif self._mode == Mode.IMAGE:
assert self._centroid is not None, "'centroid' must be set before __call__ with image mode."
elif self._mode == Mode.SEGMENTATION:
self._centroid = compute_centroid(d[self._segmentation_key])
if self._centroid is None:
self._centroid = compute_centroid(d[self._segmentation_key])
else:
raise ValueError("Unknown transform mode.")

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setuptools.setup(
name="delia",
version="1.0.14",
version="1.0.15",
author="Maxence Larose",
author_email="[email protected]",
description="DICOM Extraction for Large-scale Image Analysis (DELIA).",
Expand Down

0 comments on commit 9ac70db

Please sign in to comment.