GUI issue

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

GUI issue

Michael B.
Suppose to have three different ImagePlus objects, like these:
ImagePlus imp1 = IJ.openImage("FirstImage.tiff");
ImagePlus imp2 = IJ.openImage("SecondImage.jpg");
ImagePlus imp2 = IJ.openImage("ThirdImage.tiff");

How can I display these images into a single Frame ?
(and multiple tabs ?)
How can I display a generic ImagePlus object into any kind of UI component (AWT or Swing) like Panel,JPanel,JTabbedPane,etc  ?

I'm studying the IJ code, and every image display process turn around the ImageWindow class that extend a Frame.
Inside this class there is a reference to a SINGLE image and HIS SINGLE canvas.
So, it seem that IJ was developed along the concept to display just one image/or/stacks into a single Frame.
Then, no way to add several ImagePlus (then image or stacks) objects into a Frame: is it correct ?
Or, is possible to create something like the two following schemas ?
(in a rapid way, without changing the logic of the ij.gui packages)

(Tab1 is Visibile)
_________________________________________________
_My Custom GUI____________________________ - o X|
   _____  ______                                
__|Tab1 \| Tab2 \                              
|        ---------------------------------------
|                                              
|   ******************         ****************
|   ***First image****         ****************
|   ***(is a stack)***         **Second Image**      
|   ******************         ****************
|   *>*(scroll bar)***         ****************
|   ******************
|                                              
|    +++++++++++++++                            
|    ++My Button 1++                            
|    +++++++++++++++
|                                              
|_______________________________________________

(Tab2 is Visibile)
_________________________________________________
_My Custom GUI____________________________ - o X|
   _____  ______                                
__|Tab1 \| Tab2 \                              
--------         --------------------------------
|                                              
|   ******************
|   ***Third image****
|   ***(is a stack)***
|   ******************
|   *>*(scroll bar)***
|   ******************
|                                              
|    +++++++++++++++                            
|    ++My Button 2++                            
|    +++++++++++++++
|                                              
|_______________________________________________


This example http://imagej.nih.gov/ij/plugins/download/Panel_Window.java
can create something like this:
_________________________________________________
_Panel Window Example_____________________ - o X|
|                                              
|   ******************
|   ******image*******
|   *(can be a stack)*
|   ******************
|   *>*(scroll bar)***
|   ******************
|                                              
|    ++++++++++++                            
|    ++A Button++
|    ++++++++++++
|                                              
|_______________________________________________

Cool, but not enough for my purpose.

Do you know how to modify the Panel_Window.java example in order to
create a more generic GUI like the previous "My Custom GUI" ?

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

Re: GUI issue

ctrueden
Hi Michael,

> So, it seem that IJ was developed along the concept to display
> just one image/or/stacks into a single Frame.

Unfortunately, I do not have time to help you develop your GUI. But I will
comment that yes, you are correct that ImageJ was definitely developed with
a single-desktop, single-image-per-window design pattern. It has worked
very well within those limitations for over 15 years now, but there are
certainly use cases which it cannot accommodate.

To that end, one of our goals with the ImageJ2 project (
http://developer.imagej.net/) is to decouple the data model from the UI, so
that you can e.g. run headless, create UIs using different frameworks (AWT,
Swing, SWT, etc.), put multiple datasets into the same display, and back
multiple displays with the same data by reference.

You are welcome to look into ImageJ2 for these purposes, but please note
that the software is still in beta. Further, the API at the display & UI
layers is less mature than that of the plugin framework and data model
itself, so I expect the API will undergo significant changes before the
2.0.0 final release. But ultimately, your use case is definitely among
those we wish to support better with the project.

Regards,
Curtis


On Tue, Aug 27, 2013 at 6:30 AM, Michael B. <[hidden email]>wrote:

> Suppose to have three different ImagePlus objects, like these:
> ImagePlus imp1 = IJ.openImage("FirstImage.tiff");
> ImagePlus imp2 = IJ.openImage("SecondImage.jpg");
> ImagePlus imp2 = IJ.openImage("ThirdImage.tiff");
>
> How can I display these images into a single Frame ?
> (and multiple tabs ?)
> How can I display a generic ImagePlus object into any kind of UI component
> (AWT or Swing) like Panel,JPanel,JTabbedPane,etc  ?
>
> I'm studying the IJ code, and every image display process turn around the
> ImageWindow class that extend a Frame.
> Inside this class there is a reference to a SINGLE image and HIS SINGLE
> canvas.
> So, it seem that IJ was developed along the concept to display just one
> image/or/stacks into a single Frame.
> Then, no way to add several ImagePlus (then image or stacks) objects into
> a Frame: is it correct ?
> Or, is possible to create something like the two following schemas ?
> (in a rapid way, without changing the logic of the ij.gui packages)
>
> (Tab1 is Visibile)
> _________________________________________________
> _My Custom GUI____________________________ - o X|
>    _____  ______
> __|Tab1 \| Tab2 \
> |        ---------------------------------------
> |
> |   ******************         ****************
> |   ***First image****         ****************
> |   ***(is a stack)***         **Second Image**
> |   ******************         ****************
> |   *>*(scroll bar)***         ****************
> |   ******************
> |
> |    +++++++++++++++
> |    ++My Button 1++
> |    +++++++++++++++
> |
> |_______________________________________________
>
> (Tab2 is Visibile)
> _________________________________________________
> _My Custom GUI____________________________ - o X|
>    _____  ______
> __|Tab1 \| Tab2 \
> --------         --------------------------------
> |
> |   ******************
> |   ***Third image****
> |   ***(is a stack)***
> |   ******************
> |   *>*(scroll bar)***
> |   ******************
> |
> |    +++++++++++++++
> |    ++My Button 2++
> |    +++++++++++++++
> |
> |_______________________________________________
>
>
> This example http://imagej.nih.gov/ij/plugins/download/Panel_Window.java
> can create something like this:
> _________________________________________________
> _Panel Window Example_____________________ - o X|
> |
> |   ******************
> |   ******image*******
> |   *(can be a stack)*
> |   ******************
> |   *>*(scroll bar)***
> |   ******************
> |
> |    ++++++++++++
> |    ++A Button++
> |    ++++++++++++
> |
> |_______________________________________________
>
> Cool, but not enough for my purpose.
>
> Do you know how to modify the Panel_Window.java example in order to
> create a more generic GUI like the previous "My Custom GUI" ?
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

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