Skip to content

Commit

Permalink
Add segmentor deprecation notice
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcelRosier committed Aug 5, 2024
1 parent b1555e3 commit 87b65cf
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 deletions.
3 changes: 2 additions & 1 deletion brats_toolkit/segmentor.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,15 @@
from . import fusionator
from .util import filemanager as fm
from .util import own_itk as oitk
from .util.citation_reminder import citation_reminder
from .util.citation_reminder import citation_reminder, deprecated_segmentor


class Segmentor(object):
"""
Now does it all!
"""

@deprecated_segmentor
@citation_reminder
def __init__(
self,
Expand Down
26 changes: 25 additions & 1 deletion brats_toolkit/util/citation_reminder.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def wrapper(*args, **kwargs):
justify="center",
)
console.print(
"Please note that this deprecation does not impact the segmentation and fusion module, which will continue to receive maintenance and support.",
"Please note that this deprecation does not impact the fusion module, which will continue to receive maintenance and support.",
justify="center",
)
console.print(
Expand All @@ -48,3 +48,27 @@ def wrapper(*args, **kwargs):
func(*args, **kwargs)

return wrapper


def deprecated_segmentor(func):
def wrapper(*args, **kwargs):
console = Console()
console.rule("[bold red]Deprecation note[/bold red]")
console.print(
"Deprecation Notice: Support for the BraTS Toolkit's segmentor is now deprecated, although it is expected to remain functional.",
justify="center",
)
console.print(
"Please note that this deprecation does not impact the fusion module, which will continue to receive maintenance and support.",
justify="center",
)
console.print(
"We recommend transitioning to the BrainLes segmentor tool available at: https://github.com/BrainLesion/BraTS for segmentation tasks.",
justify="center",
)

console.rule()
console.line()
func(*args, **kwargs)

return wrapper

0 comments on commit 87b65cf

Please sign in to comment.