Hello Michael ROI is one aspect of JAI that I lack experience in. The approach that I'm writting below may be less efficient than ROI. I posting it just in case, but it may be worth to explore more on the ROI side.
A possible approach may be to binarize the mask in order to create a new image containing only 0 and 1 values. Note: I would not recommand to use ImageWorker if you can avoid it. I would rather suggest to use the JAI Binarize descriptor directly: http://download.java.net/media/jai/javadoc/1.1.3/jai-apidocs/javax/media/jai/operator/BinarizeDescriptor.html Then you can multiply your numeric image by that mask, so the masked values get 0. You can then convolved as you did, those 0 values will change the sum. For the last binarize step, I would suggest again the JAI operation rather than ImageWorker. However the above involves a lot of images (up 6) because of intermediate steps. Maybe this is not an issue. But if it is, you could also create your own JAI operations doing all this work in one step. It also give you more control on what is computed exactly. If you wish to do so, the first step would be to create a subclass of javax.media.jai.AreaOpImage. Martin ------------------------------------------------------------------------------ _______________________________________________ Geotools-gt2-users mailing list Geotools-gt2-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users