Skip to content

Commit

Permalink
Add Save
Browse files Browse the repository at this point in the history
  • Loading branch information
pooya-mohammadi committed Jul 22, 2024
1 parent 7835cb5 commit 7f9bc35
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion deep_utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from .utils.lib_utils.integeration_utils import import_lazy_module

# Deep Utils version number
__version__ = "1.3.35"
__version__ = "1.3.36"

from .utils.constants import DUMMY_PATH, Backends

Expand Down
10 changes: 10 additions & 0 deletions deep_utils/medical/sitk_utils/sitk_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,16 @@ def swap_seg_value_file(input_file: str,
swaped_array = SITKUtils.swap_seg_value(array, swap_seg)
SITKUtils.save_sample(swaped_array, image, output_file, **kwarg)

@staticmethod
def write(sitk_img, save_path: str):
"""
write sitk image!
:param sitk_img:
:param save_path:
:return:
"""
sitk.WriteImage(sitk_img, save_path)

@staticmethod
def save_sample(input_sample: np.ndarray, org_sitk_img: Optional[Image],
save_path: str, time_array_index=-1,
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import setuptools

VERSION = "1.3.35"
VERSION = "1.3.36"

long_description = open("Readme.md", mode="r", encoding="utf-8").read()

Expand Down

0 comments on commit 7f9bc35

Please sign in to comment.