Skip to content

Commit 121946a

Browse files
committed
handle_cache for fit_transform
1 parent 08cf652 commit 121946a

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "ROILoc"
3-
version = "0.2.7"
3+
version = "0.2.8"
44
description = "A simple package to center and crop T1w & T2w MRIs around a given region of interest by its name."
55
license = "MIT"
66
readme = "README.rst"

roiloc/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.2.7"
1+
__version__ = "0.2.8"

roiloc/locator.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,16 +121,18 @@ def transform(self, image: ANTsImage) -> list:
121121
for side in ["right", "left"]
122122
]
123123

124-
def fit_transform(self, image: ANTsImage) -> list:
124+
@handle_cache
125+
def fit_transform(self, image: ANTsImage, outprefix: str = "") -> list:
125126
"""Fit the ROI to the image and transform.
126127
127128
Args:
128129
image (ANTsImage): Image to fit the ROI to.
130+
outprefix (str, optional): Prefix for ANTs' temporary files.
129131
130132
Returns:
131133
list: List of transformed images.
132134
"""
133-
self.fit(image)
135+
self.fit(image, outprefix=outprefix)
134136
return self.transform(image)
135137

136138
def inverse_transform(self,

tests/test_roiloc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33

44
def test_version():
5-
assert __version__ == '0.2.7'
5+
assert __version__ == '0.2.8'

0 commit comments

Comments
 (0)