> Hi, thanks for making this program, it's the best..Is it possible to
> create an image stack without having to open all the images in separate > windows? Or at least not having to show them on the screen, but just load > them into memory? This would be useful when a large number of images is > needed. > > It would be something like the following, I guess, except instead of > openImage it would be something else. I looked at the macro language > reference guide but it wasn't obvious what command it would be. File.open > seems to be only for text files. > > Opener opener = new Opener(); > ImagePlus imp1 = opener.openImage("c-003-01.bmp"); > ImagePlus imp2 = opener.openImage("c-003-08.bmp"); > ImageStack stack = new ImageStack(imp1.getWidth(), imp1.getHeight(), 2); > stack.addSlice("first slice",imp1.getProcessor().getPixels()); > stack.addSlice("second slice",imp2.getProcessor().getPixels()); > (from > https://list.nih.gov/cgi-bin/wa.exe?A2=ind1201&L=IMAGEJ&P=R3364&1=IMAGEJ&9=A&J=on&d=No+Match%3BMatch%3BMatches&z=4 > ) > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
On Mon, Jun 4, 2012 at 6:52 PM, Rasband, Wayne (NIH/NIMH) [E] <[hidden email]> wrote:
Hi Sylvia, The easy way to open a series of image as a stack is to use the File>Import>Image Sequence command. Is there some reason why you cannot use this command? Use the command recorder to generate macro or Java code that uses this command. Best regards, -wayne --------------- Thanks for the response, this worked. What threw me off was the fact that when I put Images - Stack - Images to Stack, it said "you need to have at least 2 images open." But that was because it was already a stack, which I didn't realize. However, the 3d rendering displays as grayscale, while this doesn't happen when the stack is created from individual images. The individual images are not grayscale. I didn't change any of the default options on the 3d dialog. I guess this is better than nothing, though. Also, I don't really need to save the image sequence but just thought I'd mention that if I try to do File - Save As - Image Sequence, only tiff format will actually save a file. If I select jpg or png, no file is actually saved even though the window says "images.jpg" or "images.png." I was only doing this to see if it would help the grayscale, but it doesn't seem to. -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
In reply to this post by anon
> On Tue, Jun 5, 2012 at 2:00 PM, Rasband, Wayne (NIH/NIMH) [E] <
> [hidden email]> wrote: > > Send me two or three of the images and I will try to figure out why the > File>Import>Image Sequence and File>Save As>Image Sequence command are not > working as expected. > > Best regards, > > -wayne > > > Import>Image Sequence is working fine. I just tested Save As>Image > Sequence on another computer (XP, the other one was 7 but I guess the > platform shouldn't matter since it's java) and tiff outputs one file > containing the stack, png outputs a file for each image, and jpg outputs > one file of the current image. But maybe that's what it is supposed to do? > > The other thing I commented on is that the 3d picture is grayscale, even > though the 2d images are not. I'll attach the 3d image in a separate > message to avoid message size limitations. Thanks for your attention. -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html ![]() ![]() ![]() |
In reply to this post by anon
Here's the 3d image as mentioned previously.
-- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Free forum by Nabble | Edit this page |