return _vtkimageviewer2;
}
//-------------------------------------------------------------------
-void vtkImageViewer2_XYZ::setColorTransferFunction(vtkColorTransferFunction* colortable){
-
-
+void vtkImageViewer2_XYZ::setColorTransferFunction(vtkColorTransferFunction* colortable)
+{
vtkImageMapToWindowLevelColors* imagemaptowindowlevel = _vtkimageviewer2->GetWindowLevel();
-
- if(colortable!=NULL&&colortable->GetSize()>0 && _colortable != colortable){
+ if(colortable!=NULL&&colortable->GetSize()>0 && _colortable != colortable)
+ {
_colortable = colortable;
imagemaptowindowlevel->SetLookupTable(colortable);
}
-
}
wxVtkBaseView *wxMaracas_ViewerWidget::GetwxVtkBaseView()
{
wxVtkBaseView *wxvtkbaseview=NULL;
- if (mvtk2Dbaseview!=NULL){
+ if (mvtk2Dbaseview!=NULL)
+ {
wxvtkbaseview = mvtk2Dbaseview;
}
- if (mvtkmpr2Dview_X!=NULL){
+ if (mvtkmpr2Dview_X!=NULL)
+ {
wxvtkbaseview = mvtkmpr2Dview_X;
}
- if (mvtkmpr2Dview_Y!=NULL){
+ if (mvtkmpr2Dview_Y!=NULL)
+ {
wxvtkbaseview = mvtkmpr2Dview_Y;
}
- if (mvtkmpr2Dview_Z!=NULL){
+ if (mvtkmpr2Dview_Z!=NULL)
+ {
wxvtkbaseview = mvtkmpr2Dview_Z;
}
- if (mvtkplane2Dview!=NULL){
+ if (mvtkplane2Dview!=NULL)
+ {
wxvtkbaseview = mvtkplane2Dview;
}
- if (mwxsphereview!=NULL){
+ if (mwxsphereview!=NULL)
+ {
wxvtkbaseview = mwxsphereview;
}
- if (mwxvtk3Dbaseview_Clipping3D!=NULL){
+ if (mwxvtk3Dbaseview_Clipping3D!=NULL)
+ {
wxvtkbaseview = mwxvtk3Dbaseview_Clipping3D;
}
return wxvtkbaseview ;
imageData->GetSpacing (spx,spy,spz);
imageData->GetExtent (x1,x2,y1,y2,z1,z2);
}
+printf("//EED wxVtk2DBaseView::ResetView %d %d %d %d %d %d \n",x1,x2,y1,y2,z1,z2);
_imageViewer2XYZ -> SetExtentDimension(x1,x2,y1,y2,z1,z2);
_imageViewer2XYZ -> GetVtkImageViewer2()->SetupInteractor ( iren );
void wxVtk2DBaseView::SetImageToVtkViewer(vtkImageData *imageData)
{
int ext[6];
+ imageData->Update();
imageData->GetWholeExtent(ext);
- _imageViewer2XYZ->SetExtentDimension( ext[0],ext[1],ext[2],ext[3],ext[4],ext[5] );
if (_imageViewer2XYZ!=NULL)
{
+ _imageViewer2XYZ->SetExtentDimension( ext[0],ext[1],ext[2],ext[3],ext[4],ext[5] );
_imageViewer2XYZ->GetVtkImageViewer2()->SetInput( imageData );
} // if _imageViewer2XYZ
//-------------------------------------------------------------------
void wxVtkBaseView::RefreshView() // virtual
{
- printf("EED wxVtkBaseView::RefreshView() \n");
// EED 10 Oct 2007
-
#if defined(WIN32)
GetRenWin()->Render();
#else
((vtkInteractorStyleBaseView*)GetInteractorStyleBaseView())->AddInteractorStyleMaracas( _interactorstylemprview );
}
- if(img!=NULL){
+ if(img!=NULL)
+ {
double* origin = img->GetOrigin();
img->GetExtent(x1,x2,y1,y2,z1,z2);
img->GetSpacing(spc);