#include <wxMaracasSuperpositionPanel.h>
Public Member Functions | |
wxMaracasSuperpositionPanel (std::vector< vtkImageData * > imgs, int type, wxWindow *parent, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_FRAME_STYLE|wxSUNKEN_BORDER, int vertStart=1, int vertEnd=1, int horzStart=1, int horzEnd=1) | |
~wxMaracasSuperpositionPanel () | |
void | createSuperpositionPanel () |
void | getSpacing (double *spacing) |
wxVtkBaseView * | GetWxVtkBaseView () |
wxVtkMPR2DView * | GetwxVtkMPR2DView () |
vtkImageData * | GetshowingVID () |
int | GetImageDataSizeZ () |
void | RefreshInterface () |
void | ChangeImage (vtkImageData *img) |
void | SetVisibleAxis (bool ok) |
int | GetX () |
int | GetY () |
int | GetZ () |
void | Refresh () |
Private Attributes | |
std::vector< vtkImageData * > | _images |
int | _type |
wxMaracas_N_ViewersWidget * | theViewPanel |
wxFlexGridSizer * | outSizer |
double | last_spacing [3] |
Definition at line 31 of file wxMaracasSuperpositionPanel.h.
wxMaracasSuperpositionPanel::wxMaracasSuperpositionPanel | ( | std::vector< vtkImageData * > | imgs, | |
int | type, | |||
wxWindow * | parent, | |||
const wxPoint & | pos = wxDefaultPosition , |
|||
const wxSize & | size = wxDefaultSize , |
|||
long | style = wxDEFAULT_FRAME_STYLE | wxSUNKEN_BORDER , |
|||
int | vertStart = 1 , |
|||
int | vertEnd = 1 , |
|||
int | horzStart = 1 , |
|||
int | horzEnd = 1 | |||
) |
Definition at line 15 of file wxMaracasSuperpositionPanel.cxx.
References _images, _type, createSuperpositionPanel(), outSizer, and theViewPanel.
00016 :wxPanel(parent, -1, pos, size, style) 00017 { 00018 _images = imgs; 00019 _type = type; 00020 int gapH = 20; 00021 int gapV = 10; 00022 createSuperpositionPanel(); 00023 00024 outSizer = new wxFlexGridSizer(1, 1, gapH, gapV); 00025 outSizer -> AddGrowableCol(0); 00026 outSizer -> AddGrowableRow(0); 00027 outSizer->Add( theViewPanel, 1, wxGROW); 00028 00029 this->SetSizer( outSizer ); 00030 this->SetAutoLayout( true ); 00031 this->Layout(); 00032 }
wxMaracasSuperpositionPanel::~wxMaracasSuperpositionPanel | ( | ) |
Definition at line 35 of file wxMaracasSuperpositionPanel.cxx.
void wxMaracasSuperpositionPanel::ChangeImage | ( | vtkImageData * | img | ) |
Definition at line 99 of file wxMaracasSuperpositionPanel.cxx.
References wxMaracas_N_ViewersWidget::SetImage(), and theViewPanel.
00100 { 00101 theViewPanel->SetImage(img); 00102 }
void wxMaracasSuperpositionPanel::createSuperpositionPanel | ( | ) |
Definition at line 44 of file wxMaracasSuperpositionPanel.cxx.
References _images, _type, wxMaracas_N_ViewersWidget::GetWindow(), SetVisibleAxis(), and theViewPanel.
Referenced by wxMaracasSuperpositionPanel().
00045 { 00046 00047 std::vector<int> * numViews = new std::vector<int> (); 00048 numViews->push_back(0); 00049 00050 if (_type==1 || _type==3) 00051 { 00052 theViewPanel = new wxMaracas_N_ViewersWidget( this, _images[0], numViews ); 00053 } 00054 else if (_type==2) 00055 { 00056 theViewPanel = new wxMaracas_N_ViewersWidget( this, _images[1], numViews ); 00057 } 00058 00059 SetVisibleAxis(false); 00060 00061 theViewPanel->SetBackgroundColour(wxColour(0,0,0)); 00062 00063 theViewPanel->SetSize(800, 900); 00064 theViewPanel->GetWindow(1)->SetSize(800, 900); 00065 }
int wxMaracasSuperpositionPanel::GetImageDataSizeZ | ( | ) |
Definition at line 85 of file wxMaracasSuperpositionPanel.cxx.
References GetshowingVID().
00086 { 00087 int ext[6]; 00088 GetshowingVID()->GetExtent(ext); 00089 int sizeZ = ext[5]-ext[4]+1; 00090 00091 return sizeZ; 00092 }
vtkImageData * wxMaracasSuperpositionPanel::GetshowingVID | ( | ) |
Definition at line 80 of file wxMaracasSuperpositionPanel.cxx.
References _images.
Referenced by GetImageDataSizeZ().
00081 { 00082 return _images[0]; 00083 }
void wxMaracasSuperpositionPanel::getSpacing | ( | double * | spacing | ) |
wxVtkBaseView * wxMaracasSuperpositionPanel::GetWxVtkBaseView | ( | ) |
Definition at line 69 of file wxMaracasSuperpositionPanel.cxx.
References wxMaracas_N_ViewersWidget::GetwxVtkBaseView(), and theViewPanel.
Referenced by RefreshInterface().
00070 { 00071 return theViewPanel->GetwxVtkBaseView(1); 00072 }
wxVtkMPR2DView * wxMaracasSuperpositionPanel::GetwxVtkMPR2DView | ( | ) |
Definition at line 75 of file wxMaracasSuperpositionPanel.cxx.
References wxMaracas_N_ViewersWidget::GetwxVtkBaseView(), and theViewPanel.
Referenced by GetX(), GetY(), GetZ(), Refresh(), and SetVisibleAxis().
00076 { 00077 return (wxVtkMPR2DView *) (theViewPanel->GetwxVtkBaseView(1)); 00078 }
int wxMaracasSuperpositionPanel::GetX | ( | ) |
Definition at line 114 of file wxMaracasSuperpositionPanel.cxx.
References wxVtkMPR2DView::GetVtkmprbasedata(), GetwxVtkMPR2DView(), and vtkMPRBaseData::GetX().
00115 { 00116 return GetwxVtkMPR2DView()->GetVtkmprbasedata()->GetX(); 00117 }
int wxMaracasSuperpositionPanel::GetY | ( | ) |
Definition at line 119 of file wxMaracasSuperpositionPanel.cxx.
References wxVtkMPR2DView::GetVtkmprbasedata(), GetwxVtkMPR2DView(), and vtkMPRBaseData::GetY().
00120 { 00121 return GetwxVtkMPR2DView()->GetVtkmprbasedata()->GetY(); 00122 }
int wxMaracasSuperpositionPanel::GetZ | ( | ) |
Definition at line 124 of file wxMaracasSuperpositionPanel.cxx.
References wxVtkMPR2DView::GetVtkmprbasedata(), GetwxVtkMPR2DView(), and vtkBaseData::GetZ().
00125 { 00126 return GetwxVtkMPR2DView()->GetVtkmprbasedata()->GetZ(); 00127 }
void wxMaracasSuperpositionPanel::Refresh | ( | ) |
Definition at line 130 of file wxMaracasSuperpositionPanel.cxx.
References wxVtk2DBaseView::GetRenWin(), and GetwxVtkMPR2DView().
00131 { 00132 GetwxVtkMPR2DView()->GetRenWin()->Render(); 00133 }
void wxMaracasSuperpositionPanel::RefreshInterface | ( | ) |
Definition at line 94 of file wxMaracasSuperpositionPanel.cxx.
References GetWxVtkBaseView(), and wxVtkBaseView::Refresh().
00095 { 00096 GetWxVtkBaseView()->Refresh(); 00097 }
void wxMaracasSuperpositionPanel::SetVisibleAxis | ( | bool | ok | ) |
Definition at line 108 of file wxMaracasSuperpositionPanel.cxx.
References GetwxVtkMPR2DView(), and wxVtkMPR2DView::SetVisibleAxis().
Referenced by createSuperpositionPanel().
00109 { 00110 GetwxVtkMPR2DView()->SetVisibleAxis(ok); 00111 }
std::vector<vtkImageData*> wxMaracasSuperpositionPanel::_images [private] |
Definition at line 71 of file wxMaracasSuperpositionPanel.h.
Referenced by createSuperpositionPanel(), GetshowingVID(), and wxMaracasSuperpositionPanel().
int wxMaracasSuperpositionPanel::_type [private] |
Definition at line 74 of file wxMaracasSuperpositionPanel.h.
Referenced by createSuperpositionPanel(), and wxMaracasSuperpositionPanel().
double wxMaracasSuperpositionPanel::last_spacing[3] [private] |
Definition at line 86 of file wxMaracasSuperpositionPanel.h.
wxFlexGridSizer* wxMaracasSuperpositionPanel::outSizer [private] |
Definition at line 84 of file wxMaracasSuperpositionPanel.h.
Referenced by wxMaracasSuperpositionPanel().
Definition at line 79 of file wxMaracasSuperpositionPanel.h.
Referenced by ChangeImage(), createSuperpositionPanel(), GetWxVtkBaseView(), GetwxVtkMPR2DView(), and wxMaracasSuperpositionPanel().