Two suggestions for ImageJ when dealing with stacks of images initially having different sizes

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Two suggestions for ImageJ when dealing with stacks of images initially having different sizes

lechristophe
Hi Wayne,

I'd like to suggest two enhancements for the way ImageJ behaves when
dealing with stacks that incorporate images of different initial sizes.

1- When using the "Images to Stack" command, it is possible to gather
images of different sizes with a range of options (resizing image or canvas
etc). When using canvas extension, is it possible to have an option that
would generate a rectangle overlay marking the initial size of the image on
each image of the resulting stack? That would allow to easily retrieve
source images, even after gathering them in a stack bigger than their
original size.

2- Would it be possible the have the same image/canvas resizing options
when drag/dropping a folder of images on the ImageJ toolbar? Right now a
dialog opens asking if the images should be open as a stack, but if checked
and images within the folder are of different sizes, only the first images
and the other ones of the exact same dimensions are open. It would be more
consistent and easier to have the same kind of dialog as in the "Images to
Stack" command, choosing what to do for images of different sizes.

Thank you,

Christophe

--
Christophe Leterrier
Equipe NeuroCyto
INP CNRS UMR 7051 - Aix Marseille Université

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Two suggestions for ImageJ when dealing with stacks of images initially having different sizes

Kenneth R Sloan-2
Following up on the suggestions for more options on different size images...

My needs are simpler (but, if implemented, should probably be spread wider than MY immediate need).

Perhaps I have missed something...and I'm doing it the hard way (would not be the first time).

In one of my major suites of plugins, I deal with image stacks where ALMOST ALL of the images have a specific size (or, failing that, a specific aspect ratio - usually square).  I often process the images in some way while adding them (one at a time, in Java) to a stack where the first image used to begin the stack controls the dimensions of the final stack.

Until last week, I was happy with "resize()".  But then, I hit a snag, and needed to resize a single image to the dimensions of the existing stack while maintaining PIXEL aspect ratio.  "resize()" appears to independently scale in X and Y so that the resized image just fits in the target frame.  This distorts the image.  Instead, I wanted to resize the source image so that it "just fits" in one dimension, but was padded (and centered) in the other dimension.

This was not challenging to write - but I wonder if it would be a generally useful option for "resize()".

While not my choice for this application - I can also see a need for a "resize()" that CROPS the source image (so that one dimension "just fits" and the other is cropped (and centered...perhaps other options are useful?)

Just a suggestion - I have no immediate need.  I'm just commenting on what looks like a gap in the API.


--
Kenneth Sloan
[hidden email]
Vision is the art of seeing what is invisible to others.

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html