Hi folkes,
Im posting this because, to be honest, I'm lazy. What is the quickest way to get an ImageStack to use BufferedImage to display as opposed to java.awt.image type? From the little time I've spent looking (I literally mean 2 minutes - I said I was lazy) I get the impression I'll have to subclass ImagePlus - am I wrong? The reason I want this is simply to get double buffering working. I'm writing an interactive markup tool for some medical image segmentation which suffers from screen flicker. It will run on a Java 1.4+ system so I'm happy to loose backward compatability. I've already subclassed Canvas to get subpixel positioning back from the mouse which works well. Ideally a brief example of the minimum I need to do would be great, but any pointers much appreciated. Thanks in advance, -tony |
ToeKnee Lacey wrote:
>Im posting this because, to be honest, I'm lazy. What is the >quickest way to get an ImageStack to use BufferedImage to display as opposed >to java.awt.image type? > > Take look at ij-plugins-imageio code. It has tool for converting between ImagePlus and BufferedImage in other way around. Take look at class net.sf.ij.jaiio.BufferedImageCreator: http://cvs.sourceforge.net/viewcvs.py/ij-plugins/imageio/src/net/sf/ij/jaiio/BufferedImageCreator.java?view=markup You can download binaries and source code for complete library (you can use it as plugins to ImageJ too) at: http://ij-plugins.sourceforge.net/plugins/imageio/index.html Jarek |
In reply to this post by ToeKnee Lacey
My Hero!
Many thanks. --- ImageJ Interest Group <[hidden email] wrote: ToeKnee Lacey wrote: > > >Im posting this because, to be honest, I'm lazy. What is the > >quickest way to get an ImageStack to use BufferedImage to display as opposed > >to java.awt.image type? > > > > > Take look at ij-plugins-imageio code. It has tool for converting between > ImagePlus and BufferedImage in other way around. Take look at class > > net.sf.ij.jaiio.BufferedImageCreator: > http://cvs.sourceforge.net/viewcvs.py/ij-plugins/imageio/src/net/sf/ij/jaiio/BufferedImageCreator.java?view=markup > > You can download binaries and source code for complete library (you can use it as plugins to ImageJ too) at: > http://ij-plugins.sourceforge.net/plugins/imageio/index.html > > Jarek > |
In reply to this post by ToeKnee Lacey
To display a buffered image in an ImageStack I make a series of bi's, then make an imagePlus from each (new ImagePlus("new"+title, bi), add each one to an ImageStack, then display the stack in a new StackWindow. Is that what you are after?
Audrey ToeKnee Lacey <[hidden email]> wrote:Hi folkes, Im posting this because, to be honest, I'm lazy. What is the quickest way to get an ImageStack to use BufferedImage to display as opposed to java.awt.image type? From the little time I've spent looking (I literally mean 2 minutes - I said I was lazy) I get the impression I'll have to subclass ImagePlus - am I wrong? The reason I want this is simply to get double buffering working. I'm writing an interactive markup tool for some medical image segmentation which suffers from screen flicker. It will run on a Java 1.4+ system so I'm happy to loose backward compatability. I've already subclassed Canvas to get subpixel positioning back from the mouse which works well. Ideally a brief example of the minimum I need to do would be great, but any pointers much appreciated. Thanks in advance, -tony |
In reply to this post by ToeKnee Lacey
It was more the conversion from ImagePlus to buffered image which represented
the effort I was unable to muster then enthusiasm to do. Thankfully, through the joy of open source development and the efforts of Jarek (to whom I am incredibly grateful) my laziness was rewarded. However, it is useful to know that the second part of my devious plan (thats the one involving pumping the images back onto an ImageStack and not the one involving a powerful, space borne super laser) has some precedence. Many thanks --- ImageJ Interest Group <[hidden email] wrote: To display a buffered image in an ImageStack I make a series of bi's, then make an imagePlus from each (new ImagePlus("new"+title, bi), add each one to an ImageStack, then display the stack in a new StackWindow. Is that what you are after? > > Audrey > > > > ToeKnee Lacey <[hidden email]> wrote:Hi folkes, > > Im posting this because, to be honest, I'm lazy. What is the > quickest way to get an ImageStack to use BufferedImage to display as opposed > to java.awt.image type? > > From the little time I've spent looking (I literally > mean 2 minutes - I said I was lazy) I get the impression I'll have to subclass > ImagePlus - am I wrong? > > The reason I want this is simply to get double > buffering working. I'm writing an interactive markup tool for some medical > image segmentation which suffers from screen flicker. It will run on a Java > 1.4+ system so I'm happy to loose backward compatability. I've already subclassed > Canvas to get subpixel positioning back from the mouse which works well. > > Ideally a brief example of the minimum I need to do would be great, but > any pointers much appreciated. > > Thanks in advance, > > -tony > |
Free forum by Nabble | Edit this page |