[vtkusers] stretching

Luis Ibanez luis.ibanez at kitware.com
Thu May 26 12:35:39 EDT 2005


Hi Isabelle,


Thanks for letting us know that you were using
VTK for visualization.

...You should have said that from the beginning   :-)



Please look at the code in the file


         ImageSliceViewer.cxx


in the directory

     InsightApplications/
               LiverTumorSegmentation/


http://www.itk.org/cgi-bin/viewcvs.cgi/LiverTumorSegmentation/ImageSliceViewer.cxx?rev=1.3&root=InsightApplications&view=log


You will see in this class how to manage
the scale of your image in the method
SetupCamera(), in lines 118-185.



BTW, I'm assuming that you want to stretch the
image *WITHOUT* changing its aspect ratio. You
probably don't want to change the aspect ratio
of a Medical Image.


Note that *iff* your image has correctly specified
its pixel size in X and Y. VTK will take this pixel
size into account at the moment of rendering the
image.



    Regards,


       Luis



------------------------
Renaud Isabelle wrote:
> Hi everybody,
>  
> My job is to implement an MFC interface for medical image segmentation 
> purposes. Before, my lab was working on Matlab to display their data. 
> Default behavior of matlab is to display my image in parallel mode and 
> stretch the image to fill the best my window. It was a convenient way to 
> see our 1552*128 images. That is exactly what I want to reproduce in my 
> interface.
>  
> So, what I am desperately trying to do is to stretch my image (different 
> scale factors in x and y) to fit my render window.
>  
>  viewer->GetRenderer()->GetActiveCamera()->*ParallelProjectionOn*() is 
> OK, but
>  viewer->GetRenderer()->GetActiveCamera()->*SetParallelScale*() scale 
> not stretch my image.
>  There should be a way to stretch. 
>  
> Isabelle
> 
> ------------------------------------------------------------------------
> Découvrez le nouveau Yahoo! Mail : 1 Go d'espace de stockage pour vos 
> mails, photos et vidéos !
> Créez votre Yahoo! Mail 
> <http://us.rd.yahoo.com/mail_fr/mail_campaigns/splash/taglines_1go/default/*http://fr.promotions.yahoo.com/mail/creer28.html> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> This is the private VTK discussion list. 
> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers






More information about the vtkusers mailing list