-
Notifications
You must be signed in to change notification settings - Fork 254
Add NrrdWriter for multi-channel arrays #793
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
Merged
SachidanandAlle
merged 27 commits into
Project-MONAI:main
from
markus-hinsche:nrrd-writer
May 19, 2022
Merged
Add NrrdWriter for multi-channel arrays #793
SachidanandAlle
merged 27 commits into
Project-MONAI:main
from
markus-hinsche:nrrd-writer
May 19, 2022
Conversation
This file contains hidden or 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
Signed-off-by: Sachidanand Alle <sachidanand.alle@gmail.com> Signed-off-by: Markus Hinsche <m.hinsche@gmail.com>
* Draft Training workflow for NuClick Signed-off-by: Sachidanand Alle <sachidanand.alle@gmail.com> * Sync up changes for nuclick training Signed-off-by: Sachidanand Alle <sachidanand.alle@gmail.com> * Fix nuclick training Signed-off-by: Sachidanand Alle <sachidanand.alle@gmail.com> * rename transform Signed-off-by: Sachidanand Alle <sachidanand.alle@gmail.com> * Sync up changes for nuclick training Signed-off-by: Sachidanand Alle <sachidanand.alle@gmail.com> * use monai bunet for nuclick Signed-off-by: Sachidanand Alle <sachidanand.alle@gmail.com> * fix log Signed-off-by: Sachidanand Alle <sachidanand.alle@gmail.com> Signed-off-by: Markus Hinsche <m.hinsche@gmail.com>
Signed-off-by: Markus Hinsche <m.hinsche@gmail.com> Co-authored-by: Janis Vahldiek <janis@vahldiek.info> Signed-off-by: Markus Hinsche <m.hinsche@gmail.com>
Signed-off-by: Markus Hinsche <m.hinsche@gmail.com>
Signed-off-by: Markus Hinsche <m.hinsche@gmail.com> Co-authored-by: Janis Vahldiek <janis@vahldiek.info> Signed-off-by: Markus Hinsche <m.hinsche@gmail.com>
Signed-off-by: Janis Vahldiek <janis@vahldiek.info> Signed-off-by: Markus Hinsche <m.hinsche@gmail.com>
write_seg_nrrd() is only needed for 4D multi-channel label arrays. Everything else can be handled by ITK of nifty writer. Signed-off-by: Janis Vahldiek <janis@vahldiek.info> Signed-off-by: Markus Hinsche <m.hinsche@gmail.com>
Signed-off-by: Markus Hinsche Signed-off-by: Markus Hinsche <m.hinsche@gmail.com>
Signed-off-by: Janis Vahldiek <janis@vahldiek.info> Signed-off-by: Markus Hinsche <m.hinsche@gmail.com>
Signed-off-by: Janis Vahldiek <janis@vahldiek.info> Signed-off-by: Markus Hinsche <m.hinsche@gmail.com>
Signed-off-by: Markus Hinsche Signed-off-by: Markus Hinsche <m.hinsche@gmail.com>
Signed-off-by: Markus Hinsche <m.hinsche@gmail.com>
Signed-off-by: Markus Hinsche <m.hinsche@gmail.com>
Signed-off-by: Markus Hinsche <m.hinsche@gmail.com>
Signed-off-by: Markus Hinsche <m.hinsche@gmail.com>
Signed-off-by: Markus Hinsche <m.hinsche@gmail.com>
* Add Active Learning strategies to DeepEdit Signed-off-by: Andres Diaz-Pinto <diazandr3s@gmail.com> * Update readme - commands Active Learning strategies Signed-off-by: Andres Diaz-Pinto <diazandr3s@gmail.com> Signed-off-by: Markus Hinsche <m.hinsche@gmail.com>
…I#781) * Prepare MONAI Label for new monai - DeepEdit transforms Signed-off-by: Andres Diaz-Pinto <diazandr3s@gmail.com> * Add deprecated messages - DeepEdit transforms - interaction Signed-off-by: Andres Diaz-Pinto <diazandr3s@gmail.com> Co-authored-by: SACHIDANAND ALLE <sachidanand.alle@gmail.com> Signed-off-by: Markus Hinsche <m.hinsche@gmail.com>
Signed-off-by: SACHIDANAND ALLE <sachidanand.alle@gmail.com> Signed-off-by: Markus Hinsche <m.hinsche@gmail.com>
* Add original labels option Slicer UI Signed-off-by: Andres Diaz-Pinto <diazandr3s@gmail.com> * Update Slicer module Signed-off-by: Andres Diaz-Pinto <diazandr3s@gmail.com> Signed-off-by: Markus Hinsche <m.hinsche@gmail.com>
Signed-off-by: Markus Hinsche <m.hinsche@gmail.com>
Signed-off-by: Markus Hinsche <m.hinsche@gmail.com>
Signed-off-by: Markus Hinsche <m.hinsche@gmail.com>
Signed-off-by: Markus Hinsche <m.hinsche@gmail.com>
SachidanandAlle
approved these changes
May 19, 2022
DaoMaoDuc
pushed a commit
to jlvahldiek/MONAILabel
that referenced
this pull request
Jun 1, 2022
* Only Hide Training area when zero tasks configured (Project-MONAI#769) Signed-off-by: Sachidanand Alle <sachidanand.alle@gmail.com> Signed-off-by: Markus Hinsche <m.hinsche@gmail.com> * Nuclick train (Project-MONAI#772) * Draft Training workflow for NuClick Signed-off-by: Sachidanand Alle <sachidanand.alle@gmail.com> * Sync up changes for nuclick training Signed-off-by: Sachidanand Alle <sachidanand.alle@gmail.com> * Fix nuclick training Signed-off-by: Sachidanand Alle <sachidanand.alle@gmail.com> * rename transform Signed-off-by: Sachidanand Alle <sachidanand.alle@gmail.com> * Sync up changes for nuclick training Signed-off-by: Sachidanand Alle <sachidanand.alle@gmail.com> * use monai bunet for nuclick Signed-off-by: Sachidanand Alle <sachidanand.alle@gmail.com> * fix log Signed-off-by: Sachidanand Alle <sachidanand.alle@gmail.com> Signed-off-by: Markus Hinsche <m.hinsche@gmail.com> * Add NRRD writer Signed-off-by: Markus Hinsche <m.hinsche@gmail.com> Co-authored-by: Janis Vahldiek <janis@vahldiek.info> Signed-off-by: Markus Hinsche <m.hinsche@gmail.com> * Add unit test for NRRD writer Signed-off-by: Markus Hinsche <m.hinsche@gmail.com> * Polish Signed-off-by: Markus Hinsche <m.hinsche@gmail.com> * Add labels to data object, Check for label list Signed-off-by: Markus Hinsche <m.hinsche@gmail.com> Co-authored-by: Janis Vahldiek <janis@vahldiek.info> Signed-off-by: Markus Hinsche <m.hinsche@gmail.com> * update docstrings Signed-off-by: Janis Vahldiek <janis@vahldiek.info> Signed-off-by: Markus Hinsche <m.hinsche@gmail.com> * change writer selection write_seg_nrrd() is only needed for 4D multi-channel label arrays. Everything else can be handled by ITK of nifty writer. Signed-off-by: Janis Vahldiek <janis@vahldiek.info> Signed-off-by: Markus Hinsche <m.hinsche@gmail.com> * polish write_seg_nrrd() will only be used for 4D multi-channel label arrays. Thus, removed unnecessary code. Signed-off-by: Janis Vahldiek <janis@vahldiek.info> Signed-off-by: Markus Hinsche <m.hinsche@gmail.com> * Fix typo Signed-off-by: Markus Hinsche <m.hinsche@gmail.com> * Add pynrrd==0.4.2 to setup.cfg Signed-off-by: Markus Hinsche Signed-off-by: Markus Hinsche <m.hinsche@gmail.com> * fix check for multi-channel label Signed-off-by: Janis Vahldiek <janis@vahldiek.info> Signed-off-by: Markus Hinsche <m.hinsche@gmail.com> * fix unit test Signed-off-by: Janis Vahldiek <janis@vahldiek.info> Signed-off-by: Markus Hinsche <m.hinsche@gmail.com> * Fix multichannel problem Signed-off-by: Markus Hinsche Signed-off-by: Markus Hinsche <m.hinsche@gmail.com> * Reformat code Signed-off-by: Markus Hinsche <m.hinsche@gmail.com> * Make mypy happy Signed-off-by: Markus Hinsche <m.hinsche@gmail.com> * Fix merge conflict Signed-off-by: Markus Hinsche <m.hinsche@gmail.com> * Use logger.warning instead logger.debug Signed-off-by: Markus Hinsche <m.hinsche@gmail.com> * Add Active Learning strategies to DeepEdit (Project-MONAI#782) * Add Active Learning strategies to DeepEdit Signed-off-by: Andres Diaz-Pinto <diazandr3s@gmail.com> * Update readme - commands Active Learning strategies Signed-off-by: Andres Diaz-Pinto <diazandr3s@gmail.com> Signed-off-by: Markus Hinsche <m.hinsche@gmail.com> * Prepare MONAI Label for new monai - DeepEdit transforms (Project-MONAI#781) * Prepare MONAI Label for new monai - DeepEdit transforms Signed-off-by: Andres Diaz-Pinto <diazandr3s@gmail.com> * Add deprecated messages - DeepEdit transforms - interaction Signed-off-by: Andres Diaz-Pinto <diazandr3s@gmail.com> Co-authored-by: SACHIDANAND ALLE <sachidanand.alle@gmail.com> Signed-off-by: Markus Hinsche <m.hinsche@gmail.com> * Mention python versions which are supported (Project-MONAI#786) Signed-off-by: SACHIDANAND ALLE <sachidanand.alle@gmail.com> Signed-off-by: Markus Hinsche <m.hinsche@gmail.com> * Add original labels option Slicer UI (Project-MONAI#785) * Add original labels option Slicer UI Signed-off-by: Andres Diaz-Pinto <diazandr3s@gmail.com> * Update Slicer module Signed-off-by: Andres Diaz-Pinto <diazandr3s@gmail.com> Signed-off-by: Markus Hinsche <m.hinsche@gmail.com> * Fix: Check first dimension for multichannel Signed-off-by: Markus Hinsche <m.hinsche@gmail.com> * Polish unit test to be more specific about dimensions Signed-off-by: Markus Hinsche <m.hinsche@gmail.com> Co-authored-by: SACHIDANAND ALLE <sachidanand.alle@gmail.com> Co-authored-by: Janis Vahldiek <janis@vahldiek.info> Co-authored-by: Andres Diaz-Pinto <diazandr3s@gmail.com> Signed-off-by: Duc <ducdominhstart@googlemail.com>
Douwe-Spaanderman
pushed a commit
to Douwe-Spaanderman/MONAILabel
that referenced
this pull request
Dec 9, 2022
* Only Hide Training area when zero tasks configured (Project-MONAI#769) Signed-off-by: Sachidanand Alle <sachidanand.alle@gmail.com> Signed-off-by: Markus Hinsche <m.hinsche@gmail.com> * Nuclick train (Project-MONAI#772) * Draft Training workflow for NuClick Signed-off-by: Sachidanand Alle <sachidanand.alle@gmail.com> * Sync up changes for nuclick training Signed-off-by: Sachidanand Alle <sachidanand.alle@gmail.com> * Fix nuclick training Signed-off-by: Sachidanand Alle <sachidanand.alle@gmail.com> * rename transform Signed-off-by: Sachidanand Alle <sachidanand.alle@gmail.com> * Sync up changes for nuclick training Signed-off-by: Sachidanand Alle <sachidanand.alle@gmail.com> * use monai bunet for nuclick Signed-off-by: Sachidanand Alle <sachidanand.alle@gmail.com> * fix log Signed-off-by: Sachidanand Alle <sachidanand.alle@gmail.com> Signed-off-by: Markus Hinsche <m.hinsche@gmail.com> * Add NRRD writer Signed-off-by: Markus Hinsche <m.hinsche@gmail.com> Co-authored-by: Janis Vahldiek <janis@vahldiek.info> Signed-off-by: Markus Hinsche <m.hinsche@gmail.com> * Add unit test for NRRD writer Signed-off-by: Markus Hinsche <m.hinsche@gmail.com> * Polish Signed-off-by: Markus Hinsche <m.hinsche@gmail.com> * Add labels to data object, Check for label list Signed-off-by: Markus Hinsche <m.hinsche@gmail.com> Co-authored-by: Janis Vahldiek <janis@vahldiek.info> Signed-off-by: Markus Hinsche <m.hinsche@gmail.com> * update docstrings Signed-off-by: Janis Vahldiek <janis@vahldiek.info> Signed-off-by: Markus Hinsche <m.hinsche@gmail.com> * change writer selection write_seg_nrrd() is only needed for 4D multi-channel label arrays. Everything else can be handled by ITK of nifty writer. Signed-off-by: Janis Vahldiek <janis@vahldiek.info> Signed-off-by: Markus Hinsche <m.hinsche@gmail.com> * polish write_seg_nrrd() will only be used for 4D multi-channel label arrays. Thus, removed unnecessary code. Signed-off-by: Janis Vahldiek <janis@vahldiek.info> Signed-off-by: Markus Hinsche <m.hinsche@gmail.com> * Fix typo Signed-off-by: Markus Hinsche <m.hinsche@gmail.com> * Add pynrrd==0.4.2 to setup.cfg Signed-off-by: Markus Hinsche Signed-off-by: Markus Hinsche <m.hinsche@gmail.com> * fix check for multi-channel label Signed-off-by: Janis Vahldiek <janis@vahldiek.info> Signed-off-by: Markus Hinsche <m.hinsche@gmail.com> * fix unit test Signed-off-by: Janis Vahldiek <janis@vahldiek.info> Signed-off-by: Markus Hinsche <m.hinsche@gmail.com> * Fix multichannel problem Signed-off-by: Markus Hinsche Signed-off-by: Markus Hinsche <m.hinsche@gmail.com> * Reformat code Signed-off-by: Markus Hinsche <m.hinsche@gmail.com> * Make mypy happy Signed-off-by: Markus Hinsche <m.hinsche@gmail.com> * Fix merge conflict Signed-off-by: Markus Hinsche <m.hinsche@gmail.com> * Use logger.warning instead logger.debug Signed-off-by: Markus Hinsche <m.hinsche@gmail.com> * Add Active Learning strategies to DeepEdit (Project-MONAI#782) * Add Active Learning strategies to DeepEdit Signed-off-by: Andres Diaz-Pinto <diazandr3s@gmail.com> * Update readme - commands Active Learning strategies Signed-off-by: Andres Diaz-Pinto <diazandr3s@gmail.com> Signed-off-by: Markus Hinsche <m.hinsche@gmail.com> * Prepare MONAI Label for new monai - DeepEdit transforms (Project-MONAI#781) * Prepare MONAI Label for new monai - DeepEdit transforms Signed-off-by: Andres Diaz-Pinto <diazandr3s@gmail.com> * Add deprecated messages - DeepEdit transforms - interaction Signed-off-by: Andres Diaz-Pinto <diazandr3s@gmail.com> Co-authored-by: SACHIDANAND ALLE <sachidanand.alle@gmail.com> Signed-off-by: Markus Hinsche <m.hinsche@gmail.com> * Mention python versions which are supported (Project-MONAI#786) Signed-off-by: SACHIDANAND ALLE <sachidanand.alle@gmail.com> Signed-off-by: Markus Hinsche <m.hinsche@gmail.com> * Add original labels option Slicer UI (Project-MONAI#785) * Add original labels option Slicer UI Signed-off-by: Andres Diaz-Pinto <diazandr3s@gmail.com> * Update Slicer module Signed-off-by: Andres Diaz-Pinto <diazandr3s@gmail.com> Signed-off-by: Markus Hinsche <m.hinsche@gmail.com> * Fix: Check first dimension for multichannel Signed-off-by: Markus Hinsche <m.hinsche@gmail.com> * Polish unit test to be more specific about dimensions Signed-off-by: Markus Hinsche <m.hinsche@gmail.com> Co-authored-by: SACHIDANAND ALLE <sachidanand.alle@gmail.com> Co-authored-by: Janis Vahldiek <janis@vahldiek.info> Co-authored-by: Andres Diaz-Pinto <diazandr3s@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
The
Writerclass (inmonailabel/transform/writer.py) can't handle multi-channel arrays. The ITK reader and writer both can't handle multi-channel arrays, therefore we want to introduce a new writer that can do this.Related PRs
This work is related to other works in this area:
NrrdReaderfornrrdandseg.nrrdfiles MONAI#4238 with PR Implement NrrdReader MONAI#4259seg.nrrdtooling with 3D SlicerChanges
write_seg_nrrd()(similar towrite_itk())pynrrdpip dependency to projectSee PR review comments from predecessor PR #779