1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
|
/*=========================================================================
Program: Image Guided Surgery Software Toolkit
Module: $RCSfile: igstkDefaultWidget.cxx,v $
Language: C++
Date: $Date: 2008-02-14 15:34:31 $
Version: $Revision: 1.2 $
Copyright (c) ISC Insight Software Consortium. All rights reserved.
See IGSTKCopyright.txt or http://www.igstk.org/copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#include "igstkDefaultWidget.h"
#include "vtkRenderWindow.h"
namespace igstk
{
DefaultWidget
::DefaultWidget(unsigned int width, unsigned int height):m_ProxyView(this)
{
this->m_Width = width;
this->m_Height = height;
}
void
DefaultWidget
::RequestSetView( ViewType * view )
{
this->m_View = view;
this->m_ProxyView.Connect( this->m_View );
m_ProxyView.SetRenderWindowSize(
this->m_View, this->m_Width, this->m_Height );
}
void
DefaultWidget
::TestProxy()
{
std::cout << this->m_ProxyView.GetNameOfClass() << std::endl;
const double px = 1.3;
const double py = 1.8;
this->m_ProxyView.SetPickedPointCoordinates( this->m_View, px, py );
}
void
DefaultWidget
::SetRenderer( vtkRenderer * )
{
}
void
DefaultWidget
::SetRenderWindowInteractor( vtkRenderWindowInteractor * iren )
{
vtkRenderWindow* renWin = iren->GetRenderWindow();
if (renWin != NULL)
{
renWin->BordersOn();
renWin->SetWindowName( "IGSTK DefaultWidget" );
}
}
} // end namespace igstk
|