vtkmprbasedata->SetY( bbGetInputPoint()[1] );
vtkmprbasedata->SetZ( bbGetInputPoint()[2] );
wxCommandEvent newevent(wxEVT_COMMAND_MENU_SELECTED,12121); // Refres
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
bbGetInputwxVtkBaseView()->GetWxVTKRenderWindowInteractor ()->GetParent()->ProcessEvent( newevent );
+#else
+ bbGetInputwxVtkBaseView()->GetWxVTKRenderWindowInteractor ()->GetParent()->ProcessWindowEvent( newevent );
+#endif
+
+
} // if bbGetInputPosition
} // bbGetInputwxVtkBaseView
}
{
if (bbGetInputLookupTable()==NULL)
{
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
imageactor->SetInput( img );
+#else
+ imageactor->SetInputData( img );
+#endif
} else {
/*
vtkLookupTable *table = vtkLookupTable::New();
// imageshiftscale->SetOutputScalarTypeToUnsignedChar();
// color->SetInput( imageshiftscale->GetOutput() );
+
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
color->SetInput( img );
color->Update();
imageactor->GetMapper()->SetInput( color->GetOutput() );
+#else
+ color->SetInputData( img );
+ imageactor->GetMapper()->SetInputData( color->GetOutput() );
+#endif
imageactor->GetProperty()->SetInterpolationTypeToNearest();
}
imagedataValueResult->Delete();
}
imagedataValueResult = vtkImageData::New();
-
-//EED 2017-12-18
- imagedataValueResult->SetScalarType(scalartype);
- //imagedataValueResult->SetScalarTypeToUnsignedShort();
-
-
imagedataValueResult->SetSpacing(spc);
imagedataValueResult->SetDimensions( newDim );
//EED 2017-01-01 Migration VTK7
#if VTK_MAJOR_VERSION <= 5
- imagedataValueResult->SetScalarTypeToUnsignedShort();
+
+//EED 2017-12-18
+ imagedataValueResult->SetScalarType(scalartype);
+ //imagedataValueResult->SetScalarTypeToUnsignedShort();
imagedataValueResult->AllocateScalars();
#else
- imagedataValueResult->AllocateScalars(VTK_UNSIGNED_SHORT,1);
+ imagedataValueResult->AllocateScalars(scalartype,1);
#endif
}
imagedataMaskResult = vtkImageData::New();
-//EED 2017-12-18
-// imagedataMaskResult->SetScalarType(scalartype);
-// imagedataMaskResult->SetScalarTypeToUnsignedShort();
- imagedataMaskResult->SetScalarTypeToUnsignedChar();
imagedataMaskResult->SetSpacing(spc);
imagedataMaskResult->SetDimensions( newDim );
//EED 2017-01-01 Migration VTK7
#if VTK_MAJOR_VERSION <= 5
- imagedataMaskResult->SetScalarTypeToUnsignedShort();
+ //EED 2017-12-18
+ //imagedataMaskResult->SetScalarTypeToUnsignedShort();
+ imagedataMaskResult->SetScalarTypeToUnsignedChar();
imagedataMaskResult->AllocateScalars();
#else
- imagedataMaskResult->AllocateScalars(VTK_UNSIGNED_SHORT,1);
+ imagedataMaskResult->AllocateScalars(VTK_UNSIGNED_CHAR,1);
#endif
}
//---------------------------------------------------------------------------
void FillFilter::SetImages(vtkImageData *image,vtkImageData *image2) // virtual
{
- baseFilterManualPaint::SetImages(image,image2);
+
+
+ baseFilterManualPaint::SetImages(image,image2);
if ((_maxX!=_maxXback) || (_maxY!=_maxYback) || (_maxZ!=_maxZback))
{
_auxImageFill->SetDimensions(_maxX + 1, _maxY + 1, _maxZ + 1);
_auxImageFill->SetOrigin(0, 0, 0);
_auxImageFill->SetExtent(0, _maxX, 0, _maxY, 0, _maxZ);
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
_auxImageFill->SetWholeExtent(0, _maxX, 0, _maxY, 0, _maxZ);
_auxImageFill->SetScalarTypeToUnsignedChar();
_auxImageFill->AllocateScalars();
+#else
+ _auxImageFill->AllocateScalars(VTK_UNSIGNED_CHAR,1);
+#endif
_ptrAuxImageFill = (unsigned char *)_auxImageFill->GetScalarPointer();
memset(_ptrAuxImageFill, 0, (_maxX+1) * (_maxY+1) * (_maxZ+1) );
}
-
- _auxImageFill = vtkImageData::New();
- _auxImageFill->SetDimensions(_maxX + 1, _maxY + 1, _maxZ + 1);
- _auxImageFill->SetOrigin(0, 0, 0);
- _auxImageFill->SetExtent(0, _maxX, 0, _maxY, 0, _maxZ);
-
-
-//EED 2017-01-01 Migration VTK7
-#if VTK_MAJOR_VERSION <= 5
- _auxImageFill->SetWholeExtent(0, _maxX, 0, _maxY, 0, _maxZ);
- _auxImageFill->SetScalarTypeToUnsignedChar();
- _auxImageFill->AllocateScalars();
-#else
- _auxImageFill->AllocateScalars(VTK_UNSIGNED_CHAR,1);
-#endif
-
_maxXback=_maxX;
_maxYback=_maxY;
- _maxYback=_maxZ;
+ _maxYback=_maxZ;
}
{
//EED 2017-01-01 Migration VTK7
#if VTK_MAJOR_VERSION <= 5
- _saggitalColors->SetInput( _vtkmprbasedata->GetImageData() );
- _axialColors->SetInput( _vtkmprbasedata->GetImageData() );
- _coronalColors->SetInput( _vtkmprbasedata->GetImageData() );
+ _saggitalColors ->SetInput( _vtkmprbasedata->GetImageData() );
+ _axialColors ->SetInput( _vtkmprbasedata->GetImageData() );
+ _coronalColors ->SetInput( _vtkmprbasedata->GetImageData() );
+ _outlineData ->SetInput((vtkDataSet *) _vtkmprbasedata->GetImageData() );
#else
- _saggitalColors->SetInputData( _vtkmprbasedata->GetImageData() );
- _axialColors->SetInputData( _vtkmprbasedata->GetImageData() );
- _coronalColors->SetInputData( _vtkmprbasedata->GetImageData() );
+ _saggitalColors ->SetInputData( _vtkmprbasedata->GetImageData() );
+ _axialColors ->SetInputData( _vtkmprbasedata->GetImageData() );
+ _coronalColors ->SetInputData( _vtkmprbasedata->GetImageData() );
+ _outlineData ->SetInputData((vtkDataSet *) _vtkmprbasedata->GetImageData() );
#endif
- _outlineData -> SetInput((vtkDataSet *) _vtkmprbasedata->GetImageData() );
}
//-------------------------------------------------------------------
void wxVtk2DBaseView::SetImageToVtkViewer(vtkImageData *imageData)
{
int ext[6];
- imageData->Update();
- imageData->GetWholeExtent(ext);
if (_imageViewer2XYZ!=NULL)
{
//EED 2017-01-01 Migration VTK7
#if VTK_MAJOR_VERSION <= 5
+ imageData->Update();
+ imageData->GetWholeExtent(ext);
_imageViewer2XYZ->SetExtentDimension( ext[0],ext[1],ext[2],ext[3],ext[4],ext[5] );
_imageViewer2XYZ->GetVtkImageViewer2()->SetInput( imageData );
#else
+ imageData->GetExtent(ext);
+ _imageViewer2XYZ->SetExtentDimension( ext[0],ext[1],ext[2],ext[3],ext[4],ext[5] );
_imageViewer2XYZ->GetVtkImageViewer2()->SetInputData( imageData );
#endif
} // if _imageViewer2XYZ
{
_wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->SetInterpolate( _ckBoxInterpolate->GetValue() );
_wxvtkmpr3Dview->Refresh();
- wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121); // Refresh
+ wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121); // Refresh
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
_wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+#else
+ _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
}
//-------------------------------------------------------------------
_wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->SetOpacityAxis( _opacityAxis->GetValue()/100.0 );
_wxvtkmpr3Dview->Refresh();
wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121); // Refresh
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
_wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+#else
+ _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
}