Display mutiple ImagePlus on the same Frame / Window


#1

Hello everyone,

I am a student working with ImageJ during my internship so I’m new with the software and I am developing a program about pulmonary shunt, and I’d like to display both front and rear faces next to each other in my GUI to have a better overview.

The issue here is that I didn’t find any way yet to do this as most of GUIs are developed using ImageWindow which works only for 1 ImagePlus.

I then found this post (http://imagej.1557.x6.nabble.com/GUI-issue-td5004568.html) from 2013 in which the answer was that ImageJ was indeed developed for single images GUI but ImageJ2 would probably be able to solve that.

As of today, I didn’t find any class to help me do this, so I would like to know whether there is a solution to solve this issue other than using the MontageMaker.

Thanks for your time.


#2

Hi @AdaTextIO

if it is just about displaying the images next to each other maybe you could use the
WindowManger to access the ImageWindow and then call the setLocationAndSize() method to position the images as you see fit.

https://imagej.nih.gov/ij/developer/api/ij/WindowManager.html#getCurrentWindow--
https://imagej.nih.gov/ij/developer/api/ij/gui/ImageWindow.html#setLocationAndSize-int-int-int-int-

Otherwise there is always the possibility to program you very own image display:

Best,

Felix


#3

Hi Felix,

Thanks for your answer, but I don’t think the setLocationAndSize() method is the best for me as I want both images on the same window for my GUI.
Here is a screenshot of what it looks like for the moment, but I was wondering if it was possible to do this with 2 ImagePlus images

Regards,

AdaTextIO