[vtkusers] vtkImageMapper error

John Biddiscombe john.biddiscombe at mirada-solutions.com
Mon Apr 7 07:03:13 EDT 2003


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

-----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