Hei Alberto, I did some changes to the model yesterday night. Instead of a double array I used "Raster". I adde getRasterData() to the RasterImageLayer class. Subsequently I also changed the retrieval method in Sextante. I.e. instead of m_Raster = layer.getImage().getData(); i use now m_Raster = layer.getRasterData();
I have done only some preliminary tests and most of the stuff worked as far as I can assess (i.e. I fixed broken functions). However more testing is probably needed. stefan Alberto De Luca wrote: > Stefan, > > thank you for you time. About your doubts: > >> - you change finally the image loaded. This means that the data/image >> delivered to sextante will contain the scaled values. >> > When you need to pass over the data/image to sextante, you could always > retrieve the actual raster data. The rescaling of the data is done for > display purposes only. Sure, you couldn't instantiate an > OpenJUMPSextanteRasterLayer from a RasterImageLayer (like you do in your > class CreatePolygonGridFromSelectedImageLayerPlugIn.java), you'd need to > use a different constructor and a couple of other methods to set image > properties and data. But still it would be feasible. Or am I missing the > point here? >> - you assume that the data loaded have only one band, so you need only >> one array. >> > You're right. But we could replace the single array with a series of > arrays, each of them storing the cell values of a single band. It should > be feasible. I'd give it a try to see if it can be done. What do you reckon? > >> Mhm.. not sure what to do, maybe we modify the RasterImage method such >> way that images/data with one band will always be GridFloat files? >> But then we still would need to ensure that Sextante will get the >> correct values? Or we change the Sextante interface-classes. I actually >> talked to Victor a few weeks earlier, and it may be the better option to >> have the interface classes maintained by us? [which means more work... ;)] >> > Don't know, I'd prefer to spend some more time on the topic and try to > find a more general solution keeping the sextante classes untouched... > > Thanks again > Alberto > ------------------------------------------------------------------------------ The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://p.sf.net/sfu/dev2dev-palm _______________________________________________ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel