InsightSoftwareConsortium / napari-itk-io

File IO with itk for napari.
Apache License 2.0
7 stars 2 forks source link

ENH: Add image writer #9

Closed ntatsisk closed 1 year ago

ntatsisk commented 1 year ago

Aims to fix https://github.com/InsightSoftwareConsortium/napari-itk-io/issues/7. It will also be helpful for the elastix-napari plugin to write the result image from the registration (https://github.com/SuperElastix/elastix_napari/tree/main).

It is pretty barebones right now. @thewtex any ideas what else should be added? Should it support writing dicoms?

codecov-commenter commented 1 year ago

Codecov Report

Patch coverage: 100.00% and project coverage change: +3.01 :tada:

Comparison is base (cc08680) 88.05% compared to head (36bdf60) 91.07%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #9 +/- ## ========================================== + Coverage 88.05% 91.07% +3.01% ========================================== Files 5 5 Lines 134 168 +34 ========================================== + Hits 118 153 +35 + Misses 16 15 -1 ``` | [Impacted Files](https://codecov.io/gh/InsightSoftwareConsortium/napari-itk-io/pull/9?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=InsightSoftwareConsortium) | Coverage Δ | | |---|---|---| | [src/napari\_itk\_io/\_tests/test\_writer.py](https://codecov.io/gh/InsightSoftwareConsortium/napari-itk-io/pull/9?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=InsightSoftwareConsortium#diff-c3JjL25hcGFyaV9pdGtfaW8vX3Rlc3RzL3Rlc3Rfd3JpdGVyLnB5) | `100.00% <100.00%> (ø)` | | | [src/napari\_itk\_io/\_writer.py](https://codecov.io/gh/InsightSoftwareConsortium/napari-itk-io/pull/9?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=InsightSoftwareConsortium#diff-c3JjL25hcGFyaV9pdGtfaW8vX3dyaXRlci5weQ==) | `87.50% <100.00%> (+31.94%)` | :arrow_up: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=InsightSoftwareConsortium). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=InsightSoftwareConsortium)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

ntatsisk commented 1 year ago

Thanks @thewtex, I rebased it. Let me know if I should anything else here!

ntatsisk commented 1 year ago

Hi @thewtex, @dzenanz, it looks like the merge itself failed for macos py3.9.

In addition, do you think that it makes sense to release a new version of napari-itk-io? So that, for example, users of elastix-napari can start using this writer feature. Thanks.

dzenanz commented 1 year ago

Re-running the failed jobs for that commit did not help. The error message is:

Run GabrielBB/xvfb-action@v1
  with:
    run: python -m tox
  env:
    pythonLocation: /Users/runner/hostedtoolcache/Python/3.9.16/x64
    PLATFORM: macos-latest
/Users/runner/hostedtoolcache/Python/3.9.16/x64/bin/python -m tox
py39-macos: install_deps> python -I -m pip install itk-io itk-napari-conversion napari numpy pyqt5 pytest pytest-cov pytest-qt qtpy
ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.
    itk-io from https://files.pythonhosted.org/packages/[2](https://github.com/InsightSoftwareConsortium/napari-itk-io/actions/runs/4801366500/jobs/8543472595#step:7:2)d/9a/d66ef998dada9c4797c9b8be57a171cf01[3](https://github.com/InsightSoftwareConsortium/napari-itk-io/actions/runs/4801366500/jobs/8543472595#step:7:3)61ebb1cb77699ab8306c[4](https://github.com/InsightSoftwareConsortium/napari-itk-io/actions/runs/4801366500/jobs/8543472595#step:7:4)fc84/itk_io-[5](https://github.com/InsightSoftwareConsortium/napari-itk-io/actions/runs/4801366500/jobs/8543472595#step:7:5).3.0-cp39-cp39-macosx_10_9_x8[6](https://github.com/InsightSoftwareConsortium/napari-itk-io/actions/runs/4801366500/jobs/8543472595#step:7:6)_64.whl:
        Expected sha256 888c1a58[7](https://github.com/InsightSoftwareConsortium/napari-itk-io/actions/runs/4801366500/jobs/8543472595#step:7:8)e7f11796d9a6[8](https://github.com/InsightSoftwareConsortium/napari-itk-io/actions/runs/4801366500/jobs/8543472595#step:7:9)0a23a713[9](https://github.com/InsightSoftwareConsortium/napari-itk-io/actions/runs/4801366500/jobs/8543472595#step:7:10)29928c22daf4af216199ced181f34d8e7
             Got        fc62d5b67b3064d0429599f93e36804e78a14fb8076e33f7b42e66e52e3ab94f

Collecting itk-io
  Downloading itk_io-5.3.0-cp39-cp39-macosx_[10](https://github.com/InsightSoftwareConsortium/napari-itk-io/actions/runs/4801366500/jobs/8543472595#step:7:11)_9_x86_64.whl (24.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━                 14.7/24.3 MB 1.9 MB/s eta 0:00:06
py39-macos: exit 1 (7.51 seconds) /Users/runner/work/napari-itk-io/napari-itk-io> python -I -m pip install itk-io itk-napari-conversion napari numpy pyqt5 pytest pytest-cov pytest-qt qtpy pid=[11](https://github.com/InsightSoftwareConsortium/napari-itk-io/actions/runs/4801366500/jobs/8543472595#step:7:12)22
  py39-macos: FAIL code 1 (8.34 seconds)
  evaluation failed :( (8.47 seconds)
::error::The process '/Users/runner/hostedtoolcache/Python/3.9.[16](https://github.com/InsightSoftwareConsortium/napari-itk-io/actions/runs/4801366500/jobs/8543472595#step:7:17)/x64/bin/python' failed with exit code 1

I guess a new update is needed. I don't know whether package releases are fully automated in this repository.

thewtex commented 1 year ago

I restarted the CI -- it passed after a restart.

I tagged a new release, v0.3.0, for deployment :tada:

@ntatsisk you should receive an invitation for permissions on the repository to create future releases.