49 DEFINE_EVENT_TYPE( wxINSTANT_CHANGE )
115 wxContourViewPanel ::
wxContourViewPanel ( vtkImageData * theShowingImage, wxWindow *parent, const wxPoint& pos, const wxSize& size,
long style,
int vertStart,
int vertEnd,
int horzStart,
int horzEnd )
116 :wxPanel(parent, -1, pos, size, style)
118 theShowingImage->GetSpacing(last_spacing);
119 showingVID = theShowingImage;
122 _verticalConceptName =
"";
123 _horizontalConceptName =
"";
124 createHorizontalBar(1,80);
125 createVerticalBar(1,200);
127 _eventHandler = NULL;
129 wxFlexGridSizer * panelSizer =
new wxFlexGridSizer(1, 4, gapV, gapH);
130 panelSizer -> AddGrowableCol(2);
131 panelSizer -> AddGrowableRow(2);
132 panelSizer->Add(_verticalBar, 1, wxGROW);
133 panelSizer->AddSpacer(gapV);
134 panelSizer->Add(theViewPanel, 1, wxGROW);
135 panelSizer->AddSpacer(gapV);
137 outSizer =
new wxFlexGridSizer(3, 1, gapH, gapV);
138 outSizer -> AddGrowableCol(1);
139 outSizer -> AddGrowableRow(1);
140 outSizer->Add( _horizontalBar, 1, wxGROW);
141 outSizer->Add( panelSizer, 1, wxGROW);
142 outSizer->AddSpacer(gapH);
144 _horizontalBar->setDeviceBlitStart( _verticalBar->GetWidth() + 2*gapH, gapV);
145 _horizontalBar->setDeviceEndMargin( 2*gapH+10 );
164 this->SetSizer( outSizer );
165 this->SetAutoLayout(
true );
174 initializeScenceManager();
230 _verticalBar -> setRepresentedValues (vertStart, vertEnd);
240 std::vector<int> * numViews =
new std::vector<int> ();
241 numViews->push_back(0);
260 return (wxVtkMPR2DView *) (
theViewPanel->GetwxVtkBaseView(1));
449 _verticalBar -> setRepresentedValues( minRepresented, maxRepresented );
462 _horizontalBar -> setRepresentedValues( minRepresented, maxRepresented );
677 if ( GetId() == event.GetId() )
727 if ( toolCommand == 3 && ctrlKey )
731 else if( toolCommand == 22 && ctrlKey )
735 else if( toolCommand == 8 || (toolCommand==127) )
739 else if( toolCommand == 14 && ctrlKey )
743 else if( toolCommand == 15 && ctrlKey )
747 else if( toolCommand == 19 && ctrlKey )
750 }
else if( toolCommand == 26 ){
752 }
else if( toolCommand == 25 ){
763 for(
int i = 0; i < size;i++){
804 vtkImageViewer2 *imageviewer = wxvtk2dbaseview->_imageViewer2XYZ->GetVtkImageViewer2();
805 int colorwindow = (int)imageviewer->GetWindowLevel()->GetLevel();
812 vtkImageViewer2 *imageviewer = wxvtk2dbaseview->_imageViewer2XYZ->GetVtkImageViewer2();
813 int windowlevel = (int)imageviewer->GetWindowLevel()->GetWindow();
820 vtkImageViewer2 *imageviewer = wxvtk2dbaseview->_imageViewer2XYZ->GetVtkImageViewer2();
821 imageviewer->SetColorWindow(colorwindow);
822 imageviewer->SetColorLevel(windowlevel);
828 vtkImageViewer2 *imageviewer = wxvtk2dbaseview->_imageViewer2XYZ->GetVtkImageViewer2();
831 imageviewer->GetImageActor()->InterpolateOn();
833 imageviewer->GetImageActor()->InterpolateOff();
844 wxVtk2DBaseView* baseview = (wxVtk2DBaseView*)stylebaseview->GetWxVtk2DBaseView();
845 baseview->SetActualSlice(z);