-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Implement NrrdReader #4259
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
Implement NrrdReader #4259
Conversation
* add swin_unetr model Signed-off-by: kbressem <kenobressem@gmail.com>
* [DLMED] update to 22.04 Signed-off-by: Nic Ma <nma@nvidia.com> * fixes unit test tests.test_lr_finder Signed-off-by: Wenqi Li <wenqil@nvidia.com> * test new_empty Signed-off-by: Wenqi Li <wenqil@nvidia.com> Co-authored-by: Wenqi Li <wenqil@nvidia.com> Co-authored-by: Wenqi Li <831580+wyli@users.noreply.github.com> Signed-off-by: kbressem <kenobressem@gmail.com>
* implement the base class Signed-off-by: Yiheng Wang <vennw@nvidia.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * add unittest Signed-off-by: Yiheng Wang <vennw@nvidia.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * autofix Signed-off-by: Yiheng Wang <vennw@nvidia.com> * switch to call apex directly Signed-off-by: Yiheng Wang <vennw@nvidia.com> * uncomment unittest Signed-off-by: Yiheng Wang <vennw@nvidia.com> * add apex install link in docstring Signed-off-by: Yiheng Wang <vennw@nvidia.com> * add channels_last_3d test case Signed-off-by: Yiheng Wang <vennw@nvidia.com> * rewrite types Signed-off-by: Yiheng Wang <vennw@nvidia.com> * change types Signed-off-by: Yiheng Wang <vennw@nvidia.com> * add docstrings Signed-off-by: Yiheng Wang <vennw@nvidia.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Wenqi Li <831580+wyli@users.noreply.github.com> Signed-off-by: kbressem <kenobressem@gmail.com>
* Update dice.py reduce redundant operations in DiceFocalLoss, initially caused oom Signed-off-by: Ryan Clanton <55164720+ryancinsight@users.noreply.github.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Signed-off-by: Ryan Clanton <55164720+ryancinsight@users.noreply.github.com> * [MONAI] python code formatting Signed-off-by: monai-bot <monai.miccai2019@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: monai-bot <monai.miccai2019@gmail.com> Signed-off-by: kbressem <kenobressem@gmail.com>
* Make all transforms optional Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com> * Update wsireader tests Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com> * Remove optional from PersistentDataset and its derivatives Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com> * Add unittests for cache without transform Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com> * Add default replace_rate Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com> * Add default value Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com> * Set default replace_rate to 0.1 Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com> * Update metadata to include path Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com> * Adds SmartCachePatchWSIDataset Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com> * Add unittests for SmartCachePatchWSIDataset Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com> * Update references Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com> * Update docs Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com> * Remove smart cache Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com> * Remove unused imports Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com> * Add path metadata for OpenSlide Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com> * Update metadata to be unified across different backends Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com> * Update wsi metadata for multi wsi objects Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com> * Add unittests for wsi metadata Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com> Signed-off-by: kbressem <kenobressem@gmail.com>
* replace modules Signed-off-by: Richard Brown <33289025+rijobro@users.noreply.github.com> * fix Signed-off-by: Richard Brown <33289025+rijobro@users.noreply.github.com> * replace_module -> replace_modules Signed-off-by: Richard Brown <33289025+rijobro@users.noreply.github.com> * fix Signed-off-by: Richard Brown <33289025+rijobro@users.noreply.github.com> Signed-off-by: kbressem <kenobressem@gmail.com>
Signed-off-by: Can Zhao <canz@nvidia.com> Signed-off-by: kbressem <kenobressem@gmail.com>
* reproduce issue Signed-off-by: Yiheng Wang <vennw@nvidia.com> * remove 22.01 02 Signed-off-by: Yiheng Wang <vennw@nvidia.com> * remove other workflows Signed-off-by: Yiheng Wang <vennw@nvidia.com> * run on pull request Signed-off-by: Yiheng Wang <vennw@nvidia.com> * remove sleep Signed-off-by: Yiheng Wang <vennw@nvidia.com> * test single layer forward Signed-off-by: Yiheng Wang <vennw@nvidia.com> * add has_nvfuser Signed-off-by: Yiheng Wang <vennw@nvidia.com> * add check within factory Signed-off-by: Yiheng Wang <vennw@nvidia.com> * revert to original cron.yml Signed-off-by: Yiheng Wang <vennw@nvidia.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix old pt issue Signed-off-by: Yiheng Wang <vennw@nvidia.com> * change to return directly if no cuda Signed-off-by: Yiheng Wang <vennw@nvidia.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Signed-off-by: kbressem <kenobressem@gmail.com>
* Update to bundle specifiation Signed-off-by: Eric Kerfoot <eric.kerfoot@kcl.ac.uk> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Adding description in spec discussing the saved Torchscript object's file storage behaviour, and tweaking ckpt_export to add .json extension Signed-off-by: Eric Kerfoot <eric.kerfoot@kcl.ac.uk> * Annotating optional bundle files Signed-off-by: Eric Kerfoot <eric.kerfoot@kcl.ac.uk> * Adjusted ckpt_export test Signed-off-by: Eric Kerfoot <eric.kerfoot@kcl.ac.uk> * Fix Signed-off-by: Eric Kerfoot <eric.kerfoot@kcl.ac.uk> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Signed-off-by: kbressem <kenobressem@gmail.com>
Signed-off-by: kbressem <kenobressem@gmail.com>
for more information, see https://pre-commit.ci Signed-off-by: kbressem <kenobressem@gmail.com>
Signed-off-by: kbressem <kenobressem@gmail.com>
Signed-off-by: kbressem <kenobressem@gmail.com>
Signed-off-by: kbressem <kenobressem@gmail.com>
Signed-off-by: kbressem <kenobressem@gmail.com>
Signed-off-by: kbressem <kenobressem@gmail.com>
Signed-off-by: kbressem <kenobressem@gmail.com>
Signed-off-by: kbressem <kenobressem@gmail.com>
Signed-off-by: kbressem <kenobressem@gmail.com>
Signed-off-by: kbressem <kenobressem@gmail.com>
make flake8 happy Signed-off-by: kbressem <kenobressem@gmail.com>
Changed NrrdImage to dataclass Signed-off-by: kbressem <kenobressem@gmail.com>
|
Hi @kbressem , Thanks very much for your contribution. Thanks in advance. |
Signed-off-by: kbressem <kenobressem@gmail.com>
…nto 4238-nrrd-reader
|
Hi @Nic-Ma I've searched for
|
|
Hi @kbressem , Sorry maybe I didn't make it clear. Thanks. |
Signed-off-by: kbressem <kenobressem@gmail.com>
for more information, see https://pre-commit.ci
Thank you for the clarification. I have added |
|
this looks nice, one additional test that is worth adding is to check the consistency of the writer/reader... ideally we should have a Lines 82 to 117 in 812275a
the goal is to test whether the nrrd file created by monai's ITKWriter is readable by monai's NrrdReader for some basic (non multichannel?)cases.
|
…n header, it is assumed to be LPS and converted to RAS. If space is defined and not LPS, nothing is done to prevent wrong conversions. Signed-off-by: kbressem <kenobressem@gmail.com>
…ITKWriter can be loaded again. 2D and 3D files with no channels are tested Signed-off-by: kbressem <kenobressem@gmail.com>
Signed-off-by: kbressem <kenobressem@gmail.com>
…nto 4238-nrrd-reader
I have added a |
|
/build |
Signed-off-by: kbressem kenobressem@gmail.com
Fixes #4238.
Description
This PR proposes the
NrrdReaderclass to correctly read.nrrdand.seg.nrrdfiles.Status
Ready for review
Files changes/created
FIles created
Types of changes
./runtests.sh -f -u --net --coverage../runtests.sh --quick --unittests --disttests.make htmlcommand in thedocs/folder.