|
Replies:
1
-
Last Post:
Aug 14, 2007 1:02 PM
by: Brian Burkhalter
|
|
|
|
|
|
|
[JAI] UntiledOpImage (was Re: [JAI] OpImage::getFormatTags())
Posted:
Aug 14, 2007 10:47 AM
|
|
|
Hello,
> <javadoc> > Every operator who follows the above default implementation must supply an > overridden version of at least one of the computeRect method variants, and > specify which one is to be called via the cobbleSources argument of the > constructor, or an exception will be thrown at run time. > </javadoc>
More details : I am implementing a KMeansOpImage (to make a k-means operator). To make sure this works, I chose the UntiledOpImage as parent class. After all, I need all the pixels to be able to segment the image.
A bigger hiccup : all the constructors of UntiledOpImage set cobbleSources to true, meaning the default implementation needs to work with RasterAccessors. Can I just set it to false in my own constructor - or will this break things ?
Regards,
Daniel Léonard
--------------------------------------------------------------------- To unsubscribe, e-mail: interest-unsubscribe@jai.dev.java.net For additional commands, e-mail: interest-help@jai.dev.java.net
|
|
|
|
|
|
|
Re: [JAI] UntiledOpImage (was Re: [JAI] OpImage::getFormatTags())
Posted:
Aug 14, 2007 1:02 PM
in response to: Fork Labs
|
|
|
On Tue, 14 Aug 2007, Fork Labs wrote:
> Hello, > >> <javadoc> >> Every operator who follows the above default implementation must supply an >> overridden version of at least one of the computeRect method variants, and >> specify which one is to be called via the cobbleSources argument of the >> constructor, or an exception will be thrown at run time. >> </javadoc> > > More details : I am implementing a KMeansOpImage (to make a k-means > operator). To make sure this works, I chose the UntiledOpImage as > parent class. After all, I need all the pixels to be able to segment > the image. > > A bigger hiccup : all the constructors of UntiledOpImage set > cobbleSources to true, meaning the default implementation needs to > work with RasterAccessors. Can I just set it to false in my own > constructor - or will this break things ?
You would have to override computeTile() but a quick perusal of the code does not reveal any other obvious problems.
I suspect that you are using UntiledOpImage as much because of the fact that the algorithm is iterative on the output image as because every pixel of the output depends on every pixel of the input. We had planned at one point to implement a base class for iterative operations such as this but this was never completed. The idea was to make the destination pixel values accessible without requiring that the source be cobbled into a single tile. I guess after all this is what you are getting at here ...
Brian
---------------- Brian Burkhalter Java Media, Imaging, and Graphics Sun Microsystems, Inc.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--------------------------------------------------------------------- To unsubscribe, e-mail: interest-unsubscribe@jai.dev.java.net For additional commands, e-mail: interest-help@jai.dev.java.net
|
|
|
|
|