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

reexport MosaicViews #19

Closed
wants to merge 4 commits into from
Closed

reexport MosaicViews #19

wants to merge 4 commits into from

Conversation

johnnychen94
Copy link
Member

@johnnychen94 johnnychen94 commented Mar 13, 2020

Don't merge this until JuliaArrays/MosaicViews.jl#14 get merged, I will rebuild the test when MosaicViews v0.2.0 is registered.

TODO:

  • tests are needed because MosaicViews isn't under JuliaImages :P

I bumped a minor version because from now on this package isn't invisible to users anymore. After this, I'll also reexport ImageShow from Images, and then draft a democard in juliaimages.org

Another choice is to reexport it in ImageCore because ImageCore is a collection of different views.


MosaicViews provides a handy tool mosaicview, which can be seen as an enhanced version of cat to make visualization easier. Here're two main usages:

  1. Compare images of different sizes and colorants (not necessarily two images)
using ImageShow, TestImages
using ColorVectorSpaces # for zero(RGB{N0f8})

lena = testimage("lena") # 256*256 RGB image
cameraman = testimage("cameraman") # 512*512 Gray image
mosaicview(lena, cameraman; nrow=1)

image

  1. give a nice looking 2d view for higher-dimensional image (or images)
using ImageShow, TestImages
img = testimage("mri") # 226×186×27

mosaicview(img; fillvalue=0.5, npad=2, ncol=7, rowmajor=true)

image

@johnnychen94
Copy link
Member Author

johnnychen94 commented Mar 14, 2020

Since MosaicView depends on OffsetArrays, I think it's ok to revert #17. With OffsetArray 1.0 released, the main motivation of that is "outdated" now.

Edit: just realized that ImageCore also depends on OffsetArrays

@RalphAS
Copy link
Collaborator

RalphAS commented Mar 16, 2020

Looks fine so far. Do you have a design for a test?

@johnnychen94
Copy link
Member Author

Do you have a design for a test?

ReferenceTests are designed for such usages 😄 -- the 22 reference images occupy 88K storage, which is small enough to manage with git.

@johnnychen94
Copy link
Member Author

johnnychen94 commented Mar 16, 2020

The test fails because ColorVectorSpace isn't compatible with ColorTypes v0.10

JuliaGraphics/ColorVectorSpace.jl#128

With a modified Project.toml, it's passed locally.

@johnnychen94
Copy link
Member Author

@timholy do you think it's appropriate to move this PR to ImageCore?

@johnnychen94 johnnychen94 reopened this Apr 2, 2020
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.

2 participants