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 Image type and subtypes GrayScaleImage, RGBImage, RGBAImage #693

Merged
merged 25 commits into from
Nov 1, 2018

Conversation

bendichter
Copy link
Contributor

@bendichter bendichter commented Oct 30, 2018

  • add Image to core.base
  • add GrayscaleImage, RGBImage, and RGBAImage to core.image
  • add pynwb support for Image, Images, GrayscaleImage, RGBImage, and RGBAImage

Motivation

fix NeurodataWithoutBorders/nwb-schema#143, fix NeurodataWithoutBorders/nwb-schema#129

Checklist

  • Have you checked our Contributing document?
  • Have you ensured the PR description clearly describes problem and the solution?
  • Is your contribution compliant with our coding style ? This can be checked running flake8 from the source directory.
  • Have you checked to ensure that there aren't other open Pull Requests for the same change?
  • Have you included the relevant issue number using #XXX notation where XXX is the issue number ?

* add Image to core.base
* add GrayscaleImage, RGBImage, and RGBAImage to core.image
* add pynwb support for Image, Images, GrayscaleImage, RGBImage, and RGBAImage

TODO: add test
* make image subtypes groups instead of datasets
* add doc fields to schema
* add tests for all types
@bendichter bendichter changed the title [WIP] add Image type and subtypes GrayScaleImage, RGBImage, RGBAImage add Image type and subtypes GrayScaleImage, RGBImage, RGBAImage Oct 30, 2018
@codecov
Copy link

codecov bot commented Oct 30, 2018

Codecov Report

Merging #693 into dev will increase coverage by 0.05%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev     #693      +/-   ##
==========================================
+ Coverage   74.51%   74.57%   +0.05%     
==========================================
  Files          58       58              
  Lines        6753     6776      +23     
  Branches     1393     1398       +5     
==========================================
+ Hits         5032     5053      +21     
- Misses       1328     1332       +4     
+ Partials      393      391       -2
Impacted Files Coverage Δ
src/pynwb/file.py 82.16% <100%> (-0.2%) ⬇️
src/pynwb/base.py 98.19% <100%> (+0.23%) ⬆️
src/pynwb/image.py 100% <100%> (ø) ⬆️
src/pynwb/form/build/map.py 74.97% <0%> (-0.22%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 428cb4d...e8cb272. Read the comment docs.

src/pynwb/image.py Outdated Show resolved Hide resolved
src/pynwb/image.py Outdated Show resolved Hide resolved
oruebel
oruebel previously approved these changes Oct 30, 2018
Copy link
Contributor

@oruebel oruebel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pending pass of the CI tests ;-)

@oruebel
Copy link
Contributor

oruebel commented Oct 30, 2018

I guess I was too soon with approving it. Looks like the CI fails. But other than the failed tests it looked good to me.

@bendichter bendichter dismissed oruebel’s stale review October 30, 2018 18:55

thanks. I have addressed your comments

@bendichter
Copy link
Contributor Author

Do we want to enforce that Image is only to be used as an abstract class? i.e. an image must be declared as a GrayscaleImage, RGBImage, RGBAImage, or other subtype of Image?

@bendichter
Copy link
Contributor Author

bendichter commented Oct 30, 2018 via email

@ajtritt
Copy link
Member

ajtritt commented Oct 30, 2018

@bendichter I just submitted a PR to this branch. I thought seeing the diff would be easier than trying to explain it over text.

@bendichter
Copy link
Contributor Author

@ajtritt can you review this?

Copy link
Member

@ajtritt ajtritt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some extra __nwbfields__, but other than that it looks good.

src/pynwb/image.py Outdated Show resolved Hide resolved
src/pynwb/image.py Outdated Show resolved Hide resolved
src/pynwb/image.py Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing neurodata_type Image request: StaticImage
3 participants