[GRASSLIST:3612] Re: function to compare rasters visually

Benjamin Ducke benducke at compuserve.de
Mon Jun 7 13:22:25 EDT 2004


Dissolve seems to be what graphics programs like
Photoshop call "transparency" and is usually
implemented using an alpha blending.
It should not be too hard to implement something
like this in a GRASS rast module.
The Open Source program Gimp (www.gimp.org) should have all
the necessary algorithms.
Also, Graphics Gems (Vol. I) has an alpha blending algorithm.
I would like to see something like this in a GRASS module,
but I really think alpha blending should be done by adding the
needed functionality to d.rast. Maybe one could add an integer
1..100 to the '-o' parameter to specifiy the strength of
transparency?
While we are at it: I would love to see antialiasing for
vector maps (d.vect), it makes them so much easier on the eyes.
Are there any capabale graphics programmers who would implement it
(come on - shouldn't be that hard) ?

Benjamin

On Mon, 7 Jun 2004 15:23:39 +0200
Martin Wegmann <mailinglist2_wegmann at web.de> wrote:

> Thanks Daniel,
> 
> I will try the script, pretty useful. I already know it from ERDAS and think 
> that this function should be available per default in GRASS. But I was rather 
> looking for a comparison of two rasters inside the same monitor. I think 
> there does an equivalent function in ERDAS exist which name I forgot. 
> 
> Just to make it clear, raster 1 =  a; raster 2 = b
> 
> either with a moving border which is moved with the mouse across the monitor 
> 
> a a a a b b	a a a b b b
> a a a a b b ->a a a b b b
> a a a a b b     a a a b b b
> 
> horizontally or vertically. 
> Which would be fantastic: A dynamic border which can be changed by moving the 
> mouse in different directions (from vertical to horizontal to diagonal and 
> anything in between) 
> 
> or two raster which dissolve and the strength of dissolving can be changed. 
> 
> - just raster 1 visible
> - raster 1 80 % visible, raster 2 20% visible
> - until raster 2 100% visible 
> 
> 
> cheers Martin 
> 
> 
> BTW did you or John already post this script as wish to be implemented in 
> GRASS? 
> 
> 
> On Monday 07 June 2004 14:19, Daniel Victoria wrote:
> > Hi Martin,
> >
> > I had a similar problem once and John was kind enough
> > to send me this script. It links to grass displays
> > monitors so, whaever you look at in X0, X1 will
> > follow, like linking the displays geographically in
> > ERDAS.
> > Hope it helps, but don't thanks me, thanks John
> >
> > Cheers
> > Daniel
> >
> > --------------------------------------------------
> > From:	"John Gillette" <JGillette at rfmd.com>
> > To:	"Daniel Victoria" <daniel_victoria at yahoo.com>,
> > "Sandro Klippel" <sandro.klippel at talha-mar.com.br>,
> > "GRASSLIST" <grasslist at baylor.edu>
> >
> >
> > try this:
> >
> > Select and then Erase x1 and then display what ever
> > you want there.
> > Select x0 and erase and display other info there.
> >
> > Run this script to either pan or zoom in x0.  After
> > finishing
> > the pan or zoom x1 will redraw it's contents at the
> > same region
> > thereby "following" what ever is done in x0.
> >
> > The disadvantage is that you can only do 1 pan or zoom
> > at a time,
> > i.e. not interactively.
> >
> > usage:
> >
> > script_name z   <- does zoom instead of pan
> > script_name
> >
> > zooming and panning in x0.  x0 is selected at exit.
> >
> > Does this help?
> >
> > John
> >
> > ------------------
> > #!/bin/sh
> >
> > d.mon select=x1
> > monitor1=`d.save -o`
> >
> > d.mon select=x0
> > if [ "$1" = "z" ]
> >  then
> >    d.zoom
> >  else
> >    d.pan
> > fi
> > region=`g.region -g`
> >
> > d.mon select=x1
> > d.erase
> > g.region $region
> > eval "$monitor1"
> >
> > d.mon select=x0
> >
> > exit 0
> >
> > --- Martin Wegmann <mailinglist2_wegmann at web.de>
> >
> > wrote:
> > > Hello,
> > >
> > > I was looking for a function which makes it easy to
> > > compare two images
> > > visually by dissolving the upper image or only
> > > displaying parts of the upper
> > > image and moving the border between upper and lower
> > > image across the monitor.
> > > In other programs it is called dissolve or flicker.
> > > But I couldn't find
> > > anything related to this by using the GRASS search
> > > function.
> > >
> > > Thanks for pointing me to the correct word in GRASS.
> > > Martin
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam protection around
> > http://mail.yahoo.com
> 




More information about the grass-user mailing list