-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #48 from neuronflow/deprecated_prep
Deprecated prep
- Loading branch information
Showing
5 changed files
with
44 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
import os | ||
from path import Path | ||
|
||
from brats_toolkit.preprocessor import Preprocessor | ||
|
||
# instantiate | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,44 @@ | ||
from rich.console import Console | ||
|
||
def citation_reminder(func): | ||
|
||
def citation_reminder(func): | ||
def wrapper(*args, **kwargs): | ||
console = Console() | ||
console.rule("[bold red]Friendly citation reminder[/bold red]") | ||
console.print("If you use this software in your research, please [bold cyan]cite[/bold cyan] BraTS Toolkit and the original authors of the algorithms who make this repository and tool possible.", justify="center") | ||
console.print("Details can be found at https://github.com/neuronflow/BraTS-Toolkit#citation", justify="center") | ||
console.print( | ||
"If you use this software in your research, please [bold cyan]cite[/bold cyan] BraTS Toolkit and the original authors of the algorithms who make this repository and tool possible.", | ||
justify="center", | ||
) | ||
console.print( | ||
"Details can be found at https://github.com/neuronflow/BraTS-Toolkit#citation", | ||
justify="center", | ||
) | ||
console.print("Thank you!", justify="center") | ||
console.rule() | ||
console.line() | ||
func(*args, **kwargs) | ||
return wrapper | ||
|
||
return wrapper | ||
|
||
|
||
def deprecated_preprocessor(func): | ||
def wrapper(*args, **kwargs): | ||
console = Console() | ||
console.rule("[bold red]Deprecation note[/bold red]") | ||
console.print( | ||
"Support for BraTS Toolkit's preprocessor will be deprecated soon, even though it should continue working.", | ||
justify="center", | ||
) | ||
console.print( | ||
"You can already beta test the new BrainLes preprocessing pipeline which allows for arbitrary sequences and implements multiple backends for registration and brain extration and. Furthermore it does not require docker", | ||
justify="center", | ||
) | ||
console.print( | ||
"visit https://github.com/BrainLesion/preprocessing to learn more", | ||
justify="center", | ||
) | ||
console.rule() | ||
console.line() | ||
func(*args, **kwargs) | ||
|
||
return wrapper |