*/
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+
//===========================================================================
/// Declares a vtkImageAlgorithm-inherited AtomicBlackBox input
-#define BBTK_DECLARE_VTK_IMAGE_ALGORITHM_INPUT(NAME,TYPE) \
- public: \
- TYPE bbGetInput##NAME () \
- { if (mVtkObject) return mVtkObject->GetImageDataInput(0); return 0; } \
- void bbSetInput##NAME (TYPE d) \
- { if (mVtkObject) mVtkObject->SetInput( (vtkDataObject*) d); }
+ #define BBTK_DECLARE_VTK_IMAGE_ALGORITHM_INPUT(NAME,TYPE) \
+ public: \
+ TYPE bbGetInput##NAME () \
+ { if (mVtkObject) return mVtkObject->GetImageDataInput(0); return 0; } \
+ void bbSetInput##NAME (TYPE d) \
+ { if (mVtkObject) mVtkObject->SetInput( (vtkDataObject*) d); }
+#else
+//===========================================================================
+/// Declares a vtkImageAlgorithm-inherited AtomicBlackBox input
+ #define BBTK_DECLARE_VTK_IMAGE_ALGORITHM_INPUT(NAME,TYPE) \
+ public: \
+ TYPE bbGetInput##NAME () \
+ { if (mVtkObject) return mVtkObject->GetImageDataInput(0); return 0; } \
+ void bbSetInput##NAME (TYPE d) \
+ { if (mVtkObject) mVtkObject->SetInputData( (vtkDataObject*) d); }
+
+#endif
+
//===========================================================================
//===========================================================================
//===========================================================================
+
+//EED 2017-01-01 Migration VTK7
+
+#if (VTK_MAJOR_VERSION <= 5)
+
/// Declares a vtkAlgorithm-inherited AtomicBlackBox input
#define BBTK_DECLARE_VTK_INPUT(NAME,TYPE) \
public: \
void bbSetInput##NAME (TYPE d) \
{ if (mVtkObject) mVtkObject->SetInput( (vtkDataObject*) d); }
+#endif
+
+
+
+#if (VTK_MAJOR_VERSION >= 6)
+
+/// Declares a vtkAlgorithm-inherited AtomicBlackBox input
+#define BBTK_DECLARE_VTK_INPUT(NAME,TYPE) \
+ public: \
+ TYPE bbGetInput##NAME () \
+ { if (mVtkObject) return dynamic_cast<TYPE>(mVtkObject->GetInput()); \
+ return 0;} \
+ void bbSetInput##NAME (TYPE d) \
+ { if (mVtkObject) mVtkObject->SetInputData( (vtkDataObject*) d); }
+
+#endif
+
+
//===========================================================================
//===========================================================================
sizeZ = 1;
vtkImageData *newImage = vtkImageData::New();
newImage->Initialize();
- newImage->SetScalarTypeToUnsignedChar();
newImage->SetSpacing( 1,1,1 );
newImage->SetDimensions( sizeX,sizeY,sizeZ );
- newImage->SetWholeExtent(0, sizeX-1,0,sizeY-1,0,sizeZ-1 );
newImage->SetExtent(0, sizeX-1,0,sizeY-1,0,sizeZ-1 );
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+ newImage->SetWholeExtent(0, sizeX-1,0,sizeY-1,0,sizeZ-1 );
+ newImage->SetScalarTypeToUnsignedChar();
newImage->SetNumberOfScalarComponents(1);
newImage->AllocateScalars();
newImage->Update();
+#else
+ newImage->AllocateScalars(VTK_UNSIGNED_CHAR,1);
+#endif
+
memset ( (void*)newImage->GetScalarPointer(), 0, sizeX*sizeY*1 );
for (i=0; i<sizeX; i++)
{
VTKImageToImageFilter<TOutputImage>
::SetInput( vtkImageData * inputImage )
{
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
m_Exporter->SetInput( inputImage );
+#else
+ m_Exporter->SetInputData( inputImage );
+#endif
}
<process>
<PRE>
+
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
bbGetVtkObject()->SetInput(bbGetInputIn1());
bbGetVtkObject()->SetInput(bbGetInputIn2());
bbGetVtkObject()->SetInput(bbGetInputIn3());
bbGetVtkObject()->SetInput(bbGetInputIn4());
bbGetVtkObject()->SetInput(bbGetInputIn5());
+#else
+ bbGetVtkObject()->SetInputData(bbGetInputIn1());
+ bbGetVtkObject()->SetInputData(bbGetInputIn2());
+ bbGetVtkObject()->SetInputData(bbGetInputIn3());
+ bbGetVtkObject()->SetInputData(bbGetInputIn4());
+ bbGetVtkObject()->SetInputData(bbGetInputIn5());
+#endif
+
bbGetVtkObject()->Update();
</PRE>
int dim[3];
int ext[6];
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
bbGetInputImageFix()->GetWholeExtent(ext);
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ bbGetInputImageFix()->GetExtent(ext);
+#endif
dim[0]= ext[1]-ext[0]+1;
dim[1]= ext[3]-ext[2]+1;
dim[2]= ext[5]-ext[4]+1;
{
_imageoutput = vtkImageData::New();
_imageoutput->Initialize();
- _imageoutput->SetScalarType( bbGetInputImageFix()->GetScalarType() );
_imageoutput->SetSpacing( bbGetInputImageFix()->GetSpacing() );
_imageoutput->SetDimensions( dim[0], dim[1], dim[2] );
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
+ _imageoutput->SetScalarType( bbGetInputImageFix()->GetScalarType() );
_imageoutput->AllocateScalars();
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ _imageoutput->AllocateScalars(bbGetInputImageFix()->GetScalarType() , 1);
+#endif
}
if (bbGetInputType()==1)
{
int j,k;
int px,py,pz;
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
bbGetInputImageMove()->GetWholeExtent(ext);
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ bbGetInputImageMove()->GetExtent(ext);
+#endif
+
int dimMoveX = ext[1]-ext[0]+1;
int dimMoveY = ext[3]-ext[2]+1;
int dimMoveZ = ext[5]-ext[4]+1;
double ranges[2];
vtkImageData *image = bbGetInputIn();
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
image->Update();
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ // ..
+#endif
image->GetScalarRange(ranges);
scale = 255/(ranges[1]/100);
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
mCast->SetInput( bbGetInputIn() );
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ mCast->SetInputData( bbGetInputIn() );
+#endif
mCast->SetScale( scale / 100.0 );
//mCast->SetShift( -bbGetInputShift() );
mMapper = vtkVolumeRayCastMapper::New();
mMapper->SetVolumeRayCastFunction(mMIP);
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
mMapper->SetInput(mCast->GetOutput()); // (smoother.GetOutput())
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ mMapper->SetInputData(mCast->GetOutput()); // (smoother.GetOutput())
+#endif
mVolume = vtkVolume::New();
mVolume->SetMapper(mMapper);
vGreenToRedLut->Build();
//Input Data
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
vVecMagnitude->SetInput(bbGetInputIn());
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ vVecMagnitude->SetInputData(bbGetInputIn());
+#endif
+
vVecMagnitude->NormalizeOff();
vVecMagnitude->Update();
vVecMagnitude->GetOutput()->GetScalarRange( range1 );
vVecMagnitude->Update();
//Glyph
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
vMaskPoint->SetInput(bbGetInputIn());
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ vMaskPoint->SetInputData(bbGetInputIn());
+#endif
+
vMaskPoint->SetOnRatio(100);
vMaskPoint->Update();
vMaskPoint->RandomModeOn();
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
vGlyph->SetInput(vMaskPoint->GetOutput());
vGlyph->SetSource(cone->GetOutput());
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ vGlyph->SetInputData(vMaskPoint->GetOutput());
+ vGlyph->SetSourceData(cone->GetOutput());
+#endif
+
vGlyph->SetScaleModeToScaleByVector();
vGlyph->SetColorModeToColorByVector();
vGlyph->SetScaleFactor(0.20);
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
vGlyphMapper->SetInput( vGlyph->GetOutput() );
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ vGlyphMapper->SetInputData( vGlyph->GetOutput() );
+#endif
+
step = (range1[1]-range1[0])/10;
//Contour
dRangeColorForMultipleContourVelocity[1]=1;
dRangeColorForGlyphVelocity[0]=0;
dRangeColorForGlyphVelocity[1]=1;
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
vMultipleContourVelocity->SetInput((vtkDataSet *) vVecMagnitude->GetOutput());
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ vMultipleContourVelocity->SetInputData((vtkDataSet *) vVecMagnitude->GetOutput());
+#endif
index = 0;
double h;
index+=1;
}
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
vMultipleContourMapper->SetInput( vMultipleContourVelocity->GetOutput() );
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ vMultipleContourMapper->SetInputData( vMultipleContourVelocity->GetOutput() );
+#endif
+
vMultipleContourMapper->SetScalarRange( range1 );
vMultipleContourMapper->SetLookupTable( vGreenToRedLut );
vMultipleContourMapper->Update();
vGlyphMapper->ImmediateModeRenderingOn();
//Outline Grid
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
vOutlineGrid->SetInput( bbGetInputIn() );
vOutlineMapper->SetInput(vOutlineGrid->GetOutput());
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ vOutlineGrid->SetInputData( bbGetInputIn() );
+ vOutlineMapper->SetInputData(vOutlineGrid->GetOutput());
+#endif
+
//Outline Grid Actor
vOutlineActor->SetMapper(vOutlineMapper);
//End: Change values by the user
///////////////////////////////////////////////////////////////////////////////////////////////////
//The Plane Widget
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
vPlaneWidget->SetInput(bbGetInputIn());
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ vPlaneWidget->SetInputData(bbGetInputIn());
+#endif
vPlaneWidget->NormalToXAxisOn();
vPlaneWidget->NormalToZAxisOn();
vPlaneWidget->SetResolution(1);
vPlaneWidget->On();
vPlaneWidget->GetOrigin(p0);
- vPlaneWidget->GetCenter(c); //These is from Execute Method
+ vPlaneWidget->GetCenter(c); //These is fromvtkImageMathematics Execute Method
vPlaneWidget->GetNormal(n);
vPlaneWidget->GetPoint1(p1);
vPlaneWidget->GetPoint2(p2);
vDiskSourceEED->SetCircumferentialResolution (20);
//Stream Lines
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
vPointWidget->SetInput( bbGetInputIn() );
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ vPointWidget->SetInputData( bbGetInputIn() );
+#endif
+
vPointWidget->AllOff();
vPointWidget->PlaceWidget();
//vPointWidget->SetInteractor(vIren);
source->SetCenter( c );
source->SetRadius(5.0);
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
streamer->SetInput( bbGetInputIn() );
streamer->SetSource(source->GetOutput());
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ streamer->SetInputData( bbGetInputIn() );
+ streamer->SetSourceData(source->GetOutput());
+#endif
+
streamer->SetIntegratorTypeToRungeKutta45();
streamer->SetMaximumPropagation(500000);
//EED streamer->SetMaximumPropagationUnitToTimeUnit ();
//EED streamer->ComputeVorticityOn ();
streamer->Update();
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
rf->SetInput(streamer->GetOutput());
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ rf->SetInputData(streamer->GetOutput());
+#endif
+
rf->SetRadius(.5);
rf->SetNumberOfSides(12);
rf->SetVaryRadiusToVaryRadiusOff();
streamer->GetOutput()->GetScalarRange( range );
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
streamMapper2->SetInput(rf->GetOutput());
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ streamMapper2->SetInputData(rf->GetOutput());
+#endif
+
streamMapper2->SetLookupTable(vGreenToRedLut);
//vStreamlineActor2->SetMapper( streamMapper2 );
//End: Part of the Execute Method
//////////////////////////////////////////////////////////////////////////////////////
- vtransformpolydatafilter->SetInput( vDiskSourceEED->GetOutput() );
vtransformpolydatafilter->SetTransform( transformEED );
- vtransformpolydatafilter->Update();
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
+ vtransformpolydatafilter->SetInput( vDiskSourceEED->GetOutput() );
vProbeslices->SetInput( ( vtkDataSet* )vtransformpolydatafilter->GetOutput());
vProbeslices->SetSource( bbGetInputIn() );
- vProbeslices->Update( );
-
vGlyphFlowPlane->SetInput(vProbeslices->GetOutput());
vGlyphFlowPlane->SetSource(vArrowSource->GetOutput());
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ vtransformpolydatafilter->SetInputData( vDiskSourceEED->GetOutput() );
+ vProbeslices->SetInputData( ( vtkDataSet* )vtransformpolydatafilter->GetOutput());
+ vProbeslices->SetSourceData( bbGetInputIn() );
+ vGlyphFlowPlane->SetInputData(vProbeslices->GetOutput());
+ vGlyphFlowPlane->SetSourceData(vArrowSource->GetOutput());
+#endif
+
+ vtransformpolydatafilter->Update();
+ vProbeslices->Update( );
+
+
vGlyphFlowPlane->SetScaleModeToScaleByVector();
vGlyphFlowPlane->SetColorModeToColorByVector();
vGlyphFlowPlane->SetScaleFactor(0.2);
vGlyphFlowPlane->Update();
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
vProbeslicesFlowWidget->SetInput( ( vtkDataSet* )vPlanSource->GetOutput());
vProbeslicesFlowWidget->SetSource( vVecMagnitude->GetOutput() );
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ vProbeslicesFlowWidget->SetInputData( ( vtkDataSet* )vPlanSource->GetOutput());
+ vProbeslicesFlowWidget->SetSourceData( vVecMagnitude->GetOutput() );
+#endif
+
vProbeslicesFlowWidget->Update( );
vVecMagnitude->GetOutput()->GetScalarRange( range );
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
vAppendDataForFlowWidgetVisualisation->AddInput(vGlyphFlowPlane->GetOutput());
vAppendDataForFlowWidgetVisualisation->AddInput(vProbeslicesFlowWidget->GetPolyDataOutput());
-
vSliceMapper->SetInput( vAppendDataForFlowWidgetVisualisation->GetOutput());
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ vAppendDataForFlowWidgetVisualisation->AddInputData(vGlyphFlowPlane->GetOutput());
+ vAppendDataForFlowWidgetVisualisation->AddInputData(vProbeslicesFlowWidget->GetPolyDataOutput());
+ vSliceMapper->SetInputData( vAppendDataForFlowWidgetVisualisation->GetOutput());
+#endif
+
vSliceMapper->SetScalarRange( range );
vSliceMapper->SetLookupTable( vGreenToRedLut );
// * TYPE is the C++ type of the input/output
// (the one provided in the attribute 'type' of the tag 'input')
-printf("EED MaskPoint::Process Start\n");
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
maskpoints->SetInput( bbGetInputIn() );
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ maskpoints->SetInputData( bbGetInputIn() );
+#endif
+
maskpoints->SetOnRatio( bbGetInputRatio() );
maskpoints->RandomModeOn();
maskpoints->SetMaximumNumberOfPoints(5000);
maskpoints->Update();
bbSetOutputOut( maskpoints->GetOutput() );
-printf("EED MaskPoint::Process End\n");
}
//=====
// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
<process><PRE>
vtkMetaImageWriter* w = vtkMetaImageWriter::New();
+
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
bbGetInputIn()->Update();
+#else
+ // ...
+#endif
/*
if (bbGetInputIn() == 0)
if (bbGetInputIn()!=NULL)
{
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
w->SetInput(bbGetInputIn());
+#else
+ w->SetInputData(bbGetInputIn());
+#endif
w->SetCompression(bbGetInputCompression());
w->SetFileDimensionality(bbGetInputIn()->GetDataDimension()); // NTU
std::string userGivenName = bbGetInputFilename();
plane->SetNormal(normal[0],normal[1],normal[2]);
vtkClipPolyData* clipper = vtkClipPolyData::New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
clipper->SetInputConnection(inPolyData->GetProducerPort());
+#else
+ clipper->SetInputData(inPolyData);
+#endif
+
clipper->SetClipFunction(plane);
clipper->Update();
vtkActor *actor = (vtkActor*)bbGetOutputOutActor();
vtkPolyDataMapper *mapper = vtkPolyDataMapper::New();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
mapper->SetInput(informacion);
- actor->SetMapper(mapper);
+#else
+ mapper->SetInputData(informacion);
+#endif
+ actor->SetMapper(mapper);
bbSetOutputOutActor(actor);
if (bbGetInputInColor().size() >= 3)
if (bbGetInputActive()==true)
{
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
polydatamapper->SetInput( bbGetInputIn() );
+#else
+ polydatamapper->SetInputData( bbGetInputIn() );
+#endif
+
vtkactor->GetProperty()->SetRepresentation( bbGetInputRepresentation() );
vtkactor->GetProperty()->SetLineWidth( bbGetInputLineWidth() );
<process><PRE>
- printf("EED PolyDataWriter::Process() %s\n", bbGetInputFilename().c_str());
-
vtkPolyDataWriter* w = vtkPolyDataWriter::New();
if (bbGetInputFileType()==0)
{
} else {
w->SetFileTypeToBinary();
}
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
bbGetInputIn()->Update();
w->SetInput(bbGetInputIn());
+#else
+ w->SetInputData(bbGetInputIn());
+#endif
+
w->SetFileName(bbGetInputFilename().c_str());
w->Update();
w->Write();
vtkDataSetSurfaceFilter* surfaceFilter = vtkDataSetSurfaceFilter::New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
surfaceFilter->SetInput(entrada);
+#else
+ surfaceFilter->SetInputData(entrada);
+#endif
+
surfaceFilter->Update();
//vtkPolyData* polydata = surfaceFilter->GetOutput();
entrada = surfaceFilter->GetOutput();
if (extension.compare("vtk") == 0)
{
vtkPolyDataWriter* writer = vtkPolyDataWriter::New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
writer->SetInput(entrada);
+#else
+ writer->SetInputData(entrada);
+#endif
+
writer->SetFileName(nuevo_nombre.data());
writer->Write();
writer->Delete();
{
vtkXMLPolyDataWriter* writer = vtkXMLPolyDataWriter::New();
writer->SetFileName ( nuevo_nombre.data() );
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
writer->SetInput ( entrada );
+#else
+ writer->SetInputData ( entrada );
+#endif
+
writer->Write();
writer->Delete();
}
{
vtkSTLWriter* writer = vtkSTLWriter::New();
writer->SetFileName ( nuevo_nombre.data() );
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
writer->SetInput ( entrada );
+#else
+ writer->SetInputData ( entrada );
+#endif
+
writer->Write();
writer->Print(std::cout);
writer->Delete();
// * TYPE is the C++ type of the input/output
// (the one provided in the attribute 'type' of the tag 'input')
-printf("EED ProbeFilter::Process() Start\n");
-
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
_probefilter->SetSource( bbGetInputSource() );
_probefilter->SetInput( bbGetInputInput() );
+#else
+ _probefilter->SetSourceData( bbGetInputSource() );
+ _probefilter->SetInputData( bbGetInputInput() );
+#endif
+
_probefilter->Update();
bbSetOutputOut( _probefilter->GetOutput() );
-printf("EED ProbeFilter::Process() End\n");
-
}
//=====
// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
shift= A + (range[1]*newdifrange/difrange);
} // if type 3
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
filter1->SetInput( bbGetInputIn() );
+#else
+ filter1->SetInputData( bbGetInputIn() );
+#endif
+
filter1->SetOutputScalarType( VTK_DOUBLE );
filter1->SetShift( 0 );
filter1->SetScale( scale );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
filter2->SetInput( filter1->GetOutput() );
+#else
+ filter2->SetInputData( filter1->GetOutput() );
+#endif
+
filter2->SetOutputScalarType( outputformat );
filter2->SetShift( shift );
filter2->SetScale( 1 );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
mchange->SetInput( filter2->GetOutput() );
+#else
+ mchange->SetInputData( filter2->GetOutput() );
+#endif
+
mchange->SetExtentTranslation( -ext[0], -ext[2], -ext[4] );
mchange->SetOutputSpacing (spc);
mchange->Update(); //important
{
thresh2 = vtkImageThreshold::New();
- thresh2->SetInValue(255);
- thresh2->SetOutputScalarTypeToUnsignedChar();
+ thresh2->SetInValue(255);
+ thresh2->SetOutputScalarTypeToUnsignedChar();
connect2 = vtkImageSeedConnectivity::New();
- connect2->SetInput(thresh2->GetOutput());
- connect2->SetInputConnectValue(255);
- connect2->SetOutputConnectedValue( 255 );
- connect2->SetOutputUnconnectedValue(0);
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+ connect2->SetInput(thresh2->GetOutput());
+#else
+ connect2->SetInputData(thresh2->GetOutput());
+#endif
+
+ connect2->SetInputConnectValue(255);
+ connect2->SetOutputConnectedValue( 255 );
+ connect2->SetOutputUnconnectedValue(0);
cast4 = vtkImageCast::New();
- cast4->SetInput(connect2->GetOutput());
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+ cast4->SetInput(connect2->GetOutput());
+#else
+ cast4->SetInputData(connect2->GetOutput());
+#endif
// EED 2016 06 15
{
int outputformat = bbtkStaticLecture::GetTypeFormat( bbGetInputOutputFormat() , bbGetInputIn() );
vtkImageData *imagedata = bbGetInputIn();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
imagedata->UpdateInformation();
imagedata->SetUpdateExtent(imagedata->GetWholeExtent());
imagedata->Update();
- thresh2->ThresholdBetween(3000, 3001);
thresh2->SetInput(imagedata);
+#else
+ imagedata->SetExtent(imagedata->GetExtent());
+ thresh2->SetInputData(imagedata);
+#endif
+
+ thresh2->ThresholdBetween(3000, 3001);
thresh2->ThresholdBetween(bbGetInputThresholdMinMax()[0], bbGetInputThresholdMinMax()[1]);
thresh2->Modified();
thresh2->Update();
connect2->RemoveAllSeeds ();
int ext[6];
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
imagedata->GetWholeExtent(ext);
+#else
+ imagedata->GetExtent(ext);
+#endif
+
int maxX = ext[1]-ext[0]+1;
int maxY = ext[3]-ext[2]+1;
int maxZ = ext[5]-ext[4]+1;
final = vtkImageData::New();
final->SetSpacing(space);
final->SetDimensions(newDim);
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
final->SetScalarType(scalar_type);
final->AllocateScalars();
final->Update();
-
+#else
+ final->AllocateScalars(scalar_type,1);
+#endif
}
}
caster = vtkImageCast::New();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
caster->SetInput(final);
+#else
+ caster->SetInputData(final);
+#endif
+
caster->SetOutputScalarTypeToShort();
caster->Update();
newSphere -> SetPhiResolution(20);
newSphere -> SetRadius( 1 );
vtkPolyDataMapper * newMapper = vtkPolyDataMapper::New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
newMapper -> SetInput( newSphere -> GetOutput() );
+#else
+ newMapper -> SetInputData( newSphere -> GetOutput() );
+#endif
+
vtkActor * newActor = vtkActor::New();
sphereActor.push_back(newActor);
newActor -> SetMapper(newMapper);
{
spr -> SetFileName( bbGetInputIn().c_str() );
sp = spr->GetOutput();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
sp -> Update();
+#else
+ spr -> Update();
+#endif
bbSetOutputOut( sp );
} else {
bbSetOutputOut( NULL );
// bbSetOutputOut( bbGetInputIn() );
// std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
-printf("EED SurfaceTexture::Process Start\n");
int i;
double spc[3];
int ext[6];
bbGetInputImage()->GetSpacing(spc);
bbGetInputImage()->GetScalarRange(range);
+
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
bbGetInputImage()->GetWholeExtent(ext);
+#else
+ bbGetInputImage()->GetExtent(ext);
+#endif
+
int maxX = ext[1]-ext[0]+1;
int maxY = ext[3]-ext[2]+1;
int maxZ = ext[5]-ext[4]+1;
{
int ext[6];
int sizeX,sizeY,sizeZ;
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
bbGetInputIn()->GetWholeExtent(ext);
+#else
+ bbGetInputIn()->GetExtent(ext);
+#endif
+
sizeX=ext[1]-ext[0]+1;
sizeY=ext[3]-ext[2]+1;
sizeZ=ext[5]-ext[4]+1;
int outputdims[3];
imageIn->GetDimensions (inputdims);
unsigned short *input = (unsigned short *)(imageIn->GetScalarPointer());
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
imageIn->Update();
+#else
+ // ..
+#endif
unsigned int div = (unsigned int)ceil(sqrt( (double)numberOfImagesInMosaic ) );
outputdims[0] = inputdims[0] / div;
vtkImageOut = vtkImageData::New();
vtkImageOut->SetDimensions( outputdims );
vtkImageOut->SetExtent(0,outputdims[0]-1,0,outputdims[1]-1,0,outputdims[2]-1);
- vtkImageOut->SetWholeExtent(0,outputdims[0]-1,0,outputdims[1]-1,0,outputdims[2]-1);
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+ vtkImageOut->SetWholeExtent(0,outputdims[0]-1,0,outputdims[1]-1,0,outputdims[2]-1);
vtkImageOut->SetNumberOfScalarComponents(1);
//vtkImageOut->SetSpacing( blabla );
vtkImageOut->SetScalarType( VTK_UNSIGNED_SHORT );
vtkImageOut->AllocateScalars();
vtkImageOut->Update();
+#else
+ vtkImageOut->AllocateScalars(VTK_UNSIGNED_SHORT,1);
+#endif
+
+
+
unsigned short *output =(unsigned short *)(vtkImageOut->GetScalarPointer());
return;
}
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
ope->SetInput1((vtkDataObject*)bbGetInputIn1());
+#else
+ ope->SetInput1Data((vtkDataObject*)bbGetInputIn1());
+#endif
switch (bbGetInputOperation())
for (i=0 ; i<size ; i++)
{
vtkimagegaussiansmooth = vtkImageGaussianSmooth::New();
+
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
vtkimagegaussiansmooth->SetInput( bbGetInputIn()[i] );
+#else
+ vtkimagegaussiansmooth->SetInputData( bbGetInputIn()[i] );
+#endif
+
vtkimagegaussiansmooth->SetStandardDeviation( stdvX,stdvY, stdvZ );
vtkimagegaussiansmooth->Modified();
vtkimagegaussiansmooth->Update();
polydatamapper = vtkPolyDataMapper::New();
vtkactor = vtkActor::New();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
polydatamapper->SetInput(marchingcubes->GetOutput());
+#else
+ polydatamapper->SetInputData(marchingcubes->GetOutput());
+#endif
+
vtkactor->SetMapper(polydatamapper);
polydatamapper->ScalarVisibilityOff();
marchingcubes=VecMarchingcubes[i];
vtkactor=(vtkActor*)VecVtkactor[i];
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
marchingcubes->SetInput( bbGetInputIn()[i] );
+#else
+ marchingcubes->SetInputData( bbGetInputIn()[i] );
+#endif
+
marchingcubes->SetValue(0, bbGetInputIsovalue() );
marchingcubes->Update();
bool changed = false;
if ( bbGetInputStatus("In") != bbtk::UPTODATE )
{
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
mMapper->SetInput( bbGetInputIn() );
+#else
+ mMapper->SetInputData( bbGetInputIn() );
+#endif
changed = true;
}
mDefaultImage->SetDimensions ( dim );
mDefaultImage->SetSpacing(1,1,1);
mDefaultImage->SetExtent(0,dim[0]-1,0,dim[1]-1,0,dim[2]-1);
- mDefaultImage->SetWholeExtent(0,dim[0]-1,0,dim[1]-1,0,dim[2]-1);
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+ mDefaultImage->SetWholeExtent(0,dim[0]-1,0,dim[1]-1,0,dim[2]-1);
mDefaultImage->SetScalarTypeToUnsignedChar();
- mDefaultImage->AllocateScalars();
+ mDefaultImage->AllocateScalars();
+#else
+ mDefaultImage->AllocateScalars(VTK_UNSIGNED_CHAR,1);
+#endif
+
for (int i=0;i<dim[0];i++)
for (int j=0;j<dim[1];j++)
for (int k=0;k<dim[2];k++)
if (backImageData != mBox->bbGetInputIn()) // Don't update if just Slice changed
{
backImageData = mBox->bbGetInputIn();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
backImageData->Update();
+#else
+ // ..
+#endif
imageViewer->SetInput( backImageData );
mUpdateCamera = true;
}
{
int z = mBox->bbGetInputSlice();
int ext[6];
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
backImageData->GetWholeExtent(ext);
+#else
+ backImageData->GetExtent(ext);
+#endif
+
/*
std::cout << "ext = "<<ext[0]<<" - "<<ext[1]<<" ; "
<<ext[2]<<" - "<<ext[3]<<" ; "
EVT_SIZE (wxVTKRenderWindowInteractor::OnSize)
END_EVENT_TABLE()
-vtkCxxRevisionMacro(wxVTKRenderWindowInteractor, "$Revision: 1.5 $")
+
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+ vtkCxxRevisionMacro(wxVTKRenderWindowInteractor, "$Revision: 1.5 $")
+#else
+ //...
+#endif
+
vtkInstantiatorNewMacro(wxVTKRenderWindowInteractor)
//---------------------------------------------------------------------------
const wxSize &size = wxDefaultSize,
long style = wxWANTS_CHARS | wxNO_FULL_REPAINT_ON_RESIZE,
const wxString &name = wxPanelNameStr);
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
vtkTypeRevisionMacro(wxVTKRenderWindowInteractor,vtkRenderWindowInteractor);
+#else
+ vtkTypeMacro(wxVTKRenderWindowInteractor,vtkRenderWindowInteractor);
+#endif
+
static wxVTKRenderWindowInteractor * New();
void PrintSelf(ostream& os, vtkIndent indent);
#include "vtkRenderWindowInteractor.h"
#include "vtkRenderer.h"
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
vtkCxxRevisionMacro(wxvtkImageViewer2, "$Revision: 1.8 $");
+#else
+ //...
+#endif
+
vtkStandardNewMacro(wxvtkImageViewer2);
//----------------------------------------------------------------------------
vtkImageData *input = this->GetInput();
if (input)
{
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
input->UpdateInformation();
int *w_ext = input->GetWholeExtent();
+#else
+ int *w_ext = input->GetExtent();
+#endif
+
min = w_ext[this->SliceOrientation * 2];
max = w_ext[this->SliceOrientation * 2 + 1];
}
vtkImageData *input = this->GetInput();
if (input)
{
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
input->UpdateInformation();
+printf("EED Warning wxvtkImageViewer2::GetSliceRange GetWholeExtent()[2] ??? /n");
return input->GetWholeExtent() + this->SliceOrientation * 2;
+#else
+printf("EED Warning wxvtkImageViewer2::GetSliceRange GetExtent()[2] ??? /n");
+ return input->GetExtent() + this->SliceOrientation * 2;
+#endif
}
return NULL;
}
}
// std::cout << "--- wxvtkImageViewer2::UpdateDisplayExtent()"<<std::endl;
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
input->UpdateInformation();
int *w_ext = input->GetWholeExtent();
+#else
+ int *w_ext = input->GetExtent();
+#endif
// std::cout << "ext = "
// <<w_ext[0]<<" - "<<w_ext[1]<<" ; "
if (event == vtkCommand::ResetWindowLevelEvent)
{
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
this->IV->GetInput()->UpdateInformation();
this->IV->GetInput()->SetUpdateExtent
(this->IV->GetInput()->GetWholeExtent());
this->IV->GetInput()->Update();
+#else
+ //...
+#endif
+
double *range = this->IV->GetInput()->GetScalarRange();
this->IV->SetColorWindow(range[1] - range[0]);
this->IV->SetColorLevel(0.5 * (range[1] + range[0]));
if (this->ImageActor && this->WindowLevel)
{
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
this->ImageActor->SetInput(this->WindowLevel->GetOutput());
+#else
+ this->ImageActor->SetInputData(this->WindowLevel->GetOutput());
+#endif
}
}
{
if (this->ImageActor)
{
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
this->ImageActor->SetInput(NULL);
+#else
+ this->ImageActor->SetInputData(NULL);
+#endif
}
if (this->Renderer && this->ImageActor)
input)
{
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
input->UpdateInformation();
int *w_ext = input->GetWholeExtent();
+#else
+ int *w_ext = input->GetExtent();
+#endif
+
int xs = 0, ys = 0;
// std::cout << "wxvtkImageViewer2::Render ext = "
void wxvtkImageViewer2::SetInput(vtkImageData *in)
{
// std::cout << "### wxvtkImageViewer2::SetInput"<<std::endl;
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
this->WindowLevel->SetInput(in);
+#else
+ this->WindowLevel->SetInputData(in);
+#endif
+
this->UpdateDisplayExtent();
// LG 03/12/08
// FirstRender = 1;
{
public:
static wxvtkImageViewer2 *New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
vtkTypeRevisionMacro(wxvtkImageViewer2,vtkObject);
+#else
+ vtkTypeMacro(wxvtkImageViewer2,vtkObject);
+#endif
+
void PrintSelf(ostream& os, vtkIndent indent);
// Description: