Skip to content

Commit 0cd322f

Browse files
authored
Merge pull request #63 from neuronflow/add-segmentor-deprecation-notice
Add segmentor update notice
2 parents b1555e3 + e8a068d commit 0cd322f

File tree

2 files changed

+23
-2
lines changed

2 files changed

+23
-2
lines changed

brats_toolkit/segmentor.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,15 @@
2424
from . import fusionator
2525
from .util import filemanager as fm
2626
from .util import own_itk as oitk
27-
from .util.citation_reminder import citation_reminder
27+
from .util.citation_reminder import citation_reminder, new_segmentor_note
2828

2929

3030
class Segmentor(object):
3131
"""
3232
Now does it all!
3333
"""
3434

35+
@new_segmentor_note
3536
@citation_reminder
3637
def __init__(
3738
self,

brats_toolkit/util/citation_reminder.py

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from rich.console import Console
22

33
CITATION_LINK = "https://github.com/neuronflow/BraTS-Toolkit#citation"
4+
BRATS_LINK = "https://github.com/BrainLesion/BraTS/"
45

56

67
def citation_reminder(func):
@@ -31,7 +32,7 @@ def wrapper(*args, **kwargs):
3132
justify="center",
3233
)
3334
console.print(
34-
"Please note that this deprecation does not impact the segmentation and fusion module, which will continue to receive maintenance and support.",
35+
"Please note that this deprecation does not impact the segmentor and fusion module, which will continue to receive maintenance and support.",
3536
justify="center",
3637
)
3738
console.print(
@@ -48,3 +49,22 @@ def wrapper(*args, **kwargs):
4849
func(*args, **kwargs)
4950

5051
return wrapper
52+
53+
54+
def new_segmentor_note(func):
55+
def wrapper(*args, **kwargs):
56+
console = Console()
57+
console.rule("[bold cyan]New segmentor package[/bold cyan]")
58+
console.print(
59+
"We developed a new segmentation tool that provides the latest BraTS algorithms (2023 and later) along with various improvements and features.",
60+
justify="center",
61+
)
62+
console.print(
63+
f"While the BraTS Toolkit segementation module will remain functional for the old models we recommend transitioning to the new BraTS package available at: {BRATS_LINK} to get the latest models and features.",
64+
justify="center",
65+
)
66+
console.rule()
67+
console.line()
68+
func(*args, **kwargs)
69+
70+
return wrapper

0 commit comments

Comments
 (0)