[Insight-developers] Help to debug on LInux64 and Mac 10.5

Bill Lorensen bill.lorensen at gmail.com
Fri Dec 21 00:15:35 EST 2007


Guys,

I think I have a solution. I'll add a type to the mesh traits called
PointHashType. For itkMesh it will be the same as PointType. For
itkQuadEdgeMesh it will be Point<CoordType,VDimension>. I'll use this type
as the hash key.

Have to do some testing to see if it might work.

Bill

On Dec 21, 2007 12:01 AM, Bill Lorensen <bill.lorensen at gmail.com> wrote:

> Guys,
>
> Actually, it's not the overflow that is the problem. The p is different,
> because part of the key is a pointer! Even though the x,y,z coodinates of a
> point may be equal in an itkQuadEdgeMeshPoint, the additional part of the
> class may be different.
>
> Hmmm... somehow we need to limit the length of the key to the coordinate
> part.
>
> Bill
>   On Dec 20, 2007 7:57 PM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
>
> > OK, the 64 bit output shows that for (0, 0, 1) there are two different
> > has codes generated.
> > The codes differ after the first time the hash overflows.
> > ...
> > hash before: 1075801880
> > p now      : 63
> > hash after : 1207645527
> > hash before: 1207645527
> > p now      : 4
> > hash after : 1187547931
> >
> > ...
> > hash before: 1075801880
> > p now      : 63
> > hash after : 1207645527
> > hash before: 1207645527
> > p now      : -1
> > hash after : 1187547926
> >
> > This shows that the overflow has two different results.
> >
> > Bill
> >
> > On Dec 20, 2007 4:48 PM, Sean McBride <sean at rogue-research.com> wrote:
> >
> > > On 12/20/07 4:24 PM, Bill Lorensen said:
> > >
> > > >I it's OK. It is meant to hash an arbitrary object.
> > > >
> > > >Can you attach the output?
> > >
> > > Attached is my code change and the output.  Also, I have done a second
> > >
> > > build with all the same settings except 32 bit, and the test passes
> > > there.  Output also attached.
> > >
> > > >The length of the key for
> > > >itkMesh is 12 while the length of the key for itkQuadEdgeMesh is 20.
> > >
> > > In 32 bit, I note that the length is indeed 20 bytes.  But in 64 bit,
> > > as
> > > I said before, it is 32 bytes (sic).  Can you explain why you expect
> > > 20?
> > >
> > > --
> > >  ____________________________________________________________
> > > Sean McBride, B. Eng                 sean at rogue-research.com
> > > Rogue Research                         www.rogue-research.com
> > > Mac Software Developer              Montréal, Québec, Canada
> > >
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.itk.org/mailman/private/insight-developers/attachments/20071221/56694d89/attachment.htm


More information about the Insight-developers mailing list