RE: [ROOT] TImage, AfterImage problem

From: Michal Lijowski (michal@cvu.wustl.edu)
Date: Thu Jun 19 2003 - 22:09:31 MEST


Hello,

I compiled a new version of libAfterImage, ROOT cvs, and the TImageTest
program (attached). The white band at the bottom of the image disappered.
If you looked carefully the white band at the bottom of the color palette
remains.

   Michal



-----Original Message-----
From: owner-roottalk@pcroot.cern.ch
[mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Fons Rademakers
Sent: Thursday, June 19, 2003 5:53 AM
To: Reiner Rohlfs
Cc: Michal Lijowski; roottalk@pcroot.cern.ch
Subject: Re: [ROOT] TImage, AfterImage problem


Hi Reiner,

 I've made the changes and on
ftp://root.cern.ch/root/libAfterImage.tar.gz you can find the new
updated tar file.

Cheers, Fons.


On Fri, 2003-06-13 at 14:04, Reiner Rohlfs wrote:
> Hi Michal,
>
> I think this is a libAfterImage problem.  The library has a division by 0.
>
> In the file transform.c the line 1820 and 1821 :
>
> 				multipliers[y][x] =
> (double)(palette->channels[y][x+1] - palette->channels[y][x])/
>
> (points[x+1]-points[x]);
>
> has to be replaces by
>
>             if (points[x+1] == points[x])
>                multipliers[y][x] = 1;
>             else
> 				   multipliers[y][x] =
> (double)(palette->channels[y][x+1] - palette->channels[y][x])/
>
> (points[x+1]-points[x]);
>
> It is not important to which multipliers[y][x] is assigned to. If
points[x+1]
> == points[x] than multipliers[y][x] will by multiplied by 0 anyhow, as fas
as I
> understand the code. But it should not NaN.
>
> With this lines your image looks OK for me.
>
> Rene, Fons can you also make these changes in the libAfterImage library
ROOT
> supports.
>
> Cheers Reiner.
>
>
>
> On  6-Jun-03 at 23:09, Michal Lijowski (michal@cvu.wustl.edu) wrote:
> >
> >   I have one more problem with TImage or maybe AfterImage.
> >   When I run the attached code I get two canvas but on the bottom
> >   of the image there is white band along part of the bottom of
> >   the image. The same case is for color paletter. I try to find out
> >   where the problem is by running asvector program located in
> >   libAfterImage/apps directory. But the resultant image has black
> >   band on the bottom along full width. This band does not appear
> >   on the jpeg version of this image. I sent email to author of
> >   this software and he advised to grab the CVS version. So I did.
> >   But after correcting a couple compilation errors, the effect is
> >   the same. The resultant image from asvector program has black band
> >   on the bottom.
> >
> >   I am running ROOT 3.5/5 under RH Linux 9.0 with gcc 3.2.2.
> >
> >   Thank you for the attention.
> >
> >    Michal
> >
--
Org:    CERN, European Laboratory for Particle Physics.
Mail:   1211 Geneve 23, Switzerland
E-Mail: Fons.Rademakers@cern.ch              Phone: +41 22 7679248
WWW:    http://root.cern.ch/~rdm/            Fax:   +41 22 7679480





This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:12 MET