-
Notifications
You must be signed in to change notification settings - Fork 2
Description
From #164,Padding in only 1 direction make sense for case where we don't want padding in 2 dims and output of same size is not needed/required.ImagePyramids being a good case for this.
using paddedviews:
using mosaicview:
JuliaImages/juliaimages.github.io#164 (comment)
@johnnychen94 's comment serves as the starting point for this discussion
The current mosaicview is built based on paddedviews and sym_paddedviews, whose outputs are of the same size. For the purpose of pyramid visualization, it makes sense to visualize as your option 1 does.
Instead of providing some dirty for loop in the demo, I think a better way is to improve how mosaicview works. Here's what I have in mind:
add a dims keyword to paddedviews and sym_paddedviews to specify we only want dims dimensions to be padded. then also add dims keyword to mosaicviews.The dims keyword should follows the same options as cats do, that all of dims=1, dims=(1, 2) and dims=1:2 are valid values. To be backward-compatible, we need to make the default option dims=1:ndims(first(As)).
mosaicview(pyramid; nrow=1, center=false, dims=1) is what I have in mind; that we only pad along the height dimension.

