Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add segmentor update notice #63

Merged
merged 2 commits into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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, new_segmentor_note


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

@new_segmentor_note
@citation_reminder
def __init__(
self,
Expand Down
22 changes: 21 additions & 1 deletion brats_toolkit/util/citation_reminder.py
Original file line number Diff line number Diff line change
@@ -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):
Expand Down Expand Up @@ -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(
Expand All @@ -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
Loading