[vtkusers] Image size

Eric E. Monson emonson at cs.duke.edu
Thu Jul 8 09:26:57 EDT 2010


Hey Huseyin,

If calling renderer->ResetCamera(imageActor->GetBounds()) doesn't get you close enough, you can also look at the example on the Wiki where an image is used as the background for a window:

http://www.cmake.org/Wiki/VTK/Examples/Images/BackgroundImage

I think this example came out of this mailing list thread:

http://markmail.org/message/taknydvbtdhv6bsx

I seem to recall anther recent thread talking about an image filling a window, but I can't find it right now.

Good luck,
-Eric

------------------------------------------------------
Eric E Monson
Duke Visualization Technology Group


On Jul 8, 2010, at 3:22 AM, Hüseyin Savaş wrote:

> Actually that looks irrelevant.
> Let me describe my need again: I want my image (probably imageActor) to fill the whole screen.
> As far as I got, I can set the scale of my imageactor with some necessary calculations and then mandatorily set the position of imageactor for aligning the image to center.
> But again as I said, this isn't native at all. There should definitely be a more proper way.
> Thanks in advance.
> Huseyin.
> 
>  
> From: Jothy
> Sent: Wednesday, July 07, 2010 6:09 PM
> To: Hüseyin Savaş
> Cc: vtkusers at vtk.org
> Subject: Re: [vtkusers] Image size
> 
> Did you tried ResetCameraClippingRange()?
> 
> Jothy
> 
> 2010/7/7 Hüseyin Savaş <metlord at hotmail.com>
> Hello,
> My question looks fairly simple.
> I have an ImageActor, created via ImageViewer2.getImageActor() , added to a Renderer that has been added to a RenderWindow.
> The actual image displayed covers nearly the same size, whatever image's resolution is and wastes a lot of screen space with black area.
> I tried scaling, zooming and some extra stuff to get what I want (having an image that fits to the screen), but all of these solutions didn't look so native.
> Is there any proper solution to have an image that fits the whole screen?
> Thanks already for any advice.
> Sincerely.
> 
> 
> __________ Information from ESET NOD32 Antivirus, version of virus signature database 5259 (20100707) __________
> 
> The message was checked by ESET NOD32 Antivirus.
> 
> http://www.eset.com
> 
> _______________________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
> 
> 
> 
> __________ Information from ESET NOD32 Antivirus, version of virus signature database 5260 (20100707) __________
> 
> The message was checked by ESET NOD32 Antivirus.
> 
> http://www.eset.com
> _______________________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100708/4e199150/attachment.htm>


More information about the vtkusers mailing list