[vtkusers] vtkImageMapper error

Neil Killeen Neil.Killeen at atnf.csiro.au
Mon Apr 7 21:30:29 EDT 2003


John


On Mon, 7 Apr 2003, John Biddiscombe wrote:

> Sorry, I realized after I sent this that looking to see if thewidth/height are zero doen't help because you've set the custom extents anyway. In this case I'm lost for an idea. I can only suggest stepping through the code and seeing where the error happesn. maybe then some idea will spring to mind...
>
> JB
>


ok.  when i get the chance then i will build a debug version and
see where the error occurs.  It is not triggered until the pipeline
is activated, so it could be anywhere.

We don't run only Solaris.  Our two main platforms are solaris
and linux.   In the nearish future we will largely develop with Linux
though.

Does the dahsboard under Solaris show any problem for this class ?


cheers
Neil



> -----Original Message-----
> From: John Biddiscombe
> Sent: 07 April 2003 11:23
> To: Neil Killeen; John Biddiscombe
> Cc: Glen.Coates at csiro.au; vtkusers at public.kitware.com
> Subject: RE: [vtkusers] vtkImageMapper error
>
>
> Neil,
>
> >>
> Under Linux indeed this changed the behaviour to something
> more sensible.
> <<
>
> Good.
>
> >>
> Under Solaris I still get a Bus Error, even with this new code.
> Do you have the opportunity to try it under Solaris ?
> >>
>
> Hmmmm. I'm afraid I haven't touched a solaris box for a long time and can't get a hold of one easily. Can you step through the imagemapper code and see where the error happens? Does it happen every time or just when the window becomes zero sized or anything like that? The only thing that the RenderToRectangle code really does is insert an additional glPixelZoom( float,float) call before the draw and then glPixelZoom( 1.0, 1.0) afterwards.
>
>   if (self->GetRenderToRectangle())
>     {
>     int rectwidth  = (actorPos2[0] - actorPos[0]) + 1;
>     int rectheight = (actorPos2[1] - actorPos[1]) + 1;
>     float xscale = (float)rectwidth/width;
>     float yscale = (float)rectheight/height;
>     glPixelZoom(xscale, yscale);
>     }
> is really it. width and height are the (visible) image dimensions and are wrong when the image is cropped - that's the bug you have just found - can you see if they are becoming zero at any point. possibly some bug in unrelated code is causing a div by zero or something. can you try inserting a check wherever you see the above lines? (they appear many times in vtkopenglimagemapper)
>
> JB
> PS why solaris and nothing else?
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>




More information about the vtkusers mailing list