diff --git a/brats_toolkit/segmentor.py b/brats_toolkit/segmentor.py index 5a5ecb7..2f6eac6 100644 --- a/brats_toolkit/segmentor.py +++ b/brats_toolkit/segmentor.py @@ -24,7 +24,7 @@ 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, new_segmentor_note class Segmentor(object): @@ -32,6 +32,7 @@ class Segmentor(object): Now does it all! """ + @new_segmentor_note @citation_reminder def __init__( self, diff --git a/brats_toolkit/util/citation_reminder.py b/brats_toolkit/util/citation_reminder.py index f2075af..3fee8c6 100644 --- a/brats_toolkit/util/citation_reminder.py +++ b/brats_toolkit/util/citation_reminder.py @@ -1,6 +1,7 @@ from rich.console import Console CITATION_LINK = "https://github.com/neuronflow/BraTS-Toolkit#citation" +BRATS_LINK = "https://github.com/BrainLesion/BraTS/" def citation_reminder(func): @@ -31,7 +32,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 segmentor and fusion module, which will continue to receive maintenance and support.", justify="center", ) console.print( @@ -48,3 +49,22 @@ def wrapper(*args, **kwargs): func(*args, **kwargs) return wrapper + + +def new_segmentor_note(func): + def wrapper(*args, **kwargs): + console = Console() + console.rule("[bold cyan]New segmentor package[/bold cyan]") + console.print( + "We developed a new segmentation tool that provides the latest BraTS algorithms (2023 and later) along with various improvements and features.", + justify="center", + ) + console.print( + 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.", + justify="center", + ) + console.rule() + console.line() + func(*args, **kwargs) + + return wrapper