[R] Clip contour or image

Thomas Petzoldt petzoldt at rcs.urz.tu-dresden.de
Mon Mar 19 11:56:03 CET 2001


Han Lai schrieb:
> 
> Hi,
> 
> I am almost new to R.  Would any one show me (please include an example)
> how to clip a contour or image figure so that I only see the image or
> lines inside a selected area?

Hi,

I had a similar problem some weeks before. My problem was to clip an
interpolated (kriged) surface image of a lake to its _irregular_shaped_
shoreline. My solution was some kind of "image manipulation". I
"stamped" the shoreline into the image matrix and filled the region
outside with the help of the seedfill algorithm, which I implemented as
an external shared library (runs as Win32-DLL and .so on Linux). 

You will need the compiled C library and some R functions. If you or
another one who would be interested on my R and C functions, I can give
it to you. 

Maybe it would be worth to create a package with "basic image
manipulation procedures" for matrices. If there is anybody, who has a
better (or easier) solution, I would be interested too.

Thomas Petzoldt

-- 
Thomas Petzoldt                    (Limnology and Ecological Modelling)
Institute for Hydrobiology         http://www.tu-dresden.de/fghhihb/
Dresden University of Technology  
mailto:petzoldt at rcs.urz.tu-dresden.de  
01062 Dresden
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list