From 4ea36770118ff350051d9d5eaf53c3a8de78a77d Mon Sep 17 00:00:00 2001 From: Berk Geveci <berk.geveci@kitware.com> Date: Thu, 9 Jun 2011 16:29:59 -0400 Subject: [PATCH] Replace SetInput etc. with SetInputData etc. Since the behaviour of SetInput changed - it no longer connects the pipeline but sets up the data object as the input -, it was decided to rename it to SetInputData. This includes similar methods such as AddInputData. This commit makes on sweeping change that compiles. --- Charts/Testing/Cxx/TestBarGraph.cxx | 6 +- Charts/Testing/Cxx/TestBarGraphHorizontal.cxx | 6 +- Charts/Testing/Cxx/TestHistogram2D.cxx | 2 +- Charts/Testing/Cxx/TestLinePlot.cxx | 6 +- .../Testing/Cxx/TestLinePlotInteraction.cxx | 6 +- .../Cxx/TestMultipleChartRenderers.cxx | 6 +- Charts/Testing/Cxx/TestMultipleRenderers.cxx | 6 +- .../Testing/Cxx/TestParallelCoordinates.cxx | 2 +- Charts/Testing/Cxx/TestPieChart.cxx | 2 +- Charts/Testing/Cxx/TestPlotMatrix.cxx | 12 +- Charts/Testing/Cxx/TestScatterPlot.cxx | 6 +- Charts/Testing/Cxx/TestScientificPlot.cxx | 6 +- Charts/Testing/Cxx/TestStackedBarGraph.cxx | 4 +- Charts/Testing/Cxx/TestStackedPlot.cxx | 2 +- Charts/vtkChartHistogram2D.cxx | 4 +- Charts/vtkChartHistogram2D.h | 2 +- Charts/vtkContextMapper2D.cxx | 14 +-- Charts/vtkContextMapper2D.h | 2 +- Charts/vtkOpenGL2ContextDevice2D.cxx | 2 +- Charts/vtkOpenGLContextDevice2D.cxx | 4 +- Charts/vtkPlot.cxx | 20 ++-- Charts/vtkPlot.h | 8 +- Charts/vtkPlotHistogram2D.cxx | 2 +- Charts/vtkPlotHistogram2D.h | 6 +- Charts/vtkPlotParallelCoordinates.cxx | 6 +- Charts/vtkPlotParallelCoordinates.h | 8 +- Filtering/CMakeLists.txt | 2 - .../Testing/Cxx/TestImageDataFindCell.cxx | 2 +- .../Cxx/TestImageDataToStructuredGrid.cxx | 2 +- Filtering/vtkAlgorithm.cxx | 37 +++++- Filtering/vtkAlgorithm.h | 10 +- Filtering/vtkAnnotationLayersAlgorithm.cxx | 13 +-- Filtering/vtkAnnotationLayersAlgorithm.h | 14 +-- Filtering/vtkArrayDataAlgorithm.cxx | 13 +-- Filtering/vtkArrayDataAlgorithm.h | 34 +++--- Filtering/vtkCompositeDataPipeline.cxx | 12 +- Filtering/vtkCompositeDataSet.cxx | 22 ---- Filtering/vtkCompositeDataSet.h | 4 - Filtering/vtkCompositeDataSetAlgorithm.cxx | 16 +-- Filtering/vtkCompositeDataSetAlgorithm.h | 14 +-- Filtering/vtkDataObject.cxx | 80 ------------- Filtering/vtkDataObject.h | 29 ----- Filtering/vtkDataObjectAlgorithm.cxx | 28 ++--- Filtering/vtkDataObjectAlgorithm.h | 25 ++-- Filtering/vtkDataSetAlgorithm.cxx | 45 +++----- Filtering/vtkDataSetAlgorithm.h | 33 +++--- Filtering/vtkDemandDrivenPipeline.cxx | 8 -- Filtering/vtkDirectedGraphAlgorithm.cxx | 13 +-- Filtering/vtkDirectedGraphAlgorithm.h | 14 +-- Filtering/vtkExecutive.cxx | 49 ++++---- Filtering/vtkExecutive.h | 4 +- Filtering/vtkGraphAlgorithm.cxx | 17 +-- Filtering/vtkGraphAlgorithm.h | 25 ++-- .../vtkHierarchicalBoxDataSetAlgorithm.cxx | 16 +-- .../vtkHierarchicalBoxDataSetAlgorithm.h | 14 +-- Filtering/vtkHyperOctreeAlgorithm.cxx | 72 ++---------- Filtering/vtkHyperOctreeAlgorithm.h | 33 ++---- Filtering/vtkImageAlgorithm.cxx | 69 +++++------ Filtering/vtkImageAlgorithm.h | 32 +++--- Filtering/vtkImageData.cxx | 31 ++--- Filtering/vtkImageData.h | 12 +- Filtering/vtkImageInPlaceFilter.cxx | 2 +- Filtering/vtkImageToStructuredPoints.cxx | 4 +- Filtering/vtkImageToStructuredPoints.h | 2 +- Filtering/vtkMultiBlockDataSetAlgorithm.cxx | 16 +-- Filtering/vtkMultiBlockDataSetAlgorithm.h | 14 +-- Filtering/vtkPassInputTypeAlgorithm.cxx | 29 ++--- Filtering/vtkPassInputTypeAlgorithm.h | 29 ++--- Filtering/vtkPiecewiseFunctionAlgorithm.cxx | 30 ++--- Filtering/vtkPiecewiseFunctionAlgorithm.h | 25 ++-- Filtering/vtkPointSetAlgorithm.cxx | 45 +++----- Filtering/vtkPointSetAlgorithm.h | 33 +++--- Filtering/vtkPolyDataAlgorithm.cxx | 74 ++---------- Filtering/vtkPolyDataAlgorithm.h | 38 ++---- Filtering/vtkRectilinearGridAlgorithm.cxx | 75 ++---------- Filtering/vtkRectilinearGridAlgorithm.h | 30 ++--- Filtering/vtkSelectionAlgorithm.cxx | 13 +-- Filtering/vtkSelectionAlgorithm.h | 14 +-- Filtering/vtkSimpleImageToImageFilter.cxx | 2 +- Filtering/vtkStructuredGridAlgorithm.cxx | 75 ++---------- Filtering/vtkStructuredGridAlgorithm.h | 38 ++---- Filtering/vtkTableAlgorithm.cxx | 13 +-- Filtering/vtkTableAlgorithm.h | 22 +--- Filtering/vtkTemporalDataSetAlgorithm.cxx | 16 +-- Filtering/vtkTemporalDataSetAlgorithm.h | 14 +-- Filtering/vtkThreadedImageAlgorithm.cxx | 3 +- Filtering/vtkTreeAlgorithm.cxx | 12 +- Filtering/vtkTreeAlgorithm.h | 22 +--- Filtering/vtkTrivialProducer.cxx | 5 +- Filtering/vtkUndirectedGraphAlgorithm.cxx | 13 +-- Filtering/vtkUndirectedGraphAlgorithm.h | 22 +--- Filtering/vtkUnstructuredGridAlgorithm.cxx | 75 ++---------- Filtering/vtkUnstructuredGridAlgorithm.h | 38 ++---- .../Testing/Cxx/TestGenericClip.cxx | 2 +- .../Testing/Cxx/TestGenericContourFilter.cxx | 2 +- .../Testing/Cxx/TestGenericCutter.cxx | 2 +- .../Cxx/TestGenericDataSetTessellator.cxx | 2 +- .../Testing/Cxx/TestGenericGeometryFilter.cxx | 2 +- .../Testing/Cxx/TestGenericGlyph3DFilter.cxx | 6 +- .../Testing/Cxx/TestGenericProbeFilter.cxx | 4 +- .../Testing/Cxx/TestGenericStreamTracer.cxx | 6 +- .../Testing/Cxx/TestSmoothErrorMetric.cxx | 2 +- .../Cxx/TestViewDependentErrorMetric.cxx | 6 +- GenericFiltering/vtkGenericGlyph3DFilter.cxx | 39 ++++--- GenericFiltering/vtkGenericGlyph3DFilter.h | 4 +- GenericFiltering/vtkGenericProbeFilter.cxx | 4 +- GenericFiltering/vtkGenericProbeFilter.h | 2 +- GenericFiltering/vtkGenericStreamTracer.cxx | 16 +-- GenericFiltering/vtkGenericStreamTracer.h | 4 +- ...TestCoincidentGeoGraphRepresentation2D.cxx | 2 +- .../Testing/Cxx/TestGeoAssignCoordinates.cxx | 2 +- .../Testing/Cxx/TestGeoView2DPopulation.cxx | 2 +- Geovis/Testing/Cxx/TestGlobeSource.cxx | 4 +- Geovis/vtkCompassRepresentation.cxx | 7 +- Geovis/vtkGeoAlignedImageRepresentation.cxx | 2 +- Geovis/vtkGeoAlignedImageSource.cxx | 12 +- Geovis/vtkGeoFileImageSource.cxx | 6 +- Geovis/vtkGeoImageNode.cxx | 2 +- Geovis/vtkGeoProjectionSource.cxx | 4 +- Geovis/vtkGeoTerrain.cxx | 4 +- Graphics/Testing/Cxx/BoxClipPolyData.cxx | 14 +-- Graphics/Testing/Cxx/BoxClipTetrahedra.cxx | 12 +- Graphics/Testing/Cxx/BoxClipTriangulate.cxx | 6 +- .../Cxx/BoxClipTriangulateAndInterpolate.cxx | 24 ++-- Graphics/Testing/Cxx/MeshQuality.cxx | 2 +- Graphics/Testing/Cxx/RGrid.cxx | 2 +- Graphics/Testing/Cxx/TestActor2DTextures.cxx | 2 +- Graphics/Testing/Cxx/TestAppendSelection.cxx | 4 +- Graphics/Testing/Cxx/TestAssignAttribute.cxx | 4 +- Graphics/Testing/Cxx/TestBSPTree.cxx | 2 +- .../Testing/Cxx/TestBareScalarsToColors.cxx | 2 +- .../Cxx/TestDecimatePolylineFilter.cxx | 6 +- Graphics/Testing/Cxx/TestDelaunay2D.cxx | 2 +- Graphics/Testing/Cxx/TestDensifyPolyData.cxx | 14 +-- Graphics/Testing/Cxx/TestExtractSelection.cxx | 2 +- Graphics/Testing/Cxx/TestExtraction.cxx | 108 +++++++++--------- .../Testing/Cxx/TestGradientAndVorticity.cxx | 8 +- .../Cxx/TestHyperOctreeSurfaceFilter.cxx | 2 +- .../Cxx/TestIconGlyphFilterGravity.cxx | 18 +-- .../Testing/Cxx/TestMapVectorsAsRGBColors.cxx | 2 +- ...TestMeanValueCoordinatesInterpolation1.cxx | 2 +- ...TestMeanValueCoordinatesInterpolation2.cxx | 4 +- Graphics/Testing/Cxx/TestNamedComponents.cxx | 4 +- Graphics/Testing/Cxx/TestPolyhedron0.cxx | 14 +-- Graphics/Testing/Cxx/TestPolyhedron1.cxx | 8 +- Graphics/Testing/Cxx/TestQuadraturePoints.cxx | 8 +- .../Testing/Cxx/TestSelectEnclosedPoints.cxx | 2 +- Graphics/Testing/Cxx/TestTessellator.cxx | 18 +-- .../Testing/Cxx/TestUncertaintyTubeFilter.cxx | 2 +- .../TestUnstructuredGridGeometryFilter.cxx | 2 +- Graphics/Testing/Cxx/expCos.cxx | 2 +- Graphics/vtkAppendCompositeDataLeaves.cxx | 19 +-- Graphics/vtkAppendCompositeDataLeaves.h | 4 - Graphics/vtkAppendFilter.cxx | 18 ++- Graphics/vtkAppendFilter.h | 2 +- Graphics/vtkAppendPolyData.cxx | 39 +++++-- Graphics/vtkAppendPolyData.h | 11 +- Graphics/vtkAppendSelection.cxx | 27 +++-- Graphics/vtkAppendSelection.h | 8 +- Graphics/vtkArrowSource.cxx | 8 +- Graphics/vtkBlankStructuredGridWithImage.cxx | 4 +- Graphics/vtkBlankStructuredGridWithImage.h | 2 +- Graphics/vtkBoxClipDataSet.cxx | 3 - Graphics/vtkClipDataSet.cxx | 2 +- Graphics/vtkCompositeDataGeometryFilter.cxx | 4 +- Graphics/vtkContourFilter.cxx | 3 +- Graphics/vtkConvertSelection.cxx | 8 +- Graphics/vtkCutter.cxx | 6 +- Graphics/vtkDataObjectGenerator.cxx | 1 - Graphics/vtkDataObjectToDataSetFilter.cxx | 2 +- Graphics/vtkDelaunay2D.cxx | 4 +- Graphics/vtkDelaunay2D.h | 2 +- Graphics/vtkDijkstraImageGeodesicPath.cxx | 4 +- Graphics/vtkDijkstraImageGeodesicPath.h | 2 +- Graphics/vtkExtractArraysOverTime.cxx | 4 +- Graphics/vtkExtractSelectedBlock.cxx | 2 +- Graphics/vtkExtractSelectedFrustum.cxx | 2 +- Graphics/vtkExtractSelection.cxx | 15 ++- Graphics/vtkExtractSelectionBase.cxx | 4 +- Graphics/vtkExtractVectorComponents.cxx | 4 +- Graphics/vtkExtractVectorComponents.h | 2 +- Graphics/vtkGlyph3D.cxx | 40 ++++--- Graphics/vtkGlyph3D.h | 4 +- Graphics/vtkGradientFilter.cxx | 4 +- Graphics/vtkMarchingContourFilter.cxx | 10 +- Graphics/vtkMergeDataObjectFilter.cxx | 4 +- Graphics/vtkMergeDataObjectFilter.h | 2 +- Graphics/vtkMergeFilter.cxx | 20 ++-- Graphics/vtkMergeFilter.h | 12 +- Graphics/vtkModifiedBSPTree.cxx | 2 +- Graphics/vtkMultiBlockDataGroupFilter.cxx | 11 +- Graphics/vtkMultiBlockDataGroupFilter.h | 11 +- Graphics/vtkMultiBlockMergeFilter.cxx | 11 +- Graphics/vtkMultiBlockMergeFilter.h | 11 +- Graphics/vtkParametricFunctionSource.cxx | 6 +- Graphics/vtkPolyDataStreamer.cxx | 2 +- Graphics/vtkPolyDataToReebGraphFilter.cxx | 64 ++++------- Graphics/vtkPolyDataToReebGraphFilter.h | 1 - Graphics/vtkProbeFilter.cxx | 4 +- Graphics/vtkProbeFilter.h | 4 +- Graphics/vtkProbePolyhedron.cxx | 4 +- Graphics/vtkProbePolyhedron.h | 4 +- Graphics/vtkProbeSelectedLocations.cxx | 13 ++- Graphics/vtkProgrammableGlyphFilter.cxx | 5 +- Graphics/vtkProgrammableGlyphFilter.h | 2 +- Graphics/vtkQuadricClustering.cxx | 2 +- Graphics/vtkRectilinearGridToTetrahedra.cxx | 2 +- Graphics/vtkReebGraphSimplificationFilter.cxx | 36 ++---- .../vtkReebGraphSurfaceSkeletonFilter.cxx | 4 +- Graphics/vtkReebGraphVolumeSkeletonFilter.cxx | 4 +- Graphics/vtkReflectionFilter.cxx | 2 +- Graphics/vtkSectorSource.cxx | 2 +- Graphics/vtkSelectEnclosedPoints.cxx | 6 +- Graphics/vtkSelectEnclosedPoints.h | 2 +- Graphics/vtkSelectPolyData.cxx | 2 +- Graphics/vtkSelectionSource.cxx | 1 - Graphics/vtkSmoothPolyDataFilter.cxx | 6 +- Graphics/vtkSmoothPolyDataFilter.h | 2 +- Graphics/vtkSpherePuzzle.cxx | 4 +- Graphics/vtkStreamTracer.cxx | 4 +- Graphics/vtkStreamTracer.h | 2 +- Graphics/vtkStreamer.cxx | 4 +- Graphics/vtkStreamer.h | 2 +- Graphics/vtkSubPixelPositionEdgels.cxx | 4 +- Graphics/vtkSubPixelPositionEdgels.h | 2 +- Graphics/vtkTableBasedClipDataSet.cxx | 10 +- Graphics/vtkTemporalPathLineFilter.cxx | 4 +- Graphics/vtkTemporalPathLineFilter.h | 2 +- Graphics/vtkTemporalStatistics.cxx | 6 +- Graphics/vtkTensorGlyph.cxx | 4 +- Graphics/vtkTensorGlyph.h | 2 +- .../vtkUnstructuredGridToReebGraphFilter.cxx | 58 +++------- Graphics/vtkVoxelContoursToSurfaceFilter.cxx | 4 +- Graphics/vtkWindowedSincPolyDataFilter.cxx | 2 +- Hybrid/Testing/Cxx/TestImageDataLIC2D.h | 4 +- Hybrid/Testing/Cxx/TestImageStencilData.cxx | 10 +- Hybrid/Testing/Cxx/TestLabelPlacerExodus.cxx | 2 +- Hybrid/Testing/Cxx/TestLegendScaleActor.cxx | 2 +- Hybrid/Testing/Cxx/TestPolyDataSilhouette.cxx | 4 +- .../Cxx/TestStructuredGridLIC2DSlice.h | 4 +- Hybrid/vtk3DSImporter.cxx | 8 +- Hybrid/vtkAnnotatedCubeActor.cxx | 2 +- Hybrid/vtkAxesActor.cxx | 4 +- Hybrid/vtkAxisActor.cxx | 8 +- Hybrid/vtkBarChartActor.cxx | 2 +- Hybrid/vtkCaptionActor2D.cxx | 20 ++-- Hybrid/vtkCornerAnnotation.cxx | 3 +- Hybrid/vtkExodusReader.cxx | 2 +- Hybrid/vtkFacetReader.cxx | 2 +- Hybrid/vtkImageToPolyDataFilter.cxx | 4 +- Hybrid/vtkImplicitModeller.cxx | 6 +- Hybrid/vtkLSDynaReader.cxx | 2 +- Hybrid/vtkLegendBoxActor.cxx | 20 ++-- Hybrid/vtkLegendScaleActor.cxx | 2 +- Hybrid/vtkMNITransformWriter.cxx | 2 +- Hybrid/vtkPCAAnalysisFilter.cxx | 8 +- Hybrid/vtkPCAAnalysisFilter.h | 4 +- Hybrid/vtkPExodusReader.cxx | 2 +- Hybrid/vtkPieChartActor.cxx | 4 +- Hybrid/vtkPolyDataToImageStencil.cxx | 11 +- Hybrid/vtkPolyDataToImageStencil.h | 2 +- Hybrid/vtkProcrustesAlignmentFilter.cxx | 8 +- Hybrid/vtkProcrustesAlignmentFilter.h | 4 +- Hybrid/vtkProjectedTerrainPath.cxx | 4 +- Hybrid/vtkProjectedTerrainPath.h | 2 +- Hybrid/vtkRIBExporter.cxx | 35 +++--- Hybrid/vtkRenderLargeImage.cxx | 2 +- Hybrid/vtkSpiderPlotActor.cxx | 4 +- Hybrid/vtkStructuredGridLIC2D.cxx | 61 +++------- Hybrid/vtkStructuredGridLIC2D.h | 4 +- Hybrid/vtkTransformToGrid.cxx | 2 +- Hybrid/vtkVRMLImporter.cxx | 12 +- Hybrid/vtkVideoSource.cxx | 7 +- Hybrid/vtkX3DExporter.cxx | 7 +- Hybrid/vtkXYPlotActor.cxx | 16 +-- IO/Testing/Cxx/TestArraySerialization.cxx | 2 +- IO/Testing/Cxx/TestDataObjectIO.cxx | 4 +- IO/Testing/Cxx/TestDataObjectXMLIO.cxx | 4 +- IO/Testing/Cxx/TestHyperOctreeIO.cxx | 2 +- IO/Testing/Cxx/TestMySQLTableReadWrite.cxx | 4 +- IO/Testing/Cxx/TestNetCDFPOPReader.cxx | 2 +- IO/Testing/Cxx/TestPLYReader.cxx | 2 +- .../Cxx/TestPostgreSQLTableReadWrite.cxx | 4 +- IO/Testing/Cxx/TestProStarReader.cxx | 4 +- IO/Testing/Cxx/TestSQLiteTableReadWrite.cxx | 4 +- IO/Testing/Cxx/TestTecplotReader.cxx | 6 +- IO/vtkBMPReader.cxx | 7 +- IO/vtkBMPReader.h | 2 +- IO/vtkCompositeDataReader.cxx | 4 +- IO/vtkCompositeDataWriter.cxx | 2 +- IO/vtkDEMReader.cxx | 2 +- IO/vtkDICOMImageReader.cxx | 5 +- IO/vtkDICOMImageReader.h | 2 +- IO/vtkDataSetReader.cxx | 14 --- IO/vtkDataSetWriter.cxx | 15 +-- IO/vtkGESignaReader.cxx | 5 +- IO/vtkGESignaReader.h | 2 +- IO/vtkGenericDataObjectReader.cxx | 7 +- IO/vtkGenericDataObjectWriter.cxx | 30 ++--- IO/vtkImageReader.cxx | 5 +- IO/vtkImageReader.h | 2 +- IO/vtkImageReader2.cxx | 5 +- IO/vtkImageReader2.h | 2 +- IO/vtkJPEGReader.cxx | 5 +- IO/vtkJPEGReader.h | 2 +- IO/vtkMINCImageReader.cxx | 5 +- IO/vtkMINCImageReader.h | 2 +- IO/vtkMetaImageReader.cxx | 5 +- IO/vtkMetaImageReader.h | 2 +- IO/vtkNetCDFCFReader.cxx | 8 +- IO/vtkNetCDFReader.cxx | 2 +- IO/vtkPNGReader.cxx | 5 +- IO/vtkPNGReader.h | 2 +- IO/vtkSLCReader.cxx | 10 +- IO/vtkSLCReader.h | 2 +- IO/vtkTIFFReader.cxx | 5 +- IO/vtkTIFFReader.h | 2 +- IO/vtkVolume16Reader.cxx | 7 +- IO/vtkWriter.cxx | 16 +-- IO/vtkWriter.h | 4 +- IO/vtkXMLCompositeDataWriter.cxx | 10 +- IO/vtkXMLDataSetWriter.cxx | 19 +-- IO/vtkXMLGenericDataObjectReader.cxx | 2 +- IO/vtkXMLPDataSetWriter.cxx | 16 +-- IO/vtkXMLPImageDataWriter.cxx | 2 +- IO/vtkXMLPPolyDataWriter.cxx | 2 +- IO/vtkXMLPRectilinearGridWriter.cxx | 2 +- IO/vtkXMLPStructuredGridWriter.cxx | 2 +- IO/vtkXMLPUnstructuredGridWriter.cxx | 2 +- IO/vtkXMLWriter.cxx | 16 +-- IO/vtkXMLWriter.h | 9 +- IO/vtkXMLWriterC.cxx | 2 +- Imaging/Testing/Cxx/FastSplatter.cxx | 8 +- Imaging/Testing/Cxx/ImageWeightedSum.cxx | 8 +- Imaging/vtkBooleanTexture.cxx | 6 +- Imaging/vtkBooleanTexture.h | 2 +- Imaging/vtkGaussianSplatter.cxx | 2 +- Imaging/vtkImageAccumulate.cxx | 6 +- Imaging/vtkImageAccumulate.h | 2 +- Imaging/vtkImageAppend.cxx | 5 +- Imaging/vtkImageAppend.h | 11 +- Imaging/vtkImageAppendComponents.cxx | 5 +- Imaging/vtkImageAppendComponents.h | 11 +- Imaging/vtkImageBlend.cxx | 11 +- Imaging/vtkImageBlend.h | 13 +-- Imaging/vtkImageCanvasSource2D.cxx | 6 +- Imaging/vtkImageChangeInformation.cxx | 4 +- Imaging/vtkImageChangeInformation.h | 2 +- Imaging/vtkImageCheckerboard.h | 4 +- Imaging/vtkImageCityBlockDistance.cxx | 7 +- Imaging/vtkImageCityBlockDistance.h | 3 +- Imaging/vtkImageCorrelation.h | 4 +- Imaging/vtkImageDataStreamer.cxx | 2 +- Imaging/vtkImageDifference.h | 6 +- Imaging/vtkImageDotProduct.h | 4 +- Imaging/vtkImageEllipsoidSource.cxx | 2 +- Imaging/vtkImageEuclideanDistance.cxx | 7 +- Imaging/vtkImageEuclideanDistance.h | 3 +- Imaging/vtkImageGaussianSource.cxx | 2 +- Imaging/vtkImageGridSource.cxx | 5 +- Imaging/vtkImageGridSource.h | 2 +- Imaging/vtkImageImport.cxx | 5 +- Imaging/vtkImageImport.h | 2 +- Imaging/vtkImageIslandRemoval2D.cxx | 2 +- Imaging/vtkImageIterateFilter.cxx | 80 ++++++------- Imaging/vtkImageIterateFilter.h | 6 +- Imaging/vtkImageLogic.h | 4 +- Imaging/vtkImageMandelbrotSource.cxx | 2 +- Imaging/vtkImageMask.cxx | 8 +- Imaging/vtkImageMask.h | 8 +- Imaging/vtkImageMathematics.h | 4 +- Imaging/vtkImageNoiseSource.cxx | 5 +- Imaging/vtkImageNoiseSource.h | 2 +- Imaging/vtkImageNonMaximumSuppression.h | 4 +- Imaging/vtkImageQuantizeRGBToIndex.cxx | 2 +- Imaging/vtkImageRectilinearWipe.h | 4 +- Imaging/vtkImageReslice.cxx | 12 +- Imaging/vtkImageReslice.h | 6 +- Imaging/vtkImageSeedConnectivity.cxx | 2 +- Imaging/vtkImageSeparableConvolution.cxx | 2 +- Imaging/vtkImageSinusoidSource.cxx | 5 +- Imaging/vtkImageSinusoidSource.h | 2 +- Imaging/vtkImageSkeleton2D.cxx | 15 ++- Imaging/vtkImageSkeleton2D.h | 10 +- Imaging/vtkImageStencil.cxx | 8 +- Imaging/vtkImageStencil.h | 14 ++- Imaging/vtkImageStencilToImage.cxx | 2 +- Imaging/vtkImageToImageStencil.cxx | 11 +- Imaging/vtkImageToImageStencil.h | 2 +- Imaging/vtkPointLoad.cxx | 4 +- Imaging/vtkPointLoad.h | 2 +- Imaging/vtkRTAnalyticSource.cxx | 5 +- Imaging/vtkRTAnalyticSource.h | 2 +- Imaging/vtkSampleFunction.cxx | 4 +- Imaging/vtkSampleFunction.h | 2 +- Imaging/vtkShepardMethod.cxx | 2 +- Imaging/vtkSurfaceReconstructionFilter.cxx | 2 +- Imaging/vtkTriangularTexture.cxx | 5 +- Imaging/vtkTriangularTexture.h | 2 +- Imaging/vtkVoxelModeller.cxx | 2 +- .../Testing/Cxx/ArrayDotProductSimilarity.cxx | 6 +- .../Testing/Cxx/ArrayExtractFactoredArray.cxx | 2 +- Infovis/Testing/Cxx/ArrayMatricizeArray.cxx | 2 +- .../Testing/Cxx/ArraySparseArrayToTable.cxx | 2 +- .../Testing/Cxx/ArrayTableToSparseArray.cxx | 2 +- Infovis/Testing/Cxx/ArrayToTable.cxx | 4 +- Infovis/Testing/Cxx/ArrayTransposeMatrix.cxx | 2 +- Infovis/Testing/Cxx/TestArcEdges.cxx | 4 +- Infovis/Testing/Cxx/TestAssignCoordinates.cxx | 2 +- Infovis/Testing/Cxx/TestBoostAlgorithms.cxx | 12 +- .../Cxx/TestBoostBetweennessClustering.cxx | 2 +- .../Cxx/TestBoostBrandesCentrality.cxx | 2 +- .../Cxx/TestBoostExtractLargestComponent.cxx | 4 +- .../Cxx/TestCirclePackLayoutStrategy.cxx | 2 +- .../Cxx/TestCollapseVerticesByArray.cxx | 2 +- .../Testing/Cxx/TestContingencyStatistics.cxx | 2 +- .../Testing/Cxx/TestCorrelativeStatistics.cxx | 8 +- .../Cxx/TestCosmicTreeLayoutStrategy.cxx | 2 +- Infovis/Testing/Cxx/TestDataObjectToTable.cxx | 2 +- .../Testing/Cxx/TestDescriptiveStatistics.cxx | 14 +-- .../Testing/Cxx/TestExtractSelectedGraph.cxx | 6 +- Infovis/Testing/Cxx/TestGraphAlgorithms.cxx | 2 +- .../Cxx/TestGraphHierarchicalBundle.cxx | 4 +- Infovis/Testing/Cxx/TestGroupLeafVertices.cxx | 2 +- Infovis/Testing/Cxx/TestKMeansStatistics.cxx | 6 +- .../Testing/Cxx/TestKdTreeBoxSelection.cxx | 6 +- Infovis/Testing/Cxx/TestMergeGraphs.cxx | 8 +- Infovis/Testing/Cxx/TestMergeTables.cxx | 4 +- .../Cxx/TestMultiCorrelativeStatistics.cxx | 4 +- Infovis/Testing/Cxx/TestOrderStatistics.cxx | 4 +- Infovis/Testing/Cxx/TestPBGLAlgorithms.cxx | 4 +- Infovis/Testing/Cxx/TestPCAStatistics.cxx | 6 +- .../Cxx/TestParallelKMeansStatisticsMPI.cxx | 4 +- .../Cxx/TestParallelRandomStatisticsMPI.cxx | 10 +- Infovis/Testing/Cxx/TestPassArrays.cxx | 2 +- Infovis/Testing/Cxx/TestPassThrough.cxx | 2 +- Infovis/Testing/Cxx/TestPruneTreeFilter.cxx | 2 +- .../TestRandomPContingencyStatisticsMPI.cxx | 2 +- .../Cxx/TestRandomPOrderStatisticsMPI.cxx | 2 +- .../Cxx/TestRemoveIsolatedVertices.cxx | 2 +- .../Cxx/TestSimple3DCirclesStrategy.cxx | 6 +- Infovis/Testing/Cxx/TestStreamGraph.cxx | 2 +- Infovis/Testing/Cxx/TestStringToCategory.cxx | 2 +- .../Cxx/TestTableSplitColumnComponents.cxx | 2 +- Infovis/Testing/Cxx/TestTableToArray.cxx | 2 +- Infovis/Testing/Cxx/TestTableToGraph.cxx | 2 +- Infovis/Testing/Cxx/TestThresholdTable.cxx | 2 +- Infovis/Testing/Cxx/TestTimePoint.cxx | 14 +-- .../Testing/Cxx/TestTreeMapLayoutStrategy.cxx | 2 +- Infovis/vtkAreaLayout.cxx | 2 +- .../vtkAssignCoordinatesLayoutStrategy.cxx | 2 +- ...vtkAttributeClustering2DLayoutStrategy.cxx | 4 +- Infovis/vtkCirclePackToPolyData.cxx | 2 +- Infovis/vtkClustering2DLayoutStrategy.cxx | 4 +- Infovis/vtkCommunity2DLayoutStrategy.cxx | 4 +- Infovis/vtkComputeHistogram2DOutliers.cxx | 2 +- Infovis/vtkConstrained2DLayoutStrategy.cxx | 4 +- Infovis/vtkDelimitedTextReader.cxx | 2 +- Infovis/vtkExtractSelectedGraph.cxx | 2 +- Infovis/vtkFast2DLayoutStrategy.cxx | 4 +- Infovis/vtkGenerateIndexArray.cxx | 2 +- Infovis/vtkMergeTables.cxx | 2 +- Infovis/vtkPCAStatistics.cxx | 2 +- Infovis/vtkPCAStatistics.h | 3 + Infovis/vtkPairwiseExtractHistogram2D.cxx | 2 +- Infovis/vtkPassArrays.cxx | 2 +- Infovis/vtkRemoveHiddenData.cxx | 8 +- Infovis/vtkSQLGraphReader.cxx | 6 +- Infovis/vtkSpanTreeLayoutStrategy.cxx | 2 +- Infovis/vtkStackedTreeLayoutStrategy.cxx | 4 +- Infovis/vtkStatisticsAlgorithm.h | 8 +- Infovis/vtkStreamingStatistics.cxx | 2 +- Infovis/vtkStringToCategory.cxx | 2 +- Infovis/vtkStringToNumeric.cxx | 2 +- Infovis/vtkStringToTimePoint.cxx | 2 +- Infovis/vtkTableToGraph.cxx | 4 +- Infovis/vtkThresholdGraph.cxx | 4 +- Infovis/vtkTimePointToString.cxx | 2 +- Parallel/Testing/Cxx/DistributedData.cxx | 2 +- .../Testing/Cxx/DistributedDataRenderPass.cxx | 2 +- Parallel/Testing/Cxx/ParallelIso.cxx | 4 +- Parallel/Testing/Cxx/PrmMagnify.cxx | 3 +- Parallel/Testing/Cxx/SocketClient.cxx | 10 +- .../Testing/Cxx/TestMultiBlockExodusWrite.cxx | 2 +- Parallel/Testing/Cxx/TestPRMATGraphSource.cxx | 6 +- .../Testing/Cxx/TestPRandomGraphSource.cxx | 8 +- Parallel/Testing/Cxx/TestPStream.cxx | 2 +- Parallel/Testing/Cxx/ThreadedCommunicator.cxx | 2 +- Parallel/Testing/Cxx/TransmitImageData.cxx | 8 +- .../Cxx/TransmitImageDataRenderPass.cxx | 8 +- .../Testing/Cxx/TransmitRectilinearGrid.cxx | 8 +- .../Testing/Cxx/TransmitStructuredGrid.cxx | 8 +- Parallel/vtkCollectGraph.cxx | 2 +- Parallel/vtkCollectPolyData.cxx | 4 +- Parallel/vtkCommunicator.cxx | 2 +- Parallel/vtkCutMaterial.cxx | 4 +- Parallel/vtkDistributedDataFilter.cxx | 14 +-- Parallel/vtkDuplicatePolyData.cxx | 6 +- Parallel/vtkEnSightWriter.cxx | 4 +- Parallel/vtkEnSightWriter.h | 2 +- Parallel/vtkExodusIIWriter.cxx | 2 +- Parallel/vtkExtractCTHPart.cxx | 46 ++++---- Parallel/vtkExtractPiece.cxx | 11 +- Parallel/vtkMPIImageReader.cxx | 7 +- Parallel/vtkMPIImageReader.h | 3 +- Parallel/vtkMemoryLimitImageDataStreamer.cxx | 12 +- Parallel/vtkPChacoReader.cxx | 4 +- Parallel/vtkPDataSetReader.cxx | 10 +- Parallel/vtkPDataSetWriter.cxx | 2 +- Parallel/vtkPImageWriter.cxx | 32 ++---- Parallel/vtkPStreamTracer.cxx | 2 +- Parallel/vtkPieceRequestFilter.cxx | 18 +-- Parallel/vtkPieceRequestFilter.h | 4 +- Parallel/vtkSynchronizedRenderers.cxx | 2 +- Parallel/vtkTemporalStreamTracer.cxx | 4 +- Parallel/vtkTransmitImageDataPiece.cxx | 2 +- Parallel/vtkTransmitPolyDataPiece.cxx | 2 +- Parallel/vtkTransmitRectilinearGridPiece.cxx | 2 +- Parallel/vtkTransmitStructuredGridPiece.cxx | 2 +- Parallel/vtkTransmitUnstructuredGridPiece.cxx | 2 +- Rendering/Testing/Cxx/RenderNonFinite.cxx | 2 +- Rendering/Testing/Cxx/TestAreaSelections.cxx | 16 +-- .../Testing/Cxx/TestDynamic2DLabelMapper.cxx | 4 +- Rendering/Testing/Cxx/TestFollowerPicking.cxx | 3 +- .../Testing/Cxx/TestGlyph3DMapperArrow.cxx | 2 +- .../Testing/Cxx/TestGlyph3DMapperPicking.cxx | 2 +- Rendering/Testing/Cxx/TestLODActor.cxx | 2 +- .../Cxx/TestLabelPlacementMapper2D.cxx | 2 +- ...stLabelPlacementMapperCoincidentPoints.cxx | 4 +- Rendering/Testing/Cxx/TestLabelPlacer2D.cxx | 2 +- .../Cxx/TestLabelPlacerCoincidentPoints.cxx | 4 +- Rendering/Testing/Cxx/TestMultiTexturing.cxx | 2 +- .../Testing/Cxx/TestMultiTexturingGLSL.cxx | 2 +- .../Cxx/TestMultiTexturingTransform.cxx | 2 +- .../Testing/Cxx/TestOrderedTriangulator.cxx | 8 +- Rendering/Testing/Cxx/TestPOVExporter.cxx | 2 +- Rendering/Testing/Cxx/TestQtImages.cxx | 2 +- .../Testing/Cxx/TestQtLabelSizeCalculator.cxx | 6 +- Rendering/Testing/Cxx/TestQtLabeler.cxx | 4 +- Rendering/Testing/Cxx/TestScenePicker.cxx | 2 +- Rendering/Testing/Cxx/TestSurfaceLIC.h | 2 +- .../Testing/Cxx/TestTStripsColorsTCoords.cxx | 2 +- .../Cxx/TestTStripsNormalsColorsTCoords.cxx | 2 +- .../Testing/Cxx/TestTStripsNormalsTCoords.cxx | 2 +- Rendering/Testing/Cxx/TestTStripsTCoords.cxx | 2 +- Rendering/Testing/Cxx/TestTextureRGBA.cxx | 2 +- .../Cxx/TestTextureRGBADepthPeeling.cxx | 2 +- Rendering/Testing/Cxx/TestTilingCxx.cxx | 4 +- ...TestTranslucentImageActorAlphaBlending.cxx | 3 +- .../TestTranslucentImageActorDepthPeeling.cxx | 3 +- Rendering/Testing/Cxx/TimeRenderer.cxx | 6 +- Rendering/vtkAxisActor2D.cxx | 2 +- Rendering/vtkCompositePolyDataMapper.cxx | 4 +- Rendering/vtkDataSetMapper.cxx | 22 ++-- Rendering/vtkDataSetMapper.h | 2 +- Rendering/vtkDataTransferHelper.cxx | 4 +- Rendering/vtkGlyph3DMapper.cxx | 46 +++++--- Rendering/vtkGlyph3DMapper.h | 10 +- Rendering/vtkGraphMapper.cxx | 20 +--- Rendering/vtkGraphMapper.h | 2 +- Rendering/vtkGraphToGlyphs.cxx | 2 +- Rendering/vtkIVExporter.cxx | 10 +- Rendering/vtkImageActor.cxx | 4 +- Rendering/vtkImageActor.h | 2 +- Rendering/vtkImageMapper.cxx | 12 +- Rendering/vtkImageMapper.h | 2 +- Rendering/vtkImageMapper3D.cxx | 12 +- Rendering/vtkImageMapper3D.h | 2 +- Rendering/vtkImageViewer.h | 2 +- Rendering/vtkImageViewer2.cxx | 11 +- Rendering/vtkImageViewer2.h | 5 +- Rendering/vtkInteractorStyle.cxx | 3 +- Rendering/vtkInteractorStyleTerrain.cxx | 6 +- Rendering/vtkInteractorStyleUnicam.cxx | 2 +- Rendering/vtkLODActor.cxx | 12 +- Rendering/vtkLabelHierarchyAlgorithm.cxx | 29 ++--- Rendering/vtkLabelHierarchyAlgorithm.h | 25 ++-- Rendering/vtkLabelPlacementMapper.cxx | 4 +- Rendering/vtkLabeledDataMapper.cxx | 12 +- Rendering/vtkLabeledDataMapper.h | 2 +- Rendering/vtkLeaderActor2D.cxx | 2 +- Rendering/vtkOBJExporter.cxx | 3 +- Rendering/vtkOOGLExporter.cxx | 8 +- Rendering/vtkOpenGLGlyph3DMapper.cxx | 4 +- Rendering/vtkOpenGLImageResliceMapper.cxx | 2 +- Rendering/vtkOpenGLPolyDataMapper.cxx | 2 +- Rendering/vtkOpenGLScalarsToColorsPainter.cxx | 2 +- Rendering/vtkPOVExporter.cxx | 5 +- Rendering/vtkParallelCoordinatesActor.cxx | 2 +- Rendering/vtkPolyDataMapper.cxx | 14 +-- Rendering/vtkPolyDataMapper.h | 2 +- Rendering/vtkPolyDataMapper2D.cxx | 12 +- Rendering/vtkPolyDataMapper2D.h | 2 +- Rendering/vtkProperty.cxx | 2 +- Rendering/vtkQuadricLODActor.cxx | 2 +- Rendering/vtkRendererSource.cxx | 2 +- Rendering/vtkScalarBarActor.cxx | 6 +- Rendering/vtkTesting.cxx | 6 +- Rendering/vtkTextActor.cxx | 6 +- Rendering/vtkTextActor3D.cxx | 4 +- Rendering/vtkVRMLExporter.cxx | 12 +- Rendering/vtkWindowToImageFilter.cxx | 2 +- Views/Testing/Cxx/TestConeLayoutStrategy.cxx | 2 +- Views/Testing/Cxx/TestGraphLayoutView.cxx | 2 +- .../Cxx/TestGraphLayoutViewWithUnicode.cxx | 2 +- .../Cxx/TestInteractorStyleTreeMapHover.cxx | 2 +- Views/Testing/Cxx/TestQtLabelStrategy.cxx | 4 +- Views/vtkDataRepresentation.cxx | 23 ++-- Views/vtkHierarchicalGraphView.cxx | 11 +- Views/vtkInteractorStyleAreaSelectHover.cxx | 6 +- Views/vtkInteractorStyleTreeMapHover.cxx | 4 +- ...llelCoordinatesHistogramRepresentation.cxx | 6 +- .../vtkParallelCoordinatesRepresentation.cxx | 8 +- Views/vtkParallelCoordinatesView.cxx | 2 +- Views/vtkRenderedGraphRepresentation.cxx | 10 +- Views/vtkRenderedTreeAreaRepresentation.cxx | 10 +- Views/vtkTreeAreaView.cxx | 4 +- Views/vtkView.cxx | 9 +- .../vtkFixedPointVolumeRayCastMapper.cxx | 4 +- VolumeRendering/vtkGPUVolumeRayCastMapper.cxx | 2 +- VolumeRendering/vtkSmartVolumeMapper.cxx | 4 +- .../vtkUnstructuredGridVolumeMapper.cxx | 16 +-- .../vtkUnstructuredGridVolumeMapper.h | 4 +- .../vtkUnstructuredGridVolumeZSweepMapper.cxx | 2 +- VolumeRendering/vtkVolumeMapper.cxx | 16 +-- VolumeRendering/vtkVolumeMapper.h | 4 +- ...tkVolumeRayCastSpaceLeapingImageFilter.cxx | 12 +- .../vtkVolumeRayCastSpaceLeapingImageFilter.h | 7 +- Widgets/Testing/Cxx/BoxWidget.cxx | 6 +- Widgets/Testing/Cxx/BoxWidget2.cxx | 6 +- Widgets/Testing/Cxx/ImagePlaneWidget.cxx | 5 +- Widgets/Testing/Cxx/TerrainPolylineEditor.cxx | 8 +- Widgets/Testing/Cxx/TestAffineWidget.cxx | 3 +- Widgets/Testing/Cxx/TestAngleWidget2D.cxx | 2 +- Widgets/Testing/Cxx/TestAngleWidget3D.cxx | 2 +- .../Testing/Cxx/TestAxesTransformWidget.cxx | 2 +- Widgets/Testing/Cxx/TestBalloonWidget.cxx | 6 +- .../Testing/Cxx/TestBiDimensionalWidget.cxx | 3 +- Widgets/Testing/Cxx/TestBorderWidget.cxx | 2 +- Widgets/Testing/Cxx/TestButtonWidget.cxx | 6 +- Widgets/Testing/Cxx/TestCameraWidget.cxx | 2 +- Widgets/Testing/Cxx/TestCaptionWidget.cxx | 2 +- .../Cxx/TestCenteredSliderWidget2D.cxx | 10 +- .../Testing/Cxx/TestCheckerboardWidget.cxx | 11 +- .../Cxx/TestConstrainedHandleWidget.cxx | 3 +- .../Cxx/TestDijkstraGraphGeodesicPath.cxx | 12 +- .../Cxx/TestDijkstraImageGeodesicPath.cxx | 3 +- Widgets/Testing/Cxx/TestDistanceWidget.cxx | 2 +- Widgets/Testing/Cxx/TestDistanceWidget3D.cxx | 2 +- Widgets/Testing/Cxx/TestFocalPlaneContour.cxx | 3 +- Widgets/Testing/Cxx/TestHandleWidget.cxx | 6 +- Widgets/Testing/Cxx/TestHandleWidget2D.cxx | 4 +- .../Cxx/TestImageActorContourWidget.cxx | 2 +- Widgets/Testing/Cxx/TestImageTracerWidget.cxx | 15 +-- .../Testing/Cxx/TestImplicitPlaneWidget.cxx | 7 +- .../Testing/Cxx/TestImplicitPlaneWidget2.cxx | 6 +- .../Testing/Cxx/TestImplicitPlaneWidget2b.cxx | 6 +- Widgets/Testing/Cxx/TestLineWidget.cxx | 6 +- Widgets/Testing/Cxx/TestLineWidget2.cxx | 6 +- Widgets/Testing/Cxx/TestLogoWidget.cxx | 6 +- .../Cxx/TestLogoWidgetAlphaBlending.cxx | 6 +- .../Cxx/TestLogoWidgetDepthPeeling.cxx | 6 +- .../Cxx/TestOrientationMarkerWidget.cxx | 6 +- .../Testing/Cxx/TestOrientedGlyphContour.cxx | 3 +- Widgets/Testing/Cxx/TestOrthoPlanes.cxx | 5 +- .../Testing/Cxx/TestParallelopipedWidget.cxx | 10 +- Widgets/Testing/Cxx/TestPlaneWidget.cxx | 8 +- Widgets/Testing/Cxx/TestPlaybackWidget.cxx | 2 +- Widgets/Testing/Cxx/TestPointWidget.cxx | 8 +- Widgets/Testing/Cxx/TestPolyPlane.cxx | 18 +-- .../TestPolygonalHandleRepresentations.cxx | 12 +- ...estPolygonalRepresentationHandleWidget.cxx | 12 +- .../Testing/Cxx/TestProgrammaticPlacement.cxx | 2 +- .../Testing/Cxx/TestRectilinearWipeWidget.cxx | 11 +- Widgets/Testing/Cxx/TestScalarBarWidget.cxx | 2 +- Widgets/Testing/Cxx/TestSeedWidget.cxx | 2 +- Widgets/Testing/Cxx/TestSeedWidget2.cxx | 3 +- ...estSeedWidgetNonUniformRepresentations.cxx | 2 +- Widgets/Testing/Cxx/TestSliderWidget.cxx | 10 +- Widgets/Testing/Cxx/TestSliderWidget2D.cxx | 10 +- .../Testing/Cxx/TestSphereHandleWidget.cxx | 24 ++-- Widgets/Testing/Cxx/TestSplineWidget.cxx | 4 +- .../TestSurfaceConstrainedHandleWidget.cxx | 12 +- Widgets/Testing/Cxx/TestTextWidget.cxx | 2 +- ...bstractPolygonalHandleRepresentation3D.cxx | 14 ++- Widgets/vtkAffineRepresentation2D.cxx | 8 +- Widgets/vtkAngleRepresentation3D.cxx | 12 +- Widgets/vtkAxesTransformRepresentation.cxx | 4 +- Widgets/vtkBalloonRepresentation.cxx | 6 +- Widgets/vtkBiDimensionalRepresentation2D.cxx | 2 +- Widgets/vtkBorderRepresentation.cxx | 5 +- Widgets/vtkBoxRepresentation.cxx | 9 +- Widgets/vtkBoxWidget.cxx | 9 +- Widgets/vtkCameraRepresentation.cxx | 5 +- Widgets/vtkCenteredSliderRepresentation.cxx | 10 +- ...tkConstrainedPointHandleRepresentation.cxx | 11 +- ...tkDijkstraImageContourLineInterpolator.cxx | 4 +- Widgets/vtkDistanceRepresentation3D.cxx | 4 +- .../vtkEllipsoidTensorProbeRepresentation.cxx | 10 +- Widgets/vtkImagePlaneWidget.cxx | 18 +-- Widgets/vtkImageTracerWidget.cxx | 7 +- Widgets/vtkImplicitPlaneRepresentation.cxx | 40 ++++--- Widgets/vtkImplicitPlaneWidget.cxx | 40 ++++--- Widgets/vtkLineRepresentation.cxx | 9 +- Widgets/vtkLineWidget.cxx | 6 +- Widgets/vtkLogoRepresentation.cxx | 4 +- Widgets/vtkOrientationMarkerWidget.cxx | 2 +- .../vtkOrientedGlyphContourRepresentation.cxx | 29 ++--- ...edGlyphFocalPlaneContourRepresentation.cxx | 22 ++-- Widgets/vtkParallelopipedRepresentation.cxx | 4 +- Widgets/vtkPlaneWidget.cxx | 24 ++-- Widgets/vtkPlaybackRepresentation.cxx | 5 +- Widgets/vtkPointHandleRepresentation2D.cxx | 9 +- Widgets/vtkPointHandleRepresentation3D.cxx | 3 +- Widgets/vtkPointWidget.cxx | 3 +- ...olygonalSurfaceContourLineInterpolator.cxx | 2 +- Widgets/vtkRectilinearWipeRepresentation.cxx | 2 +- Widgets/vtkSliderRepresentation2D.cxx | 15 ++- Widgets/vtkSliderRepresentation3D.cxx | 25 ++-- Widgets/vtkSphereHandleRepresentation.cxx | 2 +- Widgets/vtkSphereRepresentation.cxx | 6 +- Widgets/vtkSphereWidget.cxx | 6 +- Widgets/vtkSplineRepresentation.cxx | 9 +- Widgets/vtkSplineWidget.cxx | 9 +- Widgets/vtkTensorProbeRepresentation.cxx | 28 ++--- Widgets/vtkTerrainContourLineInterpolator.cxx | 4 +- Widgets/vtkTexturedButtonRepresentation.cxx | 6 +- 727 files changed, 2637 insertions(+), 3361 deletions(-) diff --git a/Charts/Testing/Cxx/TestBarGraph.cxx b/Charts/Testing/Cxx/TestBarGraph.cxx index 81695a902c4..8c79123fc3d 100644 --- a/Charts/Testing/Cxx/TestBarGraph.cxx +++ b/Charts/Testing/Cxx/TestBarGraph.cxx @@ -76,15 +76,15 @@ int TestBarGraph(int , char * []) vtkPlot *plot = 0; plot = chart->AddPlot(vtkChart::BAR); - plot->SetInput(table.GetPointer(), 0, 1); + plot->SetInputData(table.GetPointer(), 0, 1); plot->SetColor(0, 255, 0, 255); plot = chart->AddPlot(vtkChart::BAR); - plot->SetInput(table.GetPointer(), 0, 2); + plot->SetInputData(table.GetPointer(), 0, 2); plot->SetColor(255, 0, 0, 255); plot = chart->AddPlot(vtkChart::BAR); - plot->SetInput(table.GetPointer(), 0, 3); + plot->SetInputData(table.GetPointer(), 0, 3); plot->SetColor(0, 0, 255, 255); //Finally render the scene and compare the image to a reference image diff --git a/Charts/Testing/Cxx/TestBarGraphHorizontal.cxx b/Charts/Testing/Cxx/TestBarGraphHorizontal.cxx index 0ef22ba9789..19d6ea38ab4 100644 --- a/Charts/Testing/Cxx/TestBarGraphHorizontal.cxx +++ b/Charts/Testing/Cxx/TestBarGraphHorizontal.cxx @@ -77,19 +77,19 @@ int TestBarGraphHorizontal(int , char * []) plot = chart->AddPlot(vtkChart::BAR); barPlot = vtkPlotBar::SafeDownCast(plot); - barPlot->SetInput(table.GetPointer(), 0, 1); + barPlot->SetInputData(table.GetPointer(), 0, 1); barPlot->SetOrientation(vtkPlotBar::HORIZONTAL); barPlot->SetColor(0, 255, 0, 255); plot = chart->AddPlot(vtkChart::BAR); barPlot = vtkPlotBar::SafeDownCast(plot); - barPlot->SetInput(table.GetPointer(), 0, 2); + barPlot->SetInputData(table.GetPointer(), 0, 2); barPlot->SetOrientation(vtkPlotBar::HORIZONTAL); barPlot->SetColor(255, 0, 0, 255); plot = chart->AddPlot(vtkChart::BAR); barPlot = vtkPlotBar::SafeDownCast(plot); - barPlot->SetInput(table.GetPointer(), 0, 3); + barPlot->SetInputData(table.GetPointer(), 0, 3); barPlot->SetOrientation(vtkPlotBar::HORIZONTAL); barPlot->SetColor(0, 0, 255, 255); diff --git a/Charts/Testing/Cxx/TestHistogram2D.cxx b/Charts/Testing/Cxx/TestHistogram2D.cxx index a4b538ede96..9026bcedece 100644 --- a/Charts/Testing/Cxx/TestHistogram2D.cxx +++ b/Charts/Testing/Cxx/TestHistogram2D.cxx @@ -52,7 +52,7 @@ int TestHistogram2D(int, char * []) cos(vtkMath::RadiansFromDegrees(double(j))); } } - chart->SetInput(data.GetPointer()); + chart->SetInputData(data.GetPointer()); vtkNew<vtkColorTransferFunction> transferFunction; transferFunction->AddHSVSegment(0.0, 0.0, 1.0, 1.0, diff --git a/Charts/Testing/Cxx/TestLinePlot.cxx b/Charts/Testing/Cxx/TestLinePlot.cxx index f6a1066ae29..7f6fd86e5ab 100644 --- a/Charts/Testing/Cxx/TestLinePlot.cxx +++ b/Charts/Testing/Cxx/TestLinePlot.cxx @@ -61,15 +61,15 @@ int TestLinePlot( int, char * [] ) // Add multiple line plots, setting the colors etc vtkPlot *line = chart->AddPlot(vtkChart::LINE); - line->SetInput(table.GetPointer(), 0, 1); + line->SetInputData(table.GetPointer(), 0, 1); line->SetColor(0, 255, 0, 255); line->SetWidth(1.0); line = chart->AddPlot(vtkChart::LINE); - line->SetInput(table.GetPointer(), 0, 2); + line->SetInputData(table.GetPointer(), 0, 2); line->SetColor(255, 0, 0, 255); line->SetWidth(5.0); line = chart->AddPlot(vtkChart::LINE); - line->SetInput(table.GetPointer(), 0, 3); + line->SetInputData(table.GetPointer(), 0, 3); line->SetColor(0, 0, 255, 255); line->SetWidth(4.0); diff --git a/Charts/Testing/Cxx/TestLinePlotInteraction.cxx b/Charts/Testing/Cxx/TestLinePlotInteraction.cxx index b617907059f..456a13321d2 100644 --- a/Charts/Testing/Cxx/TestLinePlotInteraction.cxx +++ b/Charts/Testing/Cxx/TestLinePlotInteraction.cxx @@ -165,15 +165,15 @@ int TestLinePlotInteraction(int, char * []) // Add multiple line plots, setting the colors etc vtkPlot *line = chart->AddPlot(vtkChart::LINE); - line->SetInput(table, 0, 1); + line->SetInputData(table, 0, 1); line->SetColor(0, 255, 0, 255); line->SetWidth(1.0); line = chart->AddPlot(vtkChart::LINE); - line->SetInput(table, 0, 2); + line->SetInputData(table, 0, 2); line->SetColor(255, 0, 0, 255); line->SetWidth(5.0); line = chart->AddPlot(vtkChart::LINE); - line->SetInput(table, 0, 3); + line->SetInputData(table, 0, 3); line->SetColor(0, 0, 255, 255); line->SetWidth(4.0); diff --git a/Charts/Testing/Cxx/TestMultipleChartRenderers.cxx b/Charts/Testing/Cxx/TestMultipleChartRenderers.cxx index 30a163bb84b..58ef4de32df 100644 --- a/Charts/Testing/Cxx/TestMultipleChartRenderers.cxx +++ b/Charts/Testing/Cxx/TestMultipleChartRenderers.cxx @@ -94,15 +94,15 @@ int TestMultipleChartRenderers(int , char * []) // Add multiple line plots, setting the colors etc vtkPlot *line = chart->AddPlot(vtkChart::LINE); - line->SetInput(table, 0, 1); + line->SetInputData(table, 0, 1); line->SetColor(0, 255, 0, 255); line->SetWidth(1.0); line = chart->AddPlot(vtkChart::LINE); - line->SetInput(table, 0, 2); + line->SetInputData(table, 0, 2); line->SetColor(255, 0, 0, 255); line->SetWidth(5.0); line = chart->AddPlot(vtkChart::LINE); - line->SetInput(table, 0, 3); + line->SetInputData(table, 0, 3); line->SetColor(0, 0, 255, 255); line->SetWidth(4.0); } diff --git a/Charts/Testing/Cxx/TestMultipleRenderers.cxx b/Charts/Testing/Cxx/TestMultipleRenderers.cxx index 3e49812e2d9..86ba8c7e00c 100644 --- a/Charts/Testing/Cxx/TestMultipleRenderers.cxx +++ b/Charts/Testing/Cxx/TestMultipleRenderers.cxx @@ -103,15 +103,15 @@ int TestMultipleRenderers(int , char * []) // Add multiple line plots, setting the colors etc vtkPlot *line = chart->AddPlot(vtkChart::LINE); - line->SetInput(table, 0, 1); + line->SetInputData(table, 0, 1); line->SetColor(0, 255, 0, 255); line->SetWidth(1.0); line = chart->AddPlot(vtkChart::LINE); - line->SetInput(table, 0, 2); + line->SetInputData(table, 0, 2); line->SetColor(255, 0, 0, 255); line->SetWidth(5.0); line = chart->AddPlot(vtkChart::LINE); - line->SetInput(table, 0, 3); + line->SetInputData(table, 0, 3); line->SetColor(0, 0, 255, 255); line->SetWidth(4.0); diff --git a/Charts/Testing/Cxx/TestParallelCoordinates.cxx b/Charts/Testing/Cxx/TestParallelCoordinates.cxx index 8a85b724071..f3d2960f296 100644 --- a/Charts/Testing/Cxx/TestParallelCoordinates.cxx +++ b/Charts/Testing/Cxx/TestParallelCoordinates.cxx @@ -61,7 +61,7 @@ int TestParallelCoordinates(int , char* []) table->SetValue(i, 3, tan(i * inc) + 0.5); } - chart->GetPlot(0)->SetInput(table.GetPointer()); + chart->GetPlot(0)->SetInputData(table.GetPointer()); view->GetRenderWindow()->SetMultiSamples(0); view->GetInteractor()->Initialize(); diff --git a/Charts/Testing/Cxx/TestPieChart.cxx b/Charts/Testing/Cxx/TestPieChart.cxx index 9396dec6b82..5af78b56482 100644 --- a/Charts/Testing/Cxx/TestPieChart.cxx +++ b/Charts/Testing/Cxx/TestPieChart.cxx @@ -65,7 +65,7 @@ int TestPieChart(int , char * []) // Add multiple line plots, setting the colors etc vtkPlotPie *pie = vtkPlotPie::SafeDownCast(chart->AddPlot(0)); pie->SetColorSeries(colorSeries.GetPointer()); - pie->SetInput(table.GetPointer()); + pie->SetInputData(table.GetPointer()); pie->SetInputArray(0, "2008 Circulation"); pie->SetLabels(labelArray.GetPointer()); diff --git a/Charts/Testing/Cxx/TestPlotMatrix.cxx b/Charts/Testing/Cxx/TestPlotMatrix.cxx index 97dfa6488bc..ca4b1c3e11f 100644 --- a/Charts/Testing/Cxx/TestPlotMatrix.cxx +++ b/Charts/Testing/Cxx/TestPlotMatrix.cxx @@ -62,15 +62,15 @@ int TestPlotMatrix( int, char * [] ) // Add multiple line plots, setting the colors etc vtkPlot *line = chart->AddPlot(vtkChart::LINE); - line->SetInput(table, 0, 1); + line->SetInputData(table, 0, 1); line->SetColor(0, 255, 0, 255); line->SetWidth(1.0); line = chart->AddPlot(vtkChart::LINE); - line->SetInput(table, 0, 2); + line->SetInputData(table, 0, 2); line->SetColor(255, 0, 0, 255); line->SetWidth(5.0); line = chart->AddPlot(vtkChart::LINE); - line->SetInput(table, 0, 3); + line->SetInputData(table, 0, 3); line->SetColor(0, 0, 255, 255); line->SetWidth(4.0); @@ -82,7 +82,7 @@ int TestPlotMatrix( int, char * [] ) vtkSmartPointer<vtkChartXY> chart2 = vtkSmartPointer<vtkChartXY>::New(); view->GetScene()->AddItem(chart2); line = chart2->AddPlot(vtkChart::LINE); - line->SetInput(table, 0, 1); + line->SetInputData(table, 0, 1); chart2->SetAutoSize(false); chart2->SetSize(vtkRectf(200.0, 0.0, 200.0, 150.0)); @@ -90,7 +90,7 @@ int TestPlotMatrix( int, char * [] ) vtkSmartPointer<vtkChartXY> chart3 = vtkSmartPointer<vtkChartXY>::New(); view->GetScene()->AddItem(chart3); line = chart3->AddPlot(vtkChart::POINTS); - line->SetInput(table, 0, 1); + line->SetInputData(table, 0, 1); chart3->SetAutoSize(false); chart3->SetSize(vtkRectf(0.0, 150.0, 200.0, 150.0)); @@ -98,7 +98,7 @@ int TestPlotMatrix( int, char * [] ) vtkSmartPointer<vtkChartXY> chart4 = vtkSmartPointer<vtkChartXY>::New(); view->GetScene()->AddItem(chart4); line = chart4->AddPlot(vtkChart::BAR); - line->SetInput(table, 0, 1); + line->SetInputData(table, 0, 1); chart4->GetAxis(vtkAxis::BOTTOM)->SetBehavior(vtkAxis::FIXED); chart4->GetAxis(vtkAxis::BOTTOM)->SetRange(0.0, 10.0); chart4->SetAutoSize(false); diff --git a/Charts/Testing/Cxx/TestScatterPlot.cxx b/Charts/Testing/Cxx/TestScatterPlot.cxx index 6ab7fa2a602..581f4cf8333 100644 --- a/Charts/Testing/Cxx/TestScatterPlot.cxx +++ b/Charts/Testing/Cxx/TestScatterPlot.cxx @@ -64,17 +64,17 @@ int TestScatterPlot(int , char * []) // Add multiple line plots, setting the colors etc vtkPlot *points = chart->AddPlot(vtkChart::POINTS); - points->SetInput(table, 0, 1); + points->SetInputData(table, 0, 1); points->SetColor(0, 0, 0, 255); points->SetWidth(1.0); vtkPlotPoints::SafeDownCast(points)->SetMarkerStyle(vtkPlotPoints::CROSS); points = chart->AddPlot(vtkChart::POINTS); - points->SetInput(table, 0, 2); + points->SetInputData(table, 0, 2); points->SetColor(0, 0, 0, 255); points->SetWidth(1.0); vtkPlotPoints::SafeDownCast(points)->SetMarkerStyle(vtkPlotPoints::PLUS); points = chart->AddPlot(vtkChart::POINTS); - points->SetInput(table, 0, 3); + points->SetInputData(table, 0, 3); points->SetColor(0, 0, 255, 255); points->SetWidth(4.0); diff --git a/Charts/Testing/Cxx/TestScientificPlot.cxx b/Charts/Testing/Cxx/TestScientificPlot.cxx index 41b936fad5e..7ad66bef4d5 100644 --- a/Charts/Testing/Cxx/TestScientificPlot.cxx +++ b/Charts/Testing/Cxx/TestScientificPlot.cxx @@ -63,13 +63,13 @@ int TestScientificPlot(int, char * []) // Add multiple line plots, setting the colors etc vtkPlot *line = chart->AddPlot(vtkChart::LINE); - line->SetInput(table, 0, 1); + line->SetInputData(table, 0, 1); line->SetColor(0, 255, 0, 255); line = chart->AddPlot(vtkChart::LINE); - line->SetInput(table, 0, 2); + line->SetInputData(table, 0, 2); line->SetColor(255, 0, 0, 255); line = chart->AddPlot(vtkChart::POINTS); - line->SetInput(table, 0, 3); + line->SetInputData(table, 0, 3); line->SetColor(0, 0, 255, 255); // Set up a scientific plot... diff --git a/Charts/Testing/Cxx/TestStackedBarGraph.cxx b/Charts/Testing/Cxx/TestStackedBarGraph.cxx index dc943fdbac6..7c219b58bdf 100644 --- a/Charts/Testing/Cxx/TestStackedBarGraph.cxx +++ b/Charts/Testing/Cxx/TestStackedBarGraph.cxx @@ -115,7 +115,7 @@ int TestStackedBarGraph(int , char * []) bar = vtkPlotBar::SafeDownCast(chart->AddPlot(vtkChart::BAR)); bar->SetColorSeries(colorSeries1); - bar->SetInput(table, "Month", "Books 2008"); + bar->SetInputData(table, "Month", "Books 2008"); bar->SetInputArray(2,"New / Popular 2008"); bar->SetInputArray(3,"Periodical 2008"); bar->SetInputArray(4,"Audiobook 2008"); @@ -126,7 +126,7 @@ int TestStackedBarGraph(int , char * []) bar = vtkPlotBar::SafeDownCast(chart->AddPlot(vtkChart::BAR)); bar->SetColorSeries(colorSeries2); - bar->SetInput(table, "Month", "Books 2009"); + bar->SetInputData(table, "Month", "Books 2009"); bar->SetInputArray(2,"New / Popular 2009"); bar->SetInputArray(3,"Periodical 2009"); bar->SetInputArray(4,"Audiobook 2009"); diff --git a/Charts/Testing/Cxx/TestStackedPlot.cxx b/Charts/Testing/Cxx/TestStackedPlot.cxx index 9facd08ba3b..c7420ddc295 100644 --- a/Charts/Testing/Cxx/TestStackedPlot.cxx +++ b/Charts/Testing/Cxx/TestStackedPlot.cxx @@ -109,7 +109,7 @@ int TestStackedPlot(int , char * []) // Books stack = vtkPlotStacked::SafeDownCast(chart->AddPlot(vtkChart::STACKED)); stack->SetUseIndexForXSeries(true); - stack->SetInput(table); + stack->SetInputData(table); stack->SetInputArray(1,"Books"); stack->SetInputArray(2,"New / Popular"); stack->SetInputArray(3,"Periodical"); diff --git a/Charts/vtkChartHistogram2D.cxx b/Charts/vtkChartHistogram2D.cxx index 0f05abab144..846a24e98f0 100644 --- a/Charts/vtkChartHistogram2D.cxx +++ b/Charts/vtkChartHistogram2D.cxx @@ -55,9 +55,9 @@ void vtkChartHistogram2D::Update() this->vtkChartXY::Update(); } -void vtkChartHistogram2D::SetInput(vtkImageData *data, vtkIdType z) +void vtkChartHistogram2D::SetInputData(vtkImageData *data, vtkIdType z) { - this->Histogram->SetInput(data, z); + this->Histogram->SetInputData(data, z); } void vtkChartHistogram2D::SetTransferFunction(vtkScalarsToColors *function) diff --git a/Charts/vtkChartHistogram2D.h b/Charts/vtkChartHistogram2D.h index c18ec0a50d4..690b47c823e 100644 --- a/Charts/vtkChartHistogram2D.h +++ b/Charts/vtkChartHistogram2D.h @@ -45,7 +45,7 @@ public: // Paint function is invoked. virtual void Update(); - virtual void SetInput(vtkImageData *data, vtkIdType z = 0); + virtual void SetInputData(vtkImageData *data, vtkIdType z = 0); virtual void SetTransferFunction(vtkScalarsToColors *function); // Description: diff --git a/Charts/vtkContextMapper2D.cxx b/Charts/vtkContextMapper2D.cxx index 306ddad18a6..73528003ca6 100644 --- a/Charts/vtkContextMapper2D.cxx +++ b/Charts/vtkContextMapper2D.cxx @@ -36,19 +36,9 @@ vtkContextMapper2D::~vtkContextMapper2D() } //---------------------------------------------------------------------------- -void vtkContextMapper2D::SetInput(vtkTable *input) +void vtkContextMapper2D::SetInputData(vtkTable *input) { - if(input) - { - vtkDebugMacro(<< "Input table set."); - this->SetInputConnection(0, input->GetProducerPort()); - } - else - { - // Setting a NULL input removes the connection. - vtkDebugMacro(<< "Null input table set."); - this->SetInputConnection(0, 0); - } + this->SetInputDataInternal(0, input); } //---------------------------------------------------------------------------- diff --git a/Charts/vtkContextMapper2D.h b/Charts/vtkContextMapper2D.h index 6a32a28d382..046704b4d8a 100644 --- a/Charts/vtkContextMapper2D.h +++ b/Charts/vtkContextMapper2D.h @@ -39,7 +39,7 @@ public: // Description: // Set/Get the input for this object - only accepts vtkTable as input. - virtual void SetInput(vtkTable *input); + virtual void SetInputData(vtkTable *input); virtual vtkTable * GetInput(); // Description: diff --git a/Charts/vtkOpenGL2ContextDevice2D.cxx b/Charts/vtkOpenGL2ContextDevice2D.cxx index abb01c9c16e..df9813587af 100644 --- a/Charts/vtkOpenGL2ContextDevice2D.cxx +++ b/Charts/vtkOpenGL2ContextDevice2D.cxx @@ -112,7 +112,7 @@ void vtkOpenGL2ContextDevice2D::DrawPointSprites(vtkImageData *sprite, this->Storage->SpriteTexture = vtkTexture::New(); this->Storage->SpriteTexture->SetRepeat(false); } - this->Storage->SpriteTexture->SetInput(sprite); + this->Storage->SpriteTexture->SetInputData(sprite); this->Storage->SpriteTexture->Render(this->Renderer); } diff --git a/Charts/vtkOpenGLContextDevice2D.cxx b/Charts/vtkOpenGLContextDevice2D.cxx index ec240cdf151..77b8e1e1c2f 100644 --- a/Charts/vtkOpenGLContextDevice2D.cxx +++ b/Charts/vtkOpenGLContextDevice2D.cxx @@ -283,7 +283,7 @@ void vtkOpenGLContextDevice2D::DrawPointSprites(vtkImageData *sprite, this->Storage->SpriteTexture = vtkTexture::New(); this->Storage->SpriteTexture->SetRepeat(false); } - this->Storage->SpriteTexture->SetInput(sprite); + this->Storage->SpriteTexture->SetInputData(sprite); this->Storage->SpriteTexture->Render(this->Renderer); } @@ -893,7 +893,7 @@ void vtkOpenGLContextDevice2D::SetTexture(vtkImageData* image, int properties) { this->Storage->Texture = vtkTexture::New(); } - this->Storage->Texture->SetInput(image); + this->Storage->Texture->SetInputData(image); this->Storage->TextureProperties = properties; this->Storage->Texture->SetRepeat(properties & vtkContextDevice2D::Repeat); this->Storage->Texture->SetInterpolate(properties & vtkContextDevice2D::Linear); diff --git a/Charts/vtkPlot.cxx b/Charts/vtkPlot.cxx index 26b38ff82ea..53ba5d0c0f3 100644 --- a/Charts/vtkPlot.cxx +++ b/Charts/vtkPlot.cxx @@ -214,20 +214,20 @@ vtkStdString vtkPlot::GetLabel(vtkIdType index) } } //----------------------------------------------------------------------------- -void vtkPlot::SetInput(vtkTable *table) +void vtkPlot::SetInputData(vtkTable *table) { - this->Data->SetInput(table); + this->Data->SetInputData(table); this->AutoLabels = 0; // No longer valid } //----------------------------------------------------------------------------- -void vtkPlot::SetInput(vtkTable *table, const vtkStdString &xColumn, - const vtkStdString &yColumn) +void vtkPlot::SetInputData(vtkTable *table, const vtkStdString &xColumn, + const vtkStdString &yColumn) { vtkDebugMacro(<< "Setting input, X column = \"" << xColumn.c_str() << "\", " << "Y column = \"" << yColumn.c_str() << "\""); - this->Data->SetInput(table); + this->Data->SetInputData(table); this->Data->SetInputArrayToProcess(0, 0, 0, vtkDataObject::FIELD_ASSOCIATION_ROWS, xColumn.c_str()); @@ -238,12 +238,12 @@ void vtkPlot::SetInput(vtkTable *table, const vtkStdString &xColumn, } //----------------------------------------------------------------------------- -void vtkPlot::SetInput(vtkTable *table, vtkIdType xColumn, - vtkIdType yColumn) +void vtkPlot::SetInputData(vtkTable *table, vtkIdType xColumn, + vtkIdType yColumn) { - this->SetInput(table, - table->GetColumnName(xColumn), - table->GetColumnName(yColumn)); + this->SetInputData(table, + table->GetColumnName(xColumn), + table->GetColumnName(yColumn)); } //----------------------------------------------------------------------------- diff --git a/Charts/vtkPlot.h b/Charts/vtkPlot.h index 05e135a80af..24ffe33a5d0 100644 --- a/Charts/vtkPlot.h +++ b/Charts/vtkPlot.h @@ -135,10 +135,10 @@ public: // Description: // This is a convenience function to set the input table and the x, y column // for the plot. - virtual void SetInput(vtkTable *table); - virtual void SetInput(vtkTable *table, const vtkStdString &xColumn, - const vtkStdString &yColumn); - void SetInput(vtkTable *table, vtkIdType xColumn, vtkIdType yColumn); + virtual void SetInputData(vtkTable *table); + virtual void SetInputData(vtkTable *table, const vtkStdString &xColumn, + const vtkStdString &yColumn); + void SetInputData(vtkTable *table, vtkIdType xColumn, vtkIdType yColumn); // Description: // Get the input table used by the plot. diff --git a/Charts/vtkPlotHistogram2D.cxx b/Charts/vtkPlotHistogram2D.cxx index 61c6d12d0e3..99e2132ae11 100644 --- a/Charts/vtkPlotHistogram2D.cxx +++ b/Charts/vtkPlotHistogram2D.cxx @@ -63,7 +63,7 @@ bool vtkPlotHistogram2D::Paint(vtkContext2D *painter) } //----------------------------------------------------------------------------- -void vtkPlotHistogram2D::SetInput(vtkImageData *data, vtkIdType) +void vtkPlotHistogram2D::SetInputData(vtkImageData *data, vtkIdType) { // FIXME: Store the z too, for slices. this->Input = data; diff --git a/Charts/vtkPlotHistogram2D.h b/Charts/vtkPlotHistogram2D.h index 480542e9b73..2ff3346b6e3 100644 --- a/Charts/vtkPlotHistogram2D.h +++ b/Charts/vtkPlotHistogram2D.h @@ -52,9 +52,9 @@ public: // Set the input, we are expecting a vtkImageData with just one component, // this would normally be a float or a double. It will be passed to the other // functions as a double to generate a color. - virtual void SetInput(vtkImageData *data, vtkIdType z = 0); - virtual void SetInput(vtkTable*) { } - virtual void SetInput(vtkTable*, const vtkStdString&, const vtkStdString&) { } + virtual void SetInputData(vtkImageData *data, vtkIdType z = 0); + virtual void SetInputData(vtkTable*) { } + virtual void SetInputData(vtkTable*, const vtkStdString&, const vtkStdString&) { } // Description: // Get the input table used by the plot. diff --git a/Charts/vtkPlotParallelCoordinates.cxx b/Charts/vtkPlotParallelCoordinates.cxx index 67230845756..ba0f0f96562 100644 --- a/Charts/vtkPlotParallelCoordinates.cxx +++ b/Charts/vtkPlotParallelCoordinates.cxx @@ -278,7 +278,7 @@ bool vtkPlotParallelCoordinates::ResetSelectionRange() } //----------------------------------------------------------------------------- -void vtkPlotParallelCoordinates::SetInput(vtkTable* table) +void vtkPlotParallelCoordinates::SetInputData(vtkTable* table) { if (table == this->Data->GetInput() && (!table || table->GetMTime() < this->BuildTime)) @@ -286,7 +286,7 @@ void vtkPlotParallelCoordinates::SetInput(vtkTable* table) return; } - this->vtkPlot::SetInput(table); + this->vtkPlot::SetInputData(table); vtkChartParallelCoordinates *parent = vtkChartParallelCoordinates::SafeDownCast(this->Parent); @@ -336,7 +336,7 @@ bool vtkPlotParallelCoordinates::UpdateTableCache(vtkTable *table) { // We have a different kind of column - attempt to make it into an enum vtkStringToCategory* stoc = vtkStringToCategory::New(); - stoc->SetInput(table); + stoc->SetInputData(table); stoc->SetInputArrayToProcess(0, 0, 0, vtkDataObject::FIELD_ASSOCIATION_ROWS, cols->GetValue(i)); diff --git a/Charts/vtkPlotParallelCoordinates.h b/Charts/vtkPlotParallelCoordinates.h index 72dfa1c6a2c..45d6711c0a8 100644 --- a/Charts/vtkPlotParallelCoordinates.h +++ b/Charts/vtkPlotParallelCoordinates.h @@ -82,11 +82,11 @@ public: // Description: // This is a convenience function to set the input table. - virtual void SetInput(vtkTable *table); - virtual void SetInput(vtkTable *table, const vtkStdString&, - const vtkStdString&) + virtual void SetInputData(vtkTable *table); + virtual void SetInputData(vtkTable *table, const vtkStdString&, + const vtkStdString&) { - this->SetInput(table); + this->SetInputData(table); } // Description: diff --git a/Filtering/CMakeLists.txt b/Filtering/CMakeLists.txt index 36046979318..36bf2aa4144 100644 --- a/Filtering/CMakeLists.txt +++ b/Filtering/CMakeLists.txt @@ -77,7 +77,6 @@ vtkGenericAttribute.cxx vtkGenericCell.cxx vtkGenericCellIterator.cxx vtkGenericCellTessellator.cxx -vtkGenericDataSetAlgorithm.cxx vtkGenericDataSet.cxx vtkGenericEdgeTable.cxx vtkGenericInterpolatedVelocityField.cxx @@ -239,7 +238,6 @@ vtkGenericAttribute vtkGenericCellIterator vtkGenericCellTessellator vtkGenericDataSet -vtkGenericDataSetAlgorithm vtkGenericPointIterator vtkGenericSubdivisionErrorMetric vtkGraph diff --git a/Filtering/Testing/Cxx/TestImageDataFindCell.cxx b/Filtering/Testing/Cxx/TestImageDataFindCell.cxx index f02aa35a80c..03d9df7c876 100644 --- a/Filtering/Testing/Cxx/TestImageDataFindCell.cxx +++ b/Filtering/Testing/Cxx/TestImageDataFindCell.cxx @@ -33,7 +33,7 @@ inline int DoTest( image->SetExtent(extent); image->SetOrigin(origin); image->SetSpacing(spacing); - image->AllocateScalars(); + image->AllocateScalars(VTK_DOUBLE, 1); double bounds[6]; image->GetBounds(bounds); diff --git a/Filtering/Testing/Cxx/TestImageDataToStructuredGrid.cxx b/Filtering/Testing/Cxx/TestImageDataToStructuredGrid.cxx index de1849c8652..ba20b9aa515 100644 --- a/Filtering/Testing/Cxx/TestImageDataToStructuredGrid.cxx +++ b/Filtering/Testing/Cxx/TestImageDataToStructuredGrid.cxx @@ -214,7 +214,7 @@ int TestImageDataToStructuredGrid(int,char *[]) vtkUniformGrid* img1 = GetGrid( origin, spacing, ndim ); vtkImageToStructuredGrid* myFilter = vtkImageToStructuredGrid::New( ); - myFilter->SetInput( img1 ); + myFilter->SetInputData( img1 ); img1->Delete(); myFilter->Update(); vtkStructuredGrid* sg1 = myFilter->GetOutput(); diff --git a/Filtering/vtkAlgorithm.cxx b/Filtering/vtkAlgorithm.cxx index 232925c1829..be269a894b0 100644 --- a/Filtering/vtkAlgorithm.cxx +++ b/Filtering/vtkAlgorithm.cxx @@ -39,6 +39,7 @@ #include "vtkSmartPointer.h" #include "vtkStreamingDemandDrivenPipeline.h" #include "vtkTable.h" +#include "vtkTrivialProducer.h" #include <vtkstd/set> #include <vtkstd/vector> @@ -1449,7 +1450,8 @@ int vtkAlgorithm::GetReleaseDataFlag() } //---------------------------------------------------------------------------- -int vtkAlgorithm::UpdateExtentIsEmpty(vtkDataObject *output) +int vtkAlgorithm::UpdateExtentIsEmpty(vtkInformation *pinfo, + vtkDataObject *output) { if (output == NULL) { @@ -1458,11 +1460,9 @@ int vtkAlgorithm::UpdateExtentIsEmpty(vtkDataObject *output) // get the pinfo object then call the info signature return this->UpdateExtentIsEmpty( - output->GetPipelineInformation(), + pinfo, output->GetInformation()->Get(vtkDataObject::DATA_EXTENT_TYPE())); } - - //---------------------------------------------------------------------------- int vtkAlgorithm::UpdateExtentIsEmpty(vtkInformation *info, int extentType) { @@ -1593,3 +1593,32 @@ void vtkAlgorithm::SetUpdateExtent(int port, extent); } } + +//---------------------------------------------------------------------------- +void vtkAlgorithm::SetInputDataInternal(int port, vtkDataObject *input) +{ + if(input) + { + vtkTrivialProducer* tp = vtkTrivialProducer::New(); + tp->SetOutput(input); + this->SetInputConnection(port, tp->GetOutputPort()); + tp->Delete(); + } + else + { + // Setting a NULL input removes the connection. + this->SetInputConnection(port, 0); + } +} + +//---------------------------------------------------------------------------- +void vtkAlgorithm::AddInputDataInternal(int port, vtkDataObject *input) +{ + if(input) + { + vtkTrivialProducer* tp = vtkTrivialProducer::New(); + tp->SetOutput(input); + this->AddInputConnection(port, tp->GetOutputPort()); + tp->Delete(); + } +} diff --git a/Filtering/vtkAlgorithm.h b/Filtering/vtkAlgorithm.h index 7f27392bf01..683df9752c1 100644 --- a/Filtering/vtkAlgorithm.h +++ b/Filtering/vtkAlgorithm.h @@ -407,7 +407,7 @@ public: // This condition is satisfied when the UpdateExtent has // zero volume (0,-1,...) or the UpdateNumberOfPieces is 0. // The source uses this call to determine whether to call Execute. - int UpdateExtentIsEmpty(vtkDataObject *output); + int UpdateExtentIsEmpty(vtkInformation *pinfo, vtkDataObject *output); int UpdateExtentIsEmpty(vtkInformation *pinfo, int extentType); // Description: @@ -631,6 +631,14 @@ protected: static vtkExecutive* DefaultExecutivePrototype; + // Description: + // These methods are used by subclasses to implement methods to + // set data objects directly as input. Internally, they create + // a vtkTrivialProducer that has the data object as output and + // connect it to the algorithm. + void SetInputDataInternal(int port, vtkDataObject *input); + void AddInputDataInternal(int port, vtkDataObject *input); + private: vtkExecutive* Executive; vtkInformationVector* InputPortInformation; diff --git a/Filtering/vtkAnnotationLayersAlgorithm.cxx b/Filtering/vtkAnnotationLayersAlgorithm.cxx index 2c3fb70d5a5..e5b2138393c 100644 --- a/Filtering/vtkAnnotationLayersAlgorithm.cxx +++ b/Filtering/vtkAnnotationLayersAlgorithm.cxx @@ -20,7 +20,6 @@ #include "vtkObjectFactory.h" #include "vtkAnnotationLayers.h" #include "vtkStreamingDemandDrivenPipeline.h" -#include "vtkTrivialProducer.h" vtkStandardNewMacro(vtkAnnotationLayersAlgorithm); @@ -93,17 +92,9 @@ vtkAnnotationLayers* vtkAnnotationLayersAlgorithm::GetOutput(int index) } //---------------------------------------------------------------------------- -void vtkAnnotationLayersAlgorithm::SetInput(int index, vtkDataObject* input) +void vtkAnnotationLayersAlgorithm::SetInputData(int index, vtkDataObject* input) { - if (input) - { - this->SetInputConnection(index, input->GetProducerPort()); - } - else - { - // Setting a NULL input removes the connection. - this->SetInputConnection(index, 0); - } + this->SetInputDataInternal(index, input); } //---------------------------------------------------------------------------- diff --git a/Filtering/vtkAnnotationLayersAlgorithm.h b/Filtering/vtkAnnotationLayersAlgorithm.h index 42ef9e1710b..567d3dfb0a0 100644 --- a/Filtering/vtkAnnotationLayersAlgorithm.h +++ b/Filtering/vtkAnnotationLayersAlgorithm.h @@ -58,15 +58,11 @@ public: vtkAnnotationLayers* GetOutput(int index); // Description: - // Set an input of this algorithm. You should not override these - // methods because they are not the only way to connect a pipeline. - // Note that these methods support old-style pipeline connections. - // When writing new code you should use the more general - // vtkAlgorithm::SetInputConnection(). These methods transform the - // input index to the input port index, not an index of a connection - // within a single port. - void SetInput(vtkDataObject * obj) { this->SetInput(0, obj); } - void SetInput(int index, vtkDataObject* obj); + // Assign a data object as input. Note that this method does not + // establish a pipeline connection. Use SetInputConnection() to + // setup a pipeline connection. + void SetInputData(vtkDataObject * obj) { this->SetInputData(0, obj); } + void SetInputData(int index, vtkDataObject* obj); protected: vtkAnnotationLayersAlgorithm(); diff --git a/Filtering/vtkArrayDataAlgorithm.cxx b/Filtering/vtkArrayDataAlgorithm.cxx index cafa92794c9..132bf38e086 100644 --- a/Filtering/vtkArrayDataAlgorithm.cxx +++ b/Filtering/vtkArrayDataAlgorithm.cxx @@ -26,7 +26,6 @@ #include "vtkInformationVector.h" #include "vtkObjectFactory.h" #include "vtkStreamingDemandDrivenPipeline.h" -#include "vtkTrivialProducer.h" vtkStandardNewMacro(vtkArrayDataAlgorithm); @@ -99,17 +98,9 @@ vtkArrayData* vtkArrayDataAlgorithm::GetOutput(int index) } //---------------------------------------------------------------------------- -void vtkArrayDataAlgorithm::SetInput(int index, vtkDataObject* input) +void vtkArrayDataAlgorithm::SetInputData(int index, vtkDataObject* input) { - if (input) - { - this->SetInputConnection(index, input->GetProducerPort()); - } - else - { - // Setting a NULL input removes the connection. - this->SetInputConnection(index, 0); - } + this->SetInputDataInternal(index, input); } //---------------------------------------------------------------------------- diff --git a/Filtering/vtkArrayDataAlgorithm.h b/Filtering/vtkArrayDataAlgorithm.h index 201d6bd652f..8422d31ceef 100644 --- a/Filtering/vtkArrayDataAlgorithm.h +++ b/Filtering/vtkArrayDataAlgorithm.h @@ -3,11 +3,6 @@ Program: Visualization Toolkit Module: vtkArrayDataAlgorithm.h -------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. -------------------------------------------------------------------------- Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen All rights reserved. @@ -18,6 +13,13 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ +/* +------------------------------------------------------------------------- + Copyright 2008 Sandia Corporation. + Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, + the U.S. Government retains certain rights in this software. +------------------------------------------------------------------------- +*/ // .NAME vtkArrayDataAlgorithm - Superclass for algorithms that produce // vtkArrayDatas as output @@ -31,13 +33,7 @@ // simply change it with SetNumberOfInputPorts etc. See this class // constructor for the default. This class also provides a FillInputPortInfo // method that by default says that all inputs will be vtkArrayData. If that -// isn't the case then please override this method in your subclass. This -// class breaks out the downstream requests into separate functions such as -// ExecuteData and ExecuteInformation. For new algorithms you should -// implement RequestData( request, inputVec, outputVec) but for older filters -// there is a default implementation that calls the old ExecuteData(output) -// signature. For even older filters that don't implement ExecuteData the -// default implementation calls the even older Execute() signature. +// isn't the case then please override this method in your subclass. // .SECTION Thanks // Developed by Timothy M. Shead (tshead@sandia.gov) at Sandia National Laboratories. @@ -69,15 +65,11 @@ public: vtkArrayData* GetOutput(int index); // Description: - // Set an input of this algorithm. You should not override these - // methods because they are not the only way to connect a pipeline. - // Note that these methods support old-style pipeline connections. - // When writing new code you should use the more general - // vtkAlgorithm::SetInputConnection(). These methods transform the - // input index to the input port index, not an index of a connection - // within a single port. - void SetInput(vtkDataObject * obj) { this->SetInput(0, obj); } - void SetInput(int index, vtkDataObject* obj); + // Assign a data object as input. Note that this method does not + // establish a pipeline connection. Use SetInputConnection() to + // setup a pipeline connection. + void SetInputData(vtkDataObject * obj) { this->SetInputData(0, obj); } + void SetInputData(int index, vtkDataObject* obj); protected: vtkArrayDataAlgorithm(); diff --git a/Filtering/vtkCompositeDataPipeline.cxx b/Filtering/vtkCompositeDataPipeline.cxx index 75d2b52560f..2f4e0fc3576 100644 --- a/Filtering/vtkCompositeDataPipeline.cxx +++ b/Filtering/vtkCompositeDataPipeline.cxx @@ -703,7 +703,7 @@ void vtkCompositeDataPipeline::ExecuteSimpleAlgorithm( vtkDataObject* curOutput = outInfo->Get(vtkDataObject::DATA_OBJECT()); if (curOutput != compositeOutput.GetPointer()) { - compositeOutput->SetPipelineInformation(outInfo); + outInfo->Set(vtkDataObject::DATA_OBJECT(), compositeOutput); } } this->ExecuteDataEnd(request,inInfoVec,outInfoVec); @@ -759,12 +759,6 @@ vtkDataObject* vtkCompositeDataPipeline::ExecuteSimpleAlgorithmForBlock( if (dobj) { dobj->CopyInformationToPipeline(request, 0, inInfo, 1); - - // This should not be needed but since a lot of image filters do: - // img->GetScalarType(), it is necessary. - dobj->GetProducerPort(); // make sure there is pipeline info. - dobj->CopyInformationToPipeline - (request, 0, dobj->GetPipelineInformation(), 1); } this->Superclass::ExecuteInformation(request,inInfoVec,outInfoVec); @@ -961,7 +955,7 @@ void vtkCompositeDataPipeline::ExecuteSimpleAlgorithmTime( vtkDataObject* curOutput = outInfo->Get(vtkDataObject::DATA_OBJECT()); if (curOutput != temporalOutput.GetPointer()) { - temporalOutput->SetPipelineInformation(outInfo); + outInfo->Set(vtkDataObject::DATA_OBJECT(), temporalOutput); } this->ExecuteDataEnd(request,inInfoVec,outInfoVec); } @@ -1346,7 +1340,7 @@ int vtkCompositeDataPipeline::CheckCompositeData( vtkDebugMacro(<< "CheckCompositeData created " << output->GetClassName() << "output"); } - output->SetPipelineInformation(outInfo); + outInfo->Set(vtkDataObject::DATA_OBJECT(), output); // Copy extent type to the output port information because // CreateOutputCompositeDataSet() changes it and some algorithms need it. this->GetAlgorithm()->GetOutputPortInformation(port)->Set( diff --git a/Filtering/vtkCompositeDataSet.cxx b/Filtering/vtkCompositeDataSet.cxx index 10e46dfb084..e2c813bca8a 100644 --- a/Filtering/vtkCompositeDataSet.cxx +++ b/Filtering/vtkCompositeDataSet.cxx @@ -23,7 +23,6 @@ #include "vtkInformationStringKey.h" #include "vtkInformationVector.h" #include "vtkObjectFactory.h" -#include "vtkTrivialProducer.h" vtkInformationKeyMacro(vtkCompositeDataSet, NAME, String); //---------------------------------------------------------------------------- @@ -38,27 +37,6 @@ vtkCompositeDataSet::~vtkCompositeDataSet() delete this->Internals; } -//---------------------------------------------------------------------------- -vtkAlgorithmOutput* vtkCompositeDataSet::GetProducerPort() -{ - // Make sure there is an executive. - if(!this->GetExecutive()) - { - vtkTrivialProducer* tp = vtkTrivialProducer::New(); - vtkCompositeDataPipeline* exec = vtkCompositeDataPipeline::New(); - tp->SetExecutive(exec); - vtkInformation* portInfo = - tp->GetOutputPortInformation(0); - portInfo->Set(vtkDataObject::DATA_TYPE_NAME(), this->GetClassName()); - exec->Delete(); - tp->SetOutput(this); - tp->Delete(); - } - - // Get the port from the executive. - return this->GetExecutive()->GetProducerPort(this); -} - //---------------------------------------------------------------------------- vtkCompositeDataSet* vtkCompositeDataSet::GetData(vtkInformation* info) { diff --git a/Filtering/vtkCompositeDataSet.h b/Filtering/vtkCompositeDataSet.h index 000de32440d..2ce033718e3 100644 --- a/Filtering/vtkCompositeDataSet.h +++ b/Filtering/vtkCompositeDataSet.h @@ -52,10 +52,6 @@ public: // definitions). virtual int GetDataObjectType() {return VTK_COMPOSITE_DATA_SET;} - // Description: - // Get the port currently producing this object. - virtual vtkAlgorithmOutput* GetProducerPort(); - // Description: // Copies the tree structure from the input. All pointers to non-composite // data objects are intialized to NULL. This also shallow copies the meta data diff --git a/Filtering/vtkCompositeDataSetAlgorithm.cxx b/Filtering/vtkCompositeDataSetAlgorithm.cxx index d3b2073ca18..b2394ae9944 100644 --- a/Filtering/vtkCompositeDataSetAlgorithm.cxx +++ b/Filtering/vtkCompositeDataSetAlgorithm.cxx @@ -49,23 +49,15 @@ vtkCompositeDataSet* vtkCompositeDataSetAlgorithm::GetOutput(int port) } //---------------------------------------------------------------------------- -void vtkCompositeDataSetAlgorithm::SetInput(vtkDataObject* input) +void vtkCompositeDataSetAlgorithm::SetInputData(vtkDataObject* input) { - this->SetInput(0, input); + this->SetInputData(0, input); } //---------------------------------------------------------------------------- -void vtkCompositeDataSetAlgorithm::SetInput(int index, vtkDataObject* input) +void vtkCompositeDataSetAlgorithm::SetInputData(int index, vtkDataObject* input) { - if(input) - { - this->SetInputConnection(index, input->GetProducerPort()); - } - else - { - // Setting a NULL input removes the connection. - this->SetInputConnection(index, 0); - } + this->SetInputDataInternal(index, input); } //---------------------------------------------------------------------------- diff --git a/Filtering/vtkCompositeDataSetAlgorithm.h b/Filtering/vtkCompositeDataSetAlgorithm.h index 9a82fd649b7..00477f36703 100644 --- a/Filtering/vtkCompositeDataSetAlgorithm.h +++ b/Filtering/vtkCompositeDataSetAlgorithm.h @@ -39,15 +39,11 @@ public: vtkCompositeDataSet* GetOutput(int); // Description: - // Set an input of this algorithm. You should not override these - // methods because they are not the only way to connect a pipeline. - // Note that these methods support old-style pipeline connections. - // When writing new code you should use the more general - // vtkAlgorithm::SetInputConnection(). These methods transform the - // input index to the input port index, not an index of a connection - // within a single port. - void SetInput(vtkDataObject*); - void SetInput(int, vtkDataObject*); + // Assign a data object as input. Note that this method does not + // establish a pipeline connection. Use SetInputConnection() to + // setup a pipeline connection. + void SetInputData(vtkDataObject*); + void SetInputData(int, vtkDataObject*); // Description: // see vtkAlgorithm for details diff --git a/Filtering/vtkDataObject.cxx b/Filtering/vtkDataObject.cxx index 065c0b86a88..744fe7cca88 100644 --- a/Filtering/vtkDataObject.cxx +++ b/Filtering/vtkDataObject.cxx @@ -26,8 +26,6 @@ PURPOSE. See the above copyright notice for more information. #include "vtkInformationDataObjectKey.h" #include "vtkInformationDoubleKey.h" #include "vtkInformationDoubleVectorKey.h" -#include "vtkInformationExecutivePortKey.h" -#include "vtkInformationExecutivePortVectorKey.h" #include "vtkInformationIntegerKey.h" #include "vtkInformationIntegerPointerKey.h" #include "vtkInformationIntegerVectorKey.h" @@ -91,8 +89,6 @@ const char vtkDataObject //---------------------------------------------------------------------------- vtkDataObject::vtkDataObject() { - this->PipelineInformation = 0; - this->Information = vtkInformation::New(); // We have to assume that if a user is creating the data on their own, @@ -108,7 +104,6 @@ vtkDataObject::vtkDataObject() //---------------------------------------------------------------------------- vtkDataObject::~vtkDataObject() { - this->SetPipelineInformation(0); this->SetInformation(0); this->SetFieldData(NULL); } @@ -138,59 +133,6 @@ void vtkDataObject::PrintSelf(ostream& os, vtkIndent indent) this->FieldData->PrintSelf(os,indent.GetNextIndent()); } - -//---------------------------------------------------------------------------- -void vtkDataObject::SetPipelineInformation(vtkInformation* newInfo) -{ - vtkInformation* oldInfo = this->PipelineInformation; - if(newInfo != oldInfo) - { - if(newInfo) - { - // Reference the new information. - newInfo->Register(this); - - // Detach the output that used to be held by the new information. - if(vtkDataObject* oldData = newInfo->Get(vtkDataObject::DATA_OBJECT())) - { - oldData->Register(this); - oldData->SetPipelineInformation(0); - oldData->UnRegister(this); - } - - // Tell the new information about this object. - newInfo->Set(vtkDataObject::DATA_OBJECT(), this); - } - - // Save the pointer to the new information. - this->PipelineInformation = newInfo; - - if(oldInfo) - { - // Remove the old information's reference to us. - oldInfo->Set(vtkDataObject::DATA_OBJECT(), 0); - - // Remove our reference to the old information. - oldInfo->UnRegister(this); - } - } -} - -//---------------------------------------------------------------------------- -vtkAlgorithmOutput* vtkDataObject::GetProducerPort() -{ - // Make sure there is an executive. - if(!this->GetExecutive()) - { - vtkTrivialProducer* tp = vtkTrivialProducer::New(); - tp->SetOutput(this); - tp->FastDelete(); - } - - // Get the port from the executive. - return this->GetExecutive()->GetProducerPort(this); -} - //---------------------------------------------------------------------------- // Determine the modified time of this object unsigned long int vtkDataObject::GetMTime() @@ -628,26 +570,6 @@ unsigned long vtkDataObject::GetUpdateTime() return this->UpdateTime.GetMTime(); } -//---------------------------------------------------------------------------- -vtkExecutive* vtkDataObject::GetExecutive() -{ - if(this->PipelineInformation) - { - return vtkExecutive::PRODUCER()->GetExecutive(this->PipelineInformation); - } - return 0; -} - -//---------------------------------------------------------------------------- -int vtkDataObject::GetPortNumber() -{ - if(this->PipelineInformation) - { - return vtkExecutive::PRODUCER()->GetPort(this->PipelineInformation); - } - return 0; -} - //---------------------------------------------------------------------------- unsigned long vtkDataObject::GetActualMemorySize() @@ -761,8 +683,6 @@ void vtkDataObject::ReportReferences(vtkGarbageCollector* collector) { this->Superclass::ReportReferences(collector); vtkGarbageCollectorReport(collector, this->Information, "Information"); - vtkGarbageCollectorReport(collector, this->PipelineInformation, - "PipelineInformation"); } diff --git a/Filtering/vtkDataObject.h b/Filtering/vtkDataObject.h index 0a3c498bb01..578c189d258 100644 --- a/Filtering/vtkDataObject.h +++ b/Filtering/vtkDataObject.h @@ -71,16 +71,6 @@ public: vtkGetObjectMacro(Information, vtkInformation); virtual void SetInformation(vtkInformation*); - // Description: - // Get/Set the pipeline information object that owns this data - // object. - vtkGetObjectMacro(PipelineInformation, vtkInformation); - virtual void SetPipelineInformation(vtkInformation*); - - // Description: - // Get the port currently producing this object. - virtual vtkAlgorithmOutput* GetProducerPort(); - // Description: // Data objects are composite objects and need to check each part for MTime. // The information object also needs to be considered. @@ -163,15 +153,6 @@ public: vtkInformation* output, int forceCopy); - // Description: - // Calls CopyInformationToPipeline(request, input, this->PipelineInformation, 0). - // Subclasses should not override this method (not virtual) - void CopyInformationToPipeline(vtkInformation* request, - vtkInformation* input) - { - this->CopyInformationToPipeline(request, input, this->PipelineInformation, 0); - } - // Description: // Return the information object within the input information object's // field data corresponding to the specified association @@ -387,21 +368,11 @@ protected: // When was this data last generated? vtkTimeStamp UpdateTime; - // Get the executive that manages this data object. - vtkExecutive* GetExecutive(); - - // Get the port number producing this data object. - int GetPortNumber(); - virtual void ReportReferences(vtkGarbageCollector*); // Arbitrary extra information associated with this data object. vtkInformation* Information; - // Reference the pipeline information object that owns this data - // object. - vtkInformation* PipelineInformation; - //BTX friend class vtkStreamingDemandDrivenPipelineToDataObjectFriendship; //ETX diff --git a/Filtering/vtkDataObjectAlgorithm.cxx b/Filtering/vtkDataObjectAlgorithm.cxx index f5082f43c35..7fececb8b9f 100644 --- a/Filtering/vtkDataObjectAlgorithm.cxx +++ b/Filtering/vtkDataObjectAlgorithm.cxx @@ -20,7 +20,6 @@ #include "vtkObjectFactory.h" #include "vtkDataObject.h" #include "vtkStreamingDemandDrivenPipeline.h" -#include "vtkTrivialProducer.h" vtkStandardNewMacro(vtkDataObjectAlgorithm); @@ -137,36 +136,25 @@ int vtkDataObjectAlgorithm::RequestInformation( } //---------------------------------------------------------------------------- -void vtkDataObjectAlgorithm::SetInput(vtkDataObject* input) +void vtkDataObjectAlgorithm::SetInputData(vtkDataObject* input) { - this->SetInput(0, input); + this->SetInputData(0, input); } //---------------------------------------------------------------------------- -void vtkDataObjectAlgorithm::SetInput(int index, vtkDataObject* input) +void vtkDataObjectAlgorithm::SetInputData(int index, vtkDataObject* input) { - if(input) - { - this->SetInputConnection(index, input->GetProducerPort()); - } - else - { - // Setting a NULL input removes the connection. - this->SetInputConnection(index, 0); - } + this->SetInputDataInternal(index, input); } //---------------------------------------------------------------------------- -void vtkDataObjectAlgorithm::AddInput(vtkDataObject* input) +void vtkDataObjectAlgorithm::AddInputData(vtkDataObject* input) { - this->AddInput(0, input); + this->AddInputData(0, input); } //---------------------------------------------------------------------------- -void vtkDataObjectAlgorithm::AddInput(int index, vtkDataObject* input) +void vtkDataObjectAlgorithm::AddInputData(int index, vtkDataObject* input) { - if(input) - { - this->AddInputConnection(index, input->GetProducerPort()); - } + this->AddInputDataInternal(index, input); } diff --git a/Filtering/vtkDataObjectAlgorithm.h b/Filtering/vtkDataObjectAlgorithm.h index 7f86dff5935..6f4daca7af5 100644 --- a/Filtering/vtkDataObjectAlgorithm.h +++ b/Filtering/vtkDataObjectAlgorithm.h @@ -65,23 +65,18 @@ public: vtkDataObject *GetInput(int port); // Description: - // Set an input of this algorithm. You should not override these - // methods because they are not the only way to connect a pipeline. - // Note that these methods support old-style pipeline connections. - // When writing new code you should use the more general - // vtkAlgorithm::SetInputConnection(). These methods transform the - // input index to the input port index, not an index of a connection - // within a single port. - void SetInput(vtkDataObject *); - void SetInput(int, vtkDataObject*); + // Assign a data object as input. Note that this method does not + // establish a pipeline connection. Use SetInputConnection() to + // setup a pipeline connection. + void SetInputData(vtkDataObject *); + void SetInputData(int, vtkDataObject*); // Description: - // Add an input of this algorithm. Note that these methods support - // old-style pipeline connections. When writing new code you should - // use the more general vtkAlgorithm::AddInputConnection(). See - // SetInput() for details. - void AddInput(vtkDataObject *); - void AddInput(int, vtkDataObject*); + // Assign a data object as input. Note that this method does not + // establish a pipeline connection. Use AddInputConnection() to + // setup a pipeline connection. + void AddInputData(vtkDataObject *); + void AddInputData(int, vtkDataObject*); protected: vtkDataObjectAlgorithm(); diff --git a/Filtering/vtkDataSetAlgorithm.cxx b/Filtering/vtkDataSetAlgorithm.cxx index 5175c4e36f5..062839f6cb4 100644 --- a/Filtering/vtkDataSetAlgorithm.cxx +++ b/Filtering/vtkDataSetAlgorithm.cxx @@ -92,62 +92,51 @@ vtkRectilinearGrid *vtkDataSetAlgorithm::GetRectilinearGridOutput() } //---------------------------------------------------------------------------- -void vtkDataSetAlgorithm::SetInput(vtkDataObject* input) +void vtkDataSetAlgorithm::SetInputData(vtkDataObject* input) { - this->SetInput(0, input); + this->SetInputData(0, input); } //---------------------------------------------------------------------------- -void vtkDataSetAlgorithm::SetInput(int index, vtkDataObject* input) +void vtkDataSetAlgorithm::SetInputData(int index, vtkDataObject* input) { - if(input) - { - this->SetInputConnection(index, input->GetProducerPort()); - } - else - { - // Setting a NULL input removes the connection. - this->SetInputConnection(index, 0); - } + this->SetInputDataInternal(index, input); } //---------------------------------------------------------------------------- -void vtkDataSetAlgorithm::SetInput(vtkDataSet* input) +void vtkDataSetAlgorithm::SetInputData(vtkDataSet* input) { - this->SetInput(0, static_cast<vtkDataObject*>(input)); + this->SetInputData(0, static_cast<vtkDataObject*>(input)); } //---------------------------------------------------------------------------- -void vtkDataSetAlgorithm::SetInput(int index, vtkDataSet* input) +void vtkDataSetAlgorithm::SetInputData(int index, vtkDataSet* input) { - this->SetInput(index, static_cast<vtkDataObject*>(input)); + this->SetInputData(index, static_cast<vtkDataObject*>(input)); } //---------------------------------------------------------------------------- -void vtkDataSetAlgorithm::AddInput(vtkDataObject* input) +void vtkDataSetAlgorithm::AddInputData(vtkDataObject* input) { - this->AddInput(0, input); + this->AddInputData(0, input); } //---------------------------------------------------------------------------- -void vtkDataSetAlgorithm::AddInput(int index, vtkDataObject* input) +void vtkDataSetAlgorithm::AddInputData(int index, vtkDataObject* input) { - if(input) - { - this->AddInputConnection(index, input->GetProducerPort()); - } + this->AddInputDataInternal(index, input); } //---------------------------------------------------------------------------- -void vtkDataSetAlgorithm::AddInput(vtkDataSet* input) +void vtkDataSetAlgorithm::AddInputData(vtkDataSet* input) { - this->AddInput(0, static_cast<vtkDataObject*>(input)); + this->AddInputData(0, static_cast<vtkDataObject*>(input)); } //---------------------------------------------------------------------------- -void vtkDataSetAlgorithm::AddInput(int index, vtkDataSet* input) +void vtkDataSetAlgorithm::AddInputData(int index, vtkDataSet* input) { - this->AddInput(index, static_cast<vtkDataObject*>(input)); + this->AddInputData(index, static_cast<vtkDataObject*>(input)); } //---------------------------------------------------------------------------- @@ -220,7 +209,7 @@ int vtkDataSetAlgorithm::RequestDataObject( if (!output || !output->IsA(input->GetClassName())) { vtkDataSet* newOutput = input->NewInstance(); - newOutput->SetPipelineInformation(info); + info->Set(vtkDataObject::DATA_OBJECT(), newOutput); newOutput->Delete(); } } diff --git a/Filtering/vtkDataSetAlgorithm.h b/Filtering/vtkDataSetAlgorithm.h index 846c36572f6..dea57f3447b 100644 --- a/Filtering/vtkDataSetAlgorithm.h +++ b/Filtering/vtkDataSetAlgorithm.h @@ -84,27 +84,22 @@ public: vtkRectilinearGrid *GetRectilinearGridOutput(); // Description: - // Set an input of this algorithm. You should not override these - // methods because they are not the only way to connect a pipeline. - // Note that these methods support old-style pipeline connections. - // When writing new code you should use the more general - // vtkAlgorithm::SetInputConnection(). These methods transform the - // input index to the input port index, not an index of a connection - // within a single port. - void SetInput(vtkDataObject*); - void SetInput(int, vtkDataObject*); - void SetInput(vtkDataSet*); - void SetInput(int, vtkDataSet*); + // Assign a data object as input. Note that this method does not + // establish a pipeline connection. Use SetInputConnection() to + // setup a pipeline connection. + void SetInputData(vtkDataObject*); + void SetInputData(int, vtkDataObject*); + void SetInputData(vtkDataSet*); + void SetInputData(int, vtkDataSet*); // Description: - // Add an input of this algorithm. Note that these methods support - // old-style pipeline connections. When writing new code you should - // use the more general vtkAlgorithm::AddInputConnection(). See - // SetInput() for details. - void AddInput(vtkDataObject *); - void AddInput(vtkDataSet*); - void AddInput(int, vtkDataSet*); - void AddInput(int, vtkDataObject*); + // Assign a data object as input. Note that this method does not + // establish a pipeline connection. Use AddInputConnection() to + // setup a pipeline connection. + void AddInputData(vtkDataObject *); + void AddInputData(vtkDataSet*); + void AddInputData(int, vtkDataSet*); + void AddInputData(int, vtkDataObject*); // Description: // see vtkAlgorithm for details diff --git a/Filtering/vtkDemandDrivenPipeline.cxx b/Filtering/vtkDemandDrivenPipeline.cxx index 260a62446d0..1c333c4bd6e 100644 --- a/Filtering/vtkDemandDrivenPipeline.cxx +++ b/Filtering/vtkDemandDrivenPipeline.cxx @@ -481,14 +481,6 @@ int vtkDemandDrivenPipeline::ExecuteInformation { inInfo = inInfoVec[0]->GetInformationObject(0); } - for(int i=0; i < this->Algorithm->GetNumberOfOutputPorts(); ++i) - { - vtkInformation* outInfo = outInfoVec->GetInformationObject(i); - if(vtkDataObject* outData = outInfo->Get(vtkDataObject::DATA_OBJECT())) - { - outData->CopyInformationToPipeline(request, inInfo); - } - } // Invoke the request on the algorithm. return this->CallAlgorithm(request, vtkExecutive::RequestDownstream, diff --git a/Filtering/vtkDirectedGraphAlgorithm.cxx b/Filtering/vtkDirectedGraphAlgorithm.cxx index 8b2c51ff386..b6e949b5650 100644 --- a/Filtering/vtkDirectedGraphAlgorithm.cxx +++ b/Filtering/vtkDirectedGraphAlgorithm.cxx @@ -25,7 +25,6 @@ #include "vtkObjectFactory.h" #include "vtkDirectedGraph.h" #include "vtkStreamingDemandDrivenPipeline.h" -#include "vtkTrivialProducer.h" vtkStandardNewMacro(vtkDirectedGraphAlgorithm); @@ -98,17 +97,9 @@ vtkDirectedGraph* vtkDirectedGraphAlgorithm::GetOutput(int index) } //---------------------------------------------------------------------------- -void vtkDirectedGraphAlgorithm::SetInput(int index, vtkDataObject* input) +void vtkDirectedGraphAlgorithm::SetInputData(int index, vtkDataObject* input) { - if (input) - { - this->SetInputConnection(index, input->GetProducerPort()); - } - else - { - // Setting a NULL input removes the connection. - this->SetInputConnection(index, 0); - } + this->SetInputDataInternal(index, input); } //---------------------------------------------------------------------------- diff --git a/Filtering/vtkDirectedGraphAlgorithm.h b/Filtering/vtkDirectedGraphAlgorithm.h index 491f28fdd7e..97dcf99d8cd 100644 --- a/Filtering/vtkDirectedGraphAlgorithm.h +++ b/Filtering/vtkDirectedGraphAlgorithm.h @@ -67,15 +67,11 @@ public: vtkDirectedGraph* GetOutput(int index); // Description: - // Set an input of this algorithm. You should not override these - // methods because they are not the only way to connect a pipeline. - // Note that these methods support old-style pipeline connections. - // When writing new code you should use the more general - // vtkAlgorithm::SetInputConnection(). These methods transform the - // input index to the input port index, not an index of a connection - // within a single port. - void SetInput(vtkDataObject * obj) { this->SetInput(0, obj); } - void SetInput(int index, vtkDataObject* obj); + // Assign a data object as input. Note that this method does not + // establish a pipeline connection. Use SetInputConnection() to + // setup a pipeline connection. + void SetInputData(vtkDataObject * obj) { this->SetInputData(0, obj); } + void SetInputData(int index, vtkDataObject* obj); protected: vtkDirectedGraphAlgorithm(); diff --git a/Filtering/vtkExecutive.cxx b/Filtering/vtkExecutive.cxx index ca5a10f8930..5becd4ba0fd 100644 --- a/Filtering/vtkExecutive.cxx +++ b/Filtering/vtkExecutive.cxx @@ -406,21 +406,26 @@ int vtkExecutive::OutputPortIndexInRange(int port, const char* action) } //---------------------------------------------------------------------------- -vtkAlgorithmOutput* vtkExecutive::GetProducerPort(vtkDataObject* d) -{ - if(this->Algorithm && d) - { - vtkInformation* info = d->GetPipelineInformation(); - vtkExecutive* dExecutive; - int port; - vtkExecutive::PRODUCER()->Get(info,dExecutive,port); - if(dExecutive == this) - { - return this->Algorithm->GetOutputPort(port); - } - } - return 0; -} +// vtkAlgorithmOutput* vtkExecutive::GetProducerPort(vtkDataObject* d) +// { +// if (!this->Algorithm) +// { +// return 0; +// } + +// int numPorts = this->GetNumberOfOutputPorts(); +// for (int i=0; i<numPorts; i++) +// { +// vtkInformation* info = this->GetOutputInformation(i); +// if (info->Has(vtkDataObject::DATA_OBJECT()) && +// info->Get(vtkDataObject::DATA_OBJECT()) == d) +// { +// return this->Algorithm->GetOutputPort(port); +// } +// } +// return 0; + +// } //---------------------------------------------------------------------------- void vtkExecutive::SetSharedInputInformation(vtkInformationVector** inInfoVec) @@ -473,18 +478,10 @@ void vtkExecutive::SetOutputData(int newPort, vtkDataObject* newOutput, { if(info) { - if(!newOutput || newOutput->GetPipelineInformation() != info) + vtkDataObject* currentOutput = info->Get(vtkDataObject::DATA_OBJECT()); + if(newOutput != currentOutput) { - if(newOutput) - { - newOutput->SetPipelineInformation(info); - } - else if(vtkDataObject* oldOutput = info->Get(vtkDataObject::DATA_OBJECT())) - { - oldOutput->Register(this); - oldOutput->SetPipelineInformation(0); - oldOutput->UnRegister(this); - } + info->Set(vtkDataObject::DATA_OBJECT(), newOutput); // Output has changed. Reset the pipeline information. this->ResetPipelineInformation(newPort, info); diff --git a/Filtering/vtkExecutive.h b/Filtering/vtkExecutive.h index 2b3d948feb5..0a3f685532c 100644 --- a/Filtering/vtkExecutive.h +++ b/Filtering/vtkExecutive.h @@ -132,7 +132,9 @@ public: // Description: // Get the output port that produces the given data object. - virtual vtkAlgorithmOutput* GetProducerPort(vtkDataObject*); + // Works only if the data was producer by this executive's + // algorithm. + // virtual vtkAlgorithmOutput* GetProducerPort(vtkDataObject*); // Description: // Set a pointer to an outside instance of input or output diff --git a/Filtering/vtkGraphAlgorithm.cxx b/Filtering/vtkGraphAlgorithm.cxx index 88ce1af0057..c199a3b7e2d 100644 --- a/Filtering/vtkGraphAlgorithm.cxx +++ b/Filtering/vtkGraphAlgorithm.cxx @@ -25,7 +25,6 @@ #include "vtkObjectFactory.h" #include "vtkGraph.h" #include "vtkStreamingDemandDrivenPipeline.h" -#include "vtkTrivialProducer.h" vtkStandardNewMacro(vtkGraphAlgorithm); @@ -104,17 +103,9 @@ vtkGraph* vtkGraphAlgorithm::GetOutput(int index) } //---------------------------------------------------------------------------- -void vtkGraphAlgorithm::SetInput(int index, vtkDataObject* input) +void vtkGraphAlgorithm::SetInputData(int index, vtkDataObject* input) { - if (input) - { - this->SetInputConnection(index, input->GetProducerPort()); - } - else - { - // Setting a NULL input removes the connection. - this->SetInputConnection(index, 0); - } + this->SetInputDataInternal(index, input); } //---------------------------------------------------------------------------- @@ -183,10 +174,8 @@ int vtkGraphAlgorithm::RequestDataObject( if (!output || !output->IsA(input->GetClassName())) { output = input->NewInstance(); - output->SetPipelineInformation(info); + info->Set(vtkDataObject::DATA_OBJECT(), output); output->Delete(); - this->GetOutputPortInformation(i)->Set( - vtkDataObject::DATA_EXTENT_TYPE(), output->GetExtentType()); } } return 1; diff --git a/Filtering/vtkGraphAlgorithm.h b/Filtering/vtkGraphAlgorithm.h index 65cc38826a1..fe831605a7f 100644 --- a/Filtering/vtkGraphAlgorithm.h +++ b/Filtering/vtkGraphAlgorithm.h @@ -67,15 +67,11 @@ public: vtkGraph* GetOutput(int index); // Description: - // Set an input of this algorithm. You should not override these - // methods because they are not the only way to connect a pipeline. - // Note that these methods support old-style pipeline connections. - // When writing new code you should use the more general - // vtkAlgorithm::SetInputConnection(). These methods transform the - // input index to the input port index, not an index of a connection - // within a single port. - void SetInput(vtkDataObject * obj) { this->SetInput(0, obj); } - void SetInput(int index, vtkDataObject* obj); + // Assign a data object as input. Note that this method does not + // establish a pipeline connection. Use SetInputConnection() to + // setup a pipeline connection. + void SetInputData(vtkDataObject * obj) { this->SetInputData(0, obj); } + void SetInputData(int index, vtkDataObject* obj); protected: vtkGraphAlgorithm(); @@ -86,6 +82,11 @@ protected: vtkInformationVector** inputVector, vtkInformationVector* outputVector); + virtual int RequestDataObject(vtkInformation* request, + vtkInformationVector** inputVector, + vtkInformationVector* outputVector); + + // Description: // This is called by the superclass. // This is the method you should override. @@ -100,12 +101,6 @@ protected: vtkInformationVector**, vtkInformationVector*); - // Description: - // By default, creates the same output type as the input type. - virtual int RequestDataObject(vtkInformation*, - vtkInformationVector** inputVector, - vtkInformationVector* outputVector); - // see algorithm for more info virtual int FillOutputPortInformation(int port, vtkInformation* info); virtual int FillInputPortInformation(int port, vtkInformation* info); diff --git a/Filtering/vtkHierarchicalBoxDataSetAlgorithm.cxx b/Filtering/vtkHierarchicalBoxDataSetAlgorithm.cxx index e1f039c194e..9d03ee0aefe 100644 --- a/Filtering/vtkHierarchicalBoxDataSetAlgorithm.cxx +++ b/Filtering/vtkHierarchicalBoxDataSetAlgorithm.cxx @@ -50,23 +50,15 @@ vtkHierarchicalBoxDataSet* vtkHierarchicalBoxDataSetAlgorithm::GetOutput(int por } //---------------------------------------------------------------------------- -void vtkHierarchicalBoxDataSetAlgorithm::SetInput(vtkDataObject* input) +void vtkHierarchicalBoxDataSetAlgorithm::SetInputData(vtkDataObject* input) { - this->SetInput(0, input); + this->SetInputData(0, input); } //---------------------------------------------------------------------------- -void vtkHierarchicalBoxDataSetAlgorithm::SetInput(int index, vtkDataObject* input) +void vtkHierarchicalBoxDataSetAlgorithm::SetInputData(int index, vtkDataObject* input) { - if(input) - { - this->SetInputConnection(index, input->GetProducerPort()); - } - else - { - // Setting a NULL input removes the connection. - this->SetInputConnection(index, 0); - } + this->SetInputDataInternal(index, input); } //---------------------------------------------------------------------------- diff --git a/Filtering/vtkHierarchicalBoxDataSetAlgorithm.h b/Filtering/vtkHierarchicalBoxDataSetAlgorithm.h index 846c1567597..9cda2945919 100644 --- a/Filtering/vtkHierarchicalBoxDataSetAlgorithm.h +++ b/Filtering/vtkHierarchicalBoxDataSetAlgorithm.h @@ -38,15 +38,11 @@ public: vtkHierarchicalBoxDataSet* GetOutput(int); // Description: - // Set an input of this algorithm. You should not override these - // methods because they are not the only way to connect a pipeline. - // Note that these methods support old-style pipeline connections. - // When writing new code you should use the more general - // vtkAlgorithm::SetInputConnection(). These methods transform the - // input index to the input port index, not an index of a connection - // within a single port. - void SetInput(vtkDataObject*); - void SetInput(int, vtkDataObject*); + // Assign a data object as input. Note that this method does not + // establish a pipeline connection. Use SetInputConnection() to + // setup a pipeline connection. + void SetInputData(vtkDataObject*); + void SetInputData(int, vtkDataObject*); // Description: // see vtkAlgorithm for details diff --git a/Filtering/vtkHyperOctreeAlgorithm.cxx b/Filtering/vtkHyperOctreeAlgorithm.cxx index 410a09448cc..dc513108b43 100644 --- a/Filtering/vtkHyperOctreeAlgorithm.cxx +++ b/Filtering/vtkHyperOctreeAlgorithm.cxx @@ -20,7 +20,6 @@ #include "vtkObjectFactory.h" #include "vtkHyperOctree.h" #include "vtkStreamingDemandDrivenPipeline.h" -#include "vtkTrivialProducer.h" //---------------------------------------------------------------------------- @@ -162,82 +161,29 @@ int vtkHyperOctreeAlgorithm::RequestData( vtkInformationVector** vtkNotUsed( inputVector ), vtkInformationVector* outputVector) { - // the default implimentation is to do what the old pipeline did find what - // output is requesting the data, and pass that into ExecuteData - - // which output port did the request come from - int outputPort = - request->Get(vtkDemandDrivenPipeline::FROM_OUTPUT_PORT()); - - // if output port is negative then that means this filter is calling the - // update directly, in that case just assume port 0 - if (outputPort == -1) - { - outputPort = 0; - } - - // get the data object - vtkInformation *outInfo = - outputVector->GetInformationObject(outputPort); - // call ExecuteData - this->ExecuteData( outInfo->Get(vtkDataObject::DATA_OBJECT()) ); - - return 1; + return 0; } //---------------------------------------------------------------------------- -// Assume that any source that implements ExecuteData -// can handle an empty extent. -void vtkHyperOctreeAlgorithm::ExecuteData(vtkDataObject *output) +void vtkHyperOctreeAlgorithm::SetInputData(vtkDataObject* input) { - // I want to find out if the requested extent is empty. - if (output && this->UpdateExtentIsEmpty(output)) - { - output->Initialize(); - return; - } - - this->Execute(); + this->SetInputData(0, input); } //---------------------------------------------------------------------------- -void vtkHyperOctreeAlgorithm::Execute() +void vtkHyperOctreeAlgorithm::SetInputData(int index, vtkDataObject* input) { - vtkErrorMacro(<< "Definition of Execute() method should be in subclass and you should really use the ExecuteData(vtkInformation *request,...) signature instead"); + this->SetInputDataInternal(index, input); } - //---------------------------------------------------------------------------- -void vtkHyperOctreeAlgorithm::SetInput(vtkDataObject* input) +void vtkHyperOctreeAlgorithm::AddInputData(vtkDataObject* input) { - this->SetInput(0, input); + this->AddInputData(0, input); } //---------------------------------------------------------------------------- -void vtkHyperOctreeAlgorithm::SetInput(int index, vtkDataObject* input) +void vtkHyperOctreeAlgorithm::AddInputData(int index, vtkDataObject* input) { - if(input) - { - this->SetInputConnection(index, input->GetProducerPort()); - } - else - { - // Setting a NULL input removes the connection. - this->SetInputConnection(index, 0); - } -} - -//---------------------------------------------------------------------------- -void vtkHyperOctreeAlgorithm::AddInput(vtkDataObject* input) -{ - this->AddInput(0, input); -} - -//---------------------------------------------------------------------------- -void vtkHyperOctreeAlgorithm::AddInput(int index, vtkDataObject* input) -{ - if(input) - { - this->AddInputConnection(index, input->GetProducerPort()); - } + this->AddInputDataInternal(index, input); } diff --git a/Filtering/vtkHyperOctreeAlgorithm.h b/Filtering/vtkHyperOctreeAlgorithm.h index 3df12d05cac..0cb0caf0ad5 100644 --- a/Filtering/vtkHyperOctreeAlgorithm.h +++ b/Filtering/vtkHyperOctreeAlgorithm.h @@ -22,14 +22,8 @@ // will have one input port and one output port. If that is not the case // simply change it with SetNumberOfInputPorts etc. See this classes // constructor for the default. This class also provides a FillInputPortInfo -// method that by default says that all inputs will be RectilinearGrid. If that -// isn't the case then please override this method in your subclass. This -// class breaks out the downstream requests into seperate functions such as -// ExecuteData and ExecuteInformation. For new algorithms you should -// implement RequestData( request, inputVec, outputVec) but for older filters -// there is a default implementation that calls the old ExecuteData(output) -// signature, for even older filters that don;t implement ExecuteData the -// default implementation calls the even older Execute() signature. +// method that by default says that all inputs will be HyperOctree. If that +// isn't the case then please override this method in your subclass. #ifndef __vtkHyperOctreeAlgorithm_h #define __vtkHyperOctreeAlgorithm_h @@ -65,14 +59,18 @@ public: vtkHyperOctree *GetHyperOctreeInput(int port); // Description: - // Set an input of this algorithm. - void SetInput(vtkDataObject *); - void SetInput(int, vtkDataObject*); + // Assign a data object as input. Note that this method does not + // establish a pipeline connection. Use SetInputConnection() to + // setup a pipeline connection. + void SetInputData(vtkDataObject *); + void SetInputData(int, vtkDataObject*); // Description: - // Add an input of this algorithm. - void AddInput(vtkDataObject *); - void AddInput(int, vtkDataObject*); + // Assign a data object as input. Note that this method does not + // establish a pipeline connection. Use AddInputConnection() to + // setup a pipeline connection. + void AddInputData(vtkDataObject *); + void AddInputData(int, vtkDataObject*); protected: vtkHyperOctreeAlgorithm(); @@ -97,13 +95,6 @@ protected: vtkInformationVector**, vtkInformationVector*); - - - // Description: - // This method is the old style execute method - virtual void ExecuteData(vtkDataObject *output); - virtual void Execute(); - // see algorithm for more info virtual int FillOutputPortInformation(int port, vtkInformation* info); virtual int FillInputPortInformation(int port, vtkInformation* info); diff --git a/Filtering/vtkImageAlgorithm.cxx b/Filtering/vtkImageAlgorithm.cxx index aa01d051e99..10a4d070c9e 100644 --- a/Filtering/vtkImageAlgorithm.cxx +++ b/Filtering/vtkImageAlgorithm.cxx @@ -76,7 +76,8 @@ int vtkImageAlgorithm::RequestData( this->SetErrorCode( vtkErrorCode::NoError ); if (outInfo) { - this->ExecuteData( outInfo->Get(vtkDataObject::DATA_OBJECT()) ); + this->ExecuteData( outInfo->Get(vtkDataObject::DATA_OBJECT()), + outInfo ); } else { @@ -117,6 +118,11 @@ int vtkImageAlgorithm::ProcessRequest(vtkInformation* request, return this->Superclass::ProcessRequest(request, inputVector, outputVector); } +void vtkImageAlgorithm::ExecuteData(vtkDataObject *dobj, vtkInformation*) +{ + this->ExecuteData(dobj); +} + //---------------------------------------------------------------------------- // Assume that any source that implements ExecuteData // can handle an empty extent. @@ -189,37 +195,31 @@ int vtkImageAlgorithm::RequestUpdateExtent( } //---------------------------------------------------------------------------- -void vtkImageAlgorithm::AllocateOutputData(vtkImageData *output, +void vtkImageAlgorithm::AllocateOutputData(vtkImageData *output, + vtkInformation *outInfo, int *uExtent) -{ +{ // set the extent to be the update extent output->SetExtent(uExtent); - output->AllocateScalars(); + int scalarType = vtkImageData::GetScalarType(outInfo); + int numComponents = vtkImageData::GetNumberOfScalarComponents(outInfo); + output->AllocateScalars(scalarType, numComponents); } //---------------------------------------------------------------------------- -vtkImageData *vtkImageAlgorithm::AllocateOutputData(vtkDataObject *output) +vtkImageData *vtkImageAlgorithm::AllocateOutputData(vtkDataObject *output, + vtkInformation* outInfo) { // set the extent to be the update extent vtkImageData *out = vtkImageData::SafeDownCast(output); if (out) { - // this needs to be fixed -Ken - vtkStreamingDemandDrivenPipeline *sddp = - vtkStreamingDemandDrivenPipeline::SafeDownCast(this->GetExecutive()); - int numInfoObj = sddp->GetNumberOfOutputPorts(); - if (sddp && numInfoObj == 1) - { - int extent[6]; - sddp->GetOutputInformation(0)->Get(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT(),extent); - out->SetExtent(extent); - } - else - { - vtkWarningMacro( "There are multiple output ports. You cannot use AllocateOutputData" ); - return NULL; - } - out->AllocateScalars(); + int* uExtent = outInfo->Get( + vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT()); + out->SetExtent(uExtent); + int scalarType = vtkImageData::GetScalarType(outInfo); + int numComponents = vtkImageData::GetNumberOfScalarComponents(outInfo); + out->AllocateScalars(scalarType, numComponents); } return out; } @@ -397,23 +397,15 @@ int vtkImageAlgorithm::FillInputPortInformation( } //---------------------------------------------------------------------------- -void vtkImageAlgorithm::SetInput(vtkDataObject* input) +void vtkImageAlgorithm::SetInputData(vtkDataObject* input) { - this->SetInput(0, input); + this->SetInputData(0, input); } //---------------------------------------------------------------------------- -void vtkImageAlgorithm::SetInput(int index, vtkDataObject* input) +void vtkImageAlgorithm::SetInputData(int index, vtkDataObject* input) { - if(input) - { - this->SetInputConnection(index, input->GetProducerPort()); - } - else - { - // Setting a NULL input removes the connection. - this->SetInputConnection(index, 0); - } + this->SetInputDataInternal(index, input); } //---------------------------------------------------------------------------- @@ -429,16 +421,13 @@ vtkImageData* vtkImageAlgorithm::GetImageDataInput(int port) } //---------------------------------------------------------------------------- -void vtkImageAlgorithm::AddInput(vtkDataObject* input) +void vtkImageAlgorithm::AddInputData(vtkDataObject* input) { - this->AddInput(0, input); + this->AddInputData(0, input); } //---------------------------------------------------------------------------- -void vtkImageAlgorithm::AddInput(int index, vtkDataObject* input) +void vtkImageAlgorithm::AddInputData(int index, vtkDataObject* input) { - if(input) - { - this->AddInputConnection(index, input->GetProducerPort()); - } + this->AddInputDataInternal(index, input); } diff --git a/Filtering/vtkImageAlgorithm.h b/Filtering/vtkImageAlgorithm.h index e94e3e08d4d..c5e35de58df 100644 --- a/Filtering/vtkImageAlgorithm.h +++ b/Filtering/vtkImageAlgorithm.h @@ -49,15 +49,11 @@ public: vtkInformationVector*); // Description: - // Set an input of this algorithm. You should not override these - // methods because they are not the only way to connect a pipeline. - // Note that these methods support old-style pipeline connections. - // When writing new code you should use the more general - // vtkAlgorithm::SetInputConnection(). These methods transform the - // input index to the input port index, not an index of a connection - // within a single port. - void SetInput(vtkDataObject *); - void SetInput(int, vtkDataObject*); + // Assign a data object as input. Note that this method does not + // establish a pipeline connection. Use SetInputConnection() to + // setup a pipeline connection. + void SetInputData(vtkDataObject *); + void SetInputData(int, vtkDataObject*); // this method is not recommended for use, but lots of old style filters // use it @@ -66,12 +62,11 @@ public: vtkImageData *GetImageDataInput(int port); // Description: - // Add an input of this algorithm. Note that these methods support - // old-style pipeline connections. When writing new code you should - // use the more general vtkAlgorithm::AddInputConnection(). See - // SetInput() for details. - virtual void AddInput(vtkDataObject *); - virtual void AddInput(int, vtkDataObject*); + // Assign a data object as input. Note that this method does not + // establish a pipeline connection. Use SetInputConnection() to + // setup a pipeline connection. + virtual void AddInputData(vtkDataObject *); + virtual void AddInputData(int, vtkDataObject*); protected: vtkImageAlgorithm(); @@ -101,13 +96,16 @@ protected: // Description: // This method is the old style execute method + virtual void ExecuteData(vtkDataObject *output, vtkInformation* outInfo); virtual void ExecuteData(vtkDataObject *output); virtual void Execute(); // just allocate the output data - virtual void AllocateOutputData(vtkImageData *out, + virtual void AllocateOutputData(vtkImageData *out, + vtkInformation* outInfo, int *uExtent); - virtual vtkImageData *AllocateOutputData(vtkDataObject *out); + virtual vtkImageData *AllocateOutputData(vtkDataObject *out, + vtkInformation *outInfo); // copy the other point and cell data virtual void CopyAttributeData(vtkImageData *in, vtkImageData *out, diff --git a/Filtering/vtkImageData.cxx b/Filtering/vtkImageData.cxx index 37cf2d3abbd..8eed93ac3e8 100644 --- a/Filtering/vtkImageData.cxx +++ b/Filtering/vtkImageData.cxx @@ -97,22 +97,6 @@ void vtkImageData::CopyStructure(vtkDataSet *ds) this->Origin[i] = sPts->Origin[i]; } this->SetExtent(sPts->GetExtent()); - - vtkInformation* thisPInfo = this->GetPipelineInformation(); - vtkInformation* thatPInfo = ds->GetPipelineInformation(); - if(thisPInfo && thatPInfo) - { - // copy point data. - if (thatPInfo->Has(POINT_DATA_VECTOR())) - { - thisPInfo->CopyEntry(thatPInfo, POINT_DATA_VECTOR()); - } - // copy cell data. - if (thatPInfo->Has(CELL_DATA_VECTOR())) - { - thisPInfo->CopyEntry(thatPInfo, CELL_DATA_VECTOR()); - } - } } //---------------------------------------------------------------------------- @@ -1385,7 +1369,8 @@ void *vtkImageData::GetScalarPointer(int coordinate[3]) if (scalars == NULL) { vtkDebugMacro("Allocating scalars in ImageData"); - this->AllocateScalars(); + abort(); + //this->AllocateScalars(); scalars = this->PointData->GetScalars(); } @@ -1423,7 +1408,8 @@ void *vtkImageData::GetScalarPointer() if (this->PointData->GetScalars() == NULL) { vtkDebugMacro("Allocating scalars in ImageData"); - this->AllocateScalars(); + abort(); + //this->AllocateScalars(); } return this->PointData->GetScalars()->GetVoidPointer(0); } @@ -1475,16 +1461,15 @@ int vtkImageData::GetScalarType(vtkInformation* meta_data) } //---------------------------------------------------------------------------- -void vtkImageData::AllocateScalars() +void vtkImageData::AllocateScalars(vtkInformation* pipeline_info) { int newType = VTK_DOUBLE; int newNumComp = 1; - // basically allocate the scalars based on the - this->GetProducerPort(); - if(vtkInformation* info = this->GetPipelineInformation()) + if(pipeline_info) { - vtkInformation *scalarInfo = vtkDataObject::GetActiveFieldInformation(info, + vtkInformation *scalarInfo = vtkDataObject::GetActiveFieldInformation( + pipeline_info, FIELD_ASSOCIATION_POINTS, vtkDataSetAttributes::SCALARS); if (scalarInfo) { diff --git a/Filtering/vtkImageData.h b/Filtering/vtkImageData.h index 379ea62d1fd..67c5c1e3328 100644 --- a/Filtering/vtkImageData.h +++ b/Filtering/vtkImageData.h @@ -216,10 +216,18 @@ public: int x, int y, int z, int component, double v); // Description: - // Allocate the vtkScalars object associated with this object. - virtual void AllocateScalars(); + // Allocate the point scalars for this dataset. The data type determines + // the type of the array (VTK_FLOAT, VTK_INT etc.) where as numComponents + // determines its number of components. virtual void AllocateScalars(int dataType, int numComponents); + // Description: + // Allocate the point scalars for this dataset. The data type and the + // number of components of the array is determined by the meta-data in + // the pipeline information. This is usually produced by a reader/filter + // upstream in the pipeline. + virtual void AllocateScalars(vtkInformation* pipeline_info); + // Description: // This method is passed a input and output region, and executes the filter // algorithm to fill the output from the input. diff --git a/Filtering/vtkImageInPlaceFilter.cxx b/Filtering/vtkImageInPlaceFilter.cxx index 59dd6ed293f..f0cd865ff0b 100644 --- a/Filtering/vtkImageInPlaceFilter.cxx +++ b/Filtering/vtkImageInPlaceFilter.cxx @@ -73,7 +73,7 @@ int vtkImageInPlaceFilter::RequestData( else { output->SetExtent(outExt); - output->AllocateScalars(); + output->AllocateScalars(outInfo); this->CopyData(input,output,outExt); } diff --git a/Filtering/vtkImageToStructuredPoints.cxx b/Filtering/vtkImageToStructuredPoints.cxx index 02fda9286ac..a4908ee1cca 100644 --- a/Filtering/vtkImageToStructuredPoints.cxx +++ b/Filtering/vtkImageToStructuredPoints.cxx @@ -54,9 +54,9 @@ vtkStructuredPoints* vtkImageToStructuredPoints::GetStructuredPointsOutput() } //---------------------------------------------------------------------------- -void vtkImageToStructuredPoints::SetVectorInput(vtkImageData *input) +void vtkImageToStructuredPoints::SetVectorInputData(vtkImageData *input) { - this->SetInput(1, input); + this->SetInputData(1, input); } //---------------------------------------------------------------------------- diff --git a/Filtering/vtkImageToStructuredPoints.h b/Filtering/vtkImageToStructuredPoints.h index 2fdbdbadecb..6f485c6561b 100644 --- a/Filtering/vtkImageToStructuredPoints.h +++ b/Filtering/vtkImageToStructuredPoints.h @@ -38,7 +38,7 @@ public: // Description: // Set/Get the input object from the image pipeline. - void SetVectorInput(vtkImageData *input); + void SetVectorInputData(vtkImageData *input); vtkImageData *GetVectorInput(); // Description: diff --git a/Filtering/vtkMultiBlockDataSetAlgorithm.cxx b/Filtering/vtkMultiBlockDataSetAlgorithm.cxx index 36e2b79ce50..bd194b5b82c 100644 --- a/Filtering/vtkMultiBlockDataSetAlgorithm.cxx +++ b/Filtering/vtkMultiBlockDataSetAlgorithm.cxx @@ -49,23 +49,15 @@ vtkMultiBlockDataSet* vtkMultiBlockDataSetAlgorithm::GetOutput(int port) } //---------------------------------------------------------------------------- -void vtkMultiBlockDataSetAlgorithm::SetInput(vtkDataObject* input) +void vtkMultiBlockDataSetAlgorithm::SetInputData(vtkDataObject* input) { - this->SetInput(0, input); + this->SetInputData(0, input); } //---------------------------------------------------------------------------- -void vtkMultiBlockDataSetAlgorithm::SetInput(int index, vtkDataObject* input) +void vtkMultiBlockDataSetAlgorithm::SetInputData(int index, vtkDataObject* input) { - if(input) - { - this->SetInputConnection(index, input->GetProducerPort()); - } - else - { - // Setting a NULL input removes the connection. - this->SetInputConnection(index, 0); - } + this->SetInputDataInternal(index, input); } //---------------------------------------------------------------------------- diff --git a/Filtering/vtkMultiBlockDataSetAlgorithm.h b/Filtering/vtkMultiBlockDataSetAlgorithm.h index fe47ca3f5ac..100c1173c91 100644 --- a/Filtering/vtkMultiBlockDataSetAlgorithm.h +++ b/Filtering/vtkMultiBlockDataSetAlgorithm.h @@ -39,15 +39,11 @@ public: vtkMultiBlockDataSet* GetOutput(int); // Description: - // Set an input of this algorithm. You should not override these - // methods because they are not the only way to connect a pipeline. - // Note that these methods support old-style pipeline connections. - // When writing new code you should use the more general - // vtkAlgorithm::SetInputConnection(). These methods transform the - // input index to the input port index, not an index of a connection - // within a single port. - void SetInput(vtkDataObject*); - void SetInput(int, vtkDataObject*); + // Assign a data object as input. Note that this method does not + // establish a pipeline connection. Use SetInputConnection() to + // setup a pipeline connection. + void SetInputData(vtkDataObject*); + void SetInputData(int, vtkDataObject*); // Description: // see vtkAlgorithm for details diff --git a/Filtering/vtkPassInputTypeAlgorithm.cxx b/Filtering/vtkPassInputTypeAlgorithm.cxx index 88ce160b2ff..0f90f9aabd0 100644 --- a/Filtering/vtkPassInputTypeAlgorithm.cxx +++ b/Filtering/vtkPassInputTypeAlgorithm.cxx @@ -108,38 +108,27 @@ vtkGraph *vtkPassInputTypeAlgorithm::GetGraphOutput() } //---------------------------------------------------------------------------- -void vtkPassInputTypeAlgorithm::SetInput(vtkDataObject* input) +void vtkPassInputTypeAlgorithm::SetInputData(vtkDataObject* input) { - this->SetInput(0, input); + this->SetInputData(0, input); } //---------------------------------------------------------------------------- -void vtkPassInputTypeAlgorithm::SetInput(int index, vtkDataObject* input) +void vtkPassInputTypeAlgorithm::SetInputData(int index, vtkDataObject* input) { - if(input) - { - this->SetInputConnection(index, input->GetProducerPort()); - } - else - { - // Setting a NULL input removes the connection. - this->SetInputConnection(index, 0); - } + this->SetInputDataInternal(index, input); } //---------------------------------------------------------------------------- -void vtkPassInputTypeAlgorithm::AddInput(vtkDataObject* input) +void vtkPassInputTypeAlgorithm::AddInputData(vtkDataObject* input) { - this->AddInput(0, input); + this->AddInputData(0, input); } //---------------------------------------------------------------------------- -void vtkPassInputTypeAlgorithm::AddInput(int index, vtkDataObject* input) +void vtkPassInputTypeAlgorithm::AddInputData(int index, vtkDataObject* input) { - if(input) - { - this->AddInputConnection(index, input->GetProducerPort()); - } + this->AddInputDataInternal(index, input); } //---------------------------------------------------------------------------- @@ -215,7 +204,7 @@ int vtkPassInputTypeAlgorithm::RequestDataObject( if (!output || !output->IsA(input->GetClassName())) { vtkDataObject* newOutput = input->NewInstance(); - newOutput->SetPipelineInformation(info); + info->Set(vtkDataObject::DATA_OBJECT(), newOutput); newOutput->Delete(); } } diff --git a/Filtering/vtkPassInputTypeAlgorithm.h b/Filtering/vtkPassInputTypeAlgorithm.h index a30ad0ed59d..c5569f57ebc 100644 --- a/Filtering/vtkPassInputTypeAlgorithm.h +++ b/Filtering/vtkPassInputTypeAlgorithm.h @@ -94,23 +94,18 @@ public: vtkDataObject* GetInput(); // Description: - // Set an input of this algorithm. You should not override these - // methods because they are not the only way to connect a pipeline. - // Note that these methods support old-style pipeline connections. - // When writing new code you should use the more general - // vtkAlgorithm::SetInputConnection(). These methods transform the - // input index to the input port index, not an index of a connection - // within a single port. - void SetInput(vtkDataObject*); - void SetInput(int, vtkDataObject*); - - // Description: - // Add an input of this algorithm. Note that these methods support - // old-style pipeline connections. When writing new code you should - // use the more general vtkAlgorithm::AddInputConnection(). See - // SetInput() for details. - void AddInput(vtkDataObject *); - void AddInput(int, vtkDataObject*); + // Assign a data object as input. Note that this method does not + // establish a pipeline connection. Use SetInputConnection() to + // setup a pipeline connection. + void SetInputData(vtkDataObject*); + void SetInputData(int, vtkDataObject*); + + // Description: + // Assign a data object as input. Note that this method does not + // establish a pipeline connection. Use SetInputConnection() to + // setup a pipeline connection. + void AddInputData(vtkDataObject *); + void AddInputData(int, vtkDataObject*); // Description: // see vtkAlgorithm for details diff --git a/Filtering/vtkPiecewiseFunctionAlgorithm.cxx b/Filtering/vtkPiecewiseFunctionAlgorithm.cxx index 66ca6b67e82..004522e4bd1 100644 --- a/Filtering/vtkPiecewiseFunctionAlgorithm.cxx +++ b/Filtering/vtkPiecewiseFunctionAlgorithm.cxx @@ -20,7 +20,6 @@ #include "vtkObjectFactory.h" #include "vtkDataObject.h" #include "vtkStreamingDemandDrivenPipeline.h" -#include "vtkTrivialProducer.h" vtkStandardNewMacro(vtkPiecewiseFunctionAlgorithm); @@ -117,40 +116,29 @@ int vtkPiecewiseFunctionAlgorithm::RequestData( vtkInformationVector** vtkNotUsed( inputVector ), vtkInformationVector* outputVector) { - return 1; + return 0; } //---------------------------------------------------------------------------- -void vtkPiecewiseFunctionAlgorithm::SetInput(vtkDataObject* input) +void vtkPiecewiseFunctionAlgorithm::SetInputData(vtkDataObject* input) { - this->SetInput(0, input); + this->SetInputData(0, input); } //---------------------------------------------------------------------------- -void vtkPiecewiseFunctionAlgorithm::SetInput(int index, vtkDataObject* input) +void vtkPiecewiseFunctionAlgorithm::SetInputData(int index, vtkDataObject* input) { - if(input) - { - this->SetInputConnection(index, input->GetProducerPort()); - } - else - { - // Setting a NULL input removes the connection. - this->SetInputConnection(index, 0); - } + this->SetInputDataInternal(index, input); } //---------------------------------------------------------------------------- -void vtkPiecewiseFunctionAlgorithm::AddInput(vtkDataObject* input) +void vtkPiecewiseFunctionAlgorithm::AddInputData(vtkDataObject* input) { - this->AddInput(0, input); + this->AddInputData(0, input); } //---------------------------------------------------------------------------- -void vtkPiecewiseFunctionAlgorithm::AddInput(int index, vtkDataObject* input) +void vtkPiecewiseFunctionAlgorithm::AddInputData(int index, vtkDataObject* input) { - if(input) - { - this->AddInputConnection(index, input->GetProducerPort()); - } + this->AddInputDataInternal(index, input); } diff --git a/Filtering/vtkPiecewiseFunctionAlgorithm.h b/Filtering/vtkPiecewiseFunctionAlgorithm.h index efc6315246a..985b71e377e 100644 --- a/Filtering/vtkPiecewiseFunctionAlgorithm.h +++ b/Filtering/vtkPiecewiseFunctionAlgorithm.h @@ -65,23 +65,18 @@ public: vtkDataObject *GetInput(int port); // Description: - // Set an input of this algorithm. You should not override these - // methods because they are not the only way to connect a pipeline. - // Note that these methods support old-style pipeline connections. - // When writing new code you should use the more general - // vtkAlgorithm::SetInputConnection(). These methods transform the - // input index to the input port index, not an index of a connection - // within a single port. - void SetInput(vtkDataObject *); - void SetInput(int, vtkDataObject*); + // Assign a data object as input. Note that this method does not + // establish a pipeline connection. Use SetInputConnection() to + // setup a pipeline connection. + void SetInputData(vtkDataObject *); + void SetInputData(int, vtkDataObject*); // Description: - // Add an input of this algorithm. Note that these methods support - // old-style pipeline connections. When writing new code you should - // use the more general vtkAlgorithm::AddInputConnection(). See - // SetInput() for details. - void AddInput(vtkDataObject *); - void AddInput(int, vtkDataObject*); + // Assign a data object as input. Note that this method does not + // establish a pipeline connection. Use AddInputConnection() to + // setup a pipeline connection. + void AddInputData(vtkDataObject *); + void AddInputData(int, vtkDataObject*); protected: vtkPiecewiseFunctionAlgorithm(); diff --git a/Filtering/vtkPointSetAlgorithm.cxx b/Filtering/vtkPointSetAlgorithm.cxx index 6eb1fd3014c..539810296b7 100644 --- a/Filtering/vtkPointSetAlgorithm.cxx +++ b/Filtering/vtkPointSetAlgorithm.cxx @@ -68,62 +68,51 @@ vtkUnstructuredGrid *vtkPointSetAlgorithm::GetUnstructuredGridOutput() } //---------------------------------------------------------------------------- -void vtkPointSetAlgorithm::SetInput(vtkDataObject* input) +void vtkPointSetAlgorithm::SetInputData(vtkDataObject* input) { - this->SetInput(0, input); + this->SetInputData(0, input); } //---------------------------------------------------------------------------- -void vtkPointSetAlgorithm::SetInput(int index, vtkDataObject* input) +void vtkPointSetAlgorithm::SetInputData(int index, vtkDataObject* input) { - if(input) - { - this->SetInputConnection(index, input->GetProducerPort()); - } - else - { - // Setting a NULL input removes the connection. - this->SetInputConnection(index, 0); - } + this->SetInputDataInternal(index, input); } //---------------------------------------------------------------------------- -void vtkPointSetAlgorithm::SetInput(vtkPointSet* input) +void vtkPointSetAlgorithm::SetInputData(vtkPointSet* input) { - this->SetInput(0, static_cast<vtkDataObject*>(input)); + this->SetInputData(0, static_cast<vtkDataObject*>(input)); } //---------------------------------------------------------------------------- -void vtkPointSetAlgorithm::SetInput(int index, vtkPointSet* input) +void vtkPointSetAlgorithm::SetInputData(int index, vtkPointSet* input) { - this->SetInput(index, static_cast<vtkDataObject*>(input)); + this->SetInputData(index, static_cast<vtkDataObject*>(input)); } //---------------------------------------------------------------------------- -void vtkPointSetAlgorithm::AddInput(vtkDataObject* input) +void vtkPointSetAlgorithm::AddInputData(vtkDataObject* input) { - this->AddInput(0, input); + this->AddInputData(0, input); } //---------------------------------------------------------------------------- -void vtkPointSetAlgorithm::AddInput(int index, vtkDataObject* input) +void vtkPointSetAlgorithm::AddInputData(int index, vtkDataObject* input) { - if(input) - { - this->AddInputConnection(index, input->GetProducerPort()); - } + this->AddInputDataInternal(index, input); } //---------------------------------------------------------------------------- -void vtkPointSetAlgorithm::AddInput(vtkPointSet* input) +void vtkPointSetAlgorithm::AddInputData(vtkPointSet* input) { - this->AddInput(0, static_cast<vtkDataObject*>(input)); + this->AddInputData(0, static_cast<vtkDataObject*>(input)); } //---------------------------------------------------------------------------- -void vtkPointSetAlgorithm::AddInput(int index, vtkPointSet* input) +void vtkPointSetAlgorithm::AddInputData(int index, vtkPointSet* input) { - this->AddInput(index, static_cast<vtkDataObject*>(input)); + this->AddInputData(index, static_cast<vtkDataObject*>(input)); } //---------------------------------------------------------------------------- @@ -190,7 +179,7 @@ int vtkPointSetAlgorithm::RequestDataObject( if (!output || !output->IsA(input->GetClassName())) { output = input->NewInstance(); - output->SetPipelineInformation(info); + info->Set(vtkDataObject::DATA_OBJECT(), output); output->Delete(); } } diff --git a/Filtering/vtkPointSetAlgorithm.h b/Filtering/vtkPointSetAlgorithm.h index ff30498afa3..80267ff20e1 100644 --- a/Filtering/vtkPointSetAlgorithm.h +++ b/Filtering/vtkPointSetAlgorithm.h @@ -64,27 +64,22 @@ public: vtkUnstructuredGrid *GetUnstructuredGridOutput(); // Description: - // Set an input of this algorithm. You should not override these - // methods because they are not the only way to connect a pipeline. - // Note that these methods support old-style pipeline connections. - // When writing new code you should use the more general - // vtkAlgorithm::SetInputConnection(). These methods transform the - // input index to the input port index, not an index of a connection - // within a single port. - void SetInput(vtkDataObject*); - void SetInput(int, vtkDataObject*); - void SetInput(vtkPointSet*); - void SetInput(int, vtkPointSet*); + // Assign a data object as input. Note that this method does not + // establish a pipeline connection. Use SetInputConnection() to + // setup a pipeline connection. + void SetInputData(vtkDataObject*); + void SetInputData(int, vtkDataObject*); + void SetInputData(vtkPointSet*); + void SetInputData(int, vtkPointSet*); // Description: - // Add an input of this algorithm. Note that these methods support - // old-style pipeline connections. When writing new code you should - // use the more general vtkAlgorithm::AddInputConnection(). See - // SetInput() for details. - void AddInput(vtkDataObject *); - void AddInput(vtkPointSet*); - void AddInput(int, vtkPointSet*); - void AddInput(int, vtkDataObject*); + // Assign a data object as input. Note that this method does not + // establish a pipeline connection. Use AddInputConnection() to + // setup a pipeline connection. + void AddInputData(vtkDataObject *); + void AddInputData(vtkPointSet*); + void AddInputData(int, vtkPointSet*); + void AddInputData(int, vtkDataObject*); // this method is not recommended for use, but lots of old style filters // use it diff --git a/Filtering/vtkPolyDataAlgorithm.cxx b/Filtering/vtkPolyDataAlgorithm.cxx index 4c14693ae1e..a227a7f6328 100644 --- a/Filtering/vtkPolyDataAlgorithm.cxx +++ b/Filtering/vtkPolyDataAlgorithm.cxx @@ -20,7 +20,6 @@ #include "vtkObjectFactory.h" #include "vtkPolyData.h" #include "vtkStreamingDemandDrivenPipeline.h" -#include "vtkTrivialProducer.h" vtkStandardNewMacro(vtkPolyDataAlgorithm); @@ -155,87 +154,34 @@ int vtkPolyDataAlgorithm::RequestUpdateExtent( // This is the superclasses style of Execute method. Convert it into // an imaging style Execute method. int vtkPolyDataAlgorithm::RequestData( - vtkInformation* request, + vtkInformation* vtkNotUsed( request ), vtkInformationVector** vtkNotUsed( inputVector ), - vtkInformationVector* outputVector) + vtkInformationVector* vtkNotUsed( outputVector )) { - // the default implimentation is to do what the old pipeline did find what - // output is requesting the data, and pass that into ExecuteData - - // which output port did the request come from - int outputPort = - request->Get(vtkDemandDrivenPipeline::FROM_OUTPUT_PORT()); - - // if output port is negative then that means this filter is calling the - // update directly, in that case just assume port 0 - if (outputPort == -1) - { - outputPort = 0; - } - - // get the data object - vtkInformation *outInfo = - outputVector->GetInformationObject(outputPort); - // call ExecuteData - this->ExecuteData( outInfo->Get(vtkDataObject::DATA_OBJECT()) ); - return 1; } //---------------------------------------------------------------------------- -// Assume that any source that implements ExecuteData -// can handle an empty extent. -void vtkPolyDataAlgorithm::ExecuteData(vtkDataObject *output) -{ - // I want to find out if the requested extent is empty. - if (output && this->UpdateExtentIsEmpty(output)) - { - output->Initialize(); - return; - } - - this->Execute(); -} - -//---------------------------------------------------------------------------- -void vtkPolyDataAlgorithm::Execute() +void vtkPolyDataAlgorithm::SetInputData(vtkDataObject* input) { - vtkErrorMacro(<< "Definition of Execute() method should be in subclass and you should really use the ExecuteData(vtkInformation *request,...) signature instead"); + this->SetInputData(0, input); } - //---------------------------------------------------------------------------- -void vtkPolyDataAlgorithm::SetInput(vtkDataObject* input) +void vtkPolyDataAlgorithm::SetInputData(int index, vtkDataObject* input) { - this->SetInput(0, input); + this->SetInputDataInternal(index, input); } //---------------------------------------------------------------------------- -void vtkPolyDataAlgorithm::SetInput(int index, vtkDataObject* input) +void vtkPolyDataAlgorithm::AddInputData(vtkDataObject* input) { - if(input) - { - this->SetInputConnection(index, input->GetProducerPort()); - } - else - { - // Setting a NULL input removes the connection. - this->SetInputConnection(index, 0); - } + this->AddInputData(0, input); } //---------------------------------------------------------------------------- -void vtkPolyDataAlgorithm::AddInput(vtkDataObject* input) +void vtkPolyDataAlgorithm::AddInputData(int index, vtkDataObject* input) { - this->AddInput(0, input); -} - -//---------------------------------------------------------------------------- -void vtkPolyDataAlgorithm::AddInput(int index, vtkDataObject* input) -{ - if(input) - { - this->AddInputConnection(index, input->GetProducerPort()); - } + this->AddInputDataInternal(index, input); } diff --git a/Filtering/vtkPolyDataAlgorithm.h b/Filtering/vtkPolyDataAlgorithm.h index 92d905725d3..56ccea6d3cb 100644 --- a/Filtering/vtkPolyDataAlgorithm.h +++ b/Filtering/vtkPolyDataAlgorithm.h @@ -23,13 +23,7 @@ // simply change it with SetNumberOfInputPorts etc. See this class // constructor for the default. This class also provides a FillInputPortInfo // method that by default says that all inputs will be PolyData. If that -// isn't the case then please override this method in your subclass. This -// class breaks out the downstream requests into separate functions such as -// ExecuteData and ExecuteInformation. For new algorithms you should -// implement RequestData( request, inputVec, outputVec) but for older filters -// there is a default implementation that calls the old ExecuteData(output) -// signature. For even older filters that don't implement ExecuteData the -// default implementation calls the even older Execute() signature. +// isn't the case then please override this method in your subclass. #ifndef __vtkPolyDataAlgorithm_h #define __vtkPolyDataAlgorithm_h @@ -66,23 +60,18 @@ public: vtkPolyData *GetPolyDataInput(int port); // Description: - // Set an input of this algorithm. You should not override these - // methods because they are not the only way to connect a pipeline. - // Note that these methods support old-style pipeline connections. - // When writing new code you should use the more general - // vtkAlgorithm::SetInputConnection(). These methods transform the - // input index to the input port index, not an index of a connection - // within a single port. - void SetInput(vtkDataObject *); - void SetInput(int, vtkDataObject*); + // Assign a data object as input. Note that this method does not + // establish a pipeline connection. Use SetInputConnection() to + // setup a pipeline connection. + void SetInputData(vtkDataObject *); + void SetInputData(int, vtkDataObject*); // Description: - // Add an input of this algorithm. Note that these methods support - // old-style pipeline connections. When writing new code you should - // use the more general vtkAlgorithm::AddInputConnection(). See - // SetInput() for details. - void AddInput(vtkDataObject *); - void AddInput(int, vtkDataObject*); + // Assign a data object as input. Note that this method does not + // establish a pipeline connection. Use AddInputConnection() to + // setup a pipeline connection. + void AddInputData(vtkDataObject *); + void AddInputData(int, vtkDataObject*); protected: vtkPolyDataAlgorithm(); @@ -107,11 +96,6 @@ protected: vtkInformationVector**, vtkInformationVector*); - // Description: - // This method is the old style execute method - virtual void ExecuteData(vtkDataObject *output); - virtual void Execute(); - // see algorithm for more info virtual int FillOutputPortInformation(int port, vtkInformation* info); virtual int FillInputPortInformation(int port, vtkInformation* info); diff --git a/Filtering/vtkRectilinearGridAlgorithm.cxx b/Filtering/vtkRectilinearGridAlgorithm.cxx index b291e36cd36..d7741b311a9 100644 --- a/Filtering/vtkRectilinearGridAlgorithm.cxx +++ b/Filtering/vtkRectilinearGridAlgorithm.cxx @@ -20,7 +20,6 @@ #include "vtkObjectFactory.h" #include "vtkRectilinearGrid.h" #include "vtkStreamingDemandDrivenPipeline.h" -#include "vtkTrivialProducer.h" vtkStandardNewMacro(vtkRectilinearGridAlgorithm); @@ -136,86 +135,34 @@ int vtkRectilinearGridAlgorithm::RequestInformation( // This is the superclasses style of Execute method. Convert it into // an imaging style Execute method. int vtkRectilinearGridAlgorithm::RequestData( - vtkInformation* request, + vtkInformation* vtkNotUsed( request ), vtkInformationVector** vtkNotUsed( inputVector ), - vtkInformationVector* outputVector) -{ - // the default implimentation is to do what the old pipeline did find what - // output is requesting the data, and pass that into ExecuteData - - // which output port did the request come from - int outputPort = - request->Get(vtkDemandDrivenPipeline::FROM_OUTPUT_PORT()); - - // if output port is negative then that means this filter is calling the - // update directly, in that case just assume port 0 - if (outputPort == -1) - { - outputPort = 0; - } - - // get the data object - vtkInformation *outInfo = - outputVector->GetInformationObject(outputPort); - // call ExecuteData - this->ExecuteData( outInfo->Get(vtkDataObject::DATA_OBJECT()) ); - - return 1; -} - -//---------------------------------------------------------------------------- -// Assume that any source that implements ExecuteData -// can handle an empty extent. -void vtkRectilinearGridAlgorithm::ExecuteData(vtkDataObject *output) + vtkInformationVector* vtkNotUsed( outputVector )) { - // I want to find out if the requested extent is empty. - if (output && this->UpdateExtentIsEmpty(output)) - { - output->Initialize(); - return; - } - - this->Execute(); + return 0; } //---------------------------------------------------------------------------- -void vtkRectilinearGridAlgorithm::Execute() +void vtkRectilinearGridAlgorithm::SetInputData(vtkDataObject* input) { - vtkErrorMacro(<< "Definition of Execute() method should be in subclass and you should really use the ExecuteData(vtkInformation *request,...) signature instead"); + this->SetInputData(0, input); } //---------------------------------------------------------------------------- -void vtkRectilinearGridAlgorithm::SetInput(vtkDataObject* input) +void vtkRectilinearGridAlgorithm::SetInputData(int index, vtkDataObject* input) { - this->SetInput(0, input); + this->SetInputDataInternal(index, input); } //---------------------------------------------------------------------------- -void vtkRectilinearGridAlgorithm::SetInput(int index, vtkDataObject* input) +void vtkRectilinearGridAlgorithm::AddInputData(vtkDataObject* input) { - if(input) - { - this->SetInputConnection(index, input->GetProducerPort()); - } - else - { - // Setting a NULL input removes the connection. - this->SetInputConnection(index, 0); - } -} - -//---------------------------------------------------------------------------- -void vtkRectilinearGridAlgorithm::AddInput(vtkDataObject* input) -{ - this->AddInput(0, input); + this->AddInputData(0, input); } //---------------------------------------------------------------------------- -void vtkRectilinearGridAlgorithm::AddInput(int index, vtkDataObject* input) +void vtkRectilinearGridAlgorithm::AddInputData(int index, vtkDataObject* input) { - if(input) - { - this->AddInputConnection(index, input->GetProducerPort()); - } + this->AddInputDataInternal(index, input); } diff --git a/Filtering/vtkRectilinearGridAlgorithm.h b/Filtering/vtkRectilinearGridAlgorithm.h index 09ecbfdd2ff..91a74b08a81 100644 --- a/Filtering/vtkRectilinearGridAlgorithm.h +++ b/Filtering/vtkRectilinearGridAlgorithm.h @@ -66,23 +66,18 @@ public: vtkRectilinearGrid *GetRectilinearGridInput(int port); // Description: - // Set an input of this algorithm. You should not override these - // methods because they are not the only way to connect a pipeline. - // Note that these methods support old-style pipeline connections. - // When writing new code you should use the more general - // vtkAlgorithm::SetInputConnection(). These methods transform the - // input index to the input port index, not an index of a connection - // within a single port. - void SetInput(vtkDataObject *); - void SetInput(int, vtkDataObject*); + // Assign a data object as input. Note that this method does not + // establish a pipeline connection. Use SetInputConnection() to + // setup a pipeline connection. + void SetInputData(vtkDataObject *); + void SetInputData(int, vtkDataObject*); // Description: - // Add an input of this algorithm. Note that these methods support - // old-style pipeline connections. When writing new code you should - // use the more general vtkAlgorithm::AddInputConnection(). See - // SetInput() for details. - void AddInput(vtkDataObject *); - void AddInput(int, vtkDataObject*); + // Assign a data object as input. Note that this method does not + // establish a pipeline connection. Use AddInputConnection() to + // setup a pipeline connection. + void AddInputData(vtkDataObject *); + void AddInputData(int, vtkDataObject*); protected: vtkRectilinearGridAlgorithm(); @@ -110,11 +105,6 @@ protected: return 1; }; - // Description: - // This method is the old style execute method - virtual void ExecuteData(vtkDataObject *output); - virtual void Execute(); - // see algorithm for more info virtual int FillOutputPortInformation(int port, vtkInformation* info); virtual int FillInputPortInformation(int port, vtkInformation* info); diff --git a/Filtering/vtkSelectionAlgorithm.cxx b/Filtering/vtkSelectionAlgorithm.cxx index b4a86912693..ac01dec66b8 100644 --- a/Filtering/vtkSelectionAlgorithm.cxx +++ b/Filtering/vtkSelectionAlgorithm.cxx @@ -20,7 +20,6 @@ #include "vtkObjectFactory.h" #include "vtkSelection.h" #include "vtkStreamingDemandDrivenPipeline.h" -#include "vtkTrivialProducer.h" vtkStandardNewMacro(vtkSelectionAlgorithm); @@ -93,17 +92,9 @@ vtkSelection* vtkSelectionAlgorithm::GetOutput(int index) } //---------------------------------------------------------------------------- -void vtkSelectionAlgorithm::SetInput(int index, vtkDataObject* input) +void vtkSelectionAlgorithm::SetInputData(int index, vtkDataObject* input) { - if (input) - { - this->SetInputConnection(index, input->GetProducerPort()); - } - else - { - // Setting a NULL input removes the connection. - this->SetInputConnection(index, 0); - } + this->SetInputDataInternal(index, input); } //---------------------------------------------------------------------------- diff --git a/Filtering/vtkSelectionAlgorithm.h b/Filtering/vtkSelectionAlgorithm.h index aee01deb889..9862dd4106b 100644 --- a/Filtering/vtkSelectionAlgorithm.h +++ b/Filtering/vtkSelectionAlgorithm.h @@ -62,15 +62,11 @@ public: vtkSelection* GetOutput(int index); // Description: - // Set an input of this algorithm. You should not override these - // methods because they are not the only way to connect a pipeline. - // Note that these methods support old-style pipeline connections. - // When writing new code you should use the more general - // vtkAlgorithm::SetInputConnection(). These methods transform the - // input index to the input port index, not an index of a connection - // within a single port. - void SetInput(vtkDataObject * obj) { this->SetInput(0, obj); } - void SetInput(int index, vtkDataObject* obj); + // Assign a data object as input. Note that this method does not + // establish a pipeline connection. Use SetInputConnection() to + // setup a pipeline connection. + void SetInputData(vtkDataObject * obj) { this->SetInputData(0, obj); } + void SetInputData(int index, vtkDataObject* obj); protected: vtkSelectionAlgorithm(); diff --git a/Filtering/vtkSimpleImageToImageFilter.cxx b/Filtering/vtkSimpleImageToImageFilter.cxx index 717cc769155..057942e2ac2 100644 --- a/Filtering/vtkSimpleImageToImageFilter.cxx +++ b/Filtering/vtkSimpleImageToImageFilter.cxx @@ -74,7 +74,7 @@ int vtkSimpleImageToImageFilter::RequestData( // Set the extent of the output and allocate memory. output->SetExtent( outInfo->Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT())); - output->AllocateScalars(); + output->AllocateScalars(outInfo); this->SimpleExecute(input, output); diff --git a/Filtering/vtkStructuredGridAlgorithm.cxx b/Filtering/vtkStructuredGridAlgorithm.cxx index 8ded30df804..37d530dc810 100644 --- a/Filtering/vtkStructuredGridAlgorithm.cxx +++ b/Filtering/vtkStructuredGridAlgorithm.cxx @@ -20,7 +20,6 @@ #include "vtkObjectFactory.h" #include "vtkStreamingDemandDrivenPipeline.h" #include "vtkStructuredGrid.h" -#include "vtkTrivialProducer.h" vtkStandardNewMacro(vtkStructuredGridAlgorithm); @@ -136,87 +135,35 @@ int vtkStructuredGridAlgorithm::RequestInformation( // This is the superclasses style of Execute method. Convert it into // an imaging style Execute method. int vtkStructuredGridAlgorithm::RequestData( - vtkInformation* request, + vtkInformation* vtkNotUsed( request ), vtkInformationVector** vtkNotUsed( inputVector ), - vtkInformationVector* outputVector) -{ - // the default implimentation is to do what the old pipeline did find what - // output is requesting the data, and pass that into ExecuteData - - // which output port did the request come from - int outputPort = - request->Get(vtkDemandDrivenPipeline::FROM_OUTPUT_PORT()); - - // if output port is negative then that means this filter is calling the - // update directly, in that case just assume port 0 - if (outputPort == -1) - { - outputPort = 0; - } - - // get the data object - vtkInformation *outInfo = - outputVector->GetInformationObject(outputPort); - // call ExecuteData - this->ExecuteData( outInfo->Get(vtkDataObject::DATA_OBJECT()) ); - - return 1; -} - -//---------------------------------------------------------------------------- -// Assume that any source that implements ExecuteData -// can handle an empty extent. -void vtkStructuredGridAlgorithm::ExecuteData(vtkDataObject *output) + vtkInformationVector* vtkNotUsed( outputVector )) { - // I want to find out if the requested extent is empty. - if (output && this->UpdateExtentIsEmpty(output)) - { - output->Initialize(); - return; - } - - this->Execute(); -} - -//---------------------------------------------------------------------------- -void vtkStructuredGridAlgorithm::Execute() -{ - vtkErrorMacro(<< "Definition of Execute() method should be in subclass and you should really use the ExecuteData(vtkInformation *request,...) signature instead"); + return 0; } //---------------------------------------------------------------------------- -void vtkStructuredGridAlgorithm::SetInput(vtkDataObject* input) +void vtkStructuredGridAlgorithm::SetInputData(vtkDataObject* input) { - this->SetInput(0, input); + this->SetInputData(0, input); } //---------------------------------------------------------------------------- -void vtkStructuredGridAlgorithm::SetInput(int index, vtkDataObject* input) +void vtkStructuredGridAlgorithm::SetInputData(int index, vtkDataObject* input) { - if(input) - { - this->SetInputConnection(index, input->GetProducerPort()); - } - else - { - // Setting a NULL input removes the connection. - this->SetInputConnection(index, 0); - } + this->SetInputDataInternal(index, input); } //---------------------------------------------------------------------------- -void vtkStructuredGridAlgorithm::AddInput(vtkDataObject* input) +void vtkStructuredGridAlgorithm::AddInputData(vtkDataObject* input) { - this->AddInput(0, input); + this->AddInputData(0, input); } //---------------------------------------------------------------------------- -void vtkStructuredGridAlgorithm::AddInput(int index, vtkDataObject* input) +void vtkStructuredGridAlgorithm::AddInputData(int index, vtkDataObject* input) { - if(input) - { - this->AddInputConnection(index, input->GetProducerPort()); - } + this->AddInputDataInternal(index, input); } diff --git a/Filtering/vtkStructuredGridAlgorithm.h b/Filtering/vtkStructuredGridAlgorithm.h index c144ae05fa4..51da2b166b1 100644 --- a/Filtering/vtkStructuredGridAlgorithm.h +++ b/Filtering/vtkStructuredGridAlgorithm.h @@ -23,13 +23,7 @@ // simply change it with SetNumberOfInputPorts etc. See this classes // constructor for the default. This class also provides a FillInputPortInfo // method that by default says that all inputs will be StructuredGrid. If that -// isn't the case then please override this method in your subclass. This -// class breaks out the downstream requests into seperate functions such as -// ExecuteData and ExecuteInformation. For new algorithms you should -// implement RequestData( request, inputVec, outputVec) but for older filters -// there is a default implementation that calls the old ExecuteData(output) -// signature, for even older filters that don;t implement ExecuteData the -// default implementation calls the even older Execute() signature. +// isn't the case then please override this method in your subclass. #ifndef __vtkStructuredGridAlgorithm_h #define __vtkStructuredGridAlgorithm_h @@ -66,23 +60,18 @@ public: vtkStructuredGrid *GetStructuredGridInput(int port); // Description: - // Set an input of this algorithm. You should not override these - // methods because they are not the only way to connect a pipeline. - // Note that these methods support old-style pipeline connections. - // When writing new code you should use the more general - // vtkAlgorithm::SetInputConnection(). These methods transform the - // input index to the input port index, not an index of a connection - // within a single port. - void SetInput(vtkDataObject *); - void SetInput(int, vtkDataObject*); + // Assign a data object as input. Note that this method does not + // establish a pipeline connection. Use SetInputConnection() to + // setup a pipeline connection. + void SetInputData(vtkDataObject *); + void SetInputData(int, vtkDataObject*); // Description: - // Add an input of this algorithm. Note that these methods support - // old-style pipeline connections. When writing new code you should - // use the more general vtkAlgorithm::AddInputConnection(). See - // SetInput() for details. - void AddInput(vtkDataObject *); - void AddInput(int, vtkDataObject*); + // Assign a data object as input. Note that this method does not + // establish a pipeline connection. Use AddInputConnection() to + // setup a pipeline connection. + void AddInputData(vtkDataObject *); + void AddInputData(int, vtkDataObject*); protected: vtkStructuredGridAlgorithm(); @@ -110,11 +99,6 @@ protected: return 1; }; - // Description: - // This method is the old style execute method - virtual void ExecuteData(vtkDataObject *output); - virtual void Execute(); - // see algorithm for more info virtual int FillOutputPortInformation(int port, vtkInformation* info); virtual int FillInputPortInformation(int port, vtkInformation* info); diff --git a/Filtering/vtkTableAlgorithm.cxx b/Filtering/vtkTableAlgorithm.cxx index dc837d8923e..4192fa54c40 100644 --- a/Filtering/vtkTableAlgorithm.cxx +++ b/Filtering/vtkTableAlgorithm.cxx @@ -26,7 +26,6 @@ #include "vtkObjectFactory.h" #include "vtkTable.h" #include "vtkStreamingDemandDrivenPipeline.h" -#include "vtkTrivialProducer.h" vtkStandardNewMacro(vtkTableAlgorithm); @@ -99,17 +98,9 @@ vtkTable* vtkTableAlgorithm::GetOutput(int index) } //---------------------------------------------------------------------------- -void vtkTableAlgorithm::SetInput(int index, vtkDataObject* input) +void vtkTableAlgorithm::SetInputData(int index, vtkDataObject* input) { - if (input) - { - this->SetInputConnection(index, input->GetProducerPort()); - } - else - { - // Setting a NULL input removes the connection. - this->SetInputConnection(index, 0); - } + this->SetInputDataInternal(index, input); } //---------------------------------------------------------------------------- diff --git a/Filtering/vtkTableAlgorithm.h b/Filtering/vtkTableAlgorithm.h index 02c2cc4ad2e..988ee10d351 100644 --- a/Filtering/vtkTableAlgorithm.h +++ b/Filtering/vtkTableAlgorithm.h @@ -28,13 +28,7 @@ // simply change it with SetNumberOfInputPorts etc. See this class // constructor for the default. This class also provides a FillInputPortInfo // method that by default says that all inputs will be Tree. If that -// isn't the case then please override this method in your subclass. This -// class breaks out the downstream requests into separate functions such as -// ExecuteData and ExecuteInformation. For new algorithms you should -// implement RequestData( request, inputVec, outputVec) but for older filters -// there is a default implementation that calls the old ExecuteData(output) -// signature. For even older filters that don't implement ExecuteData the -// default implementation calls the even older Execute() signature. +// isn't the case then please override this method in your subclass. // // .SECTION Thanks // Thanks to Brian Wylie for creating this class. @@ -66,15 +60,11 @@ public: vtkTable* GetOutput(int index); // Description: - // Set an input of this algorithm. You should not override these - // methods because they are not the only way to connect a pipeline. - // Note that these methods support old-style pipeline connections. - // When writing new code you should use the more general - // vtkAlgorithm::SetInputConnection(). These methods transform the - // input index to the input port index, not an index of a connection - // within a single port. - void SetInput(vtkDataObject * obj) { this->SetInput(0, obj); } - void SetInput(int index, vtkDataObject* obj); + // Assign a data object as input. Note that this method does not + // establish a pipeline connection. Use SetInputConnection() to + // setup a pipeline connection. + void SetInputData(vtkDataObject * obj) { this->SetInputData(0, obj); } + void SetInputData(int index, vtkDataObject* obj); protected: vtkTableAlgorithm(); diff --git a/Filtering/vtkTemporalDataSetAlgorithm.cxx b/Filtering/vtkTemporalDataSetAlgorithm.cxx index c9295169f3b..1c042590a92 100644 --- a/Filtering/vtkTemporalDataSetAlgorithm.cxx +++ b/Filtering/vtkTemporalDataSetAlgorithm.cxx @@ -49,23 +49,15 @@ vtkTemporalDataSet* vtkTemporalDataSetAlgorithm::GetOutput(int port) } //---------------------------------------------------------------------------- -void vtkTemporalDataSetAlgorithm::SetInput(vtkDataObject* input) +void vtkTemporalDataSetAlgorithm::SetInputData(vtkDataObject* input) { - this->SetInput(0, input); + this->SetInputData(0, input); } //---------------------------------------------------------------------------- -void vtkTemporalDataSetAlgorithm::SetInput(int index, vtkDataObject* input) +void vtkTemporalDataSetAlgorithm::SetInputData(int index, vtkDataObject* input) { - if(input) - { - this->SetInputConnection(index, input->GetProducerPort()); - } - else - { - // Setting a NULL input removes the connection. - this->SetInputConnection(index, 0); - } + this->SetInputDataInternal(index, input); } //---------------------------------------------------------------------------- diff --git a/Filtering/vtkTemporalDataSetAlgorithm.h b/Filtering/vtkTemporalDataSetAlgorithm.h index 4791cf084c0..2780dfab99e 100644 --- a/Filtering/vtkTemporalDataSetAlgorithm.h +++ b/Filtering/vtkTemporalDataSetAlgorithm.h @@ -39,15 +39,11 @@ public: vtkTemporalDataSet* GetOutput(int); // Description: - // Set an input of this algorithm. You should not override these - // methods because they are not the only way to connect a pipeline. - // Note that these methods support old-style pipeline connections. - // When writing new code you should use the more general - // vtkAlgorithm::SetInputConnection(). These methods transform the - // input index to the input port index, not an index of a connection - // within a single port. - void SetInput(vtkDataObject*); - void SetInput(int, vtkDataObject*); + // Assign a data object as input. Note that this method does not + // establish a pipeline connection. Use SetInputConnection() to + // setup a pipeline connection. + void SetInputData(vtkDataObject*); + void SetInputData(int, vtkDataObject*); // Description: // see vtkAlgorithm for details diff --git a/Filtering/vtkThreadedImageAlgorithm.cxx b/Filtering/vtkThreadedImageAlgorithm.cxx index bb36ff2c175..5678c777d3b 100644 --- a/Filtering/vtkThreadedImageAlgorithm.cxx +++ b/Filtering/vtkThreadedImageAlgorithm.cxx @@ -24,7 +24,6 @@ #include "vtkObjectFactory.h" #include "vtkPointData.h" #include "vtkStreamingDemandDrivenPipeline.h" -#include "vtkTrivialProducer.h" //---------------------------------------------------------------------------- @@ -248,7 +247,7 @@ int vtkThreadedImageAlgorithm::RequestData( // unlike geometry filters, for image filters data is pre-allocated // in the superclass (which means, in this class) - this->AllocateOutputData(outData, updateExtent); + this->AllocateOutputData(outData, info, updateExtent); } } } diff --git a/Filtering/vtkTreeAlgorithm.cxx b/Filtering/vtkTreeAlgorithm.cxx index 90a736d45c7..a4dbfe4de3f 100644 --- a/Filtering/vtkTreeAlgorithm.cxx +++ b/Filtering/vtkTreeAlgorithm.cxx @@ -97,17 +97,9 @@ vtkTree* vtkTreeAlgorithm::GetOutput(int index) } //---------------------------------------------------------------------------- -void vtkTreeAlgorithm::SetInput(int index, vtkDataObject* input) +void vtkTreeAlgorithm::SetInputData(int index, vtkDataObject* input) { - if (input) - { - this->SetInputConnection(index, input->GetProducerPort()); - } - else - { - // Setting a NULL input removes the connection. - this->SetInputConnection(index, 0); - } + this->SetInputDataInternal(index, input); } //---------------------------------------------------------------------------- diff --git a/Filtering/vtkTreeAlgorithm.h b/Filtering/vtkTreeAlgorithm.h index fc3237ab4dd..c24683d702d 100644 --- a/Filtering/vtkTreeAlgorithm.h +++ b/Filtering/vtkTreeAlgorithm.h @@ -28,13 +28,7 @@ // simply change it with SetNumberOfInputPorts etc. See this class // constructor for the default. This class also provides a FillInputPortInfo // method that by default says that all inputs will be Tree. If that -// isn't the case then please override this method in your subclass. This -// class breaks out the downstream requests into separate functions such as -// ExecuteData and ExecuteInformation. For new algorithms you should -// implement RequestData( request, inputVec, outputVec) but for older filters -// there is a default implementation that calls the old ExecuteData(output) -// signature. For even older filters that don't implement ExecuteData the -// default implementation calls the even older Execute() signature. +// isn't the case then please override this method in your subclass. #ifndef __vtkTreeAlgorithm_h #define __vtkTreeAlgorithm_h @@ -63,15 +57,11 @@ public: vtkTree* GetOutput(int index); // Description: - // Set an input of this algorithm. You should not override these - // methods because they are not the only way to connect a pipeline. - // Note that these methods support old-style pipeline connections. - // When writing new code you should use the more general - // vtkAlgorithm::SetInputConnection(). These methods transform the - // input index to the input port index, not an index of a connection - // within a single port. - void SetInput(vtkDataObject * obj) { this->SetInput(0, obj); } - void SetInput(int index, vtkDataObject* obj); + // Assign a data object as input. Note that this method does not + // establish a pipeline connection. Use SetInputConnection() to + // setup a pipeline connection. + void SetInputData(vtkDataObject * obj) { this->SetInputData(0, obj); } + void SetInputData(int index, vtkDataObject* obj); protected: vtkTreeAlgorithm(); diff --git a/Filtering/vtkTrivialProducer.cxx b/Filtering/vtkTrivialProducer.cxx index a068f3eb85b..bbed3e888bc 100644 --- a/Filtering/vtkTrivialProducer.cxx +++ b/Filtering/vtkTrivialProducer.cxx @@ -152,15 +152,14 @@ vtkTrivialProducer::ProcessRequest(vtkInformation* request, if (this->Output->IsA("vtkImageData")) { vtkImageData* img = static_cast<vtkImageData*>(this->Output); - vtkInformation* pinfo = img->GetPipelineInformation(); double spacing[3]; img->GetSpacing(spacing); - pinfo->Set(vtkDataObject::SPACING(), spacing[0], spacing[1], spacing[2]); + outputInfo->Set(vtkDataObject::SPACING(), spacing[0], spacing[1], spacing[2]); double origin[3]; img->GetOrigin(origin); - pinfo->Set(vtkDataObject::ORIGIN(), origin[0], origin[1], origin[2]); + outputInfo->Set(vtkDataObject::ORIGIN(), origin[0], origin[1], origin[2]); } } #if VTK_TRIVIAL_PRODUCER_CHECK_UPDATE_EXTENT diff --git a/Filtering/vtkUndirectedGraphAlgorithm.cxx b/Filtering/vtkUndirectedGraphAlgorithm.cxx index 617043e3beb..3dd93523d00 100644 --- a/Filtering/vtkUndirectedGraphAlgorithm.cxx +++ b/Filtering/vtkUndirectedGraphAlgorithm.cxx @@ -25,7 +25,6 @@ #include "vtkObjectFactory.h" #include "vtkUndirectedGraph.h" #include "vtkStreamingDemandDrivenPipeline.h" -#include "vtkTrivialProducer.h" vtkStandardNewMacro(vtkUndirectedGraphAlgorithm); @@ -98,17 +97,9 @@ vtkUndirectedGraph* vtkUndirectedGraphAlgorithm::GetOutput(int index) } //---------------------------------------------------------------------------- -void vtkUndirectedGraphAlgorithm::SetInput(int index, vtkDataObject* input) +void vtkUndirectedGraphAlgorithm::SetInputData(int index, vtkDataObject* input) { - if (input) - { - this->SetInputConnection(index, input->GetProducerPort()); - } - else - { - // Setting a NULL input removes the connection. - this->SetInputConnection(index, 0); - } + this->SetInputDataInternal(index, input); } //---------------------------------------------------------------------------- diff --git a/Filtering/vtkUndirectedGraphAlgorithm.h b/Filtering/vtkUndirectedGraphAlgorithm.h index ddca65290af..6d809464273 100644 --- a/Filtering/vtkUndirectedGraphAlgorithm.h +++ b/Filtering/vtkUndirectedGraphAlgorithm.h @@ -28,13 +28,7 @@ // simply change it with SetNumberOfInputPorts etc. See this class // constructor for the default. This class also provides a FillInputPortInfo // method that by default says that all inputs will be Graph. If that -// isn't the case then please override this method in your subclass. This -// class breaks out the downstream requests into separate functions such as -// ExecuteData and ExecuteInformation. For new algorithms you should -// implement RequestData( request, inputVec, outputVec) but for older filters -// there is a default implementation that calls the old ExecuteData(output) -// signature. For even older filters that don't implement ExecuteData the -// default implementation calls the even older Execute() signature. +// isn't the case then please override this method in your subclass. // // .SECTION Thanks // Thanks to Patricia Crossno, Ken Moreland, Andrew Wilson and Brian Wylie from @@ -67,15 +61,11 @@ public: vtkUndirectedGraph* GetOutput(int index); // Description: - // Set an input of this algorithm. You should not override these - // methods because they are not the only way to connect a pipeline. - // Note that these methods support old-style pipeline connections. - // When writing new code you should use the more general - // vtkAlgorithm::SetInputConnection(). These methods transform the - // input index to the input port index, not an index of a connection - // within a single port. - void SetInput(vtkDataObject * obj) { this->SetInput(0, obj); } - void SetInput(int index, vtkDataObject* obj); + // Assign a data object as input. Note that this method does not + // establish a pipeline connection. Use SetInputConnection() to + // setup a pipeline connection. + void SetInputData(vtkDataObject * obj) { this->SetInputData(0, obj); } + void SetInputData(int index, vtkDataObject* obj); protected: vtkUndirectedGraphAlgorithm(); diff --git a/Filtering/vtkUnstructuredGridAlgorithm.cxx b/Filtering/vtkUnstructuredGridAlgorithm.cxx index a9e63652e91..93a3e6e04c1 100644 --- a/Filtering/vtkUnstructuredGridAlgorithm.cxx +++ b/Filtering/vtkUnstructuredGridAlgorithm.cxx @@ -19,7 +19,6 @@ #include "vtkInformationVector.h" #include "vtkUnstructuredGrid.h" #include "vtkStreamingDemandDrivenPipeline.h" -#include "vtkTrivialProducer.h" vtkStandardNewMacro(vtkUnstructuredGridAlgorithm); @@ -148,86 +147,34 @@ int vtkUnstructuredGridAlgorithm::RequestUpdateExtent( // This is the superclasses style of Execute method. Convert it into // an imaging style Execute method. int vtkUnstructuredGridAlgorithm::RequestData( - vtkInformation* request, + vtkInformation* vtkNotUsed( request ), vtkInformationVector** vtkNotUsed( inputVector ), - vtkInformationVector* outputVector) + vtkInformationVector* vtkNotUsed( outputVector )) { - // the default implimentation is to do what the old pipeline did find what - // output is requesting the data, and pass that into ExecuteData - - // which output port did the request come from - int outputPort = - request->Get(vtkDemandDrivenPipeline::FROM_OUTPUT_PORT()); - - // if output port is negative then that means this filter is calling the - // update directly, in that case just assume port 0 - if (outputPort == -1) - { - outputPort = 0; - } - - // get the data object - vtkInformation *outInfo = - outputVector->GetInformationObject(outputPort); - // call ExecuteData - this->ExecuteData( outInfo->Get(vtkDataObject::DATA_OBJECT()) ); - - return 1; -} - -//---------------------------------------------------------------------------- -// Assume that any source that implements ExecuteData -// can handle an empty extent. -void vtkUnstructuredGridAlgorithm::ExecuteData(vtkDataObject *output) -{ - // I want to find out if the requested extent is empty. - if (output && this->UpdateExtentIsEmpty(output)) - { - output->Initialize(); - return; - } - - this->Execute(); + return 0; } //---------------------------------------------------------------------------- -void vtkUnstructuredGridAlgorithm::Execute() +void vtkUnstructuredGridAlgorithm::SetInputData(vtkDataObject* input) { - vtkErrorMacro(<< "Definition of Execute() method should be in subclass and you should really use the ExecuteData(vtkInformation *request,...) signature instead"); + this->SetInputData(0, input); } //---------------------------------------------------------------------------- -void vtkUnstructuredGridAlgorithm::SetInput(vtkDataObject* input) +void vtkUnstructuredGridAlgorithm::SetInputData(int index, vtkDataObject* input) { - this->SetInput(0, input); + this->SetInputDataInternal(index, input); } //---------------------------------------------------------------------------- -void vtkUnstructuredGridAlgorithm::SetInput(int index, vtkDataObject* input) +void vtkUnstructuredGridAlgorithm::AddInputData(vtkDataObject* input) { - if(input) - { - this->SetInputConnection(index, input->GetProducerPort()); - } - else - { - // Setting a NULL input removes the connection. - this->SetInputConnection(index, 0); - } + this->AddInputData(0, input); } //---------------------------------------------------------------------------- -void vtkUnstructuredGridAlgorithm::AddInput(vtkDataObject* input) +void vtkUnstructuredGridAlgorithm::AddInputData(int index, vtkDataObject* input) { - this->AddInput(0, input); -} - -//---------------------------------------------------------------------------- -void vtkUnstructuredGridAlgorithm::AddInput(int index, vtkDataObject* input) -{ - if(input) - { - this->AddInputConnection(index, input->GetProducerPort()); - } + this->AddInputDataInternal(index, input); } diff --git a/Filtering/vtkUnstructuredGridAlgorithm.h b/Filtering/vtkUnstructuredGridAlgorithm.h index a2bb4419dec..c3d6229d156 100644 --- a/Filtering/vtkUnstructuredGridAlgorithm.h +++ b/Filtering/vtkUnstructuredGridAlgorithm.h @@ -23,13 +23,7 @@ // simply change it with SetNumberOfInputPorts etc. See this classes // constructor for the default. This class also provides a FillInputPortInfo // method that by default says that all inputs will be UnstructuredGrid. If that -// isn't the case then please override this method in your subclass. This -// class breaks out the downstream requests into seperate functions such as -// ExecuteData and ExecuteInformation. For new algorithms you should -// implement RequestData( request, inputVec, outputVec) but for older filters -// there is a default implementation that calls the old ExecuteData(output) -// signature, for even older filters that don;t implement ExecuteData the -// default implementation calls the even older Execute() signature. +// isn't the case then please override this method in your subclass. #ifndef __vtkUnstructuredGridAlgorithm_h #define __vtkUnstructuredGridAlgorithm_h @@ -65,23 +59,18 @@ public: vtkUnstructuredGrid *GetUnstructuredGridInput(int port); // Description: - // Set an input of this algorithm. You should not override these - // methods because they are not the only way to connect a pipeline. - // Note that these methods support old-style pipeline connections. - // When writing new code you should use the more general - // vtkAlgorithm::SetInputConnection(). These methods transform the - // input index to the input port index, not an index of a connection - // within a single port. - void SetInput(vtkDataObject *); - void SetInput(int, vtkDataObject*); + // Assign a data object as input. Note that this method does not + // establish a pipeline connection. Use SetInputConnection() to + // setup a pipeline connection. + void SetInputData(vtkDataObject *); + void SetInputData(int, vtkDataObject*); // Description: - // Add an input of this algorithm. Note that these methods support - // old-style pipeline connections. When writing new code you should - // use the more general vtkAlgorithm::AddInputConnection(). See - // SetInput() for details. - void AddInput(vtkDataObject *); - void AddInput(int, vtkDataObject*); + // Assign a data object as input. Note that this method does not + // establish a pipeline connection. Use SetInputConnection() to + // setup a pipeline connection. + void AddInputData(vtkDataObject *); + void AddInputData(int, vtkDataObject*); protected: vtkUnstructuredGridAlgorithm(); @@ -106,11 +95,6 @@ protected: vtkInformationVector**, vtkInformationVector*); - // Description: - // This method is the old style execute method - virtual void ExecuteData(vtkDataObject *output); - virtual void Execute(); - // see algorithm for more info virtual int FillOutputPortInformation(int port, vtkInformation* info); virtual int FillInputPortInformation(int port, vtkInformation* info); diff --git a/GenericFiltering/Testing/Cxx/TestGenericClip.cxx b/GenericFiltering/Testing/Cxx/TestGenericClip.cxx index 11fd28fbe3e..66d95e16dbc 100644 --- a/GenericFiltering/Testing/Cxx/TestGenericClip.cxx +++ b/GenericFiltering/Testing/Cxx/TestGenericClip.cxx @@ -109,7 +109,7 @@ int TestGenericClip(int argc, char* argv[]) implicitPlane->SetNormal(1, 1, 1); // (1, 1, 1); vtkGenericClip *clipper = vtkGenericClip::New(); - clipper->SetInput(ds); + clipper->SetInputData(ds); clipper->SetClipFunction(implicitPlane); implicitPlane->Delete(); diff --git a/GenericFiltering/Testing/Cxx/TestGenericContourFilter.cxx b/GenericFiltering/Testing/Cxx/TestGenericContourFilter.cxx index 229e8b8dc9b..32813efee0e 100644 --- a/GenericFiltering/Testing/Cxx/TestGenericContourFilter.cxx +++ b/GenericFiltering/Testing/Cxx/TestGenericContourFilter.cxx @@ -92,7 +92,7 @@ int TestGenericContourFilter(int argc, char* argv[]) // Create the filter vtkGenericContourFilter *contour = vtkGenericContourFilter::New(); - contour->SetInput(ds); + contour->SetInputData(ds); contour->SetValue( 0, 0.1); contour->Update(); //So that we can call GetRange() on the scalars diff --git a/GenericFiltering/Testing/Cxx/TestGenericCutter.cxx b/GenericFiltering/Testing/Cxx/TestGenericCutter.cxx index e7a14956854..1240571bfbe 100644 --- a/GenericFiltering/Testing/Cxx/TestGenericCutter.cxx +++ b/GenericFiltering/Testing/Cxx/TestGenericCutter.cxx @@ -97,7 +97,7 @@ int TestGenericCutter(int argc, char* argv[]) implicitPlane->SetNormal(1, 1, 1); vtkGenericCutter *cutter = vtkGenericCutter::New(); - cutter->SetInput(ds); + cutter->SetInputData(ds); cutter->SetCutFunction(implicitPlane); implicitPlane->Delete(); diff --git a/GenericFiltering/Testing/Cxx/TestGenericDataSetTessellator.cxx b/GenericFiltering/Testing/Cxx/TestGenericDataSetTessellator.cxx index 23b3b65e340..26254026534 100644 --- a/GenericFiltering/Testing/Cxx/TestGenericDataSetTessellator.cxx +++ b/GenericFiltering/Testing/Cxx/TestGenericDataSetTessellator.cxx @@ -156,7 +156,7 @@ int TestGenericDataSetTessellator(int argc, char* argv[]) // Create the filter vtkGenericDataSetTessellator *tessellator = vtkGenericDataSetTessellator::New(); - tessellator->SetInput(ds); + tessellator->SetInputData(ds); tessellator->Update(); //So that we can call GetRange() on the scalars diff --git a/GenericFiltering/Testing/Cxx/TestGenericGeometryFilter.cxx b/GenericFiltering/Testing/Cxx/TestGenericGeometryFilter.cxx index 23400bbbfa9..72b8679ef8b 100644 --- a/GenericFiltering/Testing/Cxx/TestGenericGeometryFilter.cxx +++ b/GenericFiltering/Testing/Cxx/TestGenericGeometryFilter.cxx @@ -111,7 +111,7 @@ int TestGenericGeometryFilter(int argc, char* argv[]) // Create the filter vtkGenericGeometryFilter *geom = vtkGenericGeometryFilter::New(); - geom->SetInput(ds); + geom->SetInputData(ds); geom->SetPassThroughCellIds(1); geom->Update(); //So that we can call GetRange() on the scalars diff --git a/GenericFiltering/Testing/Cxx/TestGenericGlyph3DFilter.cxx b/GenericFiltering/Testing/Cxx/TestGenericGlyph3DFilter.cxx index f606aba12f3..dc49286102e 100644 --- a/GenericFiltering/Testing/Cxx/TestGenericGlyph3DFilter.cxx +++ b/GenericFiltering/Testing/Cxx/TestGenericGlyph3DFilter.cxx @@ -93,8 +93,8 @@ int TestGenericGlyph3DFilter(int argc, char* argv[]) // Create the filter vtkArrowSource *arrow=vtkArrowSource::New(); vtkGenericGlyph3DFilter *glyph=vtkGenericGlyph3DFilter::New(); - glyph->SetInput(ds); - glyph->SetSource(arrow->GetOutput()); + glyph->SetInputData(ds); + glyph->SetInputConnection(1, arrow->GetOutputPort()); glyph->SetScaling(1); glyph->SetScaleModeToScaleByScalar(); glyph->SelectInputScalars("scalars"); @@ -108,7 +108,7 @@ int TestGenericGlyph3DFilter(int argc, char* argv[]) // Create the filter vtkGenericGeometryFilter *geom = vtkGenericGeometryFilter::New(); - geom->SetInput(ds); + geom->SetInputData(ds); geom->Update(); //So that we can call GetRange() on the scalars diff --git a/GenericFiltering/Testing/Cxx/TestGenericProbeFilter.cxx b/GenericFiltering/Testing/Cxx/TestGenericProbeFilter.cxx index cda8b835b44..a1ee31ba0e8 100644 --- a/GenericFiltering/Testing/Cxx/TestGenericProbeFilter.cxx +++ b/GenericFiltering/Testing/Cxx/TestGenericProbeFilter.cxx @@ -112,7 +112,7 @@ int TestGenericProbeFilter(int argc, char* argv[]) // Create the filter vtkGenericGeometryFilter *geom = vtkGenericGeometryFilter::New(); - geom->SetInput(ds); + geom->SetInputData(ds); geom->Update(); //So that we can call GetRange() on the scalars @@ -160,7 +160,7 @@ int TestGenericProbeFilter(int argc, char* argv[]) vtkGenericProbeFilter *probe = vtkGenericProbeFilter::New(); probe->SetInputConnection(0,tpd->GetOutputPort(0)); tpd->Delete(); - probe->SetSource(ds); + probe->SetSourceData(ds); probe->Update(); //So that we can call GetRange() on the scalars diff --git a/GenericFiltering/Testing/Cxx/TestGenericStreamTracer.cxx b/GenericFiltering/Testing/Cxx/TestGenericStreamTracer.cxx index 1ad478af2a9..dcfcded7438 100644 --- a/GenericFiltering/Testing/Cxx/TestGenericStreamTracer.cxx +++ b/GenericFiltering/Testing/Cxx/TestGenericStreamTracer.cxx @@ -99,7 +99,7 @@ int TestGenericStreamTracer(int argc, char* argv[]) ds->PrintSelf(cout,indent); vtkGenericOutlineFilter *outline=vtkGenericOutlineFilter::New(); - outline->SetInput(ds); + outline->SetInputData(ds); vtkPolyDataMapper *mapOutline=vtkPolyDataMapper::New(); mapOutline->SetInputConnection(outline->GetOutputPort()); vtkActor *outlineActor=vtkActor::New(); @@ -110,7 +110,7 @@ int TestGenericStreamTracer(int argc, char* argv[]) // Create source for streamtubes vtkGenericStreamTracer *streamer=vtkGenericStreamTracer::New(); - streamer->SetInput(ds); + streamer->SetInputData(ds); streamer->SetStartPosition(0.1,2.1,0.5); streamer->SetMaximumPropagation(0,500); streamer->SetMinimumIntegrationStep(1,0.1); @@ -127,7 +127,7 @@ int TestGenericStreamTracer(int argc, char* argv[]) vtkAssignAttribute::POINT_DATA); vtkRibbonFilter *rf1=vtkRibbonFilter::New(); - rf1->SetInput(aa->GetPolyDataOutput()); + rf1->SetInputConnection(aa->GetOutputPort()); rf1->SetWidth(0.1); rf1->VaryWidthOff(); diff --git a/GenericFiltering/Testing/Cxx/TestSmoothErrorMetric.cxx b/GenericFiltering/Testing/Cxx/TestSmoothErrorMetric.cxx index 14b9529267b..f26b8a68767 100644 --- a/GenericFiltering/Testing/Cxx/TestSmoothErrorMetric.cxx +++ b/GenericFiltering/Testing/Cxx/TestSmoothErrorMetric.cxx @@ -110,7 +110,7 @@ int TestSmoothErrorMetric(int argc, char* argv[]) // Create the filter vtkGenericGeometryFilter *geom = vtkGenericGeometryFilter::New(); - geom->SetInput(ds); + geom->SetInputData(ds); geom->Update(); //So that we can call GetRange() on the scalars diff --git a/GenericFiltering/Testing/Cxx/TestViewDependentErrorMetric.cxx b/GenericFiltering/Testing/Cxx/TestViewDependentErrorMetric.cxx index 4b9f733f09c..8bef8a5a5d9 100644 --- a/GenericFiltering/Testing/Cxx/TestViewDependentErrorMetric.cxx +++ b/GenericFiltering/Testing/Cxx/TestViewDependentErrorMetric.cxx @@ -169,7 +169,7 @@ int TestViewDependentErrorMetric(int argc, char* argv[]) #if 0 // Create the filter vtkGenericDataSetTessellator *tessellator = vtkGenericDataSetTessellator::New(); - tessellator->SetInput(ds); + tessellator->SetInputData(ds); // DO NOT PERFORM UPDATE NOW, because the view dependent error metric // need the window to be realized first @@ -179,7 +179,7 @@ int TestViewDependentErrorMetric(int argc, char* argv[]) #else // Create the filter vtkGenericGeometryFilter *tessellator = vtkGenericGeometryFilter::New(); - tessellator->SetInput(ds); + tessellator->SetInputData(ds); // geom->Update(); //So that we can call GetRange() on the scalars @@ -232,7 +232,7 @@ int TestViewDependentErrorMetric(int argc, char* argv[]) renWin->SetSize(600,300); // realized vtkGenericOutlineFilter *outlineFilter= vtkGenericOutlineFilter::New(); - outlineFilter->SetInput(ds); + outlineFilter->SetInputData(ds); vtkPolyDataMapper *mapperOutline=vtkPolyDataMapper::New(); mapperOutline->SetInputConnection(outlineFilter->GetOutputPort()); outlineFilter->Delete(); diff --git a/GenericFiltering/vtkGenericGlyph3DFilter.cxx b/GenericFiltering/vtkGenericGlyph3DFilter.cxx index 8e14a56c285..70580af5a8a 100644 --- a/GenericFiltering/vtkGenericGlyph3DFilter.cxx +++ b/GenericFiltering/vtkGenericGlyph3DFilter.cxx @@ -33,6 +33,7 @@ PURPOSE. See the above copyright notice for more information. #include "vtkPointData.h" #include "vtkPolyData.h" #include "vtkTransform.h" +#include "vtkTrivialProducer.h" #include "vtkUnsignedCharArray.h" vtkStandardNewMacro(vtkGenericGlyph3DFilter); @@ -300,7 +301,6 @@ int vtkGenericGlyph3DFilter::RequestData( defaultPointIds[1] = 1; defaultSource->SetPoints(defaultPoints); defaultSource->InsertNextCell(VTK_LINE, 2, defaultPointIds); - this->SetSource(defaultSource); defaultSource->Delete(); defaultSource = NULL; defaultPoints->Delete(); @@ -723,37 +723,44 @@ int vtkGenericGlyph3DFilter::RequestInformation( //----------------------------------------------------------------------------- // Specify a source object at a specified table location. -void vtkGenericGlyph3DFilter::SetSource(int id, vtkPolyData *pd) +void vtkGenericGlyph3DFilter::SetSourceData(int id, vtkPolyData *pd) { - if (id < 0) + int numConnections = this->GetNumberOfInputConnections(1); + + if (id < 0 || id > numConnections) { vtkErrorMacro("Bad index " << id << " for source."); return; } - - int numConnections = this->GetNumberOfInputConnections(1); - vtkAlgorithmOutput *algOutput = 0; + + vtkTrivialProducer* tp = 0; if (pd) { - algOutput = pd->GetProducerPort(); - } - else - { - vtkErrorMacro("Cannot set NULL source."); - return; + tp = vtkTrivialProducer::New(); + tp->SetOutput(pd); } if (id < numConnections) { - if (algOutput) + if (tp) + { + this->SetNthInputConnection(1, id, tp->GetOutputPort()); + } + else { - this->SetNthInputConnection(1, id, algOutput); + this->SetNthInputConnection(1, id, 0); } } - else if (id == numConnections && algOutput) + else if (id == numConnections && tp) { - this->AddInputConnection(1, algOutput); + this->AddInputConnection(1, tp->GetOutputPort()); } + + if (tp) + { + tp->Delete(); + } + } //----------------------------------------------------------------------------- diff --git a/GenericFiltering/vtkGenericGlyph3DFilter.h b/GenericFiltering/vtkGenericGlyph3DFilter.h index 0aea9740b89..eb104336397 100644 --- a/GenericFiltering/vtkGenericGlyph3DFilter.h +++ b/GenericFiltering/vtkGenericGlyph3DFilter.h @@ -105,11 +105,11 @@ public: // Description: // Set the source to use for the glyph. - void SetSource(vtkPolyData *pd) {this->SetSource(0,pd);}; + void SetSourceData(vtkPolyData *pd) {this->SetSourceData(0,pd);}; // Description: // Specify a source object at a specified table location. - void SetSource(int id, vtkPolyData *pd); + void SetSourceData(int id, vtkPolyData *pd); // Description: // Get a pointer to a source object at a specified table location. diff --git a/GenericFiltering/vtkGenericProbeFilter.cxx b/GenericFiltering/vtkGenericProbeFilter.cxx index ef8ae83c7b0..34ff6b82f68 100644 --- a/GenericFiltering/vtkGenericProbeFilter.cxx +++ b/GenericFiltering/vtkGenericProbeFilter.cxx @@ -48,9 +48,9 @@ vtkGenericProbeFilter::~vtkGenericProbeFilter() //---------------------------------------------------------------------------- -void vtkGenericProbeFilter::SetSource(vtkGenericDataSet *input) +void vtkGenericProbeFilter::SetSourceData(vtkGenericDataSet *input) { - this->SetInput(1, input); + this->SetInputData(1, input); } //---------------------------------------------------------------------------- diff --git a/GenericFiltering/vtkGenericProbeFilter.h b/GenericFiltering/vtkGenericProbeFilter.h index 2d1e46a3458..f02c19059af 100644 --- a/GenericFiltering/vtkGenericProbeFilter.h +++ b/GenericFiltering/vtkGenericProbeFilter.h @@ -55,7 +55,7 @@ public: // Description: // Specify the point locations used to probe input. A generic dataset // type is assumed. - void SetSource(vtkGenericDataSet *source); + void SetSourceData(vtkGenericDataSet *source); vtkGenericDataSet *GetSource(); // Description: diff --git a/GenericFiltering/vtkGenericStreamTracer.cxx b/GenericFiltering/vtkGenericStreamTracer.cxx index 6e9b0202e0c..8f5957632e0 100644 --- a/GenericFiltering/vtkGenericStreamTracer.cxx +++ b/GenericFiltering/vtkGenericStreamTracer.cxx @@ -92,17 +92,9 @@ vtkGenericStreamTracer::~vtkGenericStreamTracer() } //----------------------------------------------------------------------------- -void vtkGenericStreamTracer::SetSource(vtkDataSet *source) +void vtkGenericStreamTracer::SetSourceData(vtkDataSet *source) { - if (source) - { - this->SetInputConnection(1, source->GetProducerPort()); - } - else - { - // Setting a NULL input removes the connection. - this->SetInputConnection(1, 0); - } + this->SetInputDataInternal(1, source); } //----------------------------------------------------------------------------- @@ -116,9 +108,9 @@ vtkDataSet *vtkGenericStreamTracer::GetSource() } //----------------------------------------------------------------------------- -void vtkGenericStreamTracer::AddInput(vtkGenericDataSet* input) +void vtkGenericStreamTracer::AddInputData(vtkGenericDataSet* input) { - this->Superclass::AddInput(input); + this->Superclass::AddInputData(input); } diff --git a/GenericFiltering/vtkGenericStreamTracer.h b/GenericFiltering/vtkGenericStreamTracer.h index aecd8d4f044..53e2c46067e 100644 --- a/GenericFiltering/vtkGenericStreamTracer.h +++ b/GenericFiltering/vtkGenericStreamTracer.h @@ -98,7 +98,7 @@ public: // Description: // Specify the source object used to generate starting points. - void SetSource(vtkDataSet *source); + void SetSourceData(vtkDataSet *source); vtkDataSet *GetSource(); int FillInputPortInformation(int port, vtkInformation* info); @@ -291,7 +291,7 @@ public: // Description: // Add a dataset to the list inputs - void AddInput(vtkGenericDataSet *in); + void AddInputData(vtkGenericDataSet *in); // Description: // The object used to interpolate the velocity field during diff --git a/Geovis/Testing/Cxx/TestCoincidentGeoGraphRepresentation2D.cxx b/Geovis/Testing/Cxx/TestCoincidentGeoGraphRepresentation2D.cxx index 2eb59cd2b4a..a96d725dd38 100644 --- a/Geovis/Testing/Cxx/TestCoincidentGeoGraphRepresentation2D.cxx +++ b/Geovis/Testing/Cxx/TestCoincidentGeoGraphRepresentation2D.cxx @@ -253,7 +253,7 @@ int TestCoincidentGeoGraphRepresentation2D(int argc, char* argv[]) vtkSmartPointer<vtkRenderedGraphRepresentation> graphRep = vtkSmartPointer<vtkRenderedGraphRepresentation>::New(); - graphRep->SetInput(graph); + graphRep->SetInputData(graph); graphRep->SetVertexColorArrayName("stuff"); graphRep->SetColorVerticesByArray(true); graphRep->SetLayoutStrategyToAssignCoordinates("longitude", "latitude"); diff --git a/Geovis/Testing/Cxx/TestGeoAssignCoordinates.cxx b/Geovis/Testing/Cxx/TestGeoAssignCoordinates.cxx index 6caf818515f..1fcf8e161f8 100644 --- a/Geovis/Testing/Cxx/TestGeoAssignCoordinates.cxx +++ b/Geovis/Testing/Cxx/TestGeoAssignCoordinates.cxx @@ -53,7 +53,7 @@ int TestGeoAssignCoordinates(int argc, char *argv[]) g->GetVertexData()->AddArray(longitude); VTK_CREATE(vtkGeoAssignCoordinates, assign); - assign->SetInput(g); + assign->SetInputData(g); assign->SetLatitudeArrayName("latitude"); assign->SetLongitudeArrayName("longitude"); assign->SetGlobeRadius(1.0); diff --git a/Geovis/Testing/Cxx/TestGeoView2DPopulation.cxx b/Geovis/Testing/Cxx/TestGeoView2DPopulation.cxx index 9471e4881b9..2e30ceaff6b 100644 --- a/Geovis/Testing/Cxx/TestGeoView2DPopulation.cxx +++ b/Geovis/Testing/Cxx/TestGeoView2DPopulation.cxx @@ -149,7 +149,7 @@ int TestGeoView2DPopulation(int argc, char* argv[]) vtkSmartPointer<vtkRenderedGraphRepresentation> graphRep = vtkSmartPointer<vtkRenderedGraphRepresentation>::New(); - graphRep->SetInput(graph); + graphRep->SetInputData(graph); graphRep->SetVertexLabelArrayName("LabelText1"); graphRep->SetVertexLabelPriorityArrayName("Priority"); graphRep->SetVertexLabelVisibility(true); diff --git a/Geovis/Testing/Cxx/TestGlobeSource.cxx b/Geovis/Testing/Cxx/TestGlobeSource.cxx index a2345ee44e2..7146330cb7e 100644 --- a/Geovis/Testing/Cxx/TestGlobeSource.cxx +++ b/Geovis/Testing/Cxx/TestGlobeSource.cxx @@ -92,11 +92,11 @@ int TestGlobeSource(int argc, char* argv[]) } globeSource->GetOutput(0)->GetPointData()->SetTCoords(textureCoords); - mapper->SetInput( globeSource->GetOutput(0) ); + mapper->SetInputConnection( globeSource->GetOutputPort() ); actor->SetMapper(mapper); VTK_CREATE(vtkTexture, texture); - texture->SetInput(reader->GetOutputDataObject(0)); + texture->SetInputConnection(reader->GetOutputPort()); actor->SetTexture(texture); // Get the right view. diff --git a/Geovis/vtkCompassRepresentation.cxx b/Geovis/vtkCompassRepresentation.cxx index 05a252c1503..511746483cd 100644 --- a/Geovis/vtkCompassRepresentation.cxx +++ b/Geovis/vtkCompassRepresentation.cxx @@ -94,11 +94,12 @@ vtkCompassRepresentation::vtkCompassRepresentation() this->BuildRing(); this->RingXForm = vtkTransformPolyDataFilter::New(); - this->RingXForm->SetInput(this->Ring); + this->RingXForm->SetInputData(this->Ring); this->RingXForm->SetTransform(this->XForm); this->RingMapper = vtkPolyDataMapper2D::New(); - this->RingMapper->SetInput(this->RingXForm->GetOutput()); + this->RingMapper->SetInputConnection( + this->RingXForm->GetOutputPort()); this->RingProperty = vtkProperty2D::New(); this->RingProperty->SetOpacity(0.5); @@ -179,7 +180,7 @@ void vtkCompassRepresentation::BuildBackdrop() backdropPolyData->GetPointData()->SetScalars(colors); this->BackdropMapper = vtkPolyDataMapper2D::New(); - this->BackdropMapper->SetInput(backdropPolyData); + this->BackdropMapper->SetInputData(backdropPolyData); this->BackdropMapper->ScalarVisibilityOn(); backdropPolyData->Delete(); diff --git a/Geovis/vtkGeoAlignedImageRepresentation.cxx b/Geovis/vtkGeoAlignedImageRepresentation.cxx index 3f548329499..1aa8f7a287c 100644 --- a/Geovis/vtkGeoAlignedImageRepresentation.cxx +++ b/Geovis/vtkGeoAlignedImageRepresentation.cxx @@ -199,7 +199,7 @@ void vtkGeoAlignedImageRepresentation::SaveDatabase(const char* path) char fn[512]; sprintf(fn, "%s/tile_%d_%ld.vti", path, node->GetLevel(), node->GetId()); writer->SetFileName(fn); - writer->SetInput(storedImage); + writer->SetInputData(storedImage); writer->Write(); // Recurse over children. diff --git a/Geovis/vtkGeoAlignedImageSource.cxx b/Geovis/vtkGeoAlignedImageSource.cxx index ab80ce2be9f..a01b2f1b5af 100644 --- a/Geovis/vtkGeoAlignedImageSource.cxx +++ b/Geovis/vtkGeoAlignedImageSource.cxx @@ -171,10 +171,10 @@ bool vtkGeoAlignedImageSource::FetchRoot(vtkGeoTreeNode* r) this->ProgressObserver->Scale = 1.0/numLevels; // Shrink image for the next level. - shrink->SetInput(image); + shrink->SetInputData(image); shrink->Update(); image->ShallowCopy(shrink->GetOutput()); - shrink->SetInput(0); + shrink->SetInputData(0); image->GetDimensions(imageDims); // Store the image for the level. @@ -192,7 +192,7 @@ bool vtkGeoAlignedImageSource::FetchRoot(vtkGeoTreeNode* r) tempBlocks->GetBlock(block)); } vtkSmartPointer<vtkTexture> texture = vtkSmartPointer<vtkTexture>::New(); - texture->SetInput(this->LevelImages->GetBlock(0)); + texture->SetInputData(this->LevelImages->GetBlock(0)); vtkSmartPointer<vtkTransform> texTrans = vtkSmartPointer<vtkTransform>::New(); // Start with (lat,lon) texTrans->PostMultiply(); @@ -280,7 +280,7 @@ bool vtkGeoAlignedImageSource::FetchChild(vtkGeoTreeNode* p, int index, vtkGeoTr vtkSmartPointer<vtkImageData> dummyImageWest = vtkSmartPointer<vtkImageData>::New(); dummyImageWest->SetOrigin(-180.0, -270.0, 0.0); dummyImageWest->SetSpacing(0.0, -90.0, 0.0); - child->GetTexture()->SetInput(dummyImageWest); + child->GetTexture()->SetInputData(dummyImageWest); child->SetLatitudeRange(-270, -90); child->SetLongitudeRange(-180, 0); child->SetId(2); @@ -291,7 +291,7 @@ bool vtkGeoAlignedImageSource::FetchChild(vtkGeoTreeNode* p, int index, vtkGeoTr vtkSmartPointer<vtkImageData> dummyImageEast = vtkSmartPointer<vtkImageData>::New(); dummyImageEast->SetOrigin(0.0, -270.0, 0.0); dummyImageEast->SetSpacing(180.0, -90.0, 0.0); - child->GetTexture()->SetInput(dummyImageEast); + child->GetTexture()->SetInputData(dummyImageEast); child->SetLatitudeRange(-270, -90); child->SetLongitudeRange(0, 180); child->SetId(3); @@ -394,7 +394,7 @@ void vtkGeoAlignedImageSource::CropImageForNode(vtkGeoImageNode* node, vtkImageD texTrans->Translate(-lonRange[0], -latRange[0], 0.0); // to origin texTrans->Scale(1.0/(lonRange[1] - lonRange[0]), 1.0/(latRange[1] - latRange[0]), 1.0); // to [0,1] tex->SetTransform(texTrans); - tex->SetInput(cropped); + tex->SetInputData(cropped); tex->InterpolateOn(); tex->RepeatOff(); tex->EdgeClampOn(); diff --git a/Geovis/vtkGeoFileImageSource.cxx b/Geovis/vtkGeoFileImageSource.cxx index 29c22a63b9a..b2fffb7eb86 100644 --- a/Geovis/vtkGeoFileImageSource.cxx +++ b/Geovis/vtkGeoFileImageSource.cxx @@ -90,7 +90,7 @@ bool vtkGeoFileImageSource::FetchChild(vtkGeoTreeNode* p, int index, vtkGeoTreeN vtkSmartPointer<vtkImageData> dummyImageWest = vtkSmartPointer<vtkImageData>::New(); dummyImageWest->SetOrigin(-180.0, -270.0, 0.0); dummyImageWest->SetSpacing(0.0, -90.0, 0.0); - child->GetTexture()->SetInput(dummyImageWest); + child->GetTexture()->SetInputData(dummyImageWest); child->SetLatitudeRange(-270, -90); child->SetLongitudeRange(-180, 0); } @@ -99,7 +99,7 @@ bool vtkGeoFileImageSource::FetchChild(vtkGeoTreeNode* p, int index, vtkGeoTreeN vtkSmartPointer<vtkImageData> dummyImageEast = vtkSmartPointer<vtkImageData>::New(); dummyImageEast->SetOrigin(0.0, -270.0, 0.0); dummyImageEast->SetSpacing(180.0, -90.0, 0.0); - child->GetTexture()->SetInput(dummyImageEast); + child->GetTexture()->SetInputData(dummyImageEast); child->SetLatitudeRange(-270, -90); child->SetLongitudeRange(0, 180); } @@ -144,7 +144,7 @@ bool vtkGeoFileImageSource::ReadImage(int level, int id, vtkGeoImageNode* node) dummy->GetPointData()->SetScalars(scalar); dummy->SetOrigin(node->GetLongitudeRange()[0], node->GetLatitudeRange()[0], 0.0); dummy->SetSpacing(node->GetLongitudeRange()[1], node->GetLatitudeRange()[1], 0.0); - node->GetTexture()->SetInput(dummy); + node->GetTexture()->SetInputData(dummy); return false; } in.close(); diff --git a/Geovis/vtkGeoImageNode.cxx b/Geovis/vtkGeoImageNode.cxx index e64bc10269a..e2ceeffbab4 100644 --- a/Geovis/vtkGeoImageNode.cxx +++ b/Geovis/vtkGeoImageNode.cxx @@ -179,7 +179,7 @@ void vtkGeoImageNode::CropImageForTile( char fn[512]; sprintf(fn, "%s/tile_%d_%ld.vti", prefix, this->Level, this->Id); writer->SetFileName(fn); - writer->SetInput(storedImage); + writer->SetInputData(storedImage); writer->Write(); writer->Delete(); storedImage->Delete(); diff --git a/Geovis/vtkGeoProjectionSource.cxx b/Geovis/vtkGeoProjectionSource.cxx index c01cdc8a6b9..1587fb16617 100644 --- a/Geovis/vtkGeoProjectionSource.cxx +++ b/Geovis/vtkGeoProjectionSource.cxx @@ -347,7 +347,7 @@ bool vtkGeoProjectionSource::FetchChild(vtkGeoTreeNode* p, int index, vtkGeoTree lonClipPlane->SetNormal(-1.0, 0.0, 0.0); lonClip->SetClipFunction(lonClipPlane); lonClip->GenerateClippedOutputOn(); - lonClip->SetInput(parent->GetModel()); + lonClip->SetInputData(parent->GetModel()); vtkSmartPointer<vtkPlane> latClipPlane = vtkSmartPointer<vtkPlane>::New(); latClipPlane->SetOrigin(center); @@ -443,7 +443,7 @@ bool vtkGeoProjectionSource::FetchChild(vtkGeoTreeNode* p, int index, vtkGeoTree finalClip->SetClipFunction(plane); vtkSmartPointer<vtkPolyData> pd = vtkSmartPointer<vtkPolyData>::New(); pd->DeepCopy(child->GetModel()); - finalClip->SetInput(pd); + finalClip->SetInputData(pd); finalClip->Update(); child->GetModel()->DeepCopy(finalClip->GetOutput()); } diff --git a/Geovis/vtkGeoTerrain.cxx b/Geovis/vtkGeoTerrain.cxx index 648380b3f68..da7091017d1 100644 --- a/Geovis/vtkGeoTerrain.cxx +++ b/Geovis/vtkGeoTerrain.cxx @@ -385,7 +385,7 @@ void vtkGeoTerrain::AddActors( // Add the data to the view vtkSmartPointer<vtkPolyDataMapper> mapper = vtkSmartPointer<vtkPolyDataMapper>::New(); vtkSmartPointer<vtkActor> actor = vtkSmartPointer<vtkActor>::New(); - mapper->SetInput(cur->GetModel()); + mapper->SetInputData(cur->GetModel()); mapper->ScalarVisibilityOff(); actor->SetMapper(mapper); actor->SetPosition(-this->Origin[0], -this->Origin[1], -this->Origin[2] - 0.1); @@ -518,7 +518,7 @@ void vtkGeoTerrain::SaveDatabase(const char* path, int depth) char fn[512]; sprintf(fn, "%s/tile_%d_%ld.vtp", path, node->GetLevel(), node->GetId()); writer->SetFileName(fn); - writer->SetInput(storedData); + writer->SetInputData(storedData); writer->Write(); if (node->GetLevel() == depth) diff --git a/Graphics/Testing/Cxx/BoxClipPolyData.cxx b/Graphics/Testing/Cxx/BoxClipPolyData.cxx index 30ece06e0f4..f0e13ff803f 100644 --- a/Graphics/Testing/Cxx/BoxClipPolyData.cxx +++ b/Graphics/Testing/Cxx/BoxClipPolyData.cxx @@ -94,7 +94,7 @@ static void TestPolyData(vtkPolyData *data, int num, vtkRenderWindow *renwin, { // Set up test of normal box. VTK_CREATE(vtkBoxClipDataSet, clipper1); - clipper1->SetInput(data); + clipper1->SetInputData(data); clipper1->GenerateClippedOutputOff(); clipper1->SetBoxClip(minBoxPoint[0], maxBoxPoint[0], minBoxPoint[1], maxBoxPoint[1], @@ -119,7 +119,7 @@ static void TestPolyData(vtkPolyData *data, int num, vtkRenderWindow *renwin, // Set up test of normal box with generation of clipped output. VTK_CREATE(vtkBoxClipDataSet, clipper2); - clipper2->SetInput(data); + clipper2->SetInputData(data); clipper2->GenerateClippedOutputOn(); clipper2->SetBoxClip(minBoxPoint[0], maxBoxPoint[0], minBoxPoint[1], maxBoxPoint[1], @@ -136,7 +136,7 @@ static void TestPolyData(vtkPolyData *data, int num, vtkRenderWindow *renwin, actor2_1->GetProperty()->SetPointSize(3.0f); VTK_CREATE(vtkDataSetSurfaceFilter, surface2_2); - surface2_2->SetInput(clipper2->GetClippedOutput()); + surface2_2->SetInputConnection(clipper2->GetOutputPort(1)); VTK_CREATE(vtkPolyDataMapper, mapper2_2); mapper2_2->SetInputConnection(0, surface2_2->GetOutputPort(0)); @@ -156,7 +156,7 @@ static void TestPolyData(vtkPolyData *data, int num, vtkRenderWindow *renwin, // Set up test of an oriented box. VTK_CREATE(vtkBoxClipDataSet, clipper3); - clipper3->SetInput(data); + clipper3->SetInputData(data); clipper3->GenerateClippedOutputOff(); clipper3->SetBoxClip(minusx, minBoxPoint, minusy, minBoxPoint, @@ -184,7 +184,7 @@ static void TestPolyData(vtkPolyData *data, int num, vtkRenderWindow *renwin, // Set up test of an oriented box with generation of clipped output. VTK_CREATE(vtkBoxClipDataSet, clipper4); - clipper4->SetInput(data); + clipper4->SetInputData(data); clipper4->GenerateClippedOutputOn(); clipper4->SetBoxClip(minusx, minBoxPoint, minusy, minBoxPoint, @@ -204,7 +204,7 @@ static void TestPolyData(vtkPolyData *data, int num, vtkRenderWindow *renwin, actor4_1->GetProperty()->SetPointSize(3.0f); VTK_CREATE(vtkDataSetSurfaceFilter, surface4_2); - surface4_2->SetInput(clipper4->GetClippedOutput()); + surface4_2->SetInputConnection(clipper4->GetOutputPort(1)); VTK_CREATE(vtkPolyDataMapper, mapper4_2); mapper4_2->SetInputConnection(0, surface4_2->GetOutputPort(0)); @@ -287,7 +287,7 @@ int BoxClipPolyData(int argc, char *argv[]) plane->SetNormal(0.0, 0.0, 1.0); VTK_CREATE(vtkCutter, cutter); - cutter->SetInput(sphereNoNormals); + cutter->SetInputData(sphereNoNormals); cutter->SetCutFunction(plane); cutter->Update(); diff --git a/Graphics/Testing/Cxx/BoxClipTetrahedra.cxx b/Graphics/Testing/Cxx/BoxClipTetrahedra.cxx index d5015119931..26ae045ee8d 100644 --- a/Graphics/Testing/Cxx/BoxClipTetrahedra.cxx +++ b/Graphics/Testing/Cxx/BoxClipTetrahedra.cxx @@ -199,7 +199,7 @@ static void TestBox(vtkRenderWindow *renwin, int boxnum, CheckWinding(input); VTK_CREATE(vtkBoxClipDataSet, clipper); - clipper->SetInput(input); + clipper->SetInputData(input); clipper->GenerateClippedOutputOff(); clipper->SetBoxClip(minx, maxx, miny, maxy, minz, maxz); clipper->Update(); @@ -233,7 +233,7 @@ static void TestBox(vtkRenderWindow *renwin, int boxnum, CheckWinding(input); VTK_CREATE(vtkBoxClipDataSet, clipper); - clipper->SetInput(input); + clipper->SetInputData(input); clipper->GenerateClippedOutputOn(); clipper->SetBoxClip(minx, maxx, miny, maxy, minz, maxz); clipper->Update(); @@ -250,7 +250,7 @@ static void TestBox(vtkRenderWindow *renwin, int boxnum, actor1->SetMapper(mapper1); VTK_CREATE(vtkDataSetSurfaceFilter, surface2); - surface2->SetInput(clipper->GetClippedOutput()); + surface2->SetInputConnection(clipper->GetOutputPort(1)); VTK_CREATE(vtkPolyDataMapper, mapper2); mapper2->SetInputConnection(0, surface2->GetOutputPort(0)); @@ -283,7 +283,7 @@ static void TestBox(vtkRenderWindow *renwin, int boxnum, CheckWinding(input); VTK_CREATE(vtkBoxClipDataSet, clipper); - clipper->SetInput(input); + clipper->SetInputData(input); clipper->GenerateClippedOutputOff(); clipper->SetBoxClip(minusx, minpoint, minusy, minpoint, minusz, minpoint, plusx, maxpoint, plusy, maxpoint, plusz, maxpoint); @@ -318,7 +318,7 @@ static void TestBox(vtkRenderWindow *renwin, int boxnum, CheckWinding(input); VTK_CREATE(vtkBoxClipDataSet, clipper); - clipper->SetInput(input); + clipper->SetInputData(input); clipper->GenerateClippedOutputOn(); clipper->SetBoxClip(minusx, minpoint, minusy, minpoint, minusz, minpoint, plusx, maxpoint, plusy, maxpoint, plusz, maxpoint); @@ -336,7 +336,7 @@ static void TestBox(vtkRenderWindow *renwin, int boxnum, actor1->SetMapper(mapper1); VTK_CREATE(vtkDataSetSurfaceFilter, surface2); - surface2->SetInput(clipper->GetClippedOutput()); + surface2->SetInputConnection(clipper->GetOutputPort(1)); VTK_CREATE(vtkPolyDataMapper, mapper2); mapper2->SetInputConnection(0, surface2->GetOutputPort(0)); diff --git a/Graphics/Testing/Cxx/BoxClipTriangulate.cxx b/Graphics/Testing/Cxx/BoxClipTriangulate.cxx index ef014b6e067..1708fd23280 100644 --- a/Graphics/Testing/Cxx/BoxClipTriangulate.cxx +++ b/Graphics/Testing/Cxx/BoxClipTriangulate.cxx @@ -234,7 +234,7 @@ static void Check2DPrimitive(int type, vtkIdType numcells, = BuildInput(type, numcells, cells); VTK_CREATE(vtkBoxClipDataSet, clipper); - clipper->SetInput(input); + clipper->SetInputData(input); // Clip nothing. clipper->SetBoxClip(0.0, 2.0, 0.0, 1.0, 0.0, 1.0); clipper->Update(); @@ -278,7 +278,7 @@ static void Check3DPrimitive(int type, vtkIdType numcells, = BuildInput(type, numcells, cells); VTK_CREATE(vtkBoxClipDataSet, clipper); - clipper->SetInput(input); + clipper->SetInputData(input); // Clip nothing. clipper->SetBoxClip(0.0, 2.0, 0.0, 1.0, 0.0, 1.0); clipper->Update(); @@ -311,7 +311,7 @@ static void Check3DPrimitive(int type, vtkIdType numcells, CheckWinding(clipper); VTK_CREATE(vtkDataSetSurfaceFilter, surface); - surface->SetInput(output); + surface->SetInputConnection(clipper->GetOutputPort()); surface->Update(); if (surface->GetOutput()->GetNumberOfCells() != numSurfacePolys) diff --git a/Graphics/Testing/Cxx/BoxClipTriangulateAndInterpolate.cxx b/Graphics/Testing/Cxx/BoxClipTriangulateAndInterpolate.cxx index 05989845455..d4895ab89e1 100644 --- a/Graphics/Testing/Cxx/BoxClipTriangulateAndInterpolate.cxx +++ b/Graphics/Testing/Cxx/BoxClipTriangulateAndInterpolate.cxx @@ -219,67 +219,67 @@ int BoxClipTriangulateAndInterpolate(int argc, char *argv[]) CreateLine(line); VTK_CREATE(vtkBoxClipDataSet, clip00); - clip00->SetInput(hex); + clip00->SetInputData(hex); clip00->SetBoxClip(0.0, 1.0, -1.0, 1.0, -1.0, 1.0); AddToRenderWindow(renwin, clip00, 0, 0); VTK_CREATE(vtkBoxClipDataSet, clip01); - clip01->SetInput(hex); + clip01->SetInputData(hex); clip01->GenerateClippedOutputOn(); clip01->SetBoxClip(0.0, 1.0, -1.0, 1.0, -1.0, 1.0); AddToRenderWindow(renwin, clip01, 0, 1); VTK_CREATE(vtkBoxClipDataSet, clip10); - clip10->SetInput(hex); + clip10->SetInputData(hex); SetClipAsHexahedron(clip10, 0.0, 1.0, -1.0, 1.0, -1.0, 1.0); AddToRenderWindow(renwin, clip10, 1, 0); VTK_CREATE(vtkBoxClipDataSet, clip11); - clip11->SetInput(hex); + clip11->SetInputData(hex); clip11->GenerateClippedOutputOn(); SetClipAsHexahedron(clip11, 0.0, 1.0, -1.0, 1.0, -1.0, 1.0); AddToRenderWindow(renwin, clip11, 1, 1); VTK_CREATE(vtkBoxClipDataSet, clip20); - clip20->SetInput(quad); + clip20->SetInputData(quad); clip20->SetBoxClip(0.0, 1.0, -1.0, 1.0, -1.0, 1.0); AddToRenderWindow(renwin, clip20, 2, 0); VTK_CREATE(vtkBoxClipDataSet, clip21); - clip21->SetInput(quad); + clip21->SetInputData(quad); clip21->GenerateClippedOutputOn(); clip21->SetBoxClip(0.0, 1.0, -1.0, 1.0, -1.0, 1.0); AddToRenderWindow(renwin, clip21, 2, 1); VTK_CREATE(vtkBoxClipDataSet, clip30); - clip30->SetInput(quad); + clip30->SetInputData(quad); SetClipAsHexahedron(clip30, 0.0, 1.0, -1.0, 1.0, -1.0, 1.0); AddToRenderWindow(renwin, clip30, 3, 0); VTK_CREATE(vtkBoxClipDataSet, clip31); - clip31->SetInput(quad); + clip31->SetInputData(quad); clip31->GenerateClippedOutputOn(); SetClipAsHexahedron(clip31, 0.0, 1.0, -1.0, 1.0, -1.0, 1.0); AddToRenderWindow(renwin, clip31, 3, 1); VTK_CREATE(vtkBoxClipDataSet, clip40); - clip40->SetInput(line); + clip40->SetInputData(line); clip40->SetBoxClip(-1.0, 1.0, 0.0, 1.0, -1.0, 1.0); AddToRenderWindow(renwin, clip40, 4, 0); VTK_CREATE(vtkBoxClipDataSet, clip41); - clip41->SetInput(line); + clip41->SetInputData(line); clip41->GenerateClippedOutputOn(); clip41->SetBoxClip(-1.0, 1.0, 0.0, 1.0, -1.0, 1.0); AddToRenderWindow(renwin, clip41, 4, 1); VTK_CREATE(vtkBoxClipDataSet, clip50); - clip50->SetInput(line); + clip50->SetInputData(line); SetClipAsHexahedron(clip50, -1.0, 1.0, 0.0, 1.0, -1.0, 1.0); AddToRenderWindow(renwin, clip50, 5, 0); VTK_CREATE(vtkBoxClipDataSet, clip51); - clip51->SetInput(line); + clip51->SetInputData(line); clip51->GenerateClippedOutputOn(); SetClipAsHexahedron(clip51, -1.0, 1.0, 0.0, 1.0, -1.0, 1.0); AddToRenderWindow(renwin, clip51, 5, 1); diff --git a/Graphics/Testing/Cxx/MeshQuality.cxx b/Graphics/Testing/Cxx/MeshQuality.cxx index af94c1d5dec..edb4b55b13d 100644 --- a/Graphics/Testing/Cxx/MeshQuality.cxx +++ b/Graphics/Testing/Cxx/MeshQuality.cxx @@ -44,7 +44,7 @@ int MeshQuality( int argc, char* argv[] ) mr->Update(); ug = mr->GetOutput(); - iq->SetInput( ug ); + iq->SetInputConnection( mr->GetOutputPort() ); if ( ug->GetNumberOfCells() ) { diff --git a/Graphics/Testing/Cxx/RGrid.cxx b/Graphics/Testing/Cxx/RGrid.cxx index e826a963cd7..3b9761c6c97 100644 --- a/Graphics/Testing/Cxx/RGrid.cxx +++ b/Graphics/Testing/Cxx/RGrid.cxx @@ -74,7 +74,7 @@ int RGrid( int argc, char *argv[] ) rgrid->SetZCoordinates(zCoords); vtkRectilinearGridGeometryFilter *plane = vtkRectilinearGridGeometryFilter::New(); - plane->SetInput(rgrid); + plane->SetInputData(rgrid); plane->SetExtent(0,46, 16,16, 0,43); vtkPolyDataMapper *rgridMapper = vtkPolyDataMapper::New(); diff --git a/Graphics/Testing/Cxx/TestActor2DTextures.cxx b/Graphics/Testing/Cxx/TestActor2DTextures.cxx index 505213e8a50..aa4a20c065b 100644 --- a/Graphics/Testing/Cxx/TestActor2DTextures.cxx +++ b/Graphics/Testing/Cxx/TestActor2DTextures.cxx @@ -76,7 +76,7 @@ int TestActor2DTextures( int argc, char *argv[]) vtkIconGlyphFilter * iconFilter = vtkIconGlyphFilter::New(); - iconFilter->SetInput(pointSet); + iconFilter->SetInputData(pointSet); iconFilter->SetIconSize(size); iconFilter->SetUseIconSize(true); iconFilter->SetIconSheetSize(imageDims); diff --git a/Graphics/Testing/Cxx/TestAppendSelection.cxx b/Graphics/Testing/Cxx/TestAppendSelection.cxx index 274bdad9fec..789f7704ea8 100644 --- a/Graphics/Testing/Cxx/TestAppendSelection.cxx +++ b/Graphics/Testing/Cxx/TestAppendSelection.cxx @@ -127,8 +127,8 @@ int TestAppendSelectionCase( vtkSelection* correct) { VTK_CREATE(vtkAppendSelection, append); - append->AddInput(input1); - append->AddInput(input2); + append->AddInputData(input1); + append->AddInputData(input2); append->Update(); vtkSelection* output = append->GetOutput(); return SelectionCompare(output, correct); diff --git a/Graphics/Testing/Cxx/TestAssignAttribute.cxx b/Graphics/Testing/Cxx/TestAssignAttribute.cxx index 0e729e31885..e4896d893f0 100644 --- a/Graphics/Testing/Cxx/TestAssignAttribute.cxx +++ b/Graphics/Testing/Cxx/TestAssignAttribute.cxx @@ -59,7 +59,7 @@ int TestAssignAttribute(int, char *[]) poly->GetCellData()->AddArray(scalars); VTK_CREATE(vtkAssignAttribute, assign); - assign->SetInput(graph); + assign->SetInputData(graph); assign->Assign("scalars", vtkDataSetAttributes::SCALARS, vtkAssignAttribute::VERTEX_DATA); assign->Update(); vtkGraph *output = vtkGraph::SafeDownCast(assign->GetOutput()); @@ -77,7 +77,7 @@ int TestAssignAttribute(int, char *[]) ++errors; } - assign->SetInput(poly); + assign->SetInputData(poly); assign->Assign("scalars", vtkDataSetAttributes::SCALARS, vtkAssignAttribute::POINT_DATA); assign->Update(); vtkPolyData *outputPoly = vtkPolyData::SafeDownCast(assign->GetOutput()); diff --git a/Graphics/Testing/Cxx/TestBSPTree.cxx b/Graphics/Testing/Cxx/TestBSPTree.cxx index f536a60ddf0..f599ef2a562 100644 --- a/Graphics/Testing/Cxx/TestBSPTree.cxx +++ b/Graphics/Testing/Cxx/TestBSPTree.cxx @@ -172,7 +172,7 @@ int TestBSPTree(int argc, char* argv[]) // Render Intersection points // vtkSmartPointer<vtkGlyph3D> iglyph = vtkSmartPointer<vtkGlyph3D>::New(); - iglyph->SetInput(0,intersections); + iglyph->SetInputData(0,intersections); iglyph->SetSourceConnection(sphere->GetOutputPort(0)); iglyph->SetScaling(1); iglyph->SetScaleFactor(0.05); diff --git a/Graphics/Testing/Cxx/TestBareScalarsToColors.cxx b/Graphics/Testing/Cxx/TestBareScalarsToColors.cxx index 1d5568a913c..9e63fc8b667 100644 --- a/Graphics/Testing/Cxx/TestBareScalarsToColors.cxx +++ b/Graphics/Testing/Cxx/TestBareScalarsToColors.cxx @@ -163,7 +163,7 @@ int TestBareScalarsToColors(int argc, char *argv[]) vtkNew<vtkImageMapper> mapper; mapper->SetColorWindow(255.0); mapper->SetColorLevel(127.5); - mapper->SetInput(image.GetPointer()); + mapper->SetInputData(image.GetPointer()); vtkNew<vtkActor2D> actor; actor->SetMapper(mapper.GetPointer()); diff --git a/Graphics/Testing/Cxx/TestDecimatePolylineFilter.cxx b/Graphics/Testing/Cxx/TestDecimatePolylineFilter.cxx index e146c789102..3f5dd0ed8ce 100644 --- a/Graphics/Testing/Cxx/TestDecimatePolylineFilter.cxx +++ b/Graphics/Testing/Cxx/TestDecimatePolylineFilter.cxx @@ -63,18 +63,18 @@ int TestDecimatePolylineFilter(int, char *[]) lines->Delete(); vtkPolyDataMapper* c_mapper = vtkPolyDataMapper::New(); - c_mapper->SetInput( circle ); + c_mapper->SetInputData( circle ); vtkActor* c_actor = vtkActor::New(); c_actor->SetMapper( c_mapper ); vtkDecimatePolylineFilter* decimate = vtkDecimatePolylineFilter::New(); - decimate->SetInput( circle ); + decimate->SetInputData( circle ); decimate->SetTargetReduction( 0.95 ); decimate->Update(); vtkPolyDataMapper* d_mapper = vtkPolyDataMapper::New(); - d_mapper->SetInput( decimate->GetOutput() ); + d_mapper->SetInputConnection( decimate->GetOutputPort() ); vtkActor* d_actor = vtkActor::New(); d_actor->SetMapper( d_mapper ); diff --git a/Graphics/Testing/Cxx/TestDelaunay2D.cxx b/Graphics/Testing/Cxx/TestDelaunay2D.cxx index c8d89d36ff6..35521236fd0 100644 --- a/Graphics/Testing/Cxx/TestDelaunay2D.cxx +++ b/Graphics/Testing/Cxx/TestDelaunay2D.cxx @@ -64,7 +64,7 @@ int TestDelaunay2D( int argc, char* argv[] ) newPts->Delete(); vtkDelaunay2D *delaunay2D = vtkDelaunay2D::New(); - delaunay2D->SetInput( pointCloud ); + delaunay2D->SetInputData( pointCloud ); pointCloud->Delete(); delaunay2D->Update(); diff --git a/Graphics/Testing/Cxx/TestDensifyPolyData.cxx b/Graphics/Testing/Cxx/TestDensifyPolyData.cxx index 85e834e4209..ac5f1e5680e 100644 --- a/Graphics/Testing/Cxx/TestDensifyPolyData.cxx +++ b/Graphics/Testing/Cxx/TestDensifyPolyData.cxx @@ -70,18 +70,18 @@ int TestDensifyPolyData(int argc, char *argv[]) boxPolydata->InsertNextCell(VTK_POLYGON, 3, ids ); } VTK_CREATE( vtkDensifyPolyData, densifyFilter ); - densifyFilter->SetInput(boxPolydata); + densifyFilter->SetInputData(boxPolydata); densifyFilter->SetNumberOfSubdivisions(2); vtkXMLPolyDataWriter *writer = vtkXMLPolyDataWriter::New(); - writer->SetInput(densifyFilter->GetOutput()); + writer->SetInputConnection(densifyFilter->GetOutputPort()); writer->SetFileName("tessellatedBox.vtp"); writer->SetDataModeToAscii(); writer->Update(); VTK_CREATE( vtkSphereSource, sphere ); VTK_CREATE( vtkDensifyPolyData, densifyFilter2 ); - densifyFilter2->SetInput(sphere->GetOutput()); + densifyFilter2->SetInputConnection(sphere->GetOutputPort()); densifyFilter2->SetNumberOfSubdivisions(1); @@ -94,7 +94,7 @@ int TestDensifyPolyData(int argc, char *argv[]) iren->SetRenderWindow(renwin); VTK_CREATE(vtkPolyDataMapper, mapper1); - mapper1->SetInput(boxPolydata); + mapper1->SetInputData(boxPolydata); VTK_CREATE(vtkActor, actor1); actor1->SetMapper(mapper1); @@ -108,7 +108,7 @@ int TestDensifyPolyData(int argc, char *argv[]) actor1->GetProperty()->SetRepresentationToWireframe(); VTK_CREATE(vtkPolyDataMapper, mapper2); - mapper2->SetInput(densifyFilter->GetOutput()); + mapper2->SetInputConnection(densifyFilter->GetOutputPort()); VTK_CREATE(vtkActor, actor2); actor2->SetMapper(mapper2); @@ -122,7 +122,7 @@ int TestDensifyPolyData(int argc, char *argv[]) actor2->GetProperty()->SetRepresentationToWireframe(); VTK_CREATE(vtkPolyDataMapper, mapper3); - mapper3->SetInput(sphere->GetOutput()); + mapper3->SetInputConnection(sphere->GetOutputPort()); VTK_CREATE(vtkActor, actor3); actor3->SetMapper(mapper3); @@ -136,7 +136,7 @@ int TestDensifyPolyData(int argc, char *argv[]) actor3->GetProperty()->SetRepresentationToWireframe(); VTK_CREATE(vtkPolyDataMapper, mapper4); - mapper4->SetInput(densifyFilter2->GetOutput()); + mapper4->SetInputConnection(densifyFilter2->GetOutputPort()); VTK_CREATE(vtkActor, actor4); actor4->SetMapper(mapper4); diff --git a/Graphics/Testing/Cxx/TestExtractSelection.cxx b/Graphics/Testing/Cxx/TestExtractSelection.cxx index d967650f662..9e4372eac13 100644 --- a/Graphics/Testing/Cxx/TestExtractSelection.cxx +++ b/Graphics/Testing/Cxx/TestExtractSelection.cxx @@ -52,7 +52,7 @@ int TestExtractSelection( int argc, char* argv[] ) vtkExtractSelectedPolyDataIds* selFilter = vtkExtractSelectedPolyDataIds::New(); - selFilter->SetInput(1, sel); + selFilter->SetInputData(1, sel); selFilter->SetInputConnection(0,sphere->GetOutputPort()); sel->Delete(); node->Delete(); diff --git a/Graphics/Testing/Cxx/TestExtraction.cxx b/Graphics/Testing/Cxx/TestExtraction.cxx index bf4f46025d7..020562a2bcf 100644 --- a/Graphics/Testing/Cxx/TestExtraction.cxx +++ b/Graphics/Testing/Cxx/TestExtraction.cxx @@ -65,7 +65,7 @@ void showMe(vtkDataSet *result, int X, int Y, int CellOrPoint, vtkDataArray *arr vtkDataSet *copy = result->NewInstance(); copy->DeepCopy(result); vtkDataSetMapper *mapper = vtkDataSetMapper::New(); - mapper->SetInput(copy); + mapper->SetInputData(copy); double *range = array->GetRange(); if (CellOrPoint == COLORBYCELL) { @@ -103,7 +103,7 @@ void showMe(vtkDataSet *result, int X, int Y, int CellOrPoint, vtkDataArray *arr mapper2->SelectColorArray("Forward Point Ids"); mapper2->SetScalarRange(10, 73); } - mapper2->SetInput(sampleData); + mapper2->SetInputData(sampleData); vtkActor *actor2 = vtkActor::New(); actor2->GetProperty()->SetRepresentationToWireframe(); actor2->SetMapper(mapper2); @@ -156,7 +156,7 @@ int TestExtraction(int argc, char *argv[]) sampleData->SetSpacing(1.0,1.0,1.0); sampleData->SetOrigin(0.0,0.0,0.0); sampleData->SetDimensions(XCELLS+1,YCELLS+1,ZCELLS+1); - sampleData->AllocateScalars(); + sampleData->AllocateScalars(VTK_DOUBLE, 1); vtkIdTypeArray *pia = vtkIdTypeArray::New(); pia->SetNumberOfComponents(1); @@ -302,7 +302,7 @@ int TestExtraction(int argc, char *argv[]) //save the test data set vtkXMLDataSetWriter *xwriter = vtkXMLDataSetWriter::New(); - xwriter->SetInput(sampleData); + xwriter->SetInputData(sampleData); xwriter->SetFileName("sampleData.vti"); if (DoWrite) { @@ -315,8 +315,8 @@ int TestExtraction(int argc, char *argv[]) vtkSelectionNode *sel = vtkSelectionNode::New(); selection->AddNode(sel); vtkExtractSelection *ext = vtkExtractSelection::New(); - ext->SetInput(0, sampleData); - ext->SetInput(1, selection); + ext->SetInputData(0, sampleData); + ext->SetInputData(1, selection); ext->PreserveTopologyOff(); vtkUnstructuredGridWriter *writer = vtkUnstructuredGridWriter::New(); @@ -346,7 +346,7 @@ int TestExtraction(int argc, char *argv[]) extGrid = vtkUnstructuredGrid::SafeDownCast(ext->GetOutput()); if (DoWrite) { - writer->SetInput(extGrid); + writer->SetInputConnection(ext->GetOutputPort()); writer->SetFileName("ext_C_GID.vtk"); writer->Write(); } @@ -357,7 +357,7 @@ int TestExtraction(int argc, char *argv[]) extGrid = vtkUnstructuredGrid::SafeDownCast(ext->GetOutput()); if (DoWrite) { - writer->SetInput(extGrid); + writer->SetInputConnection(ext->GetOutputPort()); writer->SetFileName("ext_C_GID_I.vtk"); writer->Write(); } @@ -369,7 +369,7 @@ int TestExtraction(int argc, char *argv[]) extIData = vtkImageData::SafeDownCast(ext->GetOutput()); if (DoWrite) { - xwriter->SetInput(extIData); + xwriter->SetInputConnection(ext->GetOutputPort()); xwriter->SetFileName("ext_C_GID_PT.vti"); xwriter->Write(); } @@ -401,7 +401,7 @@ int TestExtraction(int argc, char *argv[]) extGrid = vtkUnstructuredGrid::SafeDownCast(ext->GetOutput()); if (DoWrite) { - writer->SetInput(extGrid); + writer->SetInputConnection(ext->GetOutputPort()); writer->SetFileName("ext_P_GID.vtk"); writer->Write(); } @@ -412,7 +412,7 @@ int TestExtraction(int argc, char *argv[]) extGrid = vtkUnstructuredGrid::SafeDownCast(ext->GetOutput()); if (DoWrite) { - writer->SetInput(extGrid); + writer->SetInputConnection(ext->GetOutputPort()); writer->SetFileName("ext_P_GID_I.vtk"); writer->Write(); } @@ -424,7 +424,7 @@ int TestExtraction(int argc, char *argv[]) extGrid = vtkUnstructuredGrid::SafeDownCast(ext->GetOutput()); if (DoWrite) { - writer->SetInput(extGrid); + writer->SetInputConnection(ext->GetOutputPort()); writer->SetFileName("ext_P_GID_WC.vtk"); writer->Write(); } @@ -436,7 +436,7 @@ int TestExtraction(int argc, char *argv[]) extIData = vtkImageData::SafeDownCast(ext->GetOutput()); if (DoWrite) { - xwriter->SetInput(extIData); + xwriter->SetInputConnection(ext->GetOutputPort()); xwriter->SetFileName("ext_P_GID_PT.vti"); xwriter->Write(); } @@ -454,7 +454,7 @@ int TestExtraction(int argc, char *argv[]) extIData = vtkImageData::SafeDownCast(ext->GetOutput()); if (DoWrite) { - xwriter->SetInput(extGrid); + xwriter->SetInputConnection(ext->GetOutputPort()); xwriter->SetFileName("ext_P_GID_WC_PT.vtk"); xwriter->Write(); } @@ -482,7 +482,7 @@ int TestExtraction(int argc, char *argv[]) extGrid = vtkUnstructuredGrid::SafeDownCast(ext->GetOutput()); if (DoWrite) { - writer->SetInput(extGrid); + writer->SetInputConnection(ext->GetOutputPort()); writer->SetFileName("ext_C_Ind.vtk"); writer->Write(); } @@ -493,7 +493,7 @@ int TestExtraction(int argc, char *argv[]) extGrid = vtkUnstructuredGrid::SafeDownCast(ext->GetOutput()); if (DoWrite) { - writer->SetInput(extGrid); + writer->SetInputConnection(ext->GetOutputPort()); writer->SetFileName("ext_C_Ind_I.vtk"); writer->Write(); } @@ -505,7 +505,7 @@ int TestExtraction(int argc, char *argv[]) extIData = vtkImageData::SafeDownCast(ext->GetOutput()); if (DoWrite) { - xwriter->SetInput(extIData); + xwriter->SetInputConnection(ext->GetOutputPort()); xwriter->SetFileName("ext_C_Ind_PT.vti"); xwriter->Write(); } @@ -535,7 +535,7 @@ int TestExtraction(int argc, char *argv[]) extGrid = vtkUnstructuredGrid::SafeDownCast(ext->GetOutput()); if (DoWrite) { - writer->SetInput(extGrid); + writer->SetInputConnection(ext->GetOutputPort()); writer->SetFileName("ext_P_Ind_I.vtk"); writer->Write(); } @@ -546,7 +546,7 @@ int TestExtraction(int argc, char *argv[]) extGrid = vtkUnstructuredGrid::SafeDownCast(ext->GetOutput()); if (DoWrite) { - writer->SetInput(extGrid); + writer->SetInputConnection(ext->GetOutputPort()); writer->SetFileName("ext_P_Ind_I.vtk"); writer->Write(); } @@ -558,7 +558,7 @@ int TestExtraction(int argc, char *argv[]) extGrid = vtkUnstructuredGrid::SafeDownCast(ext->GetOutput()); if (DoWrite) { - writer->SetInput(extGrid); + writer->SetInputConnection(ext->GetOutputPort()); writer->SetFileName("ext_P_Ind_WC.vtk"); writer->Write(); } @@ -571,7 +571,7 @@ int TestExtraction(int argc, char *argv[]) extIData = vtkImageData::SafeDownCast(ext->GetOutput()); if (DoWrite) { - xwriter->SetInput(extIData); + xwriter->SetInputConnection(ext->GetOutputPort()); xwriter->SetFileName("ext_P_Ind_PT.vti"); xwriter->Write(); } @@ -588,7 +588,7 @@ int TestExtraction(int argc, char *argv[]) extIData = vtkImageData::SafeDownCast(ext->GetOutput()); if (DoWrite) { - xwriter->SetInput(extIData); + xwriter->SetInputConnection(ext->GetOutputPort()); xwriter->SetFileName("ext_P_Ind_PT_WC.vti"); xwriter->Write(); } @@ -617,7 +617,7 @@ int TestExtraction(int argc, char *argv[]) extGrid = vtkUnstructuredGrid::SafeDownCast(ext->GetOutput()); if (DoWrite) { - writer->SetInput(extGrid); + writer->SetInputConnection(ext->GetOutputPort()); writer->SetFileName("ext_C_Val.vtk"); writer->Write(); } @@ -628,7 +628,7 @@ int TestExtraction(int argc, char *argv[]) extGrid = vtkUnstructuredGrid::SafeDownCast(ext->GetOutput()); if (DoWrite) { - writer->SetInput(extGrid); + writer->SetInputConnection(ext->GetOutputPort()); writer->SetFileName("ext_C_Val_I.vtk"); writer->Write(); } @@ -640,7 +640,7 @@ int TestExtraction(int argc, char *argv[]) extIData = vtkImageData::SafeDownCast(ext->GetOutput()); if (DoWrite) { - xwriter->SetInput(extIData); + xwriter->SetInputConnection(ext->GetOutputPort()); xwriter->SetFileName("ext_C_Val_PT.vti"); xwriter->Write(); } @@ -671,7 +671,7 @@ int TestExtraction(int argc, char *argv[]) extGrid = vtkUnstructuredGrid::SafeDownCast(ext->GetOutput()); if (DoWrite) { - writer->SetInput(extGrid); + writer->SetInputConnection(ext->GetOutputPort()); writer->SetFileName("ext_P_Val.vtk"); writer->Write(); } @@ -682,7 +682,7 @@ int TestExtraction(int argc, char *argv[]) extGrid = vtkUnstructuredGrid::SafeDownCast(ext->GetOutput()); if (DoWrite) { - writer->SetInput(extGrid); + writer->SetInputConnection(ext->GetOutputPort()); writer->SetFileName("ext_P_Val_I.vtk"); writer->Write(); } @@ -694,7 +694,7 @@ int TestExtraction(int argc, char *argv[]) extGrid = vtkUnstructuredGrid::SafeDownCast(ext->GetOutput()); if (DoWrite) { - writer->SetInput(extGrid); + writer->SetInputConnection(ext->GetOutputPort()); writer->SetFileName("ext_P_Val_WC.vtk"); writer->Write(); } @@ -707,7 +707,7 @@ int TestExtraction(int argc, char *argv[]) extIData = vtkImageData::SafeDownCast(ext->GetOutput()); if (DoWrite) { - xwriter->SetInput(extIData); + xwriter->SetInputConnection(ext->GetOutputPort()); xwriter->SetFileName("ext_P_Val_PT.vtk"); xwriter->Write(); } @@ -724,7 +724,7 @@ int TestExtraction(int argc, char *argv[]) extIData = vtkImageData::SafeDownCast(ext->GetOutput()); if (DoWrite) { - xwriter->SetInput(extIData); + xwriter->SetInputConnection(ext->GetOutputPort()); xwriter->SetFileName("ext_P_Val_PT_WC.vtk"); xwriter->Write(); } @@ -749,7 +749,7 @@ int TestExtraction(int argc, char *argv[]) extGrid = vtkUnstructuredGrid::SafeDownCast(ext->GetOutput()); if (DoWrite) { - writer->SetInput(extGrid); + writer->SetInputConnection(ext->GetOutputPort()); writer->SetFileName("ext_C_Thr.vtk"); writer->Write(); } @@ -760,7 +760,7 @@ int TestExtraction(int argc, char *argv[]) extGrid = vtkUnstructuredGrid::SafeDownCast(ext->GetOutput()); if (DoWrite) { - writer->SetInput(extGrid); + writer->SetInputConnection(ext->GetOutputPort()); writer->SetFileName("ext_C_Thr_I.vtk"); writer->Write(); } @@ -772,7 +772,7 @@ int TestExtraction(int argc, char *argv[]) extIData = vtkImageData::SafeDownCast(ext->GetOutput()); if (DoWrite) { - xwriter->SetInput(extIData); + xwriter->SetInputConnection(ext->GetOutputPort()); xwriter->SetFileName("ext_C_Thr_PT.vtk"); xwriter->Write(); } @@ -798,7 +798,7 @@ int TestExtraction(int argc, char *argv[]) extGrid = vtkUnstructuredGrid::SafeDownCast(ext->GetOutput()); if (DoWrite) { - writer->SetInput(extGrid); + writer->SetInputConnection(ext->GetOutputPort()); writer->SetFileName("ext_P_Thr.vtk"); writer->Write(); } @@ -809,7 +809,7 @@ int TestExtraction(int argc, char *argv[]) extGrid = vtkUnstructuredGrid::SafeDownCast(ext->GetOutput()); if (DoWrite) { - writer->SetInput(extGrid); + writer->SetInputConnection(ext->GetOutputPort()); writer->SetFileName("ext_P_Thr_I.vtk"); writer->Write(); } @@ -821,7 +821,7 @@ int TestExtraction(int argc, char *argv[]) extGrid = vtkUnstructuredGrid::SafeDownCast(ext->GetOutput()); if (DoWrite) { - writer->SetInput(extGrid); + writer->SetInputConnection(ext->GetOutputPort()); writer->SetFileName("ext_P_Thr_WC.vtk"); writer->Write(); } @@ -833,7 +833,7 @@ int TestExtraction(int argc, char *argv[]) extIData = vtkImageData::SafeDownCast(ext->GetOutput()); if (DoWrite) { - xwriter->SetInput(extIData); + xwriter->SetInputConnection(ext->GetOutputPort()); xwriter->SetFileName("ext_P_Thr_PT.vtk"); xwriter->Write(); } @@ -850,7 +850,7 @@ int TestExtraction(int argc, char *argv[]) extIData = vtkImageData::SafeDownCast(ext->GetOutput()); if (DoWrite) { - xwriter->SetInput(extIData); + xwriter->SetInputConnection(ext->GetOutputPort()); xwriter->SetFileName("ext_P_Thr_PT_WC.vtk"); xwriter->Write(); } @@ -878,7 +878,7 @@ int TestExtraction(int argc, char *argv[]) extGrid = vtkUnstructuredGrid::SafeDownCast(ext->GetOutput()); if (DoWrite) { - writer->SetInput(extGrid); + writer->SetInputConnection(ext->GetOutputPort()); writer->SetFileName("ext_C_Loc.vtk"); writer->Write(); } @@ -889,7 +889,7 @@ int TestExtraction(int argc, char *argv[]) extGrid = vtkUnstructuredGrid::SafeDownCast(ext->GetOutput()); if (DoWrite) { - writer->SetInput(extGrid); + writer->SetInputConnection(ext->GetOutputPort()); writer->SetFileName("ext_C_Loc_I.vtk"); writer->Write(); } @@ -901,7 +901,7 @@ int TestExtraction(int argc, char *argv[]) extIData = vtkImageData::SafeDownCast(ext->GetOutput()); if (DoWrite) { - xwriter->SetInput(extIData); + xwriter->SetInputConnection(ext->GetOutputPort()); xwriter->SetFileName("ext_C_Loc_PT.vti"); xwriter->Write(); } @@ -930,7 +930,7 @@ int TestExtraction(int argc, char *argv[]) extGrid = vtkUnstructuredGrid::SafeDownCast(ext->GetOutput()); if (DoWrite) { - writer->SetInput(extGrid); + writer->SetInputConnection(ext->GetOutputPort()); writer->SetFileName("ext_P_Loc.vtk"); writer->Write(); } @@ -941,7 +941,7 @@ int TestExtraction(int argc, char *argv[]) extGrid = vtkUnstructuredGrid::SafeDownCast(ext->GetOutput()); if (DoWrite) { - writer->SetInput(extGrid); + writer->SetInputConnection(ext->GetOutputPort()); writer->SetFileName("ext_P_Loc_I.vtk"); writer->Write(); } @@ -953,7 +953,7 @@ int TestExtraction(int argc, char *argv[]) extGrid = vtkUnstructuredGrid::SafeDownCast(ext->GetOutput()); if (DoWrite) { - writer->SetInput(extGrid); + writer->SetInputConnection(ext->GetOutputPort()); writer->SetFileName("ext_P_Loc_WC.vtk"); writer->Write(); } @@ -966,7 +966,7 @@ int TestExtraction(int argc, char *argv[]) extIData = vtkImageData::SafeDownCast(ext->GetOutput()); if (DoWrite) { - xwriter->SetInput(extIData); + xwriter->SetInputConnection(ext->GetOutputPort()); xwriter->SetFileName("ext_P_Loc_PT.vti"); xwriter->Write(); } @@ -978,7 +978,7 @@ int TestExtraction(int argc, char *argv[]) extIData = vtkImageData::SafeDownCast(ext->GetOutput()); if (DoWrite) { - xwriter->SetInput(extIData); + xwriter->SetInputConnection(ext->GetOutputPort()); xwriter->SetFileName("ext_P_Loc_PT_WC.vti"); xwriter->Write(); } @@ -1010,7 +1010,7 @@ int TestExtraction(int argc, char *argv[]) extGrid = vtkUnstructuredGrid::SafeDownCast(ext->GetOutput()); if (DoWrite) { - writer->SetInput(extGrid); + writer->SetInputConnection(ext->GetOutputPort()); writer->SetFileName("ext_Fru.vtk"); writer->Write(); } @@ -1021,7 +1021,7 @@ int TestExtraction(int argc, char *argv[]) extGrid = vtkUnstructuredGrid::SafeDownCast(ext->GetOutput()); if (DoWrite) { - writer->SetInput(extGrid); + writer->SetInputConnection(ext->GetOutputPort()); writer->SetFileName("ext_Fru_I.vtk"); writer->Write(); } @@ -1033,7 +1033,7 @@ int TestExtraction(int argc, char *argv[]) extIData = vtkImageData::SafeDownCast(ext->GetOutput()); if (DoWrite) { - xwriter->SetInput(extIData); + xwriter->SetInputConnection(ext->GetOutputPort()); xwriter->SetFileName("ext_Fru_PT.vti"); xwriter->Write(); } @@ -1067,7 +1067,7 @@ int TestExtraction(int argc, char *argv[]) extGrid = vtkUnstructuredGrid::SafeDownCast(ext->GetOutput()); if (DoWrite) { - writer->SetInput(extGrid); + writer->SetInputConnection(ext->GetOutputPort()); writer->SetFileName("ext_P_Fru.vtk"); writer->Write(); } @@ -1078,7 +1078,7 @@ int TestExtraction(int argc, char *argv[]) extGrid = vtkUnstructuredGrid::SafeDownCast(ext->GetOutput()); if (DoWrite) { - writer->SetInput(extGrid); + writer->SetInputConnection(ext->GetOutputPort()); writer->SetFileName("ext_P_Fru_I.vtk"); writer->Write(); } @@ -1090,7 +1090,7 @@ int TestExtraction(int argc, char *argv[]) extIData = vtkImageData::SafeDownCast(ext->GetOutput()); if (DoWrite) { - xwriter->SetInput(extGrid); + xwriter->SetInputConnection(ext->GetOutputPort()); xwriter->SetFileName("ext_P_Fru_WC.vti"); xwriter->Write(); } @@ -1103,7 +1103,7 @@ int TestExtraction(int argc, char *argv[]) extIData = vtkImageData::SafeDownCast(ext->GetOutput()); if (DoWrite) { - xwriter->SetInput(extIData); + xwriter->SetInputConnection(ext->GetOutputPort()); xwriter->SetFileName("ext_P_Fru_PT.vti"); xwriter->Write(); } @@ -1115,7 +1115,7 @@ int TestExtraction(int argc, char *argv[]) extIData = vtkImageData::SafeDownCast(ext->GetOutput()); if (DoWrite) { - xwriter->SetInput(extIData); + xwriter->SetInputConnection(ext->GetOutputPort()); xwriter->SetFileName("ext_P_Fru_PT_WC.vti"); xwriter->Write(); } diff --git a/Graphics/Testing/Cxx/TestGradientAndVorticity.cxx b/Graphics/Testing/Cxx/TestGradientAndVorticity.cxx index 6e7a60b0fdd..f4ec1e035c2 100644 --- a/Graphics/Testing/Cxx/TestGradientAndVorticity.cxx +++ b/Graphics/Testing/Cxx/TestGradientAndVorticity.cxx @@ -196,14 +196,14 @@ namespace CreatePointData(Grid, NumberOfComponents, Offset, FieldName); VTK_CREATE(vtkGradientFilter, CellGradients); - CellGradients->SetInput(Grid); + CellGradients->SetInputData(Grid); CellGradients->SetInputScalars( vtkDataObject::FIELD_ASSOCIATION_CELLS, FieldName); const char ResultName[] = "Result"; CellGradients->SetResultArrayName(ResultName); VTK_CREATE(vtkGradientFilter, PointGradients); - PointGradients->SetInput(Grid); + PointGradients->SetInputData(Grid); PointGradients->SetInputScalars( vtkDataObject::FIELD_ASSOCIATION_POINTS, FieldName); PointGradients->SetResultArrayName(ResultName); @@ -238,7 +238,7 @@ namespace { // now check on the vorticity calculations VTK_CREATE(vtkGradientFilter, CellVorticity); - CellVorticity->SetInput(Grid); + CellVorticity->SetInputData(Grid); CellVorticity->SetInputScalars( vtkDataObject::FIELD_ASSOCIATION_CELLS, FieldName); CellVorticity->SetResultArrayName(ResultName); @@ -246,7 +246,7 @@ namespace CellVorticity->Update(); VTK_CREATE(vtkGradientFilter, PointVorticity); - PointVorticity->SetInput(Grid); + PointVorticity->SetInputData(Grid); PointVorticity->SetInputScalars( vtkDataObject::FIELD_ASSOCIATION_POINTS, FieldName); PointVorticity->SetResultArrayName(ResultName); diff --git a/Graphics/Testing/Cxx/TestHyperOctreeSurfaceFilter.cxx b/Graphics/Testing/Cxx/TestHyperOctreeSurfaceFilter.cxx index be101d18726..825fe572fe1 100644 --- a/Graphics/Testing/Cxx/TestHyperOctreeSurfaceFilter.cxx +++ b/Graphics/Testing/Cxx/TestHyperOctreeSurfaceFilter.cxx @@ -145,7 +145,7 @@ int TestHyperOctreeSurfaceFilter(int argc, char* argv[]) // Make sure we call SetExecutive right after the filter creation and // before the SetInput call. surface->SetExecutive(exec); - surface->SetInput(hds); + surface->SetInputData(hds); hds->Delete(); exec->Delete(); diff --git a/Graphics/Testing/Cxx/TestIconGlyphFilterGravity.cxx b/Graphics/Testing/Cxx/TestIconGlyphFilterGravity.cxx index 358e95fe3a0..293225a7b9d 100644 --- a/Graphics/Testing/Cxx/TestIconGlyphFilterGravity.cxx +++ b/Graphics/Testing/Cxx/TestIconGlyphFilterGravity.cxx @@ -71,7 +71,7 @@ int TestIconGlyphFilterGravity( int argc, char *argv[]) vtkIconGlyphFilter * iconFilter = vtkIconGlyphFilter::New(); - iconFilter->SetInput(pointSet); + iconFilter->SetInputData(pointSet); iconFilter->SetIconSize(size); iconFilter->SetUseIconSize(true); iconFilter->SetIconSheetSize(imageDims); @@ -101,7 +101,7 @@ int TestIconGlyphFilterGravity( int argc, char *argv[]) vtkIconGlyphFilter * iconFilter2 = vtkIconGlyphFilter::New(); - iconFilter2->SetInput(pointSet2); + iconFilter2->SetInputData(pointSet2); iconFilter2->SetIconSize(size); iconFilter2->SetUseIconSize(true); iconFilter2->SetIconSheetSize(imageDims); @@ -131,7 +131,7 @@ int TestIconGlyphFilterGravity( int argc, char *argv[]) vtkIconGlyphFilter * iconFilter3 = vtkIconGlyphFilter::New(); - iconFilter3->SetInput(pointSet3); + iconFilter3->SetInputData(pointSet3); iconFilter3->SetIconSize(size); iconFilter3->SetUseIconSize(true); iconFilter3->SetIconSheetSize(imageDims); @@ -161,7 +161,7 @@ int TestIconGlyphFilterGravity( int argc, char *argv[]) vtkIconGlyphFilter * iconFilter4 = vtkIconGlyphFilter::New(); - iconFilter4->SetInput(pointSet4); + iconFilter4->SetInputData(pointSet4); iconFilter4->SetIconSize(size); iconFilter4->SetUseIconSize(true); iconFilter4->SetIconSheetSize(imageDims); @@ -191,7 +191,7 @@ int TestIconGlyphFilterGravity( int argc, char *argv[]) vtkIconGlyphFilter * iconFilter5 = vtkIconGlyphFilter::New(); - iconFilter5->SetInput(pointSet5); + iconFilter5->SetInputData(pointSet5); iconFilter5->SetIconSize(size); iconFilter5->SetUseIconSize(true); iconFilter5->SetIconSheetSize(imageDims); @@ -221,7 +221,7 @@ int TestIconGlyphFilterGravity( int argc, char *argv[]) vtkIconGlyphFilter * iconFilter6 = vtkIconGlyphFilter::New(); - iconFilter6->SetInput(pointSet6); + iconFilter6->SetInputData(pointSet6); iconFilter6->SetIconSize(size); iconFilter6->SetUseIconSize(true); iconFilter6->SetIconSheetSize(imageDims); @@ -251,7 +251,7 @@ int TestIconGlyphFilterGravity( int argc, char *argv[]) vtkIconGlyphFilter * iconFilter7 = vtkIconGlyphFilter::New(); - iconFilter7->SetInput(pointSet7); + iconFilter7->SetInputData(pointSet7); iconFilter7->SetIconSize(size); iconFilter7->SetUseIconSize(true); iconFilter7->SetIconSheetSize(imageDims); @@ -281,7 +281,7 @@ int TestIconGlyphFilterGravity( int argc, char *argv[]) vtkIconGlyphFilter * iconFilter8 = vtkIconGlyphFilter::New(); - iconFilter8->SetInput(pointSet8); + iconFilter8->SetInputData(pointSet8); iconFilter8->SetIconSize(size); iconFilter8->SetUseIconSize(true); iconFilter8->SetIconSheetSize(imageDims); @@ -311,7 +311,7 @@ int TestIconGlyphFilterGravity( int argc, char *argv[]) vtkIconGlyphFilter * iconFilter9 = vtkIconGlyphFilter::New(); - iconFilter9->SetInput(pointSet9); + iconFilter9->SetInputData(pointSet9); iconFilter9->SetIconSize(size); iconFilter9->SetUseIconSize(true); iconFilter9->SetIconSheetSize(imageDims); diff --git a/Graphics/Testing/Cxx/TestMapVectorsAsRGBColors.cxx b/Graphics/Testing/Cxx/TestMapVectorsAsRGBColors.cxx index c5dbf5b7109..2dd30f1dbbc 100644 --- a/Graphics/Testing/Cxx/TestMapVectorsAsRGBColors.cxx +++ b/Graphics/Testing/Cxx/TestMapVectorsAsRGBColors.cxx @@ -148,7 +148,7 @@ int TestMapVectorsAsRGBColors(int argc, char *argv[]) vtkSmartPointer<vtkImageMapper>::New(); mapper->SetColorWindow(255.0); mapper->SetColorLevel(127.5); - mapper->SetInput(image); + mapper->SetInputData(image); vtkSmartPointer<vtkActor2D> actor = vtkSmartPointer<vtkActor2D>::New(); diff --git a/Graphics/Testing/Cxx/TestMeanValueCoordinatesInterpolation1.cxx b/Graphics/Testing/Cxx/TestMeanValueCoordinatesInterpolation1.cxx index f0ab5a36ee5..546331c96ff 100644 --- a/Graphics/Testing/Cxx/TestMeanValueCoordinatesInterpolation1.cxx +++ b/Graphics/Testing/Cxx/TestMeanValueCoordinatesInterpolation1.cxx @@ -154,7 +154,7 @@ int TestMeanValueCoordinatesInterpolation1( int argc, char *argv[] ) vtkSmartPointer<vtkClipPolyData> clip1 = vtkSmartPointer<vtkClipPolyData>::New(); - clip1->SetInput(spherePoly); + clip1->SetInputData(spherePoly); clip1->SetClipFunction(plane1); vtkSmartPointer<vtkPolyDataMapper> sphereMapper1 = diff --git a/Graphics/Testing/Cxx/TestMeanValueCoordinatesInterpolation2.cxx b/Graphics/Testing/Cxx/TestMeanValueCoordinatesInterpolation2.cxx index cbad14bf878..1ea753ff772 100644 --- a/Graphics/Testing/Cxx/TestMeanValueCoordinatesInterpolation2.cxx +++ b/Graphics/Testing/Cxx/TestMeanValueCoordinatesInterpolation2.cxx @@ -114,7 +114,7 @@ int TestMeanValueCoordinatesInterpolation2( int argc, char *argv[] ) vtkSmartPointer<vtkProbeFilter> interp = vtkSmartPointer<vtkProbeFilter>::New(); interp->SetInputConnection(pSource->GetOutputPort()); - interp->SetSource(polydata); + interp->SetSourceData(polydata); vtkSmartPointer<vtkPolyDataMapper> interpMapper = vtkSmartPointer<vtkPolyDataMapper>::New(); @@ -174,7 +174,7 @@ int TestMeanValueCoordinatesInterpolation2( int argc, char *argv[] ) vtkSmartPointer<vtkProbeFilter> interp1 = vtkSmartPointer<vtkProbeFilter>::New(); interp1->SetInputConnection(pSource1->GetOutputPort()); - interp1->SetSource(polydata1); + interp1->SetSourceData(polydata1); vtkSmartPointer<vtkPolyDataMapper> interpMapper1 = vtkSmartPointer<vtkPolyDataMapper>::New(); diff --git a/Graphics/Testing/Cxx/TestNamedComponents.cxx b/Graphics/Testing/Cxx/TestNamedComponents.cxx index e351b2af505..e06b2101ed0 100644 --- a/Graphics/Testing/Cxx/TestNamedComponents.cxx +++ b/Graphics/Testing/Cxx/TestNamedComponents.cxx @@ -125,7 +125,7 @@ int TestNamedComponents(int , char *[]) poly->BuildCells(); vtkSmartPointer<vtkThreshold> thresh = vtkSmartPointer<vtkThreshold>::New(); - thresh->SetInput(poly); + thresh->SetInputData(poly); thresh->SetInputArrayToProcess(0, 0, 0, vtkDataObject::FIELD_ASSOCIATION_CELLS, vtkDataSetAttributes::SCALARS); @@ -163,7 +163,7 @@ int TestNamedComponents(int , char *[]) //Test component names with the calculator vtkSmartPointer<vtkArrayCalculator> calc = vtkSmartPointer<vtkArrayCalculator>::New(); - calc->SetInput( poly ); + calc->SetInputData( poly ); calc->SetAttributeModeToUsePointData(); // Add coordinate scalar and vector variables calc->AddCoordinateScalarVariable( "coordsX", 0 ); diff --git a/Graphics/Testing/Cxx/TestPolyhedron0.cxx b/Graphics/Testing/Cxx/TestPolyhedron0.cxx index 2752e0c2f0f..43243c62591 100644 --- a/Graphics/Testing/Cxx/TestPolyhedron0.cxx +++ b/Graphics/Testing/Cxx/TestPolyhedron0.cxx @@ -64,7 +64,7 @@ int TestPolyhedron0( int argc, char* argv[] ) // add scaler vtkSmartPointer<vtkElevationFilter> ele = vtkSmartPointer<vtkElevationFilter>::New(); - ele->SetInput(cube->GetOutput()); + ele->SetInputConnection(cube->GetOutputPort()); ele->SetLowPoint(0,0,-10); ele->SetHighPoint(0,0,10); ele->Update(); @@ -125,7 +125,7 @@ int TestPolyhedron0( int argc, char* argv[] ) // test writer vtkSmartPointer<vtkXMLUnstructuredGridWriter> writer = vtkSmartPointer<vtkXMLUnstructuredGridWriter>::New(); - writer->SetInput(ugrid0); + writer->SetInputData(ugrid0); writer->SetFileName("test.vtu"); writer->SetDataModeToAscii(); writer->Update(); @@ -143,7 +143,7 @@ int TestPolyhedron0( int argc, char* argv[] ) polyhedron = vtkPolyhedron::SafeDownCast(ugrid->GetCell(0)); // write again to help compare - writer->SetInput(ugrid); + writer->SetInputData(ugrid); writer->SetFileName("test1.vtu"); writer->SetDataModeToAscii(); writer->Update(); @@ -429,13 +429,13 @@ int TestPolyhedron0( int argc, char* argv[] ) // shrink to show the gaps between tetrahedrons. vtkSmartPointer<vtkShrinkFilter> shrink = vtkSmartPointer<vtkShrinkFilter>::New(); - shrink->SetInput( tetraGrid ); + shrink->SetInputData( tetraGrid ); shrink->SetShrinkFactor( 0.7 ); // create actors vtkSmartPointer<vtkDataSetMapper> mapper = vtkSmartPointer<vtkDataSetMapper>::New(); - mapper->SetInput(poly); + mapper->SetInputData(poly); vtkSmartPointer<vtkActor> actor = vtkSmartPointer<vtkActor>::New(); @@ -443,7 +443,7 @@ int TestPolyhedron0( int argc, char* argv[] ) vtkSmartPointer<vtkDataSetMapper> contourMapper = vtkSmartPointer<vtkDataSetMapper>::New(); - contourMapper->SetInput(contourResult); + contourMapper->SetInputData(contourResult); vtkSmartPointer<vtkActor> contourActor = vtkSmartPointer<vtkActor>::New(); @@ -451,7 +451,7 @@ int TestPolyhedron0( int argc, char* argv[] ) vtkSmartPointer<vtkDataSetMapper> clipPolyhedronMapper = vtkSmartPointer<vtkDataSetMapper>::New(); - clipPolyhedronMapper->SetInput(clipResult); + clipPolyhedronMapper->SetInputData(clipResult); vtkSmartPointer<vtkActor> clipPolyhedronActor = vtkSmartPointer<vtkActor>::New(); diff --git a/Graphics/Testing/Cxx/TestPolyhedron1.cxx b/Graphics/Testing/Cxx/TestPolyhedron1.cxx index 08edb242e93..04f38e9382f 100644 --- a/Graphics/Testing/Cxx/TestPolyhedron1.cxx +++ b/Graphics/Testing/Cxx/TestPolyhedron1.cxx @@ -195,7 +195,7 @@ int TestPolyhedron1( int argc, char* argv[] ) // create actors vtkSmartPointer<vtkDataSetMapper> mapper = vtkSmartPointer<vtkDataSetMapper>::New(); - mapper->SetInput(polyhedron->GetPolyData()); + mapper->SetInputData(polyhedron->GetPolyData()); vtkSmartPointer<vtkActor> actor = vtkSmartPointer<vtkActor>::New(); @@ -203,7 +203,7 @@ int TestPolyhedron1( int argc, char* argv[] ) vtkSmartPointer<vtkDataSetMapper> planeMapper = vtkSmartPointer<vtkDataSetMapper>::New(); - planeMapper->SetInput(planePoly); + planeMapper->SetInputData(planePoly); vtkSmartPointer<vtkActor> planeActor = vtkSmartPointer<vtkActor>::New(); @@ -212,7 +212,7 @@ int TestPolyhedron1( int argc, char* argv[] ) vtkSmartPointer<vtkDataSetMapper> contourMapper = vtkSmartPointer<vtkDataSetMapper>::New(); - contourMapper->SetInput(contourResult); + contourMapper->SetInputData(contourResult); vtkSmartPointer<vtkActor> contourActor = vtkSmartPointer<vtkActor>::New(); @@ -220,7 +220,7 @@ int TestPolyhedron1( int argc, char* argv[] ) vtkSmartPointer<vtkDataSetMapper> clipPolyhedronMapper = vtkSmartPointer<vtkDataSetMapper>::New(); - clipPolyhedronMapper->SetInput(clipResult); + clipPolyhedronMapper->SetInputData(clipResult); vtkSmartPointer<vtkActor> clipPolyhedronActor = vtkSmartPointer<vtkActor>::New(); diff --git a/Graphics/Testing/Cxx/TestQuadraturePoints.cxx b/Graphics/Testing/Cxx/TestQuadraturePoints.cxx index a23f74cec6a..986ba5087b8 100644 --- a/Graphics/Testing/Cxx/TestQuadraturePoints.cxx +++ b/Graphics/Testing/Cxx/TestQuadraturePoints.cxx @@ -107,7 +107,7 @@ int TestQuadraturePoints(int argc,char *argv[]) // them on the fly. vtkSmartPointer<vtkQuadratureSchemeDictionaryGenerator> dictGen = vtkSmartPointer<vtkQuadratureSchemeDictionaryGenerator>::New(); - dictGen->SetInput(input); + dictGen->SetInputData(input); // Interpolate fields to the quadrature points. This generates new field data // arrays, but not a set of points. @@ -134,7 +134,7 @@ int TestQuadraturePoints(int argc,char *argv[]) input->GetPointData()->SetActiveScalars(threshName.c_str()); // Demonstrate warp by vector. vtkSmartPointer<vtkWarpVector> warper = vtkSmartPointer<vtkWarpVector>::New(); - warper->SetInput(input); + warper->SetInputData(input); warper->SetScaleFactor(0.02); // Demonstrate clip functionality. @@ -163,8 +163,8 @@ int TestQuadraturePoints(int argc,char *argv[]) vtkSmartPointer<vtkSphereSource> ss = vtkSmartPointer<vtkSphereSource>::New(); ss->SetRadius(0.0008); vtkSmartPointer<vtkGlyph3D> glyphs = vtkSmartPointer<vtkGlyph3D>::New(); - glyphs->SetInput(output); - glyphs->SetSource(ss->GetOutput()); + glyphs->SetInputConnection(pointGen->GetOutputPort()); + glyphs->SetSourceConnection(ss->GetOutputPort()); glyphs->ScalingOff(); glyphs->SetColorModeToColorByScalar(); // Map the glyphs. diff --git a/Graphics/Testing/Cxx/TestSelectEnclosedPoints.cxx b/Graphics/Testing/Cxx/TestSelectEnclosedPoints.cxx index 905100c434b..0b394cc28e9 100644 --- a/Graphics/Testing/Cxx/TestSelectEnclosedPoints.cxx +++ b/Graphics/Testing/Cxx/TestSelectEnclosedPoints.cxx @@ -73,7 +73,7 @@ int TestSelectEnclosedPoints(int argc, char* argv[]) profile->SetPoints(points); vtkSelectEnclosedPoints *select = vtkSelectEnclosedPoints::New(); - select->SetInput(profile); + select->SetInputData(profile); select->SetSurfaceConnection(ss->GetOutputPort()); // select->InsideOutOn(); diff --git a/Graphics/Testing/Cxx/TestTessellator.cxx b/Graphics/Testing/Cxx/TestTessellator.cxx index 44508f55a8e..3b0a984ff48 100644 --- a/Graphics/Testing/Cxx/TestTessellator.cxx +++ b/Graphics/Testing/Cxx/TestTessellator.cxx @@ -3136,7 +3136,7 @@ public: this->RenderWindow->Render(); pw->SetFileName( this->FileName ); - pw->SetInput( wif->GetOutput() ); + pw->SetInputConnection( wif->GetOutputPort() ); pw->Write(); pw->Delete(); @@ -3239,16 +3239,16 @@ int TestTessellator( int argc, char* argv[] ) #endif // FOR_PAPER r->AddActor( a ); a->SetMapper( m ); - sf->SetInput( ug ); + sf->SetInputData( ug ); #ifdef ONLY_WIRE sf->SetShrinkFactor( 1. ); #endif // ONLY_WIRE - m->SetInput( sf->GetOutput() ); + m->SetInputConnection( sf->GetOutputPort() ); // Add some visual pizazz startTet = vtkUnstructuredGrid::New(); startTetWireMapper = vtkDataSetMapper::New(); startTetWireActor = vtkActor::New(); - startTetWireMapper->SetInput( startTet ); + startTetWireMapper->SetInputData( startTet ); startTetWireMapper->ScalarVisibilityOff(); startTetWireActor->SetMapper( startTetWireMapper ); startTetWireActor->GetProperty()->SetRepresentationToWireframe(); @@ -3268,7 +3268,7 @@ int TestTessellator( int argc, char* argv[] ) startTetLabelMapper = vtkLabeledDataMapper::New(); startTetLabelActor = vtkActor2D::New(); - startTetLabelMapper->SetInput( startTet ); + startTetLabelMapper->SetInputData( startTet ); startTetLabelMapper->SetLabelModeToLabelScalars(); startTetLabelMapper->SetLabelFormat( " %2d" ); //startTetLabelMapper->SetLabelModeToLabelIds(); @@ -3291,12 +3291,12 @@ int TestTessellator( int argc, char* argv[] ) vertMarkers = vtkGlyph3D::New(); vertMarkerMapper = vtkPolyDataMapper::New(); vertMarkerActor = vtkActor::New(); - vertMarkerMapper->SetInput( vertMarkers->GetOutput() ); + vertMarkerMapper->SetInputConnection( vertMarkers->GetOutputPort() ); vertMarkerMapper->ScalarVisibilityOff(); vertMarkerActor->SetMapper( vertMarkerMapper ); vertMarkerActor->GetProperty()->SetColor( 0.6, 0.2, 0.2 ); - vertMarkers->SetInput( startTet ); - vertMarkers->SetSource( sphere->GetOutput() ); + vertMarkers->SetInputData( startTet ); + vertMarkers->SetSourceConnection( sphere->GetOutputPort() ); vertMarkers->SetScaleModeToDataScalingOff(); vertMarkers->SetScaleFactor(0.125); r->AddActor( vertMarkerActor ); @@ -3649,7 +3649,7 @@ int TestTessellator( int argc, char* argv[] ) rdr->Update(); vtkTessellatorFilter* tf = vtkTessellatorFilter::New(); - tf->SetInput( rdr->GetOutput() ); + tf->SetInputConnection( rdr->GetOutputPort() ); tf->MergePointsOn(); tf->Update(); diff --git a/Graphics/Testing/Cxx/TestUncertaintyTubeFilter.cxx b/Graphics/Testing/Cxx/TestUncertaintyTubeFilter.cxx index e47441ff931..a4d294f4616 100644 --- a/Graphics/Testing/Cxx/TestUncertaintyTubeFilter.cxx +++ b/Graphics/Testing/Cxx/TestUncertaintyTubeFilter.cxx @@ -87,7 +87,7 @@ int TestUncertaintyTubeFilter( int argc, char* argv[] ) v->Delete(); vtkUncertaintyTubeFilter *utf = vtkUncertaintyTubeFilter::New(); - utf->SetInput(pd); + utf->SetInputData(pd); utf->SetNumberOfSides(8); vtkPolyDataMapper *mapper = vtkPolyDataMapper::New(); diff --git a/Graphics/Testing/Cxx/TestUnstructuredGridGeometryFilter.cxx b/Graphics/Testing/Cxx/TestUnstructuredGridGeometryFilter.cxx index b19bf018dac..1ff481aa283 100644 --- a/Graphics/Testing/Cxx/TestUnstructuredGridGeometryFilter.cxx +++ b/Graphics/Testing/Cxx/TestUnstructuredGridGeometryFilter.cxx @@ -3536,7 +3536,7 @@ int TestUnstructuredGridGeometryFilter(int argc, char* argv[]) #ifdef READ_FILE geom->SetInputConnection(0,reader->GetOutputPort(0)); #else - geom->SetInput(grid); + geom->SetInputData(grid); #endif geom->Update(); //So that we can call GetRange() on the scalars diff --git a/Graphics/Testing/Cxx/expCos.cxx b/Graphics/Testing/Cxx/expCos.cxx index b4f20b9620f..30569d125b4 100644 --- a/Graphics/Testing/Cxx/expCos.cxx +++ b/Graphics/Testing/Cxx/expCos.cxx @@ -89,7 +89,7 @@ int expCos( int argc, char *argv[] ) // warp plane vtkWarpScalar *warp = vtkWarpScalar::New(); - warp->SetInput(bessel); + warp->SetInputData(bessel); warp->XYPlaneOn(); warp->SetScaleFactor(0.5); diff --git a/Graphics/vtkAppendCompositeDataLeaves.cxx b/Graphics/vtkAppendCompositeDataLeaves.cxx index d13b093225c..b3e77946b9c 100644 --- a/Graphics/vtkAppendCompositeDataLeaves.cxx +++ b/Graphics/vtkAppendCompositeDataLeaves.cxx @@ -61,19 +61,6 @@ vtkCompositeDataSet* vtkAppendCompositeDataLeaves::GetInput( int idx ) this->GetExecutive()->GetInputData( 0, idx ) ); } -//---------------------------------------------------------------------------- -// Remove a dataset from the list of data to append. -void vtkAppendCompositeDataLeaves::RemoveInput( vtkDataSet* ds ) -{ - vtkAlgorithmOutput* algOutput = 0; - if ( ds ) - { - algOutput = ds->GetProducerPort(); - } - - this->RemoveInputConnection( 0, algOutput ); -} - //---------------------------------------------------------------------------- int vtkAppendCompositeDataLeaves::RequestDataObject( vtkInformation*, @@ -100,7 +87,7 @@ int vtkAppendCompositeDataLeaves::RequestDataObject( if ( ! output || ! output->IsA( input->GetClassName() ) ) { vtkCompositeDataSet* newOutput = input->NewInstance(); - newOutput->SetPipelineInformation( info ); + info->Set(vtkDataObject::DATA_OBJECT(), newOutput); newOutput->Delete(); } } @@ -227,7 +214,7 @@ void vtkAppendCompositeDataLeaves::AppendUnstructuredGrids( vtkUnstructuredGrid* iudset = vtkUnstructuredGrid::SafeDownCast( icdset->GetDataSet( iter ) ); if ( iudset ) { - this->AppendUG->AddInput( iudset ); + this->AppendUG->AddInputData( iudset ); } } } @@ -259,7 +246,7 @@ void vtkAppendCompositeDataLeaves::AppendPolyData( vtkPolyData* ipdset = vtkPolyData::SafeDownCast( icdset->GetDataSet( iter ) ); if ( ipdset ) { - this->AppendPD->AddInput( ipdset ); + this->AppendPD->AddInputData( ipdset ); } } } diff --git a/Graphics/vtkAppendCompositeDataLeaves.h b/Graphics/vtkAppendCompositeDataLeaves.h index 5d5c422e2e8..e58d8289d15 100644 --- a/Graphics/vtkAppendCompositeDataLeaves.h +++ b/Graphics/vtkAppendCompositeDataLeaves.h @@ -58,10 +58,6 @@ public: { return this->GetInput( 0 ); } //ETX - // Description: - // Remove a dataset from the list of data to append. - void RemoveInput( vtkDataSet* in ); - // Description: // Set/get whether the field data of each dataset in the composite dataset is copied to the output. // If AppendFieldData is non-zero, then field data arrays from all the inputs are added diff --git a/Graphics/vtkAppendFilter.cxx b/Graphics/vtkAppendFilter.cxx index 7dd20a7b155..cf2780bc77a 100644 --- a/Graphics/vtkAppendFilter.cxx +++ b/Graphics/vtkAppendFilter.cxx @@ -59,15 +59,21 @@ vtkDataSet *vtkAppendFilter::GetInput(int idx) //---------------------------------------------------------------------------- // Remove a dataset from the list of data to append. -void vtkAppendFilter::RemoveInput(vtkDataSet *ds) +void vtkAppendFilter::RemoveInputData(vtkDataSet *ds) { - vtkAlgorithmOutput *algOutput = 0; - if (ds) + if (!ds) { - algOutput = ds->GetProducerPort(); + return; + } + int numCons = this->GetNumberOfInputConnections(0); + for(int i=0; i<numCons; i++) + { + if (this->GetInput(i) == ds) + { + this->RemoveInputConnection(0, + this->GetInputConnection(0, i)); + } } - - this->RemoveInputConnection(0, algOutput); } //---------------------------------------------------------------------------- diff --git a/Graphics/vtkAppendFilter.h b/Graphics/vtkAppendFilter.h index ce0aa722e88..f3b51fc2c23 100644 --- a/Graphics/vtkAppendFilter.h +++ b/Graphics/vtkAppendFilter.h @@ -63,7 +63,7 @@ public: // Description: // Remove a dataset from the list of data to append. - void RemoveInput(vtkDataSet *in); + void RemoveInputData(vtkDataSet *in); // Description: // Returns a copy of the input array. Modifications to this list diff --git a/Graphics/vtkAppendPolyData.cxx b/Graphics/vtkAppendPolyData.cxx index d81383f9176..90ecc18a5b5 100644 --- a/Graphics/vtkAppendPolyData.cxx +++ b/Graphics/vtkAppendPolyData.cxx @@ -24,6 +24,7 @@ #include "vtkPointData.h" #include "vtkPolyData.h" #include "vtkStreamingDemandDrivenPipeline.h" +#include "vtkTrivialProducer.h" vtkStandardNewMacro(vtkAppendPolyData); @@ -41,7 +42,7 @@ vtkAppendPolyData::~vtkAppendPolyData() //---------------------------------------------------------------------------- // Add a dataset to the list of data to append. -void vtkAppendPolyData::AddInput(vtkPolyData *ds) +void vtkAppendPolyData::AddInputData(vtkPolyData *ds) { if (this->UserManagedInputs) { @@ -49,12 +50,12 @@ void vtkAppendPolyData::AddInput(vtkPolyData *ds) "AddInput is not supported if UserManagedInputs is true"); return; } - this->Superclass::AddInput(ds); + this->Superclass::AddInputData(ds); } //---------------------------------------------------------------------------- // Remove a dataset from the list of data to append. -void vtkAppendPolyData::RemoveInput(vtkPolyData *ds) +void vtkAppendPolyData::RemoveInputData(vtkPolyData *ds) { if (this->UserManagedInputs) { @@ -63,13 +64,19 @@ void vtkAppendPolyData::RemoveInput(vtkPolyData *ds) return; } - vtkAlgorithmOutput *algOutput = 0; - if (ds) + if (!ds) { - algOutput = ds->GetProducerPort(); + return; + } + int numCons = this->GetNumberOfInputConnections(0); + for(int i=0; i<numCons; i++) + { + if (this->GetInput(i) == ds) + { + this->RemoveInputConnection(0, + this->GetInputConnection(0, i)); + } } - - this->RemoveInputConnection(0, algOutput); } //---------------------------------------------------------------------------- @@ -88,19 +95,29 @@ void vtkAppendPolyData::SetNumberOfInputs(int num) this->SetNumberOfInputConnections(0, num); } +//---------------------------------------------------------------------------- +void vtkAppendPolyData::SetInputDataByNumber(int num, vtkPolyData* input) +{ + vtkTrivialProducer* tp = vtkTrivialProducer::New(); + tp->SetOutput(input); + this->SetInputConnectionByNumber(num, tp->GetOutputPort()); + tp->Delete(); +} + //---------------------------------------------------------------------------- // Set Nth input, should only be used when UserManagedInputs is true. -void vtkAppendPolyData::SetInputByNumber(int num, vtkPolyData *input) +void vtkAppendPolyData::SetInputConnectionByNumber(int num, + vtkAlgorithmOutput *input) { if (!this->UserManagedInputs) { vtkErrorMacro(<< - "SetInputByNumber is not supported if UserManagedInputs is false"); + "SetInputConnectionByNumber is not supported if UserManagedInputs is false"); return; } // Ask the superclass to connect the input. - this->SetNthInputConnection(0, num, input? input->GetProducerPort() : 0); + this->SetNthInputConnection(0, num, input); } //---------------------------------------------------------------------------- diff --git a/Graphics/vtkAppendPolyData.h b/Graphics/vtkAppendPolyData.h index fd800789a29..f9cd4a8ea42 100644 --- a/Graphics/vtkAppendPolyData.h +++ b/Graphics/vtkAppendPolyData.h @@ -46,7 +46,7 @@ public: // Description: // UserManagedInputs allows the user to set inputs by number instead of // using the AddInput/RemoveInput functions. Calls to - // SetNumberOfInputs/SetInputByNumber should not be mixed with calls + // SetNumberOfInputs/SetInputConnectionByNumber should not be mixed with calls // to AddInput/RemoveInput. By default, UserManagedInputs is false. vtkSetMacro(UserManagedInputs,int); vtkGetMacro(UserManagedInputs,int); @@ -55,12 +55,12 @@ public: // Description: // Add a dataset to the list of data to append. Should not be // used when UserManagedInputs is true, use SetInputByNumber instead. - void AddInput(vtkPolyData *); + void AddInputData(vtkPolyData *); // Description: // Remove a dataset from the list of data to append. Should not be // used when UserManagedInputs is true, use SetInputByNumber (NULL) instead. - void RemoveInput(vtkPolyData *); + void RemoveInputData(vtkPolyData *); //BTX // Description: @@ -75,7 +75,8 @@ public: void SetNumberOfInputs(int num); // Set Nth input, should only be used when UserManagedInputs is true. - void SetInputByNumber(int num, vtkPolyData *input); + void SetInputConnectionByNumber(int num, vtkAlgorithmOutput *input); + void SetInputDataByNumber(int num, vtkPolyData *ds); // Description: // ParallelStreaming is for a particular application. @@ -117,7 +118,7 @@ protected: private: // hide the superclass' AddInput() from the user and the compiler - void AddInput(vtkDataObject *) + void AddInputData(vtkDataObject *) { vtkErrorMacro( << "AddInput() must be called with a vtkPolyData not a vtkDataObject."); }; int UserManagedInputs; diff --git a/Graphics/vtkAppendSelection.cxx b/Graphics/vtkAppendSelection.cxx index a8a5757d2d5..4e6ae796d07 100644 --- a/Graphics/vtkAppendSelection.cxx +++ b/Graphics/vtkAppendSelection.cxx @@ -43,7 +43,7 @@ vtkAppendSelection::~vtkAppendSelection() //---------------------------------------------------------------------------- // Add a dataset to the list of data to append. -void vtkAppendSelection::AddInput(vtkSelection *ds) +void vtkAppendSelection::AddInputData(vtkSelection *ds) { if (this->UserManagedInputs) { @@ -51,12 +51,12 @@ void vtkAppendSelection::AddInput(vtkSelection *ds) "AddInput is not supported if UserManagedInputs is true"); return; } - this->Superclass::AddInputConnection(ds->GetProducerPort()); + this->AddInputDataInternal(0, ds); } //---------------------------------------------------------------------------- // Remove a dataset from the list of data to append. -void vtkAppendSelection::RemoveInput(vtkSelection *ds) +void vtkAppendSelection::RemoveInputData(vtkSelection *ds) { if (this->UserManagedInputs) { @@ -65,13 +65,19 @@ void vtkAppendSelection::RemoveInput(vtkSelection *ds) return; } - vtkAlgorithmOutput *algOutput = 0; - if (ds) + if (!ds) { - algOutput = ds->GetProducerPort(); + return; + } + int numCons = this->GetNumberOfInputConnections(0); + for(int i=0; i<numCons; i++) + { + if (this->GetInput(i) == ds) + { + this->RemoveInputConnection(0, + this->GetInputConnection(0, i)); + } } - - this->RemoveInputConnection(0, algOutput); } //---------------------------------------------------------------------------- @@ -92,7 +98,8 @@ void vtkAppendSelection::SetNumberOfInputs(int num) //---------------------------------------------------------------------------- // Set Nth input, should only be used when UserManagedInputs is true. -void vtkAppendSelection::SetInputByNumber(int num, vtkSelection *input) +void vtkAppendSelection::SetInputConnectionByNumber(int num, + vtkAlgorithmOutput *input) { if (!this->UserManagedInputs) { @@ -102,7 +109,7 @@ void vtkAppendSelection::SetInputByNumber(int num, vtkSelection *input) } // Ask the superclass to connect the input. - this->SetNthInputConnection(0, num, input? input->GetProducerPort() : 0); + this->SetNthInputConnection(0, num, input); } //---------------------------------------------------------------------------- diff --git a/Graphics/vtkAppendSelection.h b/Graphics/vtkAppendSelection.h index 5b1b6f8cb56..74d5e45966a 100644 --- a/Graphics/vtkAppendSelection.h +++ b/Graphics/vtkAppendSelection.h @@ -50,12 +50,12 @@ public: // Description: // Add a dataset to the list of data to append. Should not be // used when UserManagedInputs is true, use SetInputByNumber instead. - void AddInput(vtkSelection *); + void AddInputData(vtkSelection *); // Description: // Remove a dataset from the list of data to append. Should not be // used when UserManagedInputs is true, use SetInputByNumber (NULL) instead. - void RemoveInput(vtkSelection *); + void RemoveInputData(vtkSelection *); //BTX // Description: @@ -70,7 +70,7 @@ public: void SetNumberOfInputs(int num); // Set Nth input, should only be used when UserManagedInputs is true. - void SetInputByNumber(int num, vtkSelection *input); + void SetInputConnectionByNumber(int num, vtkAlgorithmOutput *input); // Description: // When set to true, all the selections are combined together to form a single @@ -94,7 +94,7 @@ protected: private: // hide the superclass' AddInput() from the user and the compiler - void AddInput(vtkDataObject *) + void AddInputData(vtkDataObject *) { vtkErrorMacro( << "AddInput() must be called with a vtkSelection not a vtkDataObject."); }; int UserManagedInputs; diff --git a/Graphics/vtkArrowSource.cxx b/Graphics/vtkArrowSource.cxx index 62538aee495..c31db32494b 100644 --- a/Graphics/vtkArrowSource.cxx +++ b/Graphics/vtkArrowSource.cxx @@ -74,7 +74,7 @@ int vtkArrowSource::RequestData( trans0->RotateZ(-90.0); tf0->SetTransform(trans0); - tf0->SetInput(cyl->GetOutput()); + tf0->SetInputConnection(cyl->GetOutputPort()); cone->SetResolution(this->TipResolution); cone->SetHeight(this->TipLength); @@ -82,10 +82,10 @@ int vtkArrowSource::RequestData( trans1->Translate(1.0-this->TipLength*0.5, 0.0, 0.0); tf1->SetTransform(trans1); - tf1->SetInput(cone->GetOutput()); + tf1->SetInputConnection(cone->GetOutputPort()); - append->AddInput(tf0->GetPolyDataOutput()); - append->AddInput(tf1->GetPolyDataOutput()); + append->AddInputConnection(tf0->GetOutputPort()); + append->AddInputConnection(tf1->GetOutputPort()); // used only when this->Invert is true. trans2->Translate(1, 0, 0); diff --git a/Graphics/vtkBlankStructuredGridWithImage.cxx b/Graphics/vtkBlankStructuredGridWithImage.cxx index 96664d241c6..370c94a7bcf 100644 --- a/Graphics/vtkBlankStructuredGridWithImage.cxx +++ b/Graphics/vtkBlankStructuredGridWithImage.cxx @@ -40,9 +40,9 @@ vtkBlankStructuredGridWithImage::~vtkBlankStructuredGridWithImage() //---------------------------------------------------------------------------- // Specify the input data or filter. -void vtkBlankStructuredGridWithImage::SetBlankingInput(vtkImageData *input) +void vtkBlankStructuredGridWithImage::SetBlankingInputData(vtkImageData *input) { - this->SetInput(1, input); + this->SetInputData(1, input); } //---------------------------------------------------------------------------- diff --git a/Graphics/vtkBlankStructuredGridWithImage.h b/Graphics/vtkBlankStructuredGridWithImage.h index 0ac4d7025c8..097f0ba3bdb 100644 --- a/Graphics/vtkBlankStructuredGridWithImage.h +++ b/Graphics/vtkBlankStructuredGridWithImage.h @@ -42,7 +42,7 @@ public: // Description: // Set / get the input image used to perform the blanking. - void SetBlankingInput(vtkImageData *input); + void SetBlankingInputData(vtkImageData *input); vtkImageData *GetBlankingInput(); protected: diff --git a/Graphics/vtkBoxClipDataSet.cxx b/Graphics/vtkBoxClipDataSet.cxx index cad28914e79..56341371bd9 100644 --- a/Graphics/vtkBoxClipDataSet.cxx +++ b/Graphics/vtkBoxClipDataSet.cxx @@ -51,9 +51,6 @@ vtkBoxClipDataSet::vtkBoxClipDataSet() //this->MergeTolerance = 0.01; this->SetNumberOfOutputPorts(2); - vtkUnstructuredGrid *output2 = vtkUnstructuredGrid::New(); - this->GetExecutive()->SetOutputData(1, output2); - output2->Delete(); this->Orientation = 1; diff --git a/Graphics/vtkClipDataSet.cxx b/Graphics/vtkClipDataSet.cxx index b20cc5ea939..fc8f9b1c69b 100644 --- a/Graphics/vtkClipDataSet.cxx +++ b/Graphics/vtkClipDataSet.cxx @@ -620,7 +620,7 @@ void vtkClipDataSet::ClipVolume(vtkDataSet *input, vtkUnstructuredGrid *output) vtkImageData* tmp = vtkImageData::New(); tmp->ShallowCopy(vtkImageData::SafeDownCast(input)); - clipVolume->SetInput(tmp); + clipVolume->SetInputData(tmp); double value = 0.0; if (this->UseValueAsOffset || !this->ClipFunction) { diff --git a/Graphics/vtkCompositeDataGeometryFilter.cxx b/Graphics/vtkCompositeDataGeometryFilter.cxx index 93499112c6d..2dae4d801f5 100644 --- a/Graphics/vtkCompositeDataGeometryFilter.cxx +++ b/Graphics/vtkCompositeDataGeometryFilter.cxx @@ -95,9 +95,9 @@ int vtkCompositeDataGeometryFilter::RequestCompositeData( if (ds) { vtkGeometryFilter* geom = vtkGeometryFilter::New(); - geom->SetInput(ds); + geom->SetInputData(ds); geom->Update(); - append->AddInput(geom->GetOutput()); + append->AddInputConnection(geom->GetOutputPort()); geom->Delete(); added = true; } diff --git a/Graphics/vtkContourFilter.cxx b/Graphics/vtkContourFilter.cxx index cc7b337750d..0cea0bae785 100644 --- a/Graphics/vtkContourFilter.cxx +++ b/Graphics/vtkContourFilter.cxx @@ -372,7 +372,7 @@ int vtkContourFilter::RequestData( vtkContourGrid *cgrid; cgrid = vtkContourGrid::New(); - cgrid->SetInput(input); + cgrid->SetInputData(input); if ( this->Locator ) { cgrid->SetLocator( this->Locator ); @@ -391,7 +391,6 @@ int vtkContourFilter::RequestData( cgrid->SetInputArrayToProcess(0,this->GetInputArrayInformation(0)); cgrid->Update(); output->ShallowCopy(cgrid->GetOutput()); - cgrid->SetInput(0); cgrid->Delete(); } //if type VTK_UNSTRUCTURED_GRID else diff --git a/Graphics/vtkConvertSelection.cxx b/Graphics/vtkConvertSelection.cxx index 63cdedca460..11a7d03bfae 100644 --- a/Graphics/vtkConvertSelection.cxx +++ b/Graphics/vtkConvertSelection.cxx @@ -178,8 +178,8 @@ int vtkConvertSelection::ConvertToIndexSelection( vtkSmartPointer<vtkExtractSelection> extract = vtkSmartPointer<vtkExtractSelection>::New(); extract->PreserveTopologyOn(); - extract->SetInput(0, data); - extract->SetInput(1, tempInput); + extract->SetInputData(0, data); + extract->SetInputData(1, tempInput); extract->Update(); vtkDataSet* const extracted = vtkDataSet::SafeDownCast(extract->GetOutput()); @@ -1059,8 +1059,8 @@ vtkSelection* vtkConvertSelection::ToSelectionType( dataCopy->ShallowCopy(data); VTK_CREATE(vtkSelection, inputCopy); inputCopy->ShallowCopy(input); - convert->SetInput(0, inputCopy); - convert->SetInput(1, dataCopy); + convert->SetInputData(0, inputCopy); + convert->SetInputData(1, dataCopy); convert->SetOutputType(type); convert->SetArrayNames(arrayNames); convert->SetInputFieldType(inputFieldType); diff --git a/Graphics/vtkCutter.cxx b/Graphics/vtkCutter.cxx index 9f06de451fa..ef4f83ec25a 100644 --- a/Graphics/vtkCutter.cxx +++ b/Graphics/vtkCutter.cxx @@ -167,7 +167,7 @@ void vtkCutter::StructuredPointsCutter(vtkDataSet *dataSetInput, } } - this->SynchronizedTemplates3D->SetInput(contourData); + this->SynchronizedTemplates3D->SetInputData(contourData); this->SynchronizedTemplates3D-> SetInputArrayToProcess(0,0,0,vtkDataObject::FIELD_ASSOCIATION_POINTS,"cutScalars"); for (i = 0; i < numContours; i++) @@ -227,7 +227,7 @@ void vtkCutter::StructuredGridCutter(vtkDataSet *dataSetInput, int numContours = this->GetNumberOfContours(); this->GridSynchronizedTemplates->SetDebug(this->GetDebug()); - this->GridSynchronizedTemplates->SetInput(contourData); + this->GridSynchronizedTemplates->SetInputData(contourData); this->GridSynchronizedTemplates-> SetInputArrayToProcess(0,0,0,vtkDataObject::FIELD_ASSOCIATION_POINTS,"cutScalars"); for (i = 0; i < numContours; i++) @@ -284,7 +284,7 @@ void vtkCutter::RectilinearGridCutter(vtkDataSet *dataSetInput, } int numContours = this->GetNumberOfContours(); - this->RectilinearSynchronizedTemplates->SetInput(contourData); + this->RectilinearSynchronizedTemplates->SetInputData(contourData); this->RectilinearSynchronizedTemplates-> SetInputArrayToProcess(0,0,0,vtkDataObject::FIELD_ASSOCIATION_POINTS,"cutScalars"); for (i = 0; i < numContours; i++) diff --git a/Graphics/vtkDataObjectGenerator.cxx b/Graphics/vtkDataObjectGenerator.cxx index 1be02a03632..c5c64d7c36e 100644 --- a/Graphics/vtkDataObjectGenerator.cxx +++ b/Graphics/vtkDataObjectGenerator.cxx @@ -339,7 +339,6 @@ int vtkDataObjectGenerator::RequestDataObject(vtkInformation *, outData = this->CreateOutputDataObjects(this->Structure); if (outData) { - outData->SetPipelineInformation(outInfo); outInfo->Set(vtkDataObject::DATA_OBJECT(), outData); outData->Delete(); } diff --git a/Graphics/vtkDataObjectToDataSetFilter.cxx b/Graphics/vtkDataObjectToDataSetFilter.cxx index d98c2958491..871970ee6dc 100644 --- a/Graphics/vtkDataObjectToDataSetFilter.cxx +++ b/Graphics/vtkDataObjectToDataSetFilter.cxx @@ -1518,7 +1518,7 @@ int vtkDataObjectToDataSetFilter::RequestDataObject( } if (output) { - output->SetPipelineInformation(outInfo); + outInfo->Set(vtkDataObject::DATA_OBJECT(), output); output->Delete(); } } diff --git a/Graphics/vtkDelaunay2D.cxx b/Graphics/vtkDelaunay2D.cxx index 81d90940027..8972475c8e6 100644 --- a/Graphics/vtkDelaunay2D.cxx +++ b/Graphics/vtkDelaunay2D.cxx @@ -57,9 +57,9 @@ vtkDelaunay2D::~vtkDelaunay2D() //---------------------------------------------------------------------------- // Specify the input data or filter. Old style. -void vtkDelaunay2D::SetSource(vtkPolyData *input) +void vtkDelaunay2D::SetSourceData(vtkPolyData *input) { - this->Superclass::SetInput(1, input); + this->Superclass::SetInputData(1, input); } //---------------------------------------------------------------------------- diff --git a/Graphics/vtkDelaunay2D.h b/Graphics/vtkDelaunay2D.h index fe42c94f38f..0366c1a96e4 100644 --- a/Graphics/vtkDelaunay2D.h +++ b/Graphics/vtkDelaunay2D.h @@ -149,7 +149,7 @@ public: // points in the input point set (i.e. point ids are identical in the // input and source). // Old style. See SetSourceConnection. - void SetSource(vtkPolyData *); + void SetSourceData(vtkPolyData *); // Description: // Specify the source object used to specify constrained edges and loops. diff --git a/Graphics/vtkDijkstraImageGeodesicPath.cxx b/Graphics/vtkDijkstraImageGeodesicPath.cxx index 6730b66f503..d3261338af5 100644 --- a/Graphics/vtkDijkstraImageGeodesicPath.cxx +++ b/Graphics/vtkDijkstraImageGeodesicPath.cxx @@ -70,7 +70,7 @@ void vtkDijkstraImageGeodesicPath::SetEdgeLengthWeight( double w) } //---------------------------------------------------------------------------- -void vtkDijkstraImageGeodesicPath::SetInput( vtkDataObject *input ) +void vtkDijkstraImageGeodesicPath::SetInputData( vtkDataObject *input ) { vtkImageData* image = vtkImageData::SafeDownCast( input ); if ( !image ) @@ -97,7 +97,7 @@ void vtkDijkstraImageGeodesicPath::SetInput( vtkDataObject *input ) double* spacing = image->GetSpacing(); this->PixelSize = sqrt(spacing[u[0]]*spacing[u[0]] + spacing[u[1]]*spacing[u[1]]); - this->Superclass::SetInput( image ); + this->Superclass::SetInputData( image ); } //---------------------------------------------------------------------------- diff --git a/Graphics/vtkDijkstraImageGeodesicPath.h b/Graphics/vtkDijkstraImageGeodesicPath.h index 1f4cbd8334a..4e5006fc508 100644 --- a/Graphics/vtkDijkstraImageGeodesicPath.h +++ b/Graphics/vtkDijkstraImageGeodesicPath.h @@ -68,7 +68,7 @@ public: // Description: // Specify the image object which is used as a cost function. - void SetInput( vtkDataObject* ); + void SetInputData( vtkDataObject* ); vtkImageData* GetInputAsImageData(); // Description: diff --git a/Graphics/vtkExtractArraysOverTime.cxx b/Graphics/vtkExtractArraysOverTime.cxx index 737090615f3..49146801812 100644 --- a/Graphics/vtkExtractArraysOverTime.cxx +++ b/Graphics/vtkExtractArraysOverTime.cxx @@ -875,8 +875,8 @@ void vtkExtractArraysOverTime::ExecuteAtTimeStep( vtkExtractSelection* filter = vtkExtractSelection::New(); filter->SetPreserveTopology(0); filter->SetUseProbeForLocations(1); - filter->SetInputConnection(0, inputClone->GetProducerPort()); - filter->SetInputConnection(1, selInputClone->GetProducerPort()); + filter->SetInputData(0, inputClone); + filter->SetInputData(1, selInputClone); vtkStreamingDemandDrivenPipeline* sddp = vtkStreamingDemandDrivenPipeline::SafeDownCast( diff --git a/Graphics/vtkExtractSelectedBlock.cxx b/Graphics/vtkExtractSelectedBlock.cxx index 421e9b625f3..e6a0c198043 100644 --- a/Graphics/vtkExtractSelectedBlock.cxx +++ b/Graphics/vtkExtractSelectedBlock.cxx @@ -76,7 +76,7 @@ int vtkExtractSelectedBlock::RequestDataObject( if (!output) { output = vtkMultiBlockDataSet::New(); - output->SetPipelineInformation(outInfo); + outInfo->Set(vtkDataObject::DATA_OBJECT(), output); output->Delete(); } return 1; diff --git a/Graphics/vtkExtractSelectedFrustum.cxx b/Graphics/vtkExtractSelectedFrustum.cxx index 3d1d24b3fcf..c7ac6c74704 100644 --- a/Graphics/vtkExtractSelectedFrustum.cxx +++ b/Graphics/vtkExtractSelectedFrustum.cxx @@ -193,7 +193,7 @@ int vtkExtractSelectedFrustum::RequestDataObject( if (!output || !output->IsA("vtkUnstructuredGrid")) { vtkUnstructuredGrid* newOutput = vtkUnstructuredGrid::New(); - newOutput->SetPipelineInformation(info); + info->Set(vtkDataObject::DATA_OBJECT(), newOutput); newOutput->Delete(); } } diff --git a/Graphics/vtkExtractSelection.cxx b/Graphics/vtkExtractSelection.cxx index 3a13be02b7f..d8b06d80499 100644 --- a/Graphics/vtkExtractSelection.cxx +++ b/Graphics/vtkExtractSelection.cxx @@ -33,6 +33,7 @@ #include "vtkSmartPointer.h" #include "vtkStreamingDemandDrivenPipeline.h" #include "vtkTable.h" +#include "vtkTrivialProducer.h" vtkStandardNewMacro(vtkExtractSelection); @@ -213,8 +214,7 @@ int vtkExtractSelection::RequestDataObject( vtkMultiBlockDataSet* output = vtkMultiBlockDataSet::GetData(outInfo); if (!output) { - output = vtkMultiBlockDataSet::New(); - output->SetPipelineInformation(outInfo); + outInfo->Set(vtkDataObject::DATA_OBJECT(), output); output->Delete(); } return 1; @@ -375,7 +375,11 @@ vtkDataObject* vtkExtractSelection::RequestDataFromBlock( vtkSmartPointer<vtkSelection> tempSel = vtkSmartPointer<vtkSelection>::New(); tempSel->AddNode(sel); - subFilter->SetInputConnection(1, tempSel->GetProducerPort()); + vtkTrivialProducer* tp = vtkTrivialProducer::New(); + tp->SetOutput(tempSel); + subFilter->SetInputConnection(1, tp->GetOutputPort()); + tp->Delete(); + tp = 0; vtkStreamingDemandDrivenPipeline* sddp = vtkStreamingDemandDrivenPipeline::SafeDownCast( @@ -411,7 +415,10 @@ vtkDataObject* vtkExtractSelection::RequestDataFromBlock( vtkDataObject* inputCopy = input->NewInstance(); inputCopy->ShallowCopy(input); - subFilter->SetInputConnection(0, inputCopy->GetProducerPort()); + tp = vtkTrivialProducer::New(); + tp->SetOutput(inputCopy); + subFilter->SetInputConnection(0, tp->GetOutputPort()); + tp->Delete(); subFilter->Update(); diff --git a/Graphics/vtkExtractSelectionBase.cxx b/Graphics/vtkExtractSelectionBase.cxx index 2bd367aa3f2..550f6a08be6 100644 --- a/Graphics/vtkExtractSelectionBase.cxx +++ b/Graphics/vtkExtractSelectionBase.cxx @@ -92,7 +92,7 @@ int vtkExtractSelectionBase::RequestDataObject( // The mesh will not be modified. newOutput = input->NewInstance(); } - newOutput->SetPipelineInformation(outInfo); + outInfo->Set(vtkDataObject::DATA_OBJECT(), newOutput); newOutput->Delete(); } return 1; @@ -113,7 +113,7 @@ int vtkExtractSelectionBase::RequestDataObject( if (!output) { output = vtkTable::New(); - output->SetPipelineInformation(outInfo); + outInfo->Set(vtkDataObject::DATA_OBJECT(), output); output->Delete(); } return 1; diff --git a/Graphics/vtkExtractVectorComponents.cxx b/Graphics/vtkExtractVectorComponents.cxx index e1097a7f3b5..968d8797d2a 100644 --- a/Graphics/vtkExtractVectorComponents.cxx +++ b/Graphics/vtkExtractVectorComponents.cxx @@ -65,14 +65,14 @@ vtkDataSet *vtkExtractVectorComponents::GetVzComponent() } // Specify the input data or filter. -void vtkExtractVectorComponents::SetInput(vtkDataSet *input) +void vtkExtractVectorComponents::SetInputData(vtkDataSet *input) { if (this->GetNumberOfInputConnections(0) > 0 && this->GetInput(0) == input ) { return; } - this->Superclass::SetInput(0, input); + this->Superclass::SetInputData(0, input); if ( input == NULL ) { diff --git a/Graphics/vtkExtractVectorComponents.h b/Graphics/vtkExtractVectorComponents.h index 1240a29b696..724a6c2ad9b 100644 --- a/Graphics/vtkExtractVectorComponents.h +++ b/Graphics/vtkExtractVectorComponents.h @@ -44,7 +44,7 @@ public: // Description: // Specify the input data or filter. - virtual void SetInput(vtkDataSet *input); + virtual void SetInputData(vtkDataSet *input); // Description: // Get the output dataset representing velocity x-component. If output is diff --git a/Graphics/vtkGlyph3D.cxx b/Graphics/vtkGlyph3D.cxx index 709ed7cae64..3b972fa2231 100644 --- a/Graphics/vtkGlyph3D.cxx +++ b/Graphics/vtkGlyph3D.cxx @@ -29,6 +29,7 @@ #include "vtkSmartPointer.h" #include "vtkStreamingDemandDrivenPipeline.h" #include "vtkTransform.h" +#include "vtkTrivialProducer.h" #include "vtkUnsignedCharArray.h" vtkStandardNewMacro(vtkGlyph3D); @@ -242,7 +243,6 @@ int vtkGlyph3D::RequestData( defaultPointIds[1] = 1; defaultSource->SetPoints(defaultPoints); defaultSource->InsertNextCell(VTK_LINE, 2, defaultPointIds); - this->SetSource(defaultSource); defaultSource->Delete(); defaultSource = NULL; defaultPoints->Delete(); @@ -256,6 +256,7 @@ int vtkGlyph3D::RequestData( haveNormals = 1; for (numSourcePts=numSourceCells=i=0; i < numberOfSources; i++) { + source = this->GetSource(i, inputVector[1]); if ( source != NULL ) { if (source->GetNumberOfPoints() > numSourcePts) @@ -462,7 +463,8 @@ int vtkGlyph3D::RequestData( index = static_cast<int>((value - this->Range[0])*numberOfSources / den); index = (index < 0 ? 0 : (index >= numberOfSources ? (numberOfSources-1) : index)); - + + source = this->GetSource(index, inputVector[1]); if ( source != NULL ) { sourcePts = source->GetPoints(); @@ -717,36 +719,42 @@ void vtkGlyph3D::SetSourceConnection(int id, vtkAlgorithmOutput* algOutput) //---------------------------------------------------------------------------- // Specify a source object at a specified table location. -void vtkGlyph3D::SetSource(int id, vtkPolyData *pd) +void vtkGlyph3D::SetSourceData(int id, vtkPolyData *pd) { - if (id < 0) + int numConnections = this->GetNumberOfInputConnections(1); + + if (id < 0 || id > numConnections) { vtkErrorMacro("Bad index " << id << " for source."); return; } - int numConnections = this->GetNumberOfInputConnections(1); - vtkAlgorithmOutput *algOutput = 0; + vtkTrivialProducer* tp = 0; if (pd) { - algOutput = pd->GetProducerPort(); - } - else - { - vtkErrorMacro("Cannot set NULL source."); - return; + tp = vtkTrivialProducer::New(); + tp->SetOutput(pd); } if (id < numConnections) { - if (algOutput) + if (tp) { - this->SetNthInputConnection(1, id, algOutput); + this->SetNthInputConnection(1, id, tp->GetOutputPort()); + } + else + { + this->SetNthInputConnection(1, id, 0); } } - else if (id == numConnections && algOutput) + else if (id == numConnections && tp) { - this->AddInputConnection(1, algOutput); + this->AddInputConnection(1, tp->GetOutputPort()); + } + + if (tp) + { + tp->Delete(); } } diff --git a/Graphics/vtkGlyph3D.h b/Graphics/vtkGlyph3D.h index 543f3b30664..87a1af2f686 100644 --- a/Graphics/vtkGlyph3D.h +++ b/Graphics/vtkGlyph3D.h @@ -108,12 +108,12 @@ public: // Description: // Set the source to use for he glyph. Old style. See SetSourceConnection. - void SetSource(vtkPolyData *pd) {this->SetSource(0,pd);}; + void SetSourceData(vtkPolyData *pd) {this->SetSourceData(0,pd);}; // Description: // Specify a source object at a specified table location. // Old style. See SetSourceConnection. - void SetSource(int id, vtkPolyData *pd); + void SetSourceData(int id, vtkPolyData *pd); // Description: // Specify a source object at a specified table location. New style. diff --git a/Graphics/vtkGradientFilter.cxx b/Graphics/vtkGradientFilter.cxx index b3fb1387c49..c644f20997c 100644 --- a/Graphics/vtkGradientFilter.cxx +++ b/Graphics/vtkGradientFilter.cxx @@ -361,7 +361,7 @@ int vtkGradientFilter::ComputeUnstructuredGridGradient( dummy->GetCellData()->AddArray(cellGradients); vtkCellDataToPointData *cd2pd = vtkCellDataToPointData::New(); - cd2pd->SetInput(dummy); + cd2pd->SetInputData(dummy); cd2pd->PassCellDataOff(); cd2pd->Update(); @@ -382,7 +382,7 @@ int vtkGradientFilter::ComputeUnstructuredGridGradient( dummy->GetCellData()->SetScalars(Array); vtkCellDataToPointData *cd2pd = vtkCellDataToPointData::New(); - cd2pd->SetInput(dummy); + cd2pd->SetInputData(dummy); cd2pd->PassCellDataOff(); cd2pd->Update(); vtkDataArray *pointScalars diff --git a/Graphics/vtkMarchingContourFilter.cxx b/Graphics/vtkMarchingContourFilter.cxx index 359a428852f..a3d2562eca0 100644 --- a/Graphics/vtkMarchingContourFilter.cxx +++ b/Graphics/vtkMarchingContourFilter.cxx @@ -168,7 +168,7 @@ void vtkMarchingContourFilter::StructuredPointsContour(int dim, int i; msquares = vtkMarchingSquares::New(); - msquares->SetInput((vtkImageData *)input); + msquares->SetInputData((vtkImageData *)input); msquares->SetDebug(this->Debug); msquares->SetNumberOfContours(numContours); for (i=0; i < numContours; i++) @@ -188,7 +188,7 @@ void vtkMarchingContourFilter::StructuredPointsContour(int dim, int i; mcubes = vtkMarchingCubes::New(); - mcubes->SetInput((vtkImageData *)input); + mcubes->SetInputData((vtkImageData *)input); mcubes->SetComputeNormals (this->ComputeNormals); mcubes->SetComputeGradients (this->ComputeGradients); mcubes->SetComputeScalars (this->ComputeScalars); @@ -217,7 +217,7 @@ void vtkMarchingContourFilter::DataSetContour(vtkDataSet *input, double *values=this->ContourValues->GetValues(); vtkContourFilter *contour = vtkContourFilter::New(); - contour->SetInput((vtkImageData *)input); + contour->SetInputData((vtkImageData *)input); contour->SetComputeNormals (this->ComputeNormals); contour->SetComputeGradients (this->ComputeGradients); contour->SetComputeScalars (this->ComputeScalars); @@ -247,7 +247,7 @@ void vtkMarchingContourFilter::ImageContour(int dim, vtkDataSet *input, int i; msquares = vtkMarchingSquares::New(); - msquares->SetInput((vtkImageData *)input); + msquares->SetInputData((vtkImageData *)input); msquares->SetDebug(this->Debug); msquares->SetNumberOfContours(numContours); for (i=0; i < numContours; i++) @@ -267,7 +267,7 @@ void vtkMarchingContourFilter::ImageContour(int dim, vtkDataSet *input, int i; mcubes = vtkImageMarchingCubes::New(); - mcubes->SetInput((vtkImageData *)input); + mcubes->SetInputData((vtkImageData *)input); mcubes->SetComputeNormals (this->ComputeNormals); mcubes->SetComputeGradients (this->ComputeGradients); mcubes->SetComputeScalars (this->ComputeScalars); diff --git a/Graphics/vtkMergeDataObjectFilter.cxx b/Graphics/vtkMergeDataObjectFilter.cxx index 51c6ae44629..0dcdaccad6e 100644 --- a/Graphics/vtkMergeDataObjectFilter.cxx +++ b/Graphics/vtkMergeDataObjectFilter.cxx @@ -42,9 +42,9 @@ vtkMergeDataObjectFilter::~vtkMergeDataObjectFilter() //---------------------------------------------------------------------------- // Specify a data object at a specified table location. -void vtkMergeDataObjectFilter::SetDataObject(vtkDataObject *d) +void vtkMergeDataObjectFilter::SetDataObjectInputData(vtkDataObject *d) { - this->SetInput(1, d); + this->SetInputData(1, d); } //---------------------------------------------------------------------------- diff --git a/Graphics/vtkMergeDataObjectFilter.h b/Graphics/vtkMergeDataObjectFilter.h index 6d52dceddc9..e54dc496a3b 100644 --- a/Graphics/vtkMergeDataObjectFilter.h +++ b/Graphics/vtkMergeDataObjectFilter.h @@ -49,7 +49,7 @@ public: // Description: // Specify the data object to merge with the input dataset. - void SetDataObject(vtkDataObject *object); + void SetDataObjectInputData(vtkDataObject *object); vtkDataObject *GetDataObject(); // Description: diff --git a/Graphics/vtkMergeFilter.cxx b/Graphics/vtkMergeFilter.cxx index d894ce20a4a..3cacfd9c537 100644 --- a/Graphics/vtkMergeFilter.cxx +++ b/Graphics/vtkMergeFilter.cxx @@ -163,9 +163,9 @@ vtkDataSet* vtkMergeFilter::GetGeometry() this->GetExecutive()->GetInputData(0, 0)); } -void vtkMergeFilter::SetScalars(vtkDataSet *input) +void vtkMergeFilter::SetScalarsData(vtkDataSet *input) { - this->SetInput(1, input); + this->SetInputData(1, input); } vtkDataSet *vtkMergeFilter::GetScalars() { @@ -177,9 +177,9 @@ vtkDataSet *vtkMergeFilter::GetScalars() this->GetExecutive()->GetInputData(1, 0)); } -void vtkMergeFilter::SetVectors(vtkDataSet *input) +void vtkMergeFilter::SetVectorsData(vtkDataSet *input) { - this->SetInput(2, input); + this->SetInputData(2, input); } vtkDataSet *vtkMergeFilter::GetVectors() { @@ -191,9 +191,9 @@ vtkDataSet *vtkMergeFilter::GetVectors() this->GetExecutive()->GetInputData(2, 0)); } -void vtkMergeFilter::SetNormals(vtkDataSet *input) +void vtkMergeFilter::SetNormalsData(vtkDataSet *input) { - this->SetInput(3, input); + this->SetInputData(3, input); } vtkDataSet *vtkMergeFilter::GetNormals() { @@ -205,9 +205,9 @@ vtkDataSet *vtkMergeFilter::GetNormals() this->GetExecutive()->GetInputData(3, 0)); } -void vtkMergeFilter::SetTCoords(vtkDataSet *input) +void vtkMergeFilter::SetTCoordsData(vtkDataSet *input) { - this->SetInput(4, input); + this->SetInputData(4, input); } vtkDataSet *vtkMergeFilter::GetTCoords() { @@ -219,9 +219,9 @@ vtkDataSet *vtkMergeFilter::GetTCoords() this->GetExecutive()->GetInputData(4, 0)); } -void vtkMergeFilter::SetTensors(vtkDataSet *input) +void vtkMergeFilter::SetTensorsData(vtkDataSet *input) { - this->SetInput(5, input); + this->SetInputData(5, input); } vtkDataSet *vtkMergeFilter::GetTensors() { diff --git a/Graphics/vtkMergeFilter.h b/Graphics/vtkMergeFilter.h index 481118eee8d..0250a63a394 100644 --- a/Graphics/vtkMergeFilter.h +++ b/Graphics/vtkMergeFilter.h @@ -36,7 +36,7 @@ public: // Description: // Specify object from which to extract geometry information. // Old style. Use SetGeometryConnection() instead. - void SetGeometry(vtkDataSet *input) {this->SetInput(input);}; + void SetGeometryInputData(vtkDataSet *input) {this->SetInputData(input);}; vtkDataSet *GetGeometry(); // Description: @@ -50,7 +50,7 @@ public: // Description: // Specify object from which to extract scalar information. // Old style. Use SetScalarsConnection() instead. - void SetScalars(vtkDataSet *); + void SetScalarsData(vtkDataSet *); vtkDataSet *GetScalars(); // Description: @@ -64,7 +64,7 @@ public: // Description: // Set / get the object from which to extract vector information. // Old style. Use SetVectorsConnection() instead. - void SetVectors(vtkDataSet *); + void SetVectorsData(vtkDataSet *); vtkDataSet *GetVectors(); // Description: @@ -78,7 +78,7 @@ public: // Description: // Set / get the object from which to extract normal information. // Old style. Use SetNormalsConnection() instead. - void SetNormals(vtkDataSet *); + void SetNormalsData(vtkDataSet *); vtkDataSet *GetNormals(); // Description: @@ -93,7 +93,7 @@ public: // Set / get the object from which to extract texture coordinates // information. // Old style. Use SetTCoordsConnection() instead. - void SetTCoords(vtkDataSet *); + void SetTCoordsData(vtkDataSet *); vtkDataSet *GetTCoords(); // Description: @@ -108,7 +108,7 @@ public: // Description: // Set / get the object from which to extract tensor data. // Old style. Use SetTensorsConnection() instead. - void SetTensors(vtkDataSet *); + void SetTensorsData(vtkDataSet *); vtkDataSet *GetTensors(); // Description: diff --git a/Graphics/vtkModifiedBSPTree.cxx b/Graphics/vtkModifiedBSPTree.cxx index 41d454f145c..599bae13889 100644 --- a/Graphics/vtkModifiedBSPTree.cxx +++ b/Graphics/vtkModifiedBSPTree.cxx @@ -593,7 +593,7 @@ void vtkModifiedBSPTree::GenerateRepresentation(int level, vtkPolyData *pd) vtkCubeSource *cube = vtkCubeSource::New(); cube->SetBounds( bl[i].bounds ); cube->Update(); - polys->AddInput(cube->GetOutput()); + polys->AddInputConnection(cube->GetOutputPort()); cube->Delete(); } polys->Update(); diff --git a/Graphics/vtkMultiBlockDataGroupFilter.cxx b/Graphics/vtkMultiBlockDataGroupFilter.cxx index bd042ff6c41..32f529091b6 100644 --- a/Graphics/vtkMultiBlockDataGroupFilter.cxx +++ b/Graphics/vtkMultiBlockDataGroupFilter.cxx @@ -122,18 +122,15 @@ int vtkMultiBlockDataGroupFilter::RequestData( } //----------------------------------------------------------------------------- -void vtkMultiBlockDataGroupFilter::AddInput(vtkDataObject* input) +void vtkMultiBlockDataGroupFilter::AddInputData(vtkDataObject* input) { - this->AddInput(0, input); + this->AddInputData(0, input); } //----------------------------------------------------------------------------- -void vtkMultiBlockDataGroupFilter::AddInput(int index, vtkDataObject* input) +void vtkMultiBlockDataGroupFilter::AddInputData(int index, vtkDataObject* input) { - if(input) - { - this->AddInputConnection(index, input->GetProducerPort()); - } + this->AddInputDataInternal(index, input); } //----------------------------------------------------------------------------- diff --git a/Graphics/vtkMultiBlockDataGroupFilter.h b/Graphics/vtkMultiBlockDataGroupFilter.h index 3461ee6bfd9..02031beb7c6 100644 --- a/Graphics/vtkMultiBlockDataGroupFilter.h +++ b/Graphics/vtkMultiBlockDataGroupFilter.h @@ -37,12 +37,11 @@ public: static vtkMultiBlockDataGroupFilter *New(); // Description: - // Add an input of this algorithm. Note that these methods support - // old-style pipeline connections. When writing new code you should - // use the more general vtkAlgorithm::AddInputConnection(). See - // SetInput() for details. - void AddInput(vtkDataObject *); - void AddInput(int, vtkDataObject*); + // Assign a data object as input. Note that this method does not + // establish a pipeline connection. Use AddInputConnection() to + // setup a pipeline connection. + void AddInputData(vtkDataObject *); + void AddInputData(int, vtkDataObject*); protected: vtkMultiBlockDataGroupFilter(); diff --git a/Graphics/vtkMultiBlockMergeFilter.cxx b/Graphics/vtkMultiBlockMergeFilter.cxx index 231b5d26d51..3ebbfe0f43d 100644 --- a/Graphics/vtkMultiBlockMergeFilter.cxx +++ b/Graphics/vtkMultiBlockMergeFilter.cxx @@ -185,18 +185,15 @@ int vtkMultiBlockMergeFilter::Merge(unsigned int numPieces, unsigned int pieceNo //----------------------------------------------------------------------------- -void vtkMultiBlockMergeFilter::AddInput(vtkDataObject* input) +void vtkMultiBlockMergeFilter::AddInputData(vtkDataObject* input) { - this->AddInput(0, input); + this->AddInputData(0, input); } //----------------------------------------------------------------------------- -void vtkMultiBlockMergeFilter::AddInput(int index, vtkDataObject* input) +void vtkMultiBlockMergeFilter::AddInputData(int index, vtkDataObject* input) { - if(input) - { - this->AddInputConnection(index, input->GetProducerPort()); - } + this->AddInputDataInternal(index, input); } //----------------------------------------------------------------------------- diff --git a/Graphics/vtkMultiBlockMergeFilter.h b/Graphics/vtkMultiBlockMergeFilter.h index 3034486b108..ea18e805050 100644 --- a/Graphics/vtkMultiBlockMergeFilter.h +++ b/Graphics/vtkMultiBlockMergeFilter.h @@ -39,12 +39,11 @@ public: static vtkMultiBlockMergeFilter *New(); // Description: - // Add an input of this algorithm. Note that these methods support - // old-style pipeline connections. When writing new code you should - // use the more general vtkAlgorithm::AddInputConnection(). See - // SetInput() for details. - void AddInput(vtkDataObject *); - void AddInput(int, vtkDataObject*); + // Assign a data object as input. Note that this method does not + // establish a pipeline connection. Use AddInputConnection() to + // setup a pipeline connection. + void AddInputData(vtkDataObject *); + void AddInputData(int, vtkDataObject*); protected: vtkMultiBlockMergeFilter(); diff --git a/Graphics/vtkParametricFunctionSource.cxx b/Graphics/vtkParametricFunctionSource.cxx index 1afc711e208..b89b16786a5 100644 --- a/Graphics/vtkParametricFunctionSource.cxx +++ b/Graphics/vtkParametricFunctionSource.cxx @@ -495,14 +495,14 @@ void vtkParametricFunctionSource::Produce2DOutput(vtkInformationVector *output) if ( this->ParametricFunction->GetDerivativesAvailable() ) { //Generate polygons from the triangle strips - tri->SetInput(pd); + tri->SetInputData(pd); } else { // Calculate Normals - norm->SetInput(pd); + norm->SetInputData(pd); // Generate polygons from the triangle strips - tri->SetInput(norm->GetOutput()); + tri->SetInputConnection(norm->GetOutputPort()); } tri->PassLinesOn(); tri->PassVertsOff(); diff --git a/Graphics/vtkPolyDataStreamer.cxx b/Graphics/vtkPolyDataStreamer.cxx index 9a91dec2033..8350f37b241 100644 --- a/Graphics/vtkPolyDataStreamer.cxx +++ b/Graphics/vtkPolyDataStreamer.cxx @@ -113,7 +113,7 @@ int vtkPolyDataStreamer::RequestData( outNumPieces *this->NumberOfStreamDivisions); copy = vtkPolyData::New(); copy->ShallowCopy(input); - append->AddInput(copy); + append->AddInputData(copy); copy->Delete(); if (pieceColors) { diff --git a/Graphics/vtkPolyDataToReebGraphFilter.cxx b/Graphics/vtkPolyDataToReebGraphFilter.cxx index c68d5425450..d1f4a0cd959 100644 --- a/Graphics/vtkPolyDataToReebGraphFilter.cxx +++ b/Graphics/vtkPolyDataToReebGraphFilter.cxx @@ -73,50 +73,34 @@ int vtkPolyDataToReebGraphFilter::RequestData(vtkInformation*, vtkInformation *inInfo = inputVector[0]->GetInformationObject(0); - if(!inInfo) - { - return 0; - } - vtkPolyData *input = vtkPolyData::SafeDownCast( inInfo->Get(vtkPolyData::DATA_OBJECT())); - if(input) + vtkInformation *outInfo = outputVector->GetInformationObject(0); + vtkReebGraph *output = vtkReebGraph::SafeDownCast( + outInfo->Get(vtkReebGraph::DATA_OBJECT())); + + // check for the presence of a scalar field + vtkDataArray *scalarField = input->GetPointData()->GetArray(FieldId); + if(!scalarField) + { + vtkElevationFilter* eFilter = vtkElevationFilter::New(); + eFilter->SetInputData(input); + eFilter->Update(); + output->Build(vtkPolyData::SafeDownCast(eFilter->GetOutput()), + "Elevation"); + eFilter->Delete(); + } + else + { + output->Build(input, FieldId); + } + if(scalarField) + { + } + else { - vtkInformation *outInfo = outputVector->GetInformationObject(0); - vtkReebGraph *output = vtkReebGraph::SafeDownCast( - outInfo->Get(vtkReebGraph::DATA_OBJECT())); - - // check for the presence of a scalar field - vtkDataArray *scalarField = input->GetPointData()->GetArray(FieldId); - vtkPolyData *newInput = NULL; - vtkElevationFilter *eFilter = NULL; - if(!scalarField) - { - eFilter = vtkElevationFilter::New(); - eFilter->SetInput(input); - eFilter->Update(); - newInput = vtkPolyData::SafeDownCast(eFilter->GetOutput()); - } - - if(output) - { - if(scalarField) output->Build(input, FieldId); - else output->Build(newInput, "Elevation"); - } - else - { - output = vtkReebGraph::New(); - if(scalarField) output->Build(input, FieldId); - else output->Build(newInput, "Elevation"); - output->SetPipelineInformation(outInfo); - output->Delete(); - } - - if(eFilter) eFilter->Delete(); - - return 1; } - return 0; + return 1; } diff --git a/Graphics/vtkPolyDataToReebGraphFilter.h b/Graphics/vtkPolyDataToReebGraphFilter.h index 2adc9af174f..f1175c41d8b 100644 --- a/Graphics/vtkPolyDataToReebGraphFilter.h +++ b/Graphics/vtkPolyDataToReebGraphFilter.h @@ -42,7 +42,6 @@ public: vtkReebGraph* GetOutput(); - protected: vtkPolyDataToReebGraphFilter(); ~vtkPolyDataToReebGraphFilter(); diff --git a/Graphics/vtkProbeFilter.cxx b/Graphics/vtkProbeFilter.cxx index 927b1f879a0..5a8152bae04 100644 --- a/Graphics/vtkProbeFilter.cxx +++ b/Graphics/vtkProbeFilter.cxx @@ -74,9 +74,9 @@ void vtkProbeFilter::SetSourceConnection(vtkAlgorithmOutput* algOutput) } //---------------------------------------------------------------------------- -void vtkProbeFilter::SetSource(vtkDataObject *input) +void vtkProbeFilter::SetSourceData(vtkDataObject *input) { - this->SetInput(1, input); + this->SetInputData(1, input); } //---------------------------------------------------------------------------- diff --git a/Graphics/vtkProbeFilter.h b/Graphics/vtkProbeFilter.h index 2c6a892d952..5c3d20b38a9 100644 --- a/Graphics/vtkProbeFilter.h +++ b/Graphics/vtkProbeFilter.h @@ -51,8 +51,8 @@ public: // Description: // Specify the point locations used to probe input. Any geometry - // can be used. Old style. Do not use unless for backwards compatibility. - void SetSource(vtkDataObject *source); + // can be used. + void SetSourceData(vtkDataObject *source); vtkDataObject *GetSource(); // Description: diff --git a/Graphics/vtkProbePolyhedron.cxx b/Graphics/vtkProbePolyhedron.cxx index 0085959daa8..7655b99de25 100644 --- a/Graphics/vtkProbePolyhedron.cxx +++ b/Graphics/vtkProbePolyhedron.cxx @@ -50,9 +50,9 @@ void vtkProbePolyhedron::SetSourceConnection(vtkAlgorithmOutput* algOutput) } //---------------------------------------------------------------------------- -void vtkProbePolyhedron::SetSource(vtkPolyData *input) +void vtkProbePolyhedron::SetSourceData(vtkPolyData *input) { - this->SetInput(1, input); + this->SetInputData(1, input); } //---------------------------------------------------------------------------- diff --git a/Graphics/vtkProbePolyhedron.h b/Graphics/vtkProbePolyhedron.h index 848a62efa89..68c445135c7 100644 --- a/Graphics/vtkProbePolyhedron.h +++ b/Graphics/vtkProbePolyhedron.h @@ -67,8 +67,8 @@ public: // Description: // Specify the point locations used to probe input. Any geometry - // can be used. Old style. Do not use unless for backwards compatibility. - void SetSource(vtkPolyData *source); + // can be used. + void SetSourceData(vtkPolyData *source); vtkPolyData *GetSource(); // Description: diff --git a/Graphics/vtkProbeSelectedLocations.cxx b/Graphics/vtkProbeSelectedLocations.cxx index f9f3e94ed72..626c0078374 100644 --- a/Graphics/vtkProbeSelectedLocations.cxx +++ b/Graphics/vtkProbeSelectedLocations.cxx @@ -23,6 +23,7 @@ #include "vtkSelection.h" #include "vtkSelectionNode.h" #include "vtkStreamingDemandDrivenPipeline.h" +#include "vtkTrivialProducer.h" #include "vtkUnstructuredGrid.h" vtkStandardNewMacro(vtkProbeSelectedLocations); @@ -123,11 +124,19 @@ int vtkProbeSelectedLocations::RequestData(vtkInformation *vtkNotUsed(request), inputClone->ShallowCopy(dataInput); vtkProbeFilter* subFilter = vtkProbeFilter::New(); - subFilter->SetInputConnection(1, inputClone->GetProducerPort()); + vtkTrivialProducer* tp = vtkTrivialProducer::New(); + tp->SetOutput(inputClone); + subFilter->SetInputConnection(1, tp->GetOutputPort()); inputClone->Delete(); + tp->Delete(); + tp = 0; - subFilter->SetInputConnection(0, tempInput->GetProducerPort()); + tp = vtkTrivialProducer::New(); + tp->SetOutput(tempInput); + subFilter->SetInputConnection(0, tp->GetOutputPort()); tempInput->Delete(); + tp->Delete(); + tp = 0; vtkStreamingDemandDrivenPipeline* sddp = vtkStreamingDemandDrivenPipeline::SafeDownCast( diff --git a/Graphics/vtkProgrammableGlyphFilter.cxx b/Graphics/vtkProgrammableGlyphFilter.cxx index 4ee982bc066..5ef55c0e8b3 100644 --- a/Graphics/vtkProgrammableGlyphFilter.cxx +++ b/Graphics/vtkProgrammableGlyphFilter.cxx @@ -57,10 +57,9 @@ vtkProgrammableGlyphFilter::~vtkProgrammableGlyphFilter() } } -// Specify a source object at a specified table location. -void vtkProgrammableGlyphFilter::SetSource(vtkPolyData *pd) +void vtkProgrammableGlyphFilter::SetSourceData(vtkPolyData *pd) { - this->SetInput(1, pd); + this->SetInputData(1, pd); } // Get a pointer to a source object at a specified table location. diff --git a/Graphics/vtkProgrammableGlyphFilter.h b/Graphics/vtkProgrammableGlyphFilter.h index 87f2adee97b..05a1aefdf84 100644 --- a/Graphics/vtkProgrammableGlyphFilter.h +++ b/Graphics/vtkProgrammableGlyphFilter.h @@ -78,7 +78,7 @@ public: // Description: // Set/Get the source to use for this glyph. // Note: you can change the source during execution of this filter. - void SetSource(vtkPolyData *source); + void SetSourceData(vtkPolyData *source); vtkPolyData *GetSource(); // Description: diff --git a/Graphics/vtkQuadricClustering.cxx b/Graphics/vtkQuadricClustering.cxx index 8b9f0b69744..a4ef39f73e4 100644 --- a/Graphics/vtkQuadricClustering.cxx +++ b/Graphics/vtkQuadricClustering.cxx @@ -1443,7 +1443,7 @@ void vtkQuadricClustering::AppendFeatureQuadrics(vtkPolyData *pd, // Find the boundary edges. input->ShallowCopy(pd); - this->FeatureEdges->SetInput(input); + this->FeatureEdges->SetInputData(input); this->FeatureEdges->Update(); edgePts = this->FeatureEdges->GetOutput()->GetPoints(); edges = this->FeatureEdges->GetOutput()->GetLines(); diff --git a/Graphics/vtkRectilinearGridToTetrahedra.cxx b/Graphics/vtkRectilinearGridToTetrahedra.cxx index f1847eb4c39..43359cdd730 100644 --- a/Graphics/vtkRectilinearGridToTetrahedra.cxx +++ b/Graphics/vtkRectilinearGridToTetrahedra.cxx @@ -119,7 +119,7 @@ void vtkRectilinearGridToTetrahedra::SetInput(const double Extent[3], Coord[2]->Delete(); // Get the reference counting right. - this->Superclass::SetInput(RectGrid); + this->Superclass::SetInputData(RectGrid); RectGrid->Delete(); } diff --git a/Graphics/vtkReebGraphSimplificationFilter.cxx b/Graphics/vtkReebGraphSimplificationFilter.cxx index d58dfacf6b8..5fae5fd754a 100644 --- a/Graphics/vtkReebGraphSimplificationFilter.cxx +++ b/Graphics/vtkReebGraphSimplificationFilter.cxx @@ -38,7 +38,11 @@ vtkReebGraphSimplificationFilter::~vtkReebGraphSimplificationFilter() void vtkReebGraphSimplificationFilter::SetSimplificationMetric( vtkReebGraphSimplificationMetric *simplificationMetric) { - this->SimplificationMetric = simplificationMetric; + if (simplificationMetric != this->SimplificationMetric) + { + this->SimplificationMetric = simplificationMetric; + this->Modified(); + } } //---------------------------------------------------------------------------- @@ -79,33 +83,15 @@ int vtkReebGraphSimplificationFilter::RequestData( vtkInformation* vtkNotUsed(re vtkInformation* inInfo = inputVector[0]->GetInformationObject(0); - if (!inInfo) - { - return 0; - } vtkReebGraph *input = vtkReebGraph::SafeDownCast( inInfo->Get(vtkReebGraph::DATA_OBJECT())); - if (input) - { - vtkInformation *outInfo = outputVector->GetInformationObject(0); - vtkReebGraph *output = vtkReebGraph::SafeDownCast( - outInfo->Get(vtkReebGraph::DATA_OBJECT())); - - if(output){ - output->DeepCopy(input); - output->Simplify(SimplificationThreshold, SimplificationMetric); - } + vtkInformation *outInfo = outputVector->GetInformationObject(0); + vtkReebGraph *output = vtkReebGraph::SafeDownCast( + outInfo->Get(vtkReebGraph::DATA_OBJECT())); - if(!output){ - output = vtkReebGraph::New(); - output->DeepCopy(input); - output->Simplify(SimplificationThreshold, SimplificationMetric); - output->SetPipelineInformation(outInfo); - output->Delete(); - } + output->DeepCopy(input); + output->Simplify(this->SimplificationThreshold, this->SimplificationMetric); - return 1; - } - return 0; + return 1; } diff --git a/Graphics/vtkReebGraphSurfaceSkeletonFilter.cxx b/Graphics/vtkReebGraphSurfaceSkeletonFilter.cxx index 091514b6639..24b711eeecc 100644 --- a/Graphics/vtkReebGraphSurfaceSkeletonFilter.cxx +++ b/Graphics/vtkReebGraphSurfaceSkeletonFilter.cxx @@ -269,13 +269,15 @@ int vtkReebGraphSurfaceSkeletonFilter::RequestData(vtkInformation* vtkNotUsed(re contourFilter->SetNumberOfContours(1); contourFilter->SetValue(i, minValue + (i + 1.0)*(maxValue - minValue)/(((double)NumberOfSamples) + 1.0)); - contourFilter->SetInput(subMesh); + contourFilter->SetInputData(subMesh); contourFilter->Update(); vtkPolyData *contourMesh = contourFilter->GetOutput(); std::vector<double> baryCenter(3); for(int j = 0; j < 3; j++) + { baryCenter[j] = 0.0; + } if(contourMesh->GetNumberOfPoints() > 1) { diff --git a/Graphics/vtkReebGraphVolumeSkeletonFilter.cxx b/Graphics/vtkReebGraphVolumeSkeletonFilter.cxx index b733d466d65..9c24ffb6359 100644 --- a/Graphics/vtkReebGraphVolumeSkeletonFilter.cxx +++ b/Graphics/vtkReebGraphVolumeSkeletonFilter.cxx @@ -274,13 +274,15 @@ int vtkReebGraphVolumeSkeletonFilter::RequestData(vtkInformation* vtkNotUsed(req contourFilter->SetValue(i, minValue + (i + 1.0)*(maxValue - minValue) /(((double)NumberOfSamples) + 1.0)); - contourFilter->SetInput(subMesh); + contourFilter->SetInputData(subMesh); contourFilter->Update(); vtkPolyData *contourMesh = contourFilter->GetOutput(); std::vector<double> baryCenter(3); for(int j = 0; j < 3; j++) + { baryCenter[j] = 0.0; + } if(contourMesh->GetNumberOfPoints() > 1) { diff --git a/Graphics/vtkReflectionFilter.cxx b/Graphics/vtkReflectionFilter.cxx index a6117f9fc31..f21ff0a2fdc 100644 --- a/Graphics/vtkReflectionFilter.cxx +++ b/Graphics/vtkReflectionFilter.cxx @@ -426,7 +426,7 @@ int vtkReflectionFilter::RequestDataObject( { newOutput = vtkUnstructuredGrid::New(); } - newOutput->SetPipelineInformation(outInfo); + outInfo->Set(vtkDataSet::DATA_OBJECT(), newOutput); newOutput->Delete(); } return 1; diff --git a/Graphics/vtkSectorSource.cxx b/Graphics/vtkSectorSource.cxx index 79d01184516..2f9725fd02f 100644 --- a/Graphics/vtkSectorSource.cxx +++ b/Graphics/vtkSectorSource.cxx @@ -101,7 +101,7 @@ int vtkSectorSource::RequestData( VTK_CREATE(vtkRotationalExtrusionFilter, rotateFilter); rotateFilter->SetResolution( this->CircumferentialResolution ); - rotateFilter->SetInput(lineSource->GetOutput()); + rotateFilter->SetInputConnection(lineSource->GetOutputPort()); rotateFilter->SetAngle( this->EndAngle - this->StartAngle ); if (piece == 0 && numPieces > 0) diff --git a/Graphics/vtkSelectEnclosedPoints.cxx b/Graphics/vtkSelectEnclosedPoints.cxx index 0f92194a60c..d0588d3b526 100644 --- a/Graphics/vtkSelectEnclosedPoints.cxx +++ b/Graphics/vtkSelectEnclosedPoints.cxx @@ -157,7 +157,7 @@ int vtkSelectEnclosedPoints::IsSurfaceClosed(vtkPolyData *surface) checker->CopyStructure(surface); vtkFeatureEdges *features = vtkFeatureEdges::New(); - features->SetInput(checker); + features->SetInputData(checker); features->BoundaryEdgesOn(); features->NonManifoldEdgesOn(); features->ManifoldEdgesOff(); @@ -321,9 +321,9 @@ void vtkSelectEnclosedPoints::SetSurfaceConnection(vtkAlgorithmOutput* algOutput //---------------------------------------------------------------------------- // Specify a source object at a specified table location. -void vtkSelectEnclosedPoints::SetSurface(vtkPolyData *pd) +void vtkSelectEnclosedPoints::SetSurfaceData(vtkPolyData *pd) { - this->SetInput(1, pd); + this->SetInputData(1, pd); } //---------------------------------------------------------------------------- diff --git a/Graphics/vtkSelectEnclosedPoints.h b/Graphics/vtkSelectEnclosedPoints.h index 760de3eac6d..8de469a67e2 100644 --- a/Graphics/vtkSelectEnclosedPoints.h +++ b/Graphics/vtkSelectEnclosedPoints.h @@ -63,7 +63,7 @@ public: // Set the surface to be used to test for containment. Two methods are // provided: one directly for vtkPolyData, and one for the output of a // filter. - void SetSurface(vtkPolyData *pd); + void SetSurfaceData(vtkPolyData *pd); void SetSurfaceConnection(vtkAlgorithmOutput* algOutput); // Description: diff --git a/Graphics/vtkSelectPolyData.cxx b/Graphics/vtkSelectPolyData.cxx index 9111c3b9481..c5edb4e1350 100644 --- a/Graphics/vtkSelectPolyData.cxx +++ b/Graphics/vtkSelectPolyData.cxx @@ -146,7 +146,7 @@ int vtkSelectPolyData::RequestData( // Okay, now we build unstructured representation. Make sure we're // working with triangles. vtkTriangleFilter *tf=vtkTriangleFilter::New(); - tf->SetInput(input); + tf->SetInputData(input); tf->PassLinesOff(); tf->PassVertsOff(); tf->Update(); diff --git a/Graphics/vtkSelectionSource.cxx b/Graphics/vtkSelectionSource.cxx index 4f2fd7fd45f..8961b612159 100644 --- a/Graphics/vtkSelectionSource.cxx +++ b/Graphics/vtkSelectionSource.cxx @@ -25,7 +25,6 @@ #include "vtkSmartPointer.h" #include "vtkStreamingDemandDrivenPipeline.h" #include "vtkStringArray.h" -#include "vtkTrivialProducer.h" #include "vtkUnsignedIntArray.h" #include "vtkstd/vector" diff --git a/Graphics/vtkSmoothPolyDataFilter.cxx b/Graphics/vtkSmoothPolyDataFilter.cxx index 85874c92455..173305c082e 100644 --- a/Graphics/vtkSmoothPolyDataFilter.cxx +++ b/Graphics/vtkSmoothPolyDataFilter.cxx @@ -133,9 +133,9 @@ vtkSmoothPolyDataFilter::vtkSmoothPolyDataFilter() this->SetNumberOfInputPorts(2); } -void vtkSmoothPolyDataFilter::SetSource(vtkPolyData *source) +void vtkSmoothPolyDataFilter::SetSourceData(vtkPolyData *source) { - this->SetInput(1, source); + this->SetInputData(1, source); } vtkPolyData *vtkSmoothPolyDataFilter::GetSource() @@ -330,7 +330,7 @@ int vtkSmoothPolyDataFilter::RequestData( { // convert data to triangles inMesh->SetStrips(inStrips); toTris = vtkTriangleFilter::New(); - toTris->SetInput(inMesh); + toTris->SetInputData(inMesh); toTris->Update(); Mesh = toTris->GetOutput(); } diff --git a/Graphics/vtkSmoothPolyDataFilter.h b/Graphics/vtkSmoothPolyDataFilter.h index 5a7abb6c408..875c514cbda 100644 --- a/Graphics/vtkSmoothPolyDataFilter.h +++ b/Graphics/vtkSmoothPolyDataFilter.h @@ -167,7 +167,7 @@ public: // Specify the source object which is used to constrain smoothing. The // source defines a surface that the input (as it is smoothed) is // constrained to lie upon. - void SetSource(vtkPolyData *source); + void SetSourceData(vtkPolyData *source); vtkPolyData *GetSource(); protected: diff --git a/Graphics/vtkSpherePuzzle.cxx b/Graphics/vtkSpherePuzzle.cxx index 37c835de735..98703dbf771 100644 --- a/Graphics/vtkSpherePuzzle.cxx +++ b/Graphics/vtkSpherePuzzle.cxx @@ -131,7 +131,7 @@ int vtkSpherePuzzle::RequestData( sphere->SetThetaResolution(4); tf->SetTransform(this->Transform); - tf->SetInput(sphere->GetOutput()); + tf->SetInputConnection(sphere->GetOutputPort()); for (j = 0; j < 4; ++j) { @@ -173,7 +173,7 @@ int vtkSpherePuzzle::RequestData( } // append all the pieces. - append->AddInput(tmp); + append->AddInputData(tmp); tmp->FastDelete(); ++count; } diff --git a/Graphics/vtkStreamTracer.cxx b/Graphics/vtkStreamTracer.cxx index 8e4092f4ec7..7f10e51405c 100644 --- a/Graphics/vtkStreamTracer.cxx +++ b/Graphics/vtkStreamTracer.cxx @@ -96,9 +96,9 @@ void vtkStreamTracer::SetSourceConnection(vtkAlgorithmOutput* algOutput) this->SetInputConnection(1, algOutput); } -void vtkStreamTracer::SetSource(vtkDataSet *source) +void vtkStreamTracer::SetSourceData(vtkDataSet *source) { - this->SetInput(1, source); + this->SetInputData(1, source); } vtkDataSet *vtkStreamTracer::GetSource() diff --git a/Graphics/vtkStreamTracer.h b/Graphics/vtkStreamTracer.h index 7225c7dc4ba..5eee3c57824 100644 --- a/Graphics/vtkStreamTracer.h +++ b/Graphics/vtkStreamTracer.h @@ -114,7 +114,7 @@ public: // Description: // Specify the source object used to generate starting points (seeds). // Old style. Do not use. - void SetSource(vtkDataSet *source); + void SetSourceData(vtkDataSet *source); vtkDataSet *GetSource(); // Description: diff --git a/Graphics/vtkStreamer.cxx b/Graphics/vtkStreamer.cxx index 4e53adc7a9e..97d5f551865 100644 --- a/Graphics/vtkStreamer.cxx +++ b/Graphics/vtkStreamer.cxx @@ -122,9 +122,9 @@ vtkStreamer::~vtkStreamer() this->SetIntegrator(0); } -void vtkStreamer::SetSource(vtkDataSet *source) +void vtkStreamer::SetSourceData(vtkDataSet *source) { - this->SetInput(1, source); + this->SetInputData(1, source); } vtkDataSet *vtkStreamer::GetSource() diff --git a/Graphics/vtkStreamer.h b/Graphics/vtkStreamer.h index 17a6d09ed15..5b8008a7991 100644 --- a/Graphics/vtkStreamer.h +++ b/Graphics/vtkStreamer.h @@ -98,7 +98,7 @@ public: // Description: // Specify the source object used to generate starting points. - void SetSource(vtkDataSet *source); + void SetSourceData(vtkDataSet *source); vtkDataSet *GetSource(); // Description: diff --git a/Graphics/vtkSubPixelPositionEdgels.cxx b/Graphics/vtkSubPixelPositionEdgels.cxx index 5de13998eb8..17c99429ac0 100644 --- a/Graphics/vtkSubPixelPositionEdgels.cxx +++ b/Graphics/vtkSubPixelPositionEdgels.cxx @@ -723,9 +723,9 @@ void vtkSubPixelPositionEdgels::Move(int xdim, int ydim, int zdim, } } -void vtkSubPixelPositionEdgels::SetGradMaps(vtkStructuredPoints *gm) +void vtkSubPixelPositionEdgels::SetGradMapsData(vtkStructuredPoints *gm) { - this->SetInput(1, gm); + this->SetInputData(1, gm); } vtkStructuredPoints *vtkSubPixelPositionEdgels::GetGradMaps() diff --git a/Graphics/vtkSubPixelPositionEdgels.h b/Graphics/vtkSubPixelPositionEdgels.h index baaf3a7f838..9a9e48f11de 100644 --- a/Graphics/vtkSubPixelPositionEdgels.h +++ b/Graphics/vtkSubPixelPositionEdgels.h @@ -48,7 +48,7 @@ public: // Description: // Set/Get the gradient data for doing the position adjustments. - void SetGradMaps(vtkStructuredPoints *gm); + void SetGradMapsData(vtkStructuredPoints *gm); vtkStructuredPoints *GetGradMaps(); // Description: diff --git a/Graphics/vtkTableBasedClipDataSet.cxx b/Graphics/vtkTableBasedClipDataSet.cxx index d789a70ecb3..c35902e5b6e 100644 --- a/Graphics/vtkTableBasedClipDataSet.cxx +++ b/Graphics/vtkTableBasedClipDataSet.cxx @@ -1997,7 +1997,7 @@ void vtkTableBasedClipDataSet::ClipDataSet( vtkDataSet * pDataSet, vtkDataArray * clipAray, vtkUnstructuredGrid * unstruct ) { vtkClipDataSet * clipData = vtkClipDataSet::New(); - clipData->SetInput( pDataSet ); + clipData->SetInputData( pDataSet ); clipData->SetValue( this->Value ); clipData->SetInsideOut( this->InsideOut ); clipData->SetClipFunction( this->ClipFunction ); @@ -2410,8 +2410,8 @@ void vtkTableBasedClipDataSet::ClipPolyData( vtkDataSet * inputGrd, polyData->GetCellData(), visItGrd, theCords ); vtkAppendFilter * appender = vtkAppendFilter::New(); - appender->AddInput( vtkUGrid ); - appender->AddInput( visItGrd ); + appender->AddInputData( vtkUGrid ); + appender->AddInputData( visItGrd ); appender->Update(); outputUG->ShallowCopy( appender->GetOutput() ); @@ -3421,8 +3421,8 @@ void vtkTableBasedClipDataSet::ClipUnstructuredGridData( vtkDataSet * inputGrd, unstruct->GetCellData(), visItGrd, theCords ); vtkAppendFilter * appender = vtkAppendFilter::New(); - appender->AddInput( vtkUGrid ); - appender->AddInput( visItGrd ); + appender->AddInputData( vtkUGrid ); + appender->AddInputData( visItGrd ); appender->Update(); outputUG->ShallowCopy( appender->GetOutput() ); diff --git a/Graphics/vtkTemporalPathLineFilter.cxx b/Graphics/vtkTemporalPathLineFilter.cxx index e296abad46d..a8df9f4c476 100644 --- a/Graphics/vtkTemporalPathLineFilter.cxx +++ b/Graphics/vtkTemporalPathLineFilter.cxx @@ -160,9 +160,9 @@ void vtkTemporalPathLineFilter::SetSelectionConnection(vtkAlgorithmOutput* algOu this->SetInputConnection(1, algOutput); } //---------------------------------------------------------------------------- -void vtkTemporalPathLineFilter::SetSelection(vtkDataSet *input) +void vtkTemporalPathLineFilter::SetSelectionData(vtkDataSet *input) { - this->SetInput(1, input); + this->SetInputData(1, input); } //---------------------------------------------------------------------------- int vtkTemporalPathLineFilter::RequestInformation( diff --git a/Graphics/vtkTemporalPathLineFilter.h b/Graphics/vtkTemporalPathLineFilter.h index 8d412e3366b..9f3707b2581 100644 --- a/Graphics/vtkTemporalPathLineFilter.h +++ b/Graphics/vtkTemporalPathLineFilter.h @@ -119,7 +119,7 @@ class VTK_GRAPHICS_EXPORT vtkTemporalPathLineFilter : public vtkPolyDataAlgorith // Set a second input which is a selection. Particles with the same // Id in the selection as the primary input will be chosen for pathlines // Note that you must have the same IdChannelArray in the selection as the input - void SetSelection(vtkDataSet *input); + void SetSelectionData(vtkDataSet *input); protected: vtkTemporalPathLineFilter(); diff --git a/Graphics/vtkTemporalStatistics.cxx b/Graphics/vtkTemporalStatistics.cxx index 3808c9ec385..78255b84b6b 100644 --- a/Graphics/vtkTemporalStatistics.cxx +++ b/Graphics/vtkTemporalStatistics.cxx @@ -202,13 +202,9 @@ int vtkTemporalStatistics::RequestDataObject( vtkInformation *inInfo = inputVector[0]->GetInformationObject(0); vtkInformation *outInfo = outputVector->GetInformationObject(0); - if (!inInfo) return 0; - vtkDataObject *input = vtkDataObject::GetData(inInfo); vtkDataObject *output = vtkDataObject::GetData(outInfo); - if (!input) return 0; - vtkSmartPointer<vtkDataObject> newOutput; if (input->IsA("vtkTemporalDataSet")) @@ -234,7 +230,7 @@ int vtkTemporalStatistics::RequestDataObject( if (newOutput) { - newOutput->SetPipelineInformation(outInfo); + outInfo->Set(vtkDataObject::DATA_OBJECT(), newOutput); } return 1; diff --git a/Graphics/vtkTensorGlyph.cxx b/Graphics/vtkTensorGlyph.cxx index d69da35f402..059a86d29bb 100644 --- a/Graphics/vtkTensorGlyph.cxx +++ b/Graphics/vtkTensorGlyph.cxx @@ -464,9 +464,9 @@ void vtkTensorGlyph::SetSourceConnection(int id, vtkAlgorithmOutput* algOutput) } //---------------------------------------------------------------------------- -void vtkTensorGlyph::SetSource(vtkPolyData *source) +void vtkTensorGlyph::SetSourceData(vtkPolyData *source) { - this->SetInput(1, source); + this->SetInputData(1, source); } //---------------------------------------------------------------------------- diff --git a/Graphics/vtkTensorGlyph.h b/Graphics/vtkTensorGlyph.h index 65edcfe772f..c76e2b49fbb 100644 --- a/Graphics/vtkTensorGlyph.h +++ b/Graphics/vtkTensorGlyph.h @@ -93,7 +93,7 @@ public: // Description: // Specify the geometry to copy to each point. Old style. See // SetSourceConnection. - void SetSource(vtkPolyData *source); + void SetSourceData(vtkPolyData *source); vtkPolyData *GetSource(); // Description: diff --git a/Graphics/vtkUnstructuredGridToReebGraphFilter.cxx b/Graphics/vtkUnstructuredGridToReebGraphFilter.cxx index d91301d0551..a86a09feb8d 100644 --- a/Graphics/vtkUnstructuredGridToReebGraphFilter.cxx +++ b/Graphics/vtkUnstructuredGridToReebGraphFilter.cxx @@ -73,50 +73,28 @@ int vtkUnstructuredGridToReebGraphFilter::RequestData(vtkInformation*, vtkInformation *inInfo = inputVector[0]->GetInformationObject(0); - if(!inInfo) - { - return 0; - } - vtkUnstructuredGrid *input = vtkUnstructuredGrid::SafeDownCast( inInfo->Get(vtkUnstructuredGrid::DATA_OBJECT())); - if(input) + vtkInformation *outInfo = outputVector->GetInformationObject(0); + vtkReebGraph *output = vtkReebGraph::SafeDownCast( + outInfo->Get(vtkReebGraph::DATA_OBJECT())); + + // check for the presence of a scalar field + vtkDataArray *scalarField = input->GetPointData()->GetArray(FieldId); + if(!scalarField) { - vtkInformation *outInfo = outputVector->GetInformationObject(0); - vtkReebGraph *output = vtkReebGraph::SafeDownCast( - outInfo->Get(vtkReebGraph::DATA_OBJECT())); - - // check for the presence of a scalar field - vtkDataArray *scalarField = input->GetPointData()->GetArray(FieldId); - vtkUnstructuredGrid *newInput = NULL; - vtkElevationFilter *eFilter = NULL; - if(!scalarField) - { - eFilter = vtkElevationFilter::New(); - eFilter->SetInput(input); - eFilter->Update(); - newInput = vtkUnstructuredGrid::SafeDownCast(eFilter->GetOutput()); - } - - if(output) - { - if(scalarField) output->Build(input, FieldId); - else output->Build(newInput, "Elevation"); - } - else - { - output = vtkReebGraph::New(); - if(scalarField) output->Build(input, FieldId); - else output->Build(newInput, "Elevation"); - output->SetPipelineInformation(outInfo); - output->Delete(); - } - - if(eFilter) eFilter->Delete(); - - return 1; + vtkElevationFilter* eFilter = vtkElevationFilter::New(); + eFilter->SetInputData(input); + eFilter->Update(); + output->Build(vtkUnstructuredGrid::SafeDownCast(eFilter->GetOutput()), + "Elevation"); + eFilter->Delete(); + } + else + { + output->Build(input, FieldId); } - return 0; + return 1; } diff --git a/Graphics/vtkVoxelContoursToSurfaceFilter.cxx b/Graphics/vtkVoxelContoursToSurfaceFilter.cxx index 2d0e48cc6a9..3b1e09070f2 100644 --- a/Graphics/vtkVoxelContoursToSurfaceFilter.cxx +++ b/Graphics/vtkVoxelContoursToSurfaceFilter.cxx @@ -564,7 +564,7 @@ int vtkVoxelContoursToSurfaceFilter::RequestData( contourFilter = vtkContourFilter::New(); - contourFilter->SetInput( volume ); + contourFilter->SetInputData( volume ); contourFilter->SetNumberOfContours(1); contourFilter->SetValue( 0, 0.0 ); @@ -648,7 +648,7 @@ int vtkVoxelContoursToSurfaceFilter::RequestData( contourOutput = vtkPolyData::New(); contourFilter->Update(); contourOutput->ShallowCopy(contourFilter->GetOutput()); - appendFilter->AddInput( contourOutput ); + appendFilter->AddInputData( contourOutput ); contourOutput->Delete(); diff --git a/Graphics/vtkWindowedSincPolyDataFilter.cxx b/Graphics/vtkWindowedSincPolyDataFilter.cxx index 27bb48dbafe..cb4e8fd26d0 100644 --- a/Graphics/vtkWindowedSincPolyDataFilter.cxx +++ b/Graphics/vtkWindowedSincPolyDataFilter.cxx @@ -238,7 +238,7 @@ int vtkWindowedSincPolyDataFilter::RequestData( { // convert data to triangles inMesh->SetStrips(inStrips); toTris = vtkTriangleFilter::New(); - toTris->SetInput(inMesh); + toTris->SetInputData(inMesh); toTris->Update(); Mesh = toTris->GetOutput(); } diff --git a/Hybrid/Testing/Cxx/TestImageDataLIC2D.h b/Hybrid/Testing/Cxx/TestImageDataLIC2D.h index 8a29149993e..756c8f4af92 100644 --- a/Hybrid/Testing/Cxx/TestImageDataLIC2D.h +++ b/Hybrid/Testing/Cxx/TestImageDataLIC2D.h @@ -187,7 +187,7 @@ int ImageDataLIC2D(int argc, char* argv[]) CREATE_NEW(probe,vtkProbeFilter); probe->SetSource(reader->GetOutput()); - probe->SetInput(probeData); + probe->SetInputData(probeData); probe->Update(); CREATE_NEW(renWin, vtkRenderWindow); @@ -252,7 +252,7 @@ int ImageDataLIC2D(int argc, char* argv[]) // input is double between 0.0 and 1.0. Cast it between [0, 255]. CREATE_NEW(caster, vtkImageShiftScale); - caster->SetInput(clone); + caster->SetInputData(clone); caster->SetShift(0.0); caster->SetScale(255.0); caster->SetOutputScalarTypeToUnsignedChar(); diff --git a/Hybrid/Testing/Cxx/TestImageStencilData.cxx b/Hybrid/Testing/Cxx/TestImageStencilData.cxx index 12a020154c0..b5bf4c114a6 100644 --- a/Hybrid/Testing/Cxx/TestImageStencilData.cxx +++ b/Hybrid/Testing/Cxx/TestImageStencilData.cxx @@ -54,7 +54,7 @@ CreateBoxStencilData(double d1, double d2 ) // Extrude the contour along the normal to the plane the contour lies on. vtkLinearExtrusionFilter *extrudeFilter = vtkLinearExtrusionFilter::New(); - extrudeFilter->SetInput( pd ); + extrudeFilter->SetInputData( pd ); extrudeFilter->SetScaleFactor(1); extrudeFilter->SetExtrusionTypeToNormalExtrusion(); extrudeFilter->SetVector( 0, 0, 1); @@ -67,7 +67,7 @@ CreateBoxStencilData(double d1, double d2 ) vtkMatrixToLinearTransform *linearTransform = vtkMatrixToLinearTransform::New(); linearTransform->GetMatrix()->DeepCopy( m ); vtkTransformPolyDataFilter *transformPolyData = vtkTransformPolyDataFilter::New(); - transformPolyData->SetInput( extrudeFilter->GetOutput() ); + transformPolyData->SetInputConnection( extrudeFilter->GetOutputPort() ); transformPolyData->SetTransform( linearTransform ); transformPolyData->Update(); linearTransform->Delete(); @@ -76,7 +76,7 @@ CreateBoxStencilData(double d1, double d2 ) // bounded by the extrusion) and get extents into a stencil vtkPolyDataToImageStencil *contourStencilFilter = vtkPolyDataToImageStencil::New(); - contourStencilFilter->SetInput( transformPolyData->GetOutput() ); + contourStencilFilter->SetInputConnection( transformPolyData->GetOutputPort() ); vtkImageData *image = vtkImageData::New(); image->SetSpacing( 1.0, 1.0, 1.0 ); @@ -86,8 +86,8 @@ CreateBoxStencilData(double d1, double d2 ) image->AllocateScalars(VTK_UNSIGNED_CHAR, 1); vtkImageStencil *stencil = vtkImageStencil::New(); - stencil->SetInput( image ); - stencil->SetStencil( contourStencilFilter->GetOutput() ); + stencil->SetInputData( image ); + stencil->SetStencilConnection( contourStencilFilter->GetOutputPort() ); stencil->SetBackgroundValue(0); stencil->Update(); vtkSmartPointer< vtkImageStencilData > diff --git a/Hybrid/Testing/Cxx/TestLabelPlacerExodus.cxx b/Hybrid/Testing/Cxx/TestLabelPlacerExodus.cxx index 3e5d69e967f..59c4f5e7062 100644 --- a/Hybrid/Testing/Cxx/TestLabelPlacerExodus.cxx +++ b/Hybrid/Testing/Cxx/TestLabelPlacerExodus.cxx @@ -181,7 +181,7 @@ int TestLabelPlacerExodus(int argc, char *argv[]) /// Label /// - labelSizeCalculator->SetInput(temp); + labelSizeCalculator->SetInputData(temp); labelSizeCalculator->GetFontProperty()->SetFontSize( 14 ); labelSizeCalculator->GetFontProperty()->SetFontFamily( vtkTextProperty::GetFontFamilyFromString( "Arial" ) ); labelSizeCalculator->GetFontProperty()->ShadowOn(); diff --git a/Hybrid/Testing/Cxx/TestLegendScaleActor.cxx b/Hybrid/Testing/Cxx/TestLegendScaleActor.cxx index 754d902583a..bee0269c9d6 100644 --- a/Hybrid/Testing/Cxx/TestLegendScaleActor.cxx +++ b/Hybrid/Testing/Cxx/TestLegendScaleActor.cxx @@ -45,7 +45,7 @@ int TestLegendScaleActor( int argc, char * argv [] ) // vtkSphereSource *ss = vtkSphereSource::New(); vtkPolyDataMapper *mapper = vtkPolyDataMapper::New(); - mapper->SetInput(ss->GetOutput()); + mapper->SetInputConnection(ss->GetOutputPort()); vtkActor *sph = vtkActor::New(); sph->SetMapper(mapper); diff --git a/Hybrid/Testing/Cxx/TestPolyDataSilhouette.cxx b/Hybrid/Testing/Cxx/TestPolyDataSilhouette.cxx index 4acbf767d3b..5dbf33abdcc 100644 --- a/Hybrid/Testing/Cxx/TestPolyDataSilhouette.cxx +++ b/Hybrid/Testing/Cxx/TestPolyDataSilhouette.cxx @@ -39,7 +39,7 @@ int TestPolyDataSilhouette(int argc, char *argv[]) //create mapper and actor for original model vtkSmartPointer<vtkPolyDataMapper> mapper = vtkSmartPointer<vtkPolyDataMapper>::New(); - mapper->SetInput(polyData); + mapper->SetInputData(polyData); vtkSmartPointer<vtkActor> actor = vtkSmartPointer<vtkActor>::New(); @@ -58,7 +58,7 @@ int TestPolyDataSilhouette(int argc, char *argv[]) //Compute the silhouette vtkSmartPointer<vtkPolyDataSilhouette> silhouette = vtkSmartPointer<vtkPolyDataSilhouette>::New(); - silhouette->SetInput(polyData); + silhouette->SetInputData(polyData); silhouette->SetCamera(renderer->GetActiveCamera()); silhouette->SetEnableFeatureAngle(0); diff --git a/Hybrid/Testing/Cxx/TestStructuredGridLIC2DSlice.h b/Hybrid/Testing/Cxx/TestStructuredGridLIC2DSlice.h index b13310610e4..de9ed6c4eb9 100644 --- a/Hybrid/Testing/Cxx/TestStructuredGridLIC2DSlice.h +++ b/Hybrid/Testing/Cxx/TestStructuredGridLIC2DSlice.h @@ -230,7 +230,7 @@ static int StructuredGridLIC2DSlice(int argc, char* argv[]) double range[2]; clone->GetPointData()->GetScalars()->GetRange(range); CREATE_NEW(caster, vtkImageShiftScale); - caster->SetInput(clone); + caster->SetInputData(clone); caster->SetOutputScalarTypeToUnsignedChar(); caster->SetShift(-range[0]); caster->SetScale(255.0/(range[1]-range[0])); @@ -250,7 +250,7 @@ static int StructuredGridLIC2DSlice(int argc, char* argv[]) clone2->ShallowCopy(filter->GetOutput(0)); CREATE_NEW(surfaceFilter, vtkDataSetSurfaceFilter); - surfaceFilter->SetInput(clone2); + surfaceFilter->SetInputData(clone2); CREATE_NEW(mapper, vtkPolyDataMapper); mapper->SetInputConnection(surfaceFilter->GetOutputPort()); diff --git a/Hybrid/vtk3DSImporter.cxx b/Hybrid/vtk3DSImporter.cxx index d51a7f5d48c..69f2f2a63c6 100644 --- a/Hybrid/vtk3DSImporter.cxx +++ b/Hybrid/vtk3DSImporter.cxx @@ -183,15 +183,15 @@ void vtk3DSImporter::ImportActors (vtkRenderer *renderer) if (this->ComputeNormals) { mesh->aNormals = polyNormals = vtkPolyDataNormals::New (); - polyNormals->SetInput (polyData); - polyStripper->SetInput (polyNormals->GetOutput ()); + polyNormals->SetInputData (polyData); + polyStripper->SetInputConnection(polyNormals->GetOutputPort()); } else { - polyStripper->SetInput (polyData); + polyStripper->SetInputData(polyData); } - polyMapper->SetInput (polyStripper->GetOutput ()); + polyMapper->SetInputConnection(polyStripper->GetOutputPort()); vtkDebugMacro (<< "Importing Actor: " << mesh->name); mesh->anActor = actor = vtkActor::New (); actor->SetMapper (polyMapper); diff --git a/Hybrid/vtkAnnotatedCubeActor.cxx b/Hybrid/vtkAnnotatedCubeActor.cxx index 0a22fd7e964..6c5d2f5046b 100644 --- a/Hybrid/vtkAnnotatedCubeActor.cxx +++ b/Hybrid/vtkAnnotatedCubeActor.cxx @@ -137,7 +137,7 @@ vtkAnnotatedCubeActor::vtkAnnotatedCubeActor() for (int i = 0; i < 6; i++) { vtkPolyData *edges = vtkPolyData::New(); - this->AppendTextEdges->SetInputByNumber(i,edges); + this->AppendTextEdges->SetInputDataByNumber(i,edges); edges->Delete(); } diff --git a/Hybrid/vtkAxesActor.cxx b/Hybrid/vtkAxesActor.cxx index 6c21d2eaa3b..16b5dc06629 100644 --- a/Hybrid/vtkAxesActor.cxx +++ b/Hybrid/vtkAxesActor.cxx @@ -589,7 +589,7 @@ void vtkAxesActor::UpdateProps() break; case vtkAxesActor::USER_DEFINED_SHAFT: (vtkPolyDataMapper::SafeDownCast(this->XAxisShaft->GetMapper()))-> - SetInputConnection( this->UserDefinedShaft->GetProducerPort() ); + SetInputData( this->UserDefinedShaft ); } switch ( this->TipType ) @@ -604,7 +604,7 @@ void vtkAxesActor::UpdateProps() break; case vtkAxesActor::USER_DEFINED_TIP: (vtkPolyDataMapper::SafeDownCast(this->XAxisTip->GetMapper()))-> - SetInputConnection( this->UserDefinedTip->GetProducerPort() ); + SetInputData( this->UserDefinedTip ); } vtkPolyDataMapper::SafeDownCast(this->XAxisTip->GetMapper())-> diff --git a/Hybrid/vtkAxisActor.cxx b/Hybrid/vtkAxisActor.cxx index bf0bcc9b7e2..5f2477b7922 100644 --- a/Hybrid/vtkAxisActor.cxx +++ b/Hybrid/vtkAxisActor.cxx @@ -90,7 +90,8 @@ vtkAxisActor::vtkAxisActor() this->TitleVector = vtkVectorText::New(); this->TitleMapper = vtkPolyDataMapper::New(); - this->TitleMapper->SetInput(this->TitleVector->GetOutput()); + this->TitleMapper->SetInputConnection( + this->TitleVector->GetOutputPort()); this->TitleActor = vtkFollower::New(); this->TitleActor->SetMapper(this->TitleMapper); @@ -102,7 +103,7 @@ vtkAxisActor::vtkAxisActor() this->Axis = vtkPolyData::New(); this->AxisMapper = vtkPolyDataMapper::New(); - this->AxisMapper->SetInput(this->Axis); + this->AxisMapper->SetInputData(this->Axis); this->AxisActor = vtkActor::New(); this->AxisActor->SetMapper(this->AxisMapper); @@ -859,7 +860,8 @@ void vtkAxisActor::SetLabels(vtkStringArray *labels) { this->LabelVectors[i] = vtkVectorText::New(); this->LabelMappers[i] = vtkPolyDataMapper::New(); - this->LabelMappers[i]->SetInput(this->LabelVectors[i]->GetOutput()); + this->LabelMappers[i]->SetInputConnection( + this->LabelVectors[i]->GetOutputPort()); this->LabelActors[i] = vtkFollower::New(); this->LabelActors[i]->SetMapper(this->LabelMappers[i]); } diff --git a/Hybrid/vtkBarChartActor.cxx b/Hybrid/vtkBarChartActor.cxx index 9b5d5f751f3..6a39d60a639 100644 --- a/Hybrid/vtkBarChartActor.cxx +++ b/Hybrid/vtkBarChartActor.cxx @@ -102,7 +102,7 @@ vtkBarChartActor::vtkBarChartActor() this->PlotData = vtkPolyData::New(); this->PlotMapper = vtkPolyDataMapper2D::New(); - this->PlotMapper->SetInput(this->PlotData); + this->PlotMapper->SetInputData(this->PlotData); this->PlotActor = vtkActor2D::New(); this->PlotActor->SetMapper(this->PlotMapper); this->TitleMapper = vtkTextMapper::New(); diff --git a/Hybrid/vtkCaptionActor2D.cxx b/Hybrid/vtkCaptionActor2D.cxx index f08d0b20dc1..c421884e891 100644 --- a/Hybrid/vtkCaptionActor2D.cxx +++ b/Hybrid/vtkCaptionActor2D.cxx @@ -99,7 +99,7 @@ vtkCaptionActor2D::vtkCaptionActor2D() border->Delete(); this->BorderMapper = vtkPolyDataMapper2D::New(); - this->BorderMapper->SetInput(this->BorderPolyData); + this->BorderMapper->SetInputData(this->BorderPolyData); this->BorderActor = vtkActor2D::New(); this->BorderActor->SetMapper(this->BorderMapper); @@ -137,7 +137,7 @@ vtkCaptionActor2D::vtkCaptionActor2D() // Used to generate the glyph on the leader head this->HeadGlyph = vtkGlyph3D::New(); - this->HeadGlyph->SetInput(this->HeadPolyData); + this->HeadGlyph->SetInputData(this->HeadPolyData); this->HeadGlyph->SetScaleModeToDataScalingOff(); this->HeadGlyph->SetScaleFactor(0.1); @@ -145,8 +145,8 @@ vtkCaptionActor2D::vtkCaptionActor2D() this->AppendLeader = vtkAppendPolyData::New(); this->AppendLeader->UserManagedInputsOn(); this->AppendLeader->SetNumberOfInputs(2); - this->AppendLeader->SetInputByNumber(0,this->LeaderPolyData); - this->AppendLeader->SetInputByNumber(1,this->HeadGlyph->GetOutput()); + this->AppendLeader->SetInputDataByNumber(0,this->LeaderPolyData); + this->AppendLeader->SetInputDataByNumber(1,this->HeadGlyph->GetOutput()); // Used to transform from world to other coordinate systems this->MapperCoordinate2D = vtkCoordinate::New(); @@ -421,17 +421,19 @@ int vtkCaptionActor2D::RenderOpaqueGeometry(vtkViewport *viewport) vtkDebugMacro(<<"Scale factor: " << sf); - this->HeadGlyph->SetSource(this->LeaderGlyph); + this->HeadGlyph->SetSourceData(this->LeaderGlyph); this->HeadGlyph->SetScaleFactor(sf); - this->LeaderMapper2D->SetInput(this->AppendLeader->GetOutput()); - this->LeaderMapper3D->SetInput(this->AppendLeader->GetOutput()); + this->LeaderMapper2D->SetInputConnection( + this->AppendLeader->GetOutputPort()); + this->LeaderMapper3D->SetInputConnection( + this->AppendLeader->GetOutputPort()); this->AppendLeader->Update(); } else { - this->LeaderMapper2D->SetInput(this->LeaderPolyData); - this->LeaderMapper3D->SetInput(this->LeaderPolyData); + this->LeaderMapper2D->SetInputData(this->LeaderPolyData); + this->LeaderMapper3D->SetInputData(this->LeaderPolyData); } // assign properties diff --git a/Hybrid/vtkCornerAnnotation.cxx b/Hybrid/vtkCornerAnnotation.cxx index d3fcf23fae2..d5b28a7b884 100644 --- a/Hybrid/vtkCornerAnnotation.cxx +++ b/Hybrid/vtkCornerAnnotation.cxx @@ -17,6 +17,7 @@ #include "vtkAlgorithmOutput.h" #include "vtkImageActor.h" #include "vtkImageData.h" +#include "vtkImageMapper3D.h" #include "vtkImageMapToWindowLevelColors.h" #include "vtkObjectFactory.h" #include "vtkPropCollection.h" @@ -397,7 +398,7 @@ int vtkCornerAnnotation::RenderOpaqueGeometry(vtkViewport *viewport) if (ia->GetInput() && !wl) { wl = vtkImageMapToWindowLevelColors::SafeDownCast( - ia->GetInput()->GetProducerPort()->GetProducer()); + ia->GetMapper()->GetInputAlgorithm()); } break; } diff --git a/Hybrid/vtkExodusReader.cxx b/Hybrid/vtkExodusReader.cxx index b194037130a..27fbeb87f15 100644 --- a/Hybrid/vtkExodusReader.cxx +++ b/Hybrid/vtkExodusReader.cxx @@ -3583,7 +3583,7 @@ void vtkExodusReader::AddDisplacements(vtkUnstructuredGrid* output) vtkUnstructuredGrid *geom = vtkUnstructuredGrid::New(); geom->ShallowCopy(output); - warp->SetInput(geom); + warp->SetInputData(geom); warp->SetInputArrayToProcess( 0, 0, 0, vtkDataObject::FIELD_ASSOCIATION_POINTS, arrayName); if (this->HasModeShapes) diff --git a/Hybrid/vtkFacetReader.cxx b/Hybrid/vtkFacetReader.cxx index 4af88cda8b5..48146fedf5d 100644 --- a/Hybrid/vtkFacetReader.cxx +++ b/Hybrid/vtkFacetReader.cxx @@ -388,7 +388,7 @@ int vtkFacetReader::RequestData( partGrid->GetCellData()->AddArray(materialArrayPtr); partGrid->GetCellData()->AddArray(relativePartArrayPtr); partGrid->GetCellData()->SetScalars(materialArrayPtr); - appendPtr->AddInput(partGrid); + appendPtr->AddInputData(partGrid); partNumberArray->Delete(); partGrid->Delete(); diff --git a/Hybrid/vtkImageToPolyDataFilter.cxx b/Hybrid/vtkImageToPolyDataFilter.cxx index 536230dc42a..9a874fe3a53 100644 --- a/Hybrid/vtkImageToPolyDataFilter.cxx +++ b/Hybrid/vtkImageToPolyDataFilter.cxx @@ -117,8 +117,8 @@ int vtkImageToPolyDataFilter::RequestData( totalPieces = numPieces[0]*numPieces[1]; appendOutput->Initialize(); //empty the output - append->AddInput(tmpOutput); //output of piece - append->AddInput(tmpInput); //output of previoius append + append->AddInputData(tmpOutput); //output of piece + append->AddInputData(tmpInput); //output of previoius append // Loop over this many pieces for (pieceNum=j=0; j < numPieces[1] && !abortExecute; j++) diff --git a/Hybrid/vtkImplicitModeller.cxx b/Hybrid/vtkImplicitModeller.cxx index c14a77fbf92..33a03a38e55 100644 --- a/Hybrid/vtkImplicitModeller.cxx +++ b/Hybrid/vtkImplicitModeller.cxx @@ -182,7 +182,7 @@ void vtkImplicitModeller::StartAppend(int internal) vtkStreamingDemandDrivenPipeline::GetWholeExtent(this->GetOutputInformation(0))); vtkDebugMacro(<< "Initializing data"); - this->AllocateOutputData(this->GetOutput()); + this->AllocateOutputData(this->GetOutput(), this->GetOutputInformation(0)); this->UpdateProgress(0.0); this->DataAppended = 1; @@ -727,7 +727,7 @@ void vtkImplicitModeller::Append(vtkDataSet *input) minPlane[i]->SetOrigin(0.0, 0.0, minZ); minClipper[i] = vtkClipPolyData::New(); - minClipper[i]->SetInput((vtkPolyData *)input); + minClipper[i]->SetInputData((vtkPolyData *)input); minClipper[i]->SetClipFunction(minPlane[i]); minClipper[i]->SetValue( 0.0 ); minClipper[i]->InsideOutOn(); @@ -759,7 +759,7 @@ void vtkImplicitModeller::Append(vtkDataSet *input) maxPlane[i]->SetOrigin(0.0, 0.0, maxZ); maxClipper[i] = vtkClipPolyData::New(); - maxClipper[i]->SetInput(minClipper[i]->GetOutput()); + maxClipper[i]->SetInputConnection(minClipper[i]->GetOutputPort()); maxClipper[i]->SetClipFunction(maxPlane[i]); maxClipper[i]->SetValue( 0.0 ); maxClipper[i]->InsideOutOn(); diff --git a/Hybrid/vtkLSDynaReader.cxx b/Hybrid/vtkLSDynaReader.cxx index 7f1e9d0261f..b78dbc82f87 100644 --- a/Hybrid/vtkLSDynaReader.cxx +++ b/Hybrid/vtkLSDynaReader.cxx @@ -4794,7 +4794,7 @@ void vtkLSDynaReader::PartFilter( vtkMultiBlockDataSet* mbds, int celltype ) vtkUnstructuredGrid* temp = vtkUnstructuredGrid::New(); temp->ShallowCopy( target ); - thresh->SetInput( temp ); + thresh->SetInputData( temp ); vtkstd::vector<int> partSetIds; int partSetId; for ( m = 0; m < (int) p->MaterialsOrdered.size(); ++m ) diff --git a/Hybrid/vtkLegendBoxActor.cxx b/Hybrid/vtkLegendBoxActor.cxx index 18c714aa67d..f943836367c 100644 --- a/Hybrid/vtkLegendBoxActor.cxx +++ b/Hybrid/vtkLegendBoxActor.cxx @@ -95,7 +95,7 @@ vtkLegendBoxActor::vtkLegendBoxActor() this->BorderPolyData->SetLines(lines); lines->Delete(); this->BorderMapper = vtkPolyDataMapper2D::New(); - this->BorderMapper->SetInput(this->BorderPolyData); + this->BorderMapper->SetInputData(this->BorderPolyData); this->BorderActor = vtkActor2D::New(); this->BorderActor->SetMapper(this->BorderMapper); @@ -112,7 +112,7 @@ vtkLegendBoxActor::vtkLegendBoxActor() this->BoxPolyData->SetPolys(polys); polys->Delete(); this->BoxMapper = vtkPolyDataMapper2D::New(); - this->BoxMapper->SetInput(this->BoxPolyData); + this->BoxMapper->SetInputData(this->BoxPolyData); this->BoxActor = vtkActor2D::New(); this->BoxActor->SetMapper(this->BoxMapper); @@ -315,7 +315,8 @@ void vtkLegendBoxActor::SetNumberOfEntries(int num) symbolTransform[i] = vtkTransformPolyDataFilter::New(); symbolTransform[i]->SetTransform(transform[i]); symbolMapper[i] = vtkPolyDataMapper2D::New(); - symbolMapper[i]->SetInput(symbolTransform[i]->GetOutput()); + symbolMapper[i]->SetInputConnection( + symbolTransform[i]->GetOutputPort()); symbolActor[i] = vtkActor2D::New(); symbolActor[i]->SetMapper(symbolMapper[i]); @@ -334,7 +335,8 @@ void vtkLegendBoxActor::SetNumberOfEntries(int num) iconTransformFilter[i]->SetTransform(iconTransform[i]); iconMapper[i] = vtkPolyDataMapper2D::New(); - iconMapper[i]->SetInput(iconTransformFilter[i]->GetOutput()); + iconMapper[i]->SetInputConnection( + iconTransformFilter[i]->GetOutputPort()); iconActor[i] = vtkTexturedActor2D::New(); iconActor[i]->SetMapper(iconMapper[i]); @@ -791,7 +793,8 @@ int vtkLegendBoxActor::RenderOpaqueGeometry(vtkViewport *viewport) this->Background->SetPoint1(p2[0], p1[1], 0.0); this->Background->SetPoint2(p1[0], p2[1], 0.0); - this->BackgroundMapper->SetInput(this->Background->GetOutput()); + this->BackgroundMapper->SetInputConnection( + this->Background->GetOutputPort()); this->BackgroundActor->GetProperty()->SetOpacity(this->BackgroundOpacity); this->BackgroundActor->GetProperty()->SetColor(this->BackgroundColor); } @@ -852,7 +855,7 @@ int vtkLegendBoxActor::RenderOpaqueGeometry(vtkViewport *viewport) { if ( this->Symbol[i] ) { - this->SymbolTransform[i]->SetInput(this->Symbol[i]); + this->SymbolTransform[i]->SetInputData(this->Symbol[i]); bounds = this->Symbol[i]->GetBounds(); if ( (bounds[1]-bounds[0]) == 0.0 ) @@ -906,11 +909,12 @@ int vtkLegendBoxActor::RenderOpaqueGeometry(vtkViewport *viewport) if ( this->IconImage[i] ) { vtkTexture *texture (vtkTexture::New()); - texture->SetInput(this->IconImage[i]); + texture->SetInputData(this->IconImage[i]); this->IconActor[i]->SetTexture(texture); texture->Delete(); this->Icon[i]->Update(); - this->IconTransformFilter[i]->SetInput(this->Icon[i]->GetOutput()); + this->IconTransformFilter[i]->SetInputConnection( + this->Icon[i]->GetOutputPort()); this->IconTransformFilter[i]->Update(); bounds = this->Icon[i]->GetOutput(0)->GetBounds(); diff --git a/Hybrid/vtkLegendScaleActor.cxx b/Hybrid/vtkLegendScaleActor.cxx index 5cfeacc1a05..4b10f6bea78 100644 --- a/Hybrid/vtkLegendScaleActor.cxx +++ b/Hybrid/vtkLegendScaleActor.cxx @@ -88,7 +88,7 @@ vtkLegendScaleActor::vtkLegendScaleActor() this->LegendPoints = vtkPoints::New(); this->Legend->SetPoints(this->LegendPoints); this->LegendMapper = vtkPolyDataMapper2D::New(); - this->LegendMapper->SetInput(this->Legend); + this->LegendMapper->SetInputData(this->Legend); this->LegendActor = vtkActor2D::New(); this->LegendActor->SetMapper(this->LegendMapper); diff --git a/Hybrid/vtkMNITransformWriter.cxx b/Hybrid/vtkMNITransformWriter.cxx index de7baa1026d..1a1bfa349b1 100644 --- a/Hybrid/vtkMNITransformWriter.cxx +++ b/Hybrid/vtkMNITransformWriter.cxx @@ -372,7 +372,7 @@ int vtkMNITransformWriter::WriteGridTransform( // Use the full path to write the minc file vtkMINCImageWriter *writer = vtkMINCImageWriter::New(); writer->SetFileName(vtksys::SystemTools::JoinPath(xfmpath).c_str()); - writer->SetInput(transform->GetDisplacementGrid()); + writer->SetInputData(transform->GetDisplacementGrid()); if (transform->GetDisplacementShift() != 0.0 || transform->GetDisplacementScale() != 1.0) { diff --git a/Hybrid/vtkPCAAnalysisFilter.cxx b/Hybrid/vtkPCAAnalysisFilter.cxx index 74df1bc6cb8..6a319580488 100644 --- a/Hybrid/vtkPCAAnalysisFilter.cxx +++ b/Hybrid/vtkPCAAnalysisFilter.cxx @@ -443,19 +443,19 @@ void vtkPCAAnalysisFilter::SetNumberOfInputs(int n) } //---------------------------------------------------------------------------- -void vtkPCAAnalysisFilter::SetInput(int idx, vtkPointSet *p) +void vtkPCAAnalysisFilter::SetInputData(int idx, vtkPointSet *p) { - this->SetNthInputConnection(0, idx, p ? p->GetProducerPort() : 0); + this->SetInputDataInternal(idx, p); } //---------------------------------------------------------------------------- -void vtkPCAAnalysisFilter::SetInput(int idx, vtkDataObject* input) +void vtkPCAAnalysisFilter::SetInputData(int idx, vtkDataObject* input) { vtkPointSet* p = vtkPointSet::SafeDownCast(input); if (p) { - this->SetInput(idx, p); + this->SetInputData(idx, p); } else { diff --git a/Hybrid/vtkPCAAnalysisFilter.h b/Hybrid/vtkPCAAnalysisFilter.h index 8333b21b268..29db46b7e33 100644 --- a/Hybrid/vtkPCAAnalysisFilter.h +++ b/Hybrid/vtkPCAAnalysisFilter.h @@ -77,8 +77,8 @@ class VTK_HYBRID_EXPORT vtkPCAAnalysisFilter : public vtkPointSetAlgorithm // Description: // Specify the input pointset with index idx. // Call SetNumberOfInputs before calling this function. - void SetInput(int idx, vtkPointSet* p); - void SetInput(int idx, vtkDataObject* input); + void SetInputData(int idx, vtkPointSet* p); + void SetInputData(int idx, vtkDataObject* input); // Description: // Retrieve the input with index idx (usually only used for pipeline diff --git a/Hybrid/vtkPExodusReader.cxx b/Hybrid/vtkPExodusReader.cxx index 824053874fe..ca6512e75e1 100644 --- a/Hybrid/vtkPExodusReader.cxx +++ b/Hybrid/vtkPExodusReader.cxx @@ -538,7 +538,7 @@ int vtkPExodusReader::RequestData( } #ifdef APPEND - append->AddInput(subgrid); + append->AddInputData(subgrid); subgrid->Delete(); #else totalSets++; diff --git a/Hybrid/vtkPieChartActor.cxx b/Hybrid/vtkPieChartActor.cxx index 678066122d4..60652b4c70c 100644 --- a/Hybrid/vtkPieChartActor.cxx +++ b/Hybrid/vtkPieChartActor.cxx @@ -93,7 +93,7 @@ vtkPieChartActor::vtkPieChartActor() this->PlotData = vtkPolyData::New(); this->PlotMapper = vtkPolyDataMapper2D::New(); - this->PlotMapper->SetInput(this->PlotData); + this->PlotMapper->SetInputData(this->PlotData); this->PlotActor = vtkActor2D::New(); this->PlotActor->SetMapper(this->PlotMapper); @@ -108,7 +108,7 @@ vtkPieChartActor::vtkPieChartActor() this->WebData = vtkPolyData::New(); this->WebMapper = vtkPolyDataMapper2D::New(); - this->WebMapper->SetInput(this->WebData); + this->WebMapper->SetInputData(this->WebData); this->WebActor = vtkActor2D::New(); this->WebActor->SetMapper(this->WebMapper); diff --git a/Hybrid/vtkPolyDataToImageStencil.cxx b/Hybrid/vtkPolyDataToImageStencil.cxx index d7f3d950984..41675ede994 100644 --- a/Hybrid/vtkPolyDataToImageStencil.cxx +++ b/Hybrid/vtkPolyDataToImageStencil.cxx @@ -81,16 +81,9 @@ vtkPolyDataToImageStencil::~vtkPolyDataToImageStencil() } //---------------------------------------------------------------------------- -void vtkPolyDataToImageStencil::SetInput(vtkPolyData *input) +void vtkPolyDataToImageStencil::SetInputData(vtkPolyData *input) { - if (input) - { - this->SetInputConnection(0, input->GetProducerPort()); - } - else - { - this->SetInputConnection(0, 0); - } + this->SetInputDataInternal(0, input); } //---------------------------------------------------------------------------- diff --git a/Hybrid/vtkPolyDataToImageStencil.h b/Hybrid/vtkPolyDataToImageStencil.h index a57b2cea115..52b78ded594 100644 --- a/Hybrid/vtkPolyDataToImageStencil.h +++ b/Hybrid/vtkPolyDataToImageStencil.h @@ -75,7 +75,7 @@ public: // Description: // Specify the implicit function to convert into a stencil. - virtual void SetInput(vtkPolyData*); + virtual void SetInputData(vtkPolyData*); vtkPolyData *GetInput(); // Description: diff --git a/Hybrid/vtkProcrustesAlignmentFilter.cxx b/Hybrid/vtkProcrustesAlignmentFilter.cxx index ac186cea878..5e2612553af 100644 --- a/Hybrid/vtkProcrustesAlignmentFilter.cxx +++ b/Hybrid/vtkProcrustesAlignmentFilter.cxx @@ -398,19 +398,19 @@ void vtkProcrustesAlignmentFilter::SetNumberOfInputs(int n) } //---------------------------------------------------------------------------- -void vtkProcrustesAlignmentFilter::SetInput(int idx, vtkPointSet *p) +void vtkProcrustesAlignmentFilter::SetInputData(int idx, vtkPointSet *p) { - this->SetNthInputConnection(0, idx, p ? p->GetProducerPort() : 0); + this->SetInputDataInternal(idx, p); } //---------------------------------------------------------------------------- -void vtkProcrustesAlignmentFilter::SetInput(int idx, vtkDataObject* input) +void vtkProcrustesAlignmentFilter::SetInputData(int idx, vtkDataObject* input) { vtkPointSet* p = vtkPointSet::SafeDownCast(input); if (p) { - this->SetInput(idx, p); + this->SetInputData(idx, p); } else { diff --git a/Hybrid/vtkProcrustesAlignmentFilter.h b/Hybrid/vtkProcrustesAlignmentFilter.h index 1b5e2a2a2ef..22a364a2e31 100644 --- a/Hybrid/vtkProcrustesAlignmentFilter.h +++ b/Hybrid/vtkProcrustesAlignmentFilter.h @@ -86,8 +86,8 @@ public: // Description: // Specify the input pointset with index idx. // Call SetNumberOfInputs before calling this function. - void SetInput(int idx, vtkPointSet* p); - void SetInput(int idx, vtkDataObject* input); + void SetInputData(int idx, vtkPointSet* p); + void SetInputData(int idx, vtkDataObject* input); // Description: // When on, the initial alignment is to the centroid diff --git a/Hybrid/vtkProjectedTerrainPath.cxx b/Hybrid/vtkProjectedTerrainPath.cxx index 20e0f309f56..ec950860fd2 100644 --- a/Hybrid/vtkProjectedTerrainPath.cxx +++ b/Hybrid/vtkProjectedTerrainPath.cxx @@ -67,9 +67,9 @@ vtkProjectedTerrainPath::~vtkProjectedTerrainPath() } //----------------------------------------------------------------------------- -void vtkProjectedTerrainPath::SetSource(vtkImageData *source) +void vtkProjectedTerrainPath::SetSourceData(vtkImageData *source) { - this->SetInput(1, source); + this->SetInputDataInternal(1, source); } //----------------------------------------------------------------------------- diff --git a/Hybrid/vtkProjectedTerrainPath.h b/Hybrid/vtkProjectedTerrainPath.h index 6f9a8a71adf..ad0d323d9d3 100644 --- a/Hybrid/vtkProjectedTerrainPath.h +++ b/Hybrid/vtkProjectedTerrainPath.h @@ -85,7 +85,7 @@ public: // Description: // Specify the second input (the terrain) onto which the polyline(s) should // be projected. - void SetSource(vtkImageData *source); + void SetSourceData(vtkImageData *source); vtkImageData *GetSource(); //BTX diff --git a/Hybrid/vtkRIBExporter.cxx b/Hybrid/vtkRIBExporter.cxx index 29203c2000c..368ee3abb82 100644 --- a/Hybrid/vtkRIBExporter.cxx +++ b/Hybrid/vtkRIBExporter.cxx @@ -613,7 +613,8 @@ void vtkRIBExporter::WriteActor(vtkActor *anActor) if ( aDataSet->GetDataObjectType() != VTK_POLY_DATA ) { geometryFilter = vtkGeometryFilter::New(); - geometryFilter->SetInput(aDataSet); + geometryFilter->SetInputConnection( + anActor->GetMapper()->GetInputConnection(0, 0)); geometryFilter->Update(); polyData = geometryFilter->GetOutput(); } @@ -1308,15 +1309,15 @@ void vtkRIBExporter::WriteTexture (vtkTexture *aTexture) iac2 = vtkImageAppendComponents::New(); icp = vtkImageConstantPad::New(); - iac1->SetInput(0, anImage); - iac1->SetInput(1, anImage); - iac2->SetInput(0, iac1->GetOutput ()); - iac2->SetInput(1, anImage); - icp->SetInput( iac2->GetOutput ()); + iac1->SetInputData(0, anImage); + iac1->SetInputData(1, anImage); + iac2->SetInputConnection(0, iac1->GetOutputPort()); + iac2->SetInputData(1, anImage); + icp->SetInputConnection(iac2->GetOutputPort()); icp->SetConstant(255); icp->SetOutputNumberOfScalarComponents(4); - aWriter->SetInput (icp->GetOutput()); + aWriter->SetInputConnection(icp->GetOutputPort()); } else if (bpp == 2) // needs intensity intensity { @@ -1324,26 +1325,26 @@ void vtkRIBExporter::WriteTexture (vtkTexture *aTexture) iac1 = vtkImageAppendComponents::New(); iac2 = vtkImageAppendComponents::New(); - iec->SetInput( anImage); - iec->SetComponents (0); - iac1->SetInput(0, iec->GetOutput ()); - iac1->SetInput(1, anImage); - iac2->SetInput(0, iec->GetOutput ()); - iac2->SetInput(1, iac1->GetOutput ()); + iec->SetInputData(anImage); + iec->SetComponents(0); + iac1->SetInputConnection(0, iec->GetOutputPort()); + iac1->SetInputData(1, anImage); + iac2->SetInputConnection(0, iec->GetOutputPort()); + iac2->SetInputConnection(1, iac1->GetOutputPort()); - aWriter->SetInput (iac2->GetOutput()); + aWriter->SetInputConnection(iac2->GetOutputPort()); } else if (bpp == 3) // needs alpha { icp = vtkImageConstantPad::New(); - icp->SetInput( anImage); + icp->SetInputData(anImage); icp->SetConstant(255); icp->SetOutputNumberOfScalarComponents(4); - aWriter->SetInput (icp->GetOutput()); + aWriter->SetInputConnection(icp->GetOutputPort()); } else // needs nothing { - aWriter->SetInput (anImage); + aWriter->SetInputData(anImage); } aWriter->SetFileName (this->GetTIFFName (aTexture)); aWriter->Write (); diff --git a/Hybrid/vtkRenderLargeImage.cxx b/Hybrid/vtkRenderLargeImage.cxx index 3d0d9b89e33..e01e0a697d7 100644 --- a/Hybrid/vtkRenderLargeImage.cxx +++ b/Hybrid/vtkRenderLargeImage.cxx @@ -181,7 +181,7 @@ void vtkRenderLargeImage::RequestData( vtkImageData::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT())); data->SetExtent( outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT())); - data->AllocateScalars(); + data->AllocateScalars(outInfo); int inExtent[6]; vtkIdType inIncr[3]; int *size; diff --git a/Hybrid/vtkSpiderPlotActor.cxx b/Hybrid/vtkSpiderPlotActor.cxx index 43e254c05c2..528fffe41ab 100644 --- a/Hybrid/vtkSpiderPlotActor.cxx +++ b/Hybrid/vtkSpiderPlotActor.cxx @@ -105,7 +105,7 @@ vtkSpiderPlotActor::vtkSpiderPlotActor() this->PlotData = vtkPolyData::New(); this->PlotMapper = vtkPolyDataMapper2D::New(); - this->PlotMapper->SetInput(this->PlotData); + this->PlotMapper->SetInputData(this->PlotData); this->PlotActor = vtkActor2D::New(); this->PlotActor->SetMapper(this->PlotMapper); @@ -120,7 +120,7 @@ vtkSpiderPlotActor::vtkSpiderPlotActor() this->WebData = vtkPolyData::New(); this->WebMapper = vtkPolyDataMapper2D::New(); - this->WebMapper->SetInput(this->WebData); + this->WebMapper->SetInputData(this->WebData); this->WebActor = vtkActor2D::New(); this->WebActor->SetMapper(this->WebMapper); diff --git a/Hybrid/vtkStructuredGridLIC2D.cxx b/Hybrid/vtkStructuredGridLIC2D.cxx index 09082d25e3f..bfd3e46f2b5 100644 --- a/Hybrid/vtkStructuredGridLIC2D.cxx +++ b/Hybrid/vtkStructuredGridLIC2D.cxx @@ -282,49 +282,21 @@ int vtkStructuredGridLIC2D::RequestUpdateExtent ( //---------------------------------------------------------------------------- // Stolen from vtkImageAlgorithm. Should be in vtkStructuredGridAlgorithm. void vtkStructuredGridLIC2D::AllocateOutputData(vtkDataObject *output, - int outputPort) + vtkInformation *outInfo) { // set the extent to be the update extent vtkStructuredGrid *out = vtkStructuredGrid::SafeDownCast(output); if (out) { - // this needs to be fixed -Ken - vtkStreamingDemandDrivenPipeline *sddp = - vtkStreamingDemandDrivenPipeline::SafeDownCast(this->GetExecutive()); - int numInfoObj = sddp->GetNumberOfOutputPorts(); - if (sddp && outputPort<numInfoObj) - { - int extent[6]; - sddp->GetOutputInformation(outputPort)->Get(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT(),extent); - out->SetExtent(extent); - } - else - { - vtkWarningMacro( "Not enough output ports." ); - return; - } - this->AllocateScalars(out); + out->SetExtent(outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT())); + this->AllocateScalars(out, outInfo); } else { vtkImageData *out2 = vtkImageData::SafeDownCast(output); if (out2) { - // this needs to be fixed -Ken - vtkStreamingDemandDrivenPipeline *sddp = - vtkStreamingDemandDrivenPipeline::SafeDownCast(this->GetExecutive()); - int numInfoObj = sddp->GetNumberOfOutputPorts(); - if (sddp && outputPort<numInfoObj) - { - int extent[6]; - sddp->GetOutputInformation(outputPort)->Get(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT(),extent); - out2->SetExtent(extent); - } - else - { - vtkWarningMacro( "Not enough output ports." ); - return; - } + out2->SetExtent(outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT())); out2->AllocateScalars(VTK_FLOAT, 3); } } @@ -332,24 +304,21 @@ void vtkStructuredGridLIC2D::AllocateOutputData(vtkDataObject *output, //---------------------------------------------------------------------------- // Stolen from vtkImageData. Should be in vtkStructuredGrid. -void vtkStructuredGridLIC2D::AllocateScalars(vtkStructuredGrid *sg) +void vtkStructuredGridLIC2D::AllocateScalars(vtkStructuredGrid *sg, + vtkInformation *outInfo) { int newType = VTK_DOUBLE; int newNumComp = 1; - // basically allocate the scalars based on the - sg->GetProducerPort(); - if(vtkInformation* info = sg->GetPipelineInformation()) + vtkInformation *scalarInfo = vtkDataObject::GetActiveFieldInformation( + outInfo, + vtkDataObject::FIELD_ASSOCIATION_POINTS, vtkDataSetAttributes::SCALARS); + if (scalarInfo) { - vtkInformation *scalarInfo = vtkDataObject::GetActiveFieldInformation(info, - vtkDataObject::FIELD_ASSOCIATION_POINTS, vtkDataSetAttributes::SCALARS); - if (scalarInfo) + newType = scalarInfo->Get( vtkDataObject::FIELD_ARRAY_TYPE() ); + if ( scalarInfo->Has(vtkDataObject::FIELD_NUMBER_OF_COMPONENTS()) ) { - newType = scalarInfo->Get( vtkDataObject::FIELD_ARRAY_TYPE() ); - if ( scalarInfo->Has(vtkDataObject::FIELD_NUMBER_OF_COMPONENTS()) ) - { - newNumComp = scalarInfo->Get( vtkDataObject::FIELD_NUMBER_OF_COMPONENTS() ); - } + newNumComp = scalarInfo->Get( vtkDataObject::FIELD_NUMBER_OF_COMPONENTS() ); } } @@ -476,13 +445,13 @@ int vtkStructuredGridLIC2D::RequestData( vtkInformation * outInfo = outputVector->GetInformationObject(0); vtkStructuredGrid * output = vtkStructuredGrid::SafeDownCast( outInfo->Get(vtkDataObject::DATA_OBJECT())); - this->AllocateOutputData(output,0); + this->AllocateOutputData(output, outInfo); output->ShallowCopy(input); vtkInformation * outInfoTexture = outputVector->GetInformationObject(1); vtkImageData * outputTexture = vtkImageData::SafeDownCast( outInfoTexture->Get(vtkDataObject::DATA_OBJECT())); - this->AllocateOutputData(outputTexture,1); + this->AllocateOutputData(outputTexture, outInfoTexture); // Noise. vtkInformation *noiseInfo = inputVector[1]->GetInformationObject(0); diff --git a/Hybrid/vtkStructuredGridLIC2D.h b/Hybrid/vtkStructuredGridLIC2D.h index 169551a608d..c98c7916085 100644 --- a/Hybrid/vtkStructuredGridLIC2D.h +++ b/Hybrid/vtkStructuredGridLIC2D.h @@ -131,11 +131,11 @@ protected: // Description: // Stolen from vtkImageAlgorithm. Should be in vtkStructuredGridAlgorithm. void AllocateOutputData(vtkDataObject *output, - int outputPort); + vtkInformation *outInfo); // Description: // Stolen from vtkImageData. Should be in vtkStructuredGrid. - void AllocateScalars(vtkStructuredGrid *sg); + void AllocateScalars(vtkStructuredGrid *sg, vtkInformation *outInfo); // Description: // This is called by the superclass. diff --git a/Hybrid/vtkTransformToGrid.cxx b/Hybrid/vtkTransformToGrid.cxx index 31202e399ce..86d55d6d214 100644 --- a/Hybrid/vtkTransformToGrid.cxx +++ b/Hybrid/vtkTransformToGrid.cxx @@ -362,7 +362,7 @@ void vtkTransformToGrid::RequestData( grid->SetExtent( outInfo->Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT())); - grid->AllocateScalars(); + grid->AllocateScalars(outInfo); int *extent = grid->GetExtent(); double *gridPtr = (double *)grid->GetScalarPointerForExtent(extent); diff --git a/Hybrid/vtkVRMLImporter.cxx b/Hybrid/vtkVRMLImporter.cxx index 2beac11ae49..48987f81de9 100644 --- a/Hybrid/vtkVRMLImporter.cxx +++ b/Hybrid/vtkVRMLImporter.cxx @@ -5652,7 +5652,7 @@ vtkVRMLImporter::enterNode(const char *nodeType) { pmap = vtkPolyDataMapper::New(); vtkCubeSource *cube= vtkCubeSource::New(); - pmap->SetInput(cube->GetOutput()); + pmap->SetInputConnection(cube->GetOutputPort()); this->CurrentActor->SetMapper(pmap); pmap->Delete(); if (this->CurrentProperty) @@ -5675,7 +5675,7 @@ vtkVRMLImporter::enterNode(const char *nodeType) pmap = vtkPolyDataMapper::New(); vtkConeSource *cone= vtkConeSource::New(); cone->SetResolution(12); - pmap->SetInput(cone->GetOutput()); + pmap->SetInputConnection(cone->GetOutputPort()); this->CurrentActor->SetMapper(pmap); pmap->Delete(); if (this->CurrentProperty) @@ -5698,7 +5698,7 @@ vtkVRMLImporter::enterNode(const char *nodeType) pmap = vtkPolyDataMapper::New(); vtkCylinderSource *cyl= vtkCylinderSource::New(); cyl->SetResolution(12); - pmap->SetInput(cyl->GetOutput()); + pmap->SetInputConnection(cyl->GetOutputPort()); this->CurrentActor->SetMapper(pmap); pmap->Delete(); if (this->CurrentProperty) @@ -5786,7 +5786,7 @@ vtkVRMLImporter::enterNode(const char *nodeType) { pmap = vtkPolyDataMapper::New(); vtkSphereSource *sphere = vtkSphereSource::New(); - pmap->SetInput(sphere->GetOutput()); + pmap->SetInputConnection(sphere->GetOutputPort()); if (this->CurrentSource) { this->CurrentSource->Delete(); @@ -6257,7 +6257,7 @@ vtkVRMLImporter::exitField() pd->SetLines(cells); } - this->CurrentMapper->SetInput(pd); + this->CurrentMapper->SetInputData(pd); pd->Delete(); cells->Delete(); yylval.mfint32->Reset();this->DeleteObject(yylval.mfint32); @@ -6322,7 +6322,7 @@ vtkVRMLImporter::exitField() pd->SetVerts(cells); - this->CurrentMapper->SetInput(pd); + this->CurrentMapper->SetInputData(pd); pd->Delete(); cells->Delete(); } diff --git a/Hybrid/vtkVideoSource.cxx b/Hybrid/vtkVideoSource.cxx index 28aed25b839..4ec337a9b39 100644 --- a/Hybrid/vtkVideoSource.cxx +++ b/Hybrid/vtkVideoSource.cxx @@ -1004,9 +1004,12 @@ void vtkVideoSource::UnpackRasterLine(char *outPtr, char *rowPtr, int vtkVideoSource::RequestData( vtkInformation *vtkNotUsed(request), vtkInformationVector **vtkNotUsed(inputVector), - vtkInformationVector *vtkNotUsed(outputVector)) + vtkInformationVector *outputVector) { - vtkImageData *data = this->AllocateOutputData(this->GetOutput()); + vtkInformation* outInfo = outputVector->GetInformationObject(0); + vtkImageData *data = this->AllocateOutputData( + vtkImageData::GetData(outInfo), + outInfo); int i,j; int outputExtent[6]; // will later be clipped in Z to a single frame diff --git a/Hybrid/vtkX3DExporter.cxx b/Hybrid/vtkX3DExporter.cxx index 41bfd3a74b0..12db3eaf3c6 100644 --- a/Hybrid/vtkX3DExporter.cxx +++ b/Hybrid/vtkX3DExporter.cxx @@ -391,17 +391,20 @@ void vtkX3DExporter::WriteAnActor(vtkActor *anActor, // get the mappers input and matrix vtkCompositeDataSet* cd = vtkCompositeDataSet::SafeDownCast(dObj); + vtkAlgorithmOutput* dsProducer = 0; if (cd) { vtkCompositeDataGeometryFilter* gf = vtkCompositeDataGeometryFilter::New(); - gf->SetInput(cd); + gf->SetInputConnection(anActor->GetMapper()->GetInputConnection(0, 0)); gf->Update(); ds = gf->GetOutput(); gf->Delete(); + dsProducer = gf->GetOutputPort(); } else { ds = anActor->GetMapper()->GetInput(); + dsProducer = anActor->GetMapper()->GetInputConnection(0, 0); } if (!ds) @@ -413,7 +416,7 @@ void vtkX3DExporter::WriteAnActor(vtkActor *anActor, if ( ds->GetDataObjectType() != VTK_POLY_DATA ) { vtkSmartPointer<vtkGeometryFilter> gf = vtkSmartPointer<vtkGeometryFilter>::New(); - gf->SetInput(ds); + gf->SetInputConnection(dsProducer); gf->Update(); pd = gf->GetOutput(); } diff --git a/Hybrid/vtkXYPlotActor.cxx b/Hybrid/vtkXYPlotActor.cxx index 14b2ded2dfa..a8c24e2ec63 100644 --- a/Hybrid/vtkXYPlotActor.cxx +++ b/Hybrid/vtkXYPlotActor.cxx @@ -190,7 +190,7 @@ vtkXYPlotActor::vtkXYPlotActor() polys->InsertCellPoint(3); this->ChartBoxPolyData->SetPolys(polys); polys->Delete(); this->ChartBoxMapper = vtkPolyDataMapper2D::New(); - this->ChartBoxMapper->SetInput(this->ChartBoxPolyData); + this->ChartBoxMapper->SetInputData(this->ChartBoxPolyData); this->ChartBoxActor = vtkActor2D::New(); this->ChartBoxActor->SetMapper(this->ChartBoxMapper); // Box border @@ -206,7 +206,7 @@ vtkXYPlotActor::vtkXYPlotActor() lines->InsertCellPoint(0); this->ChartBorderPolyData->SetLines(lines); lines->Delete(); this->ChartBorderMapper = vtkPolyDataMapper2D::New(); - this->ChartBorderMapper->SetInput(this->ChartBorderPolyData); + this->ChartBorderMapper->SetInputData(this->ChartBorderPolyData); this->ChartBorderActor = vtkActor2D::New(); this->ChartBorderActor->SetMapper(this->ChartBorderMapper); @@ -230,7 +230,7 @@ vtkXYPlotActor::vtkXYPlotActor() points->Delete(); lines->Delete(); this->ReferenceLinesMapper = vtkPolyDataMapper2D::New(); - this->ReferenceLinesMapper->SetInput(this->ReferenceLinesPolyData); + this->ReferenceLinesMapper->SetInputData(this->ReferenceLinesPolyData); this->ReferenceLinesActor = vtkActor2D::New(); this->ReferenceLinesActor->SetMapper(this->ReferenceLinesMapper); @@ -1638,19 +1638,19 @@ void vtkXYPlotActor::CreatePlotData(int *pos, int *pos2, double xRange[2], { this->PlotData[i] = vtkPolyData::New(); this->PlotGlyph[i] = vtkGlyph2D::New(); - this->PlotGlyph[i]->SetInput(this->PlotData[i]); + this->PlotGlyph[i]->SetInputData(this->PlotData[i]); this->PlotGlyph[i]->SetScaleModeToDataScalingOff(); this->PlotAppend[i] = vtkAppendPolyData::New(); - this->PlotAppend[i]->AddInput(this->PlotData[i]); + this->PlotAppend[i]->AddInputData(this->PlotData[i]); if ( this->LegendActor->GetEntrySymbol(i) != NULL && this->LegendActor->GetEntrySymbol(i) != this->GlyphSource->GetOutput() ) { - this->PlotGlyph[i]->SetSource(this->LegendActor->GetEntrySymbol(i)); + this->PlotGlyph[i]->SetSourceData(this->LegendActor->GetEntrySymbol(i)); this->PlotGlyph[i]->SetScaleFactor(this->ComputeGlyphScale(i,pos,pos2)); - this->PlotAppend[i]->AddInput(this->PlotGlyph[i]->GetOutput()); + this->PlotAppend[i]->AddInputConnection(this->PlotGlyph[i]->GetOutputPort()); } this->PlotMapper[i] = vtkPolyDataMapper2D::New(); - this->PlotMapper[i]->SetInput(this->PlotAppend[i]->GetOutput()); + this->PlotMapper[i]->SetInputConnection(this->PlotAppend[i]->GetOutputPort()); this->PlotMapper[i]->ScalarVisibilityOff(); this->PlotActor[i] = vtkActor2D::New(); this->PlotActor[i]->SetMapper(this->PlotMapper[i]); diff --git a/IO/Testing/Cxx/TestArraySerialization.cxx b/IO/Testing/Cxx/TestArraySerialization.cxx index 576e5d9d65e..c326e077b9d 100644 --- a/IO/Testing/Cxx/TestArraySerialization.cxx +++ b/IO/Testing/Cxx/TestArraySerialization.cxx @@ -183,7 +183,7 @@ int TestArraySerialization(int vtkNotUsed(argc), char* vtkNotUsed(argv)[]) vtkNew<vtkArrayWriter> jw; jw->WriteToOutputStringOn(); - jw->SetInput(j1d.GetPointer()); + jw->SetInputData(j1d.GetPointer()); jw->Write(); vtkStdString js = jw->GetOutputString(); diff --git a/IO/Testing/Cxx/TestDataObjectIO.cxx b/IO/Testing/Cxx/TestDataObjectIO.cxx index 97b30770982..43dfcd42550 100644 --- a/IO/Testing/Cxx/TestDataObjectIO.cxx +++ b/IO/Testing/Cxx/TestDataObjectIO.cxx @@ -274,7 +274,7 @@ void InitializeData(vtkUnstructuredGrid* Data) { vtkCubeSource* const source = vtkCubeSource::New(); vtkDelaunay3D* const delaunay = vtkDelaunay3D::New(); - delaunay->AddInput(source->GetOutput()); + delaunay->AddInputConnection(source->GetOutputPort()); delaunay->Update(); Data->ShallowCopy(delaunay->GetOutput()); @@ -342,7 +342,7 @@ bool TestDataObjectSerialization() const char* const filename = output_data->GetClassName(); vtkGenericDataObjectWriter* const writer = vtkGenericDataObjectWriter::New(); - writer->SetInput(output_data); + writer->SetInputData(output_data); writer->SetFileName(filename); writer->Write(); writer->Delete(); diff --git a/IO/Testing/Cxx/TestDataObjectXMLIO.cxx b/IO/Testing/Cxx/TestDataObjectXMLIO.cxx index 604f9a96897..aba550f0583 100644 --- a/IO/Testing/Cxx/TestDataObjectXMLIO.cxx +++ b/IO/Testing/Cxx/TestDataObjectXMLIO.cxx @@ -86,7 +86,7 @@ void InitializeData(vtkUnstructuredGrid* Data) { vtkCubeSource* const source = vtkCubeSource::New(); vtkDelaunay3D* const delaunay = vtkDelaunay3D::New(); - delaunay->AddInput(source->GetOutput()); + delaunay->AddInputConnection(source->GetOutputPort()); delaunay->Update(); Data->ShallowCopy(delaunay->GetOutput()); @@ -115,7 +115,7 @@ bool TestDataObjectXMLSerialization() vtkXMLDataSetWriter* const writer = vtkXMLDataSetWriter::New(); - writer->SetInput(output_data); + writer->SetInputData(output_data); writer->SetFileName(filename); writer->Write(); writer->Delete(); diff --git a/IO/Testing/Cxx/TestHyperOctreeIO.cxx b/IO/Testing/Cxx/TestHyperOctreeIO.cxx index 81be86c069a..c2d58da6cb9 100644 --- a/IO/Testing/Cxx/TestHyperOctreeIO.cxx +++ b/IO/Testing/Cxx/TestHyperOctreeIO.cxx @@ -296,7 +296,7 @@ int TestHyperOctreeIO(int argc, char* argv[]) // Make sure we call SetExecutive right after the filter creation and // before the SetInput call. surface->SetExecutive(exec); - surface->SetInput(hds); + surface->SetInputData(hds); exec->Delete(); hds->Delete(); diff --git a/IO/Testing/Cxx/TestMySQLTableReadWrite.cxx b/IO/Testing/Cxx/TestMySQLTableReadWrite.cxx index b8073646f69..2e51056bb06 100644 --- a/IO/Testing/Cxx/TestMySQLTableReadWrite.cxx +++ b/IO/Testing/Cxx/TestMySQLTableReadWrite.cxx @@ -58,7 +58,7 @@ int TestMySQLTableReadWrite(int argc, char *argv[]) vtkSmartPointer<vtkTableToMySQLWriter> writerToTest = vtkSmartPointer<vtkTableToMySQLWriter>::New(); - writerToTest->SetInput(table); + writerToTest->SetInputData(table); writerToTest->SetDatabase(db); writerToTest->SetTableName("tableTest"); writerToTest->Update(); @@ -75,7 +75,7 @@ int TestMySQLTableReadWrite(int argc, char *argv[]) vtkSmartPointer<vtkTableWriter> tableFileWriter = vtkSmartPointer<vtkTableWriter>::New(); tableFileWriter->SetFileName("TestMySQLTableReadWrite.vtk"); - tableFileWriter->SetInput(readerToTest->GetOutput()); + tableFileWriter->SetInputConnection(readerToTest->GetOutputPort()); tableFileWriter->Update(); cerr << "verifying that it's the same as what we started with..."; diff --git a/IO/Testing/Cxx/TestNetCDFPOPReader.cxx b/IO/Testing/Cxx/TestNetCDFPOPReader.cxx index 2f060d7d3a2..5cde6323722 100644 --- a/IO/Testing/Cxx/TestNetCDFPOPReader.cxx +++ b/IO/Testing/Cxx/TestNetCDFPOPReader.cxx @@ -51,7 +51,7 @@ int TestNetCDFPOPReader( int argc, char *argv[] ) // Create a mapper. vtkPolyDataMapper* mapper = vtkPolyDataMapper::New(); - mapper->SetInput(geometryFilter->GetOutput()); + mapper->SetInputConnection(geometryFilter->GetOutputPort()); mapper->ScalarVisibilityOn(); // Create the actor. diff --git a/IO/Testing/Cxx/TestPLYReader.cxx b/IO/Testing/Cxx/TestPLYReader.cxx index 5acf944b9d0..26c81b8ee5b 100644 --- a/IO/Testing/Cxx/TestPLYReader.cxx +++ b/IO/Testing/Cxx/TestPLYReader.cxx @@ -43,7 +43,7 @@ int TestPLYReader( int argc, char *argv[] ) // Create a mapper. vtkPolyDataMapper* mapper = vtkPolyDataMapper::New(); - mapper->SetInput(reader->GetOutput()); + mapper->SetInputConnection(reader->GetOutputPort()); mapper->ScalarVisibilityOn(); // Create the actor. diff --git a/IO/Testing/Cxx/TestPostgreSQLTableReadWrite.cxx b/IO/Testing/Cxx/TestPostgreSQLTableReadWrite.cxx index 8eec91fa271..2245b500eb6 100644 --- a/IO/Testing/Cxx/TestPostgreSQLTableReadWrite.cxx +++ b/IO/Testing/Cxx/TestPostgreSQLTableReadWrite.cxx @@ -70,7 +70,7 @@ int TestPostgreSQLTableReadWrite(int argc, char *argv[]) vtkSmartPointer<vtkTableToPostgreSQLWriter> writerToTest = vtkSmartPointer<vtkTableToPostgreSQLWriter>::New(); - writerToTest->SetInput(table); + writerToTest->SetInputData(table); writerToTest->SetDatabase(db); writerToTest->SetTableName("tabletest"); writerToTest->Update(); @@ -87,7 +87,7 @@ int TestPostgreSQLTableReadWrite(int argc, char *argv[]) vtkSmartPointer<vtkTableWriter> tableFileWriter = vtkSmartPointer<vtkTableWriter>::New(); tableFileWriter->SetFileName("TestPostgreSQLTableReadWrite.vtk"); - tableFileWriter->SetInput(readerToTest->GetOutput()); + tableFileWriter->SetInputConnection(readerToTest->GetOutputPort()); tableFileWriter->Update(); cerr << "verifying that it's the same as what we started with..."; diff --git a/IO/Testing/Cxx/TestProStarReader.cxx b/IO/Testing/Cxx/TestProStarReader.cxx index c778561a488..7dfdab0f7f5 100644 --- a/IO/Testing/Cxx/TestProStarReader.cxx +++ b/IO/Testing/Cxx/TestProStarReader.cxx @@ -77,12 +77,12 @@ int TestProStarReader( int argc, char *argv[] ) // Convert to PolyData. vtkGeometryFilter* geometryFilter = vtkGeometryFilter::New(); - geometryFilter->SetInput(newGrid); + geometryFilter->SetInputData(newGrid); newGrid->Delete(); // Create a mapper. vtkPolyDataMapper* mapper = vtkPolyDataMapper::New(); - mapper->SetInput(geometryFilter->GetOutput()); + mapper->SetInputConnection(geometryFilter->GetOutputPort()); mapper->ScalarVisibilityOn(); // Create the actor. diff --git a/IO/Testing/Cxx/TestSQLiteTableReadWrite.cxx b/IO/Testing/Cxx/TestSQLiteTableReadWrite.cxx index a7c4038832e..4b06055f07b 100644 --- a/IO/Testing/Cxx/TestSQLiteTableReadWrite.cxx +++ b/IO/Testing/Cxx/TestSQLiteTableReadWrite.cxx @@ -56,7 +56,7 @@ int TestSQLiteTableReadWrite(int argc, char *argv[]) vtkSmartPointer<vtkTableToSQLiteWriter> writerToTest = vtkSmartPointer<vtkTableToSQLiteWriter>::New(); - writerToTest->SetInput(table); + writerToTest->SetInputData(table); writerToTest->SetDatabase(db); writerToTest->SetTableName("tableTest"); writerToTest->Update(); @@ -73,7 +73,7 @@ int TestSQLiteTableReadWrite(int argc, char *argv[]) vtkSmartPointer<vtkTableWriter> tableFileWriter = vtkSmartPointer<vtkTableWriter>::New(); tableFileWriter->SetFileName("TestSQLiteTableReadWrite.vtk"); - tableFileWriter->SetInput(readerToTest->GetOutput()); + tableFileWriter->SetInputConnection(readerToTest->GetOutputPort()); tableFileWriter->Update(); cerr << "verifying that it's the same as what we started with..."; diff --git a/IO/Testing/Cxx/TestTecplotReader.cxx b/IO/Testing/Cxx/TestTecplotReader.cxx index 3555e3ebe93..d59fbcad133 100644 --- a/IO/Testing/Cxx/TestTecplotReader.cxx +++ b/IO/Testing/Cxx/TestTecplotReader.cxx @@ -68,7 +68,7 @@ int TestTecplotReader( int argc, char *argv[] ) vtkSmartPointer<vtkPolyDataMapper> mapper = vtkSmartPointer<vtkPolyDataMapper>::New(); - mapper->SetInput(data); + mapper->SetInputData(data); mapper->ScalarVisibilityOn(); mapper->SetColorModeToMapScalars(); mapper->SetScalarRange(-0.3,0.3); @@ -97,7 +97,7 @@ int TestTecplotReader( int argc, char *argv[] ) vtkSmartPointer<vtkPolyDataMapper> mapper2 = vtkSmartPointer<vtkPolyDataMapper>::New(); - mapper2->SetInput(data2); + mapper2->SetInputData(data2); mapper2->ScalarVisibilityOn(); mapper2->SetColorModeToMapScalars(); mapper2->SetScalarRange(-0.3,0.3); @@ -126,7 +126,7 @@ int TestTecplotReader( int argc, char *argv[] ) vtkSmartPointer<vtkPolyDataMapper> mapper3 = vtkSmartPointer<vtkPolyDataMapper>::New(); - mapper3->SetInput(data3); + mapper3->SetInputData(data3); mapper3->ScalarVisibilityOn(); mapper3->SetColorModeToMapScalars(); mapper3->SetScalarRange(-0.3,0.3); diff --git a/IO/vtkBMPReader.cxx b/IO/vtkBMPReader.cxx index 9d4c3bb2f72..32188d1efae 100644 --- a/IO/vtkBMPReader.cxx +++ b/IO/vtkBMPReader.cxx @@ -514,11 +514,12 @@ void vtkBMPReaderUpdate2(vtkBMPReader *self, vtkImageData *data, OT *outPtr) //---------------------------------------------------------------------------- // This function reads a data from a file. The datas extent/axes // are assumed to be the same as the file extent/order. -void vtkBMPReader::ExecuteData(vtkDataObject *output) +void vtkBMPReader::ExecuteData(vtkDataObject *output, + vtkInformation* outInfo) { - vtkImageData *data = this->AllocateOutputData(output); + vtkImageData *data = this->AllocateOutputData(output, outInfo); - if (this->UpdateExtentIsEmpty(output)) + if (this->UpdateExtentIsEmpty(outInfo, output)) { return; } diff --git a/IO/vtkBMPReader.h b/IO/vtkBMPReader.h index 7b8e48caef5..aa0ae16414a 100644 --- a/IO/vtkBMPReader.h +++ b/IO/vtkBMPReader.h @@ -100,7 +100,7 @@ protected: virtual void ComputeDataIncrements(); virtual void ExecuteInformation(); - virtual void ExecuteData(vtkDataObject *out); + virtual void ExecuteData(vtkDataObject *out, vtkInformation* outInfo); private: vtkBMPReader(const vtkBMPReader&); // Not implemented. void operator=(const vtkBMPReader&); // Not implemented. diff --git a/IO/vtkCompositeDataReader.cxx b/IO/vtkCompositeDataReader.cxx index f543b05a87c..cadd0473cab 100644 --- a/IO/vtkCompositeDataReader.cxx +++ b/IO/vtkCompositeDataReader.cxx @@ -117,7 +117,9 @@ int vtkCompositeDataReader::RequestDataObject(vtkInformation *, !output->IsA(vtkDataObjectTypes::GetClassNameFromTypeId(output_type))) { output = vtkDataObjectTypes::NewDataObject(output_type); - output->SetPipelineInformation(outputVector->GetInformationObject(0)); + outputVector->GetInformationObject(0)->Set( + vtkDataObject::DATA_OBJECT(), + output); output->FastDelete(); } return 1; diff --git a/IO/vtkCompositeDataWriter.cxx b/IO/vtkCompositeDataWriter.cxx index dd6fb0610fd..495c9e2b397 100644 --- a/IO/vtkCompositeDataWriter.cxx +++ b/IO/vtkCompositeDataWriter.cxx @@ -181,7 +181,7 @@ bool vtkCompositeDataWriter::WriteBlock(ostream* fp, vtkDataObject* block) vtkGenericDataObjectWriter* writer = vtkGenericDataObjectWriter::New(); writer->WriteToOutputStringOn(); writer->SetFileType(this->FileType); - writer->SetInput(block); + writer->SetInputData(block); if (writer->Write()) { fp->write( diff --git a/IO/vtkDEMReader.cxx b/IO/vtkDEMReader.cxx index ce9e90215e2..aaa30cf4add 100644 --- a/IO/vtkDEMReader.cxx +++ b/IO/vtkDEMReader.cxx @@ -138,7 +138,7 @@ int vtkDEMReader::RequestData( output->SetExtent( outInfo->Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT())); - output->AllocateScalars(); + output->AllocateScalars(outInfo); if (!this->FileName) { diff --git a/IO/vtkDICOMImageReader.cxx b/IO/vtkDICOMImageReader.cxx index c9ad333ce79..9177c8d7ad8 100644 --- a/IO/vtkDICOMImageReader.cxx +++ b/IO/vtkDICOMImageReader.cxx @@ -247,9 +247,10 @@ void vtkDICOMImageReader::ExecuteInformation() } //---------------------------------------------------------------------------- -void vtkDICOMImageReader::ExecuteData(vtkDataObject *output) +void vtkDICOMImageReader::ExecuteData(vtkDataObject *output, + vtkInformation *outInfo) { - vtkImageData *data = this->AllocateOutputData(output); + vtkImageData *data = this->AllocateOutputData(output, outInfo); if (!this->FileName && this->DICOMFileNames->size() == 0) { diff --git a/IO/vtkDICOMImageReader.h b/IO/vtkDICOMImageReader.h index 1793bcc457b..ca037e9781b 100644 --- a/IO/vtkDICOMImageReader.h +++ b/IO/vtkDICOMImageReader.h @@ -183,7 +183,7 @@ protected: void SetupOutputInformation(int num_slices); virtual void ExecuteInformation(); - virtual void ExecuteData(vtkDataObject *out); + virtual void ExecuteData(vtkDataObject *out, vtkInformation *outInfo); // // Constructor diff --git a/IO/vtkDataSetReader.cxx b/IO/vtkDataSetReader.cxx index 8cd20dbcd1b..714f517c14f 100644 --- a/IO/vtkDataSetReader.cxx +++ b/IO/vtkDataSetReader.cxx @@ -216,21 +216,7 @@ int vtkDataSetReader::RequestData( preader->SetReadAllTCoords(this->GetReadAllTCoords()); preader->SetReadAllFields(this->GetReadAllFields()); preader->Update(); - // Can we use the old output? - if(!(output && strcmp(output->GetClassName(), "vtkStructuredPoints") == 0)) - { - // Hack to make sure that the object is not modified - // with SetNthOutput. Otherwise, extra executions occur. - vtkTimeStamp ts = this->MTime; - output = vtkStructuredPoints::New(); - this->GetExecutive()->SetOutputData(0, output); - output->Delete(); - this->MTime = ts; - } output->ShallowCopy(preader->GetOutput()); - output->GetPipelineInformation()->CopyEntry( - preader->GetOutput()->GetPipelineInformation(), - vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT()); preader->Delete(); return 1; } diff --git a/IO/vtkDataSetWriter.cxx b/IO/vtkDataSetWriter.cxx index 10e450199ce..35e26f10753 100644 --- a/IO/vtkDataSetWriter.cxx +++ b/IO/vtkDataSetWriter.cxx @@ -28,6 +28,7 @@ #include "vtkStructuredPointsWriter.h" #include "vtkUnstructuredGrid.h" #include "vtkUnstructuredGridWriter.h" +#include "vtkAlgorithmOutput.h" vtkStandardNewMacro(vtkDataSetWriter); @@ -35,43 +36,43 @@ void vtkDataSetWriter::WriteData() { int type; vtkDataWriter *writer; - vtkDataSet *input = vtkDataSet::SafeDownCast(this->GetInput()); + vtkAlgorithmOutput *input = this->GetInputConnection(0, 0); vtkDebugMacro(<<"Writing vtk dataset..."); - type = input->GetDataObjectType(); + type = this->GetInput()->GetDataObjectType(); if ( type == VTK_POLY_DATA ) { vtkPolyDataWriter *pwriter = vtkPolyDataWriter::New(); - pwriter->SetInput(static_cast<vtkPolyData*>(input)); + pwriter->SetInputConnection(input); writer = pwriter; } else if ( type == VTK_STRUCTURED_POINTS || type == VTK_IMAGE_DATA || type == VTK_UNIFORM_GRID) { vtkStructuredPointsWriter *spwriter = vtkStructuredPointsWriter::New(); - spwriter->SetInput(static_cast<vtkImageData*>(input)); + spwriter->SetInputConnection(input); writer = spwriter; } else if ( type == VTK_STRUCTURED_GRID ) { vtkStructuredGridWriter *sgwriter = vtkStructuredGridWriter::New(); - sgwriter->SetInput(static_cast<vtkStructuredGrid*>(input)); + sgwriter->SetInputConnection(input); writer = sgwriter; } else if ( type == VTK_UNSTRUCTURED_GRID ) { vtkUnstructuredGridWriter *ugwriter = vtkUnstructuredGridWriter::New(); - ugwriter->SetInput(static_cast<vtkUnstructuredGrid*>(input)); + ugwriter->SetInputConnection(input); writer = ugwriter; } else if ( type == VTK_RECTILINEAR_GRID ) { vtkRectilinearGridWriter *rgwriter = vtkRectilinearGridWriter::New(); - rgwriter->SetInput(static_cast<vtkRectilinearGrid*>(input)); + rgwriter->SetInputConnection(input); writer = rgwriter; } diff --git a/IO/vtkGESignaReader.cxx b/IO/vtkGESignaReader.cxx index c6683f01422..698ee6f9f32 100644 --- a/IO/vtkGESignaReader.cxx +++ b/IO/vtkGESignaReader.cxx @@ -477,9 +477,10 @@ void vtkGESignaReaderUpdate(vtkGESignaReader *self, vtkImageData *data, //---------------------------------------------------------------------------- // This function reads a data from a file. The datas extent/axes // are assumed to be the same as the file extent/order. -void vtkGESignaReader::ExecuteData(vtkDataObject *output) +void vtkGESignaReader::ExecuteData(vtkDataObject *output, + vtkInformation *outInfo) { - vtkImageData *data = this->AllocateOutputData(output); + vtkImageData *data = this->AllocateOutputData(output, outInfo); if (this->InternalFileName == NULL) { diff --git a/IO/vtkGESignaReader.h b/IO/vtkGESignaReader.h index ab151f5be7b..0927d967bdd 100644 --- a/IO/vtkGESignaReader.h +++ b/IO/vtkGESignaReader.h @@ -61,7 +61,7 @@ protected: ~vtkGESignaReader() {}; virtual void ExecuteInformation(); - virtual void ExecuteData(vtkDataObject *out); + virtual void ExecuteData(vtkDataObject *out, vtkInformation* outInfo); private: vtkGESignaReader(const vtkGESignaReader&); // Not implemented. diff --git a/IO/vtkGenericDataObjectReader.cxx b/IO/vtkGenericDataObjectReader.cxx index aaf216bcdb0..943960a5812 100644 --- a/IO/vtkGenericDataObjectReader.cxx +++ b/IO/vtkGenericDataObjectReader.cxx @@ -85,9 +85,6 @@ void vtkGenericDataObjectReader::ReadData(const char* DataClass, vtkDataObject* this->MTime = mtime; } Output->ShallowCopy(reader->GetOutput()); - Output->GetPipelineInformation()->CopyEntry( - reader->GetOutput()->GetPipelineInformation(), - vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT()); reader->Delete(); } @@ -168,8 +165,8 @@ int vtkGenericDataObjectReader::RequestDataObject( default: return 0; } - - output->SetPipelineInformation(info); + + info->Set(vtkDataObject::DATA_OBJECT(), output); output->Delete(); } diff --git a/IO/vtkGenericDataObjectWriter.cxx b/IO/vtkGenericDataObjectWriter.cxx index 22dc8c43d60..627074067a9 100644 --- a/IO/vtkGenericDataObjectWriter.cxx +++ b/IO/vtkGenericDataObjectWriter.cxx @@ -40,11 +40,11 @@ vtkStandardNewMacro(vtkGenericDataObjectWriter); -template<typename WriterT, typename DataT> -vtkDataWriter* CreateWriter(vtkDataObject* Data) +template<typename WriterT> +vtkDataWriter* CreateWriter(vtkAlgorithmOutput* input) { WriterT* const writer = WriterT::New(); - writer->SetInput(static_cast<DataT*>(Data)); + writer->SetInputConnection(input); return writer; } @@ -62,8 +62,8 @@ void vtkGenericDataObjectWriter::WriteData() vtkDataWriter* writer = 0; - vtkDataObject* const input = this->GetInput(); - switch(input->GetDataObjectType()) + vtkAlgorithmOutput* input = this->GetInputConnection(0, 0); + switch(this->GetInput()->GetDataObjectType()) { case VTK_COMPOSITE_DATA_SET: vtkErrorMacro(<< "Cannot write composite data set"); @@ -79,7 +79,7 @@ void vtkGenericDataObjectWriter::WriteData() return; case VTK_DIRECTED_GRAPH: case VTK_UNDIRECTED_GRAPH: - writer = CreateWriter<vtkGraphWriter, vtkGraph>(input); + writer = CreateWriter<vtkGraphWriter>(input); break; case VTK_HIERARCHICAL_DATA_SET: vtkErrorMacro(<< "Cannot write hierarchical data set"); @@ -88,12 +88,12 @@ void vtkGenericDataObjectWriter::WriteData() vtkErrorMacro(<< "Cannot write hyper octree"); return; case VTK_IMAGE_DATA: - writer = CreateWriter<vtkStructuredPointsWriter, vtkImageData>(input); + writer = CreateWriter<vtkStructuredPointsWriter>(input); break; case VTK_MULTIBLOCK_DATA_SET: case VTK_HIERARCHICAL_BOX_DATA_SET: case VTK_MULTIPIECE_DATA_SET: - writer = CreateWriter<vtkCompositeDataWriter, vtkCompositeDataSet>(input); + writer = CreateWriter<vtkCompositeDataWriter>(input); break; case VTK_MULTIGROUP_DATA_SET: vtkErrorMacro(<< "Cannot write multigroup data set"); @@ -105,22 +105,22 @@ void vtkGenericDataObjectWriter::WriteData() vtkErrorMacro(<< "Cannot write point set"); return; case VTK_POLY_DATA: - writer = CreateWriter<vtkPolyDataWriter, vtkPolyData>(input); + writer = CreateWriter<vtkPolyDataWriter>(input); break; case VTK_RECTILINEAR_GRID: - writer = CreateWriter<vtkRectilinearGridWriter, vtkRectilinearGrid>(input); + writer = CreateWriter<vtkRectilinearGridWriter>(input); break; case VTK_STRUCTURED_GRID: - writer = CreateWriter<vtkStructuredGridWriter, vtkStructuredGrid>(input); + writer = CreateWriter<vtkStructuredGridWriter>(input); break; case VTK_STRUCTURED_POINTS: - writer = CreateWriter<vtkStructuredPointsWriter, vtkStructuredPoints>(input); + writer = CreateWriter<vtkStructuredPointsWriter>(input); break; case VTK_TABLE: - writer = CreateWriter<vtkTableWriter, vtkTable>(input); + writer = CreateWriter<vtkTableWriter>(input); break; case VTK_TREE: - writer = CreateWriter<vtkTreeWriter, vtkTree>(input); + writer = CreateWriter<vtkTreeWriter>(input); break; case VTK_TEMPORAL_DATA_SET: vtkErrorMacro(<< "Cannot write temporal data set"); @@ -129,7 +129,7 @@ void vtkGenericDataObjectWriter::WriteData() vtkErrorMacro(<< "Cannot write uniform grid"); return; case VTK_UNSTRUCTURED_GRID: - writer = CreateWriter<vtkUnstructuredGridWriter, vtkUnstructuredGrid>(input); + writer = CreateWriter<vtkUnstructuredGridWriter>(input); break; } diff --git a/IO/vtkImageReader.cxx b/IO/vtkImageReader.cxx index 2072d3bf258..758eddd7e83 100644 --- a/IO/vtkImageReader.cxx +++ b/IO/vtkImageReader.cxx @@ -415,9 +415,10 @@ void vtkImageReaderUpdate1(vtkImageReader *self, vtkImageData *data, T *inPtr) //---------------------------------------------------------------------------- // This function reads a data from a file. The datas extent/axes // are assumed to be the same as the file extent/order. -void vtkImageReader::ExecuteData(vtkDataObject *output) +void vtkImageReader::ExecuteData(vtkDataObject *output, + vtkInformation *outInfo) { - vtkImageData *data = this->AllocateOutputData(output); + vtkImageData *data = this->AllocateOutputData(output, outInfo); void *ptr = NULL; int *ext; diff --git a/IO/vtkImageReader.h b/IO/vtkImageReader.h index 9f788ec3d81..2cb2015412c 100644 --- a/IO/vtkImageReader.h +++ b/IO/vtkImageReader.h @@ -97,7 +97,7 @@ protected: vtkInformationVector** inputVector, vtkInformationVector* outputVector); - void ExecuteData(vtkDataObject *data); + void ExecuteData(vtkDataObject *data, vtkInformation *outInfo); private: vtkImageReader(const vtkImageReader&); // Not implemented. void operator=(const vtkImageReader&); // Not implemented. diff --git a/IO/vtkImageReader2.cxx b/IO/vtkImageReader2.cxx index 6e33c4b4989..7dd44ca7167 100644 --- a/IO/vtkImageReader2.cxx +++ b/IO/vtkImageReader2.cxx @@ -802,9 +802,10 @@ void vtkImageReader2Update(vtkImageReader2 *self, vtkImageData *data, OT *outPtr //---------------------------------------------------------------------------- // This function reads a data from a file. The datas extent/axes // are assumed to be the same as the file extent/order. -void vtkImageReader2::ExecuteData(vtkDataObject *output) +void vtkImageReader2::ExecuteData(vtkDataObject *output, + vtkInformation *outInfo) { - vtkImageData *data = this->AllocateOutputData(output); + vtkImageData *data = this->AllocateOutputData(output, outInfo); void *ptr; int *ext; diff --git a/IO/vtkImageReader2.h b/IO/vtkImageReader2.h index 357a0216df7..0501d1add92 100644 --- a/IO/vtkImageReader2.h +++ b/IO/vtkImageReader2.h @@ -247,7 +247,7 @@ protected: vtkInformationVector** inputVector, vtkInformationVector* outputVector); virtual void ExecuteInformation(); - virtual void ExecuteData(vtkDataObject *data); + virtual void ExecuteData(vtkDataObject *data, vtkInformation *outInfo); virtual void ComputeDataIncrements(); private: vtkImageReader2(const vtkImageReader2&); // Not implemented. diff --git a/IO/vtkJPEGReader.cxx b/IO/vtkJPEGReader.cxx index 2532cba39fe..38797aa7a1b 100644 --- a/IO/vtkJPEGReader.cxx +++ b/IO/vtkJPEGReader.cxx @@ -268,9 +268,10 @@ void vtkJPEGReaderUpdate(vtkJPEGReader *self, vtkImageData *data, OT *outPtr) //---------------------------------------------------------------------------- // This function reads a data from a file. The datas extent/axes // are assumed to be the same as the file extent/order. -void vtkJPEGReader::ExecuteData(vtkDataObject *output) +void vtkJPEGReader::ExecuteData(vtkDataObject *output, + vtkInformation *outInfo) { - vtkImageData *data = this->AllocateOutputData(output); + vtkImageData *data = this->AllocateOutputData(output, outInfo); if (this->InternalFileName == NULL) { diff --git a/IO/vtkJPEGReader.h b/IO/vtkJPEGReader.h index 1c24767b828..2f213e9d8dc 100644 --- a/IO/vtkJPEGReader.h +++ b/IO/vtkJPEGReader.h @@ -56,7 +56,7 @@ protected: ~vtkJPEGReader() {}; virtual void ExecuteInformation(); - virtual void ExecuteData(vtkDataObject *out); + virtual void ExecuteData(vtkDataObject *out, vtkInformation *outInfo); private: vtkJPEGReader(const vtkJPEGReader&); // Not implemented. void operator=(const vtkJPEGReader&); // Not implemented. diff --git a/IO/vtkMINCImageReader.cxx b/IO/vtkMINCImageReader.cxx index 23ba9aa96df..56d89103e38 100644 --- a/IO/vtkMINCImageReader.cxx +++ b/IO/vtkMINCImageReader.cxx @@ -1127,9 +1127,10 @@ void vtkMINCImageReaderExecuteChunk( case VTK_UNSIGNED_CHAR: { typedef unsigned char VTK_TT; call; }; break //------------------------------------------------------------------------- -void vtkMINCImageReader::ExecuteData(vtkDataObject *output) +void vtkMINCImageReader::ExecuteData(vtkDataObject *output, + vtkInformation *outInfo) { - vtkImageData *data = this->AllocateOutputData(output); + vtkImageData *data = this->AllocateOutputData(output, outInfo); int scalarType = data->GetScalarType(); int scalarSize = data->GetScalarSize(); int numComponents = data->GetNumberOfScalarComponents(); diff --git a/IO/vtkMINCImageReader.h b/IO/vtkMINCImageReader.h index 5c8c80e943b..219e075fc47 100644 --- a/IO/vtkMINCImageReader.h +++ b/IO/vtkMINCImageReader.h @@ -178,7 +178,7 @@ protected: static int ConvertMINCTypeToVTKType(int minctype, int mincsigned); virtual void ExecuteInformation(); - virtual void ExecuteData(vtkDataObject *out); + virtual void ExecuteData(vtkDataObject *out, vtkInformation *outInfo); private: vtkMINCImageReader(const vtkMINCImageReader&); // Not implemented diff --git a/IO/vtkMetaImageReader.cxx b/IO/vtkMetaImageReader.cxx index 9c89fd0089e..0948cae3c63 100644 --- a/IO/vtkMetaImageReader.cxx +++ b/IO/vtkMetaImageReader.cxx @@ -204,10 +204,11 @@ void vtkMetaImageReader::ExecuteInformation() } -void vtkMetaImageReader::ExecuteData(vtkDataObject * output) +void vtkMetaImageReader::ExecuteData(vtkDataObject * output, + vtkInformation *outInfo) { - vtkImageData * data = this->AllocateOutputData(output); + vtkImageData * data = this->AllocateOutputData(output, outInfo); if(!this->FileName) { diff --git a/IO/vtkMetaImageReader.h b/IO/vtkMetaImageReader.h index 82a5af32a2d..9bcd2b18973 100644 --- a/IO/vtkMetaImageReader.h +++ b/IO/vtkMetaImageReader.h @@ -172,7 +172,7 @@ protected: { return vtkImageReader2::GetHeaderSize(); }*/ void ExecuteInformation(); - void ExecuteData(vtkDataObject *out); + void ExecuteData(vtkDataObject *out, vtkInformation *outInfo); virtual int RequestInformation(vtkInformation * request, vtkInformationVector ** inputVector, vtkInformationVector * outputVector); diff --git a/IO/vtkNetCDFCFReader.cxx b/IO/vtkNetCDFCFReader.cxx index 0e621421add..7a3e216103f 100644 --- a/IO/vtkNetCDFCFReader.cxx +++ b/IO/vtkNetCDFCFReader.cxx @@ -866,7 +866,7 @@ int vtkNetCDFCFReader::RequestDataObject( if (!output || !output->IsA("vtkImageData")) { output = vtkImageData::New(); - output->SetPipelineInformation(outInfo); + outInfo->Set(vtkDataObject::DATA_OBJECT(), output); output->Delete(); // Not really deleted. } } @@ -875,7 +875,7 @@ int vtkNetCDFCFReader::RequestDataObject( if (!output || !output->IsA("vtkRectilinearGrid")) { output = vtkRectilinearGrid::New(); - output->SetPipelineInformation(outInfo); + outInfo->Set(vtkDataObject::DATA_OBJECT(), output); output->Delete(); // Not really deleted. } } @@ -884,7 +884,7 @@ int vtkNetCDFCFReader::RequestDataObject( if (!output || !output->IsA("vtkStructuredGrid")) { output = vtkStructuredGrid::New(); - output->SetPipelineInformation(outInfo); + outInfo->Set(vtkDataObject::DATA_OBJECT(), output); output->Delete(); // Not really deleted. } } @@ -893,7 +893,7 @@ int vtkNetCDFCFReader::RequestDataObject( if (!output || !output->IsA("vtkUnstructuredGrid")) { output = vtkUnstructuredGrid::New(); - output->SetPipelineInformation(outInfo); + outInfo->Set(vtkDataObject::DATA_OBJECT(), output); output->Delete(); // Not really deleted. } } diff --git a/IO/vtkNetCDFReader.cxx b/IO/vtkNetCDFReader.cxx index 7dc3ff7a1c0..d3d4d196327 100644 --- a/IO/vtkNetCDFReader.cxx +++ b/IO/vtkNetCDFReader.cxx @@ -143,7 +143,7 @@ int vtkNetCDFReader::RequestDataObject( if (!output || !output->IsA("vtkImageData")) { output = vtkImageData::New(); - output->SetPipelineInformation(outInfo); + outInfo->Set(vtkDataObject::DATA_OBJECT(), output); output->Delete(); // Not really deleted. } diff --git a/IO/vtkPNGReader.cxx b/IO/vtkPNGReader.cxx index 39a4f5290b8..5648c5e9019 100644 --- a/IO/vtkPNGReader.cxx +++ b/IO/vtkPNGReader.cxx @@ -312,9 +312,10 @@ void vtkPNGReaderUpdate(vtkPNGReader *self, vtkImageData *data, OT *outPtr) //---------------------------------------------------------------------------- // This function reads a data from a file. The datas extent/axes // are assumed to be the same as the file extent/order. -void vtkPNGReader::ExecuteData(vtkDataObject *output) +void vtkPNGReader::ExecuteData(vtkDataObject *output, + vtkInformation *outInfo) { - vtkImageData *data = this->AllocateOutputData(output); + vtkImageData *data = this->AllocateOutputData(output, outInfo); if (this->InternalFileName == NULL) { diff --git a/IO/vtkPNGReader.h b/IO/vtkPNGReader.h index 60669976537..ed16bfac3c9 100644 --- a/IO/vtkPNGReader.h +++ b/IO/vtkPNGReader.h @@ -57,7 +57,7 @@ protected: ~vtkPNGReader() {}; virtual void ExecuteInformation(); - virtual void ExecuteData(vtkDataObject *out); + virtual void ExecuteData(vtkDataObject *out, vtkInformation *outInfo); private: vtkPNGReader(const vtkPNGReader&); // Not implemented. void operator=(const vtkPNGReader&); // Not implemented. diff --git a/IO/vtkSLCReader.cxx b/IO/vtkSLCReader.cxx index 0ea80a955ae..cd86d2c6c47 100644 --- a/IO/vtkSLCReader.cxx +++ b/IO/vtkSLCReader.cxx @@ -144,14 +144,10 @@ int vtkSLCReader::RequestInformation ( } // Reads an SLC file and creates a vtkStructuredPoints dataset. -void vtkSLCReader::ExecuteData(vtkDataObject* ) +void vtkSLCReader::ExecuteData(vtkDataObject *output_do, + vtkInformation *outInfo) { - vtkImageData *output = this->GetOutput(); - - output->SetExtent( - vtkStreamingDemandDrivenPipeline::GetWholeExtent( - this->GetOutputInformation(0))); - output->AllocateScalars(); + vtkImageData *output = this->AllocateOutputData(output_do, outInfo); if (!output->GetPointData()->GetScalars()) { diff --git a/IO/vtkSLCReader.h b/IO/vtkSLCReader.h index de032cc5434..4e6830181a4 100644 --- a/IO/vtkSLCReader.h +++ b/IO/vtkSLCReader.h @@ -62,7 +62,7 @@ protected: ~vtkSLCReader(); // Reads the file name and builds a vtkStructuredPoints dataset. - virtual void ExecuteData(vtkDataObject*); + virtual void ExecuteData(vtkDataObject*, vtkInformation*); virtual int RequestInformation(vtkInformation* request, vtkInformationVector** inputVector, diff --git a/IO/vtkTIFFReader.cxx b/IO/vtkTIFFReader.cxx index dcb51fbfb30..73d7c96278b 100644 --- a/IO/vtkTIFFReader.cxx +++ b/IO/vtkTIFFReader.cxx @@ -599,9 +599,10 @@ void vtkTIFFReaderUpdate(vtkTIFFReader *self, vtkTIFFReaderInternal *reader, //---------------------------------------------------------------------------- // This function reads a data from a file. The datas extent/axes // are assumed to be the same as the file extent/order. -void vtkTIFFReader::ExecuteData(vtkDataObject *output) +void vtkTIFFReader::ExecuteData(vtkDataObject *output, + vtkInformation *outInfo) { - vtkImageData *data = this->AllocateOutputData(output); + vtkImageData *data = this->AllocateOutputData(output, outInfo); vtkTIFFReaderInternal *reader = this->GetInternalImage(); if (this->InternalFileName == NULL) diff --git a/IO/vtkTIFFReader.h b/IO/vtkTIFFReader.h index 9b90f79dbc6..c97d365d1f3 100644 --- a/IO/vtkTIFFReader.h +++ b/IO/vtkTIFFReader.h @@ -129,7 +129,7 @@ protected: unsigned int GetFormat(); virtual void ExecuteInformation(); - virtual void ExecuteData(vtkDataObject *out); + virtual void ExecuteData(vtkDataObject *out, vtkInformation *outInfo); private: vtkTIFFReader(const vtkTIFFReader&); // Not implemented. diff --git a/IO/vtkVolume16Reader.cxx b/IO/vtkVolume16Reader.cxx index 48240bbd66b..125b5169760 100644 --- a/IO/vtkVolume16Reader.cxx +++ b/IO/vtkVolume16Reader.cxx @@ -154,7 +154,7 @@ int vtkVolume16Reader::RequestInformation( int vtkVolume16Reader::RequestData( vtkInformation *vtkNotUsed(request), vtkInformationVector **vtkNotUsed(inputVector), - vtkInformationVector *vtkNotUsed(outputVector)) + vtkInformationVector *outputVector) { int first, last; int *dim; @@ -162,7 +162,10 @@ int vtkVolume16Reader::RequestData( double Spacing[3]; double origin[3]; - vtkImageData *output = this->AllocateOutputData(this->GetOutput()); + vtkInformation* outInfo = outputVector->GetInformationObject(0); + vtkDataObject* output_do = outInfo->Get(vtkDataObject::DATA_OBJECT()); + vtkImageData *output = this->AllocateOutputData(output_do, + outInfo); vtkUnsignedShortArray *newScalars = vtkUnsignedShortArray::SafeDownCast(output->GetPointData()->GetScalars()); diff --git a/IO/vtkWriter.cxx b/IO/vtkWriter.cxx index 999777aebb4..df173d9ed23 100644 --- a/IO/vtkWriter.cxx +++ b/IO/vtkWriter.cxx @@ -40,22 +40,14 @@ vtkWriter::~vtkWriter() { } -void vtkWriter::SetInput(vtkDataObject *input) +void vtkWriter::SetInputData(vtkDataObject *input) { - this->SetInput(0, input); + this->SetInputData(0, input); } -void vtkWriter::SetInput(int index, vtkDataObject *input) +void vtkWriter::SetInputData(int index, vtkDataObject *input) { - if (input) - { - this->SetInputConnection(index, input->GetProducerPort()); - } - else - { - // Setting a NULL input remove the connection. - this->SetInputConnection(index, 0); - } + this->SetInputDataInternal(index, input); } vtkDataObject *vtkWriter::GetInput() diff --git a/IO/vtkWriter.h b/IO/vtkWriter.h index a86b75054cf..149fd2d9ecc 100644 --- a/IO/vtkWriter.h +++ b/IO/vtkWriter.h @@ -64,8 +64,8 @@ public: // Description: // Set/get the input to this writer. - void SetInput(vtkDataObject *input); - void SetInput(int index, vtkDataObject *input); + void SetInputData(vtkDataObject *input); + void SetInputData(int index, vtkDataObject *input); //BTX vtkDataObject *GetInput(); vtkDataObject *GetInput(int port); diff --git a/IO/vtkXMLCompositeDataWriter.cxx b/IO/vtkXMLCompositeDataWriter.cxx index 90d9b0e135b..b4ef3a02b09 100644 --- a/IO/vtkXMLCompositeDataWriter.cxx +++ b/IO/vtkXMLCompositeDataWriter.cxx @@ -420,7 +420,7 @@ void vtkXMLCompositeDataWriter::CreateWriters(vtkCompositeDataSet* hdInput) w->Delete(); } vtkXMLPolyDataWriter::SafeDownCast(this->Internal->Writers[i].GetPointer()) - ->SetInput(ds); + ->SetInputData(ds); break; case VTK_STRUCTURED_POINTS: case VTK_IMAGE_DATA: @@ -434,7 +434,7 @@ void vtkXMLCompositeDataWriter::CreateWriters(vtkCompositeDataSet* hdInput) w->Delete(); } vtkXMLImageDataWriter::SafeDownCast(this->Internal->Writers[i].GetPointer()) - ->SetInput(ds); + ->SetInputData(ds); break; case VTK_UNSTRUCTURED_GRID: if(!this->Internal->Writers[i].GetPointer() || @@ -446,7 +446,7 @@ void vtkXMLCompositeDataWriter::CreateWriters(vtkCompositeDataSet* hdInput) w->Delete(); } vtkXMLUnstructuredGridWriter::SafeDownCast( - this->Internal->Writers[i].GetPointer())->SetInput(ds); + this->Internal->Writers[i].GetPointer())->SetInputData(ds); break; case VTK_STRUCTURED_GRID: if(!this->Internal->Writers[i].GetPointer() || @@ -458,7 +458,7 @@ void vtkXMLCompositeDataWriter::CreateWriters(vtkCompositeDataSet* hdInput) w->Delete(); } vtkXMLStructuredGridWriter::SafeDownCast( - this->Internal->Writers[i].GetPointer())->SetInput(ds); + this->Internal->Writers[i].GetPointer())->SetInputData(ds); break; case VTK_RECTILINEAR_GRID: if(!this->Internal->Writers[i].GetPointer() || @@ -470,7 +470,7 @@ void vtkXMLCompositeDataWriter::CreateWriters(vtkCompositeDataSet* hdInput) w->Delete(); } vtkXMLRectilinearGridWriter::SafeDownCast( - this->Internal->Writers[i].GetPointer())->SetInput(ds); + this->Internal->Writers[i].GetPointer())->SetInputData(ds); break; default: this->Internal->Writers[i] = 0; diff --git a/IO/vtkXMLDataSetWriter.cxx b/IO/vtkXMLDataSetWriter.cxx index 37a3ae8033c..83a4eec4a52 100644 --- a/IO/vtkXMLDataSetWriter.cxx +++ b/IO/vtkXMLDataSetWriter.cxx @@ -30,6 +30,7 @@ #include "vtkXMLRectilinearGridWriter.h" #include "vtkXMLStructuredGridWriter.h" #include "vtkXMLUnstructuredGridWriter.h" +#include "vtkAlgorithmOutput.h" vtkStandardNewMacro(vtkXMLDataSetWriter); @@ -63,47 +64,47 @@ vtkDataSet* vtkXMLDataSetWriter::GetInput() //---------------------------------------------------------------------------- int vtkXMLDataSetWriter::WriteInternal() { - vtkDataSet* input = vtkDataSet::SafeDownCast(this->GetInput()); + vtkAlgorithmOutput* input = this->GetInputConnection(0, 0); vtkXMLWriter* writer = 0; // Create a writer based on the data set type. - switch (input->GetDataObjectType()) + switch (this->GetInput()->GetDataObjectType()) { case VTK_IMAGE_DATA: case VTK_STRUCTURED_POINTS: { vtkXMLImageDataWriter* w = vtkXMLImageDataWriter::New(); - w->SetInput(static_cast<vtkImageData*>(input)); + w->SetInputConnection(input); writer = w; } break; case VTK_STRUCTURED_GRID: { vtkXMLStructuredGridWriter* w = vtkXMLStructuredGridWriter::New(); - w->SetInput(static_cast<vtkStructuredGrid*>(input)); + w->SetInputConnection(input); writer = w; } break; case VTK_RECTILINEAR_GRID: { vtkXMLRectilinearGridWriter* w = vtkXMLRectilinearGridWriter::New(); - w->SetInput(static_cast<vtkRectilinearGrid*>(input)); + w->SetInputConnection(input); writer = w; } break; case VTK_UNSTRUCTURED_GRID: { vtkXMLUnstructuredGridWriter* w = vtkXMLUnstructuredGridWriter::New(); - w->SetInput(static_cast<vtkUnstructuredGrid*>(input)); + w->SetInputConnection(input); writer = w; } break; case VTK_POLY_DATA: { vtkXMLPolyDataWriter* w = vtkXMLPolyDataWriter::New(); - w->SetInput(static_cast<vtkPolyData*>(input)); + w->SetInputConnection(input); writer = w; } break; case VTK_HYPER_OCTREE: { vtkXMLHyperOctreeWriter* w = vtkXMLHyperOctreeWriter::New(); - w->SetInput(static_cast<vtkHyperOctree*>(input)); + w->SetInputConnection(input); writer = w; } break; } @@ -112,7 +113,7 @@ int vtkXMLDataSetWriter::WriteInternal() if(!writer) { vtkErrorMacro("Cannot write dataset type: " - << input->GetDataObjectType()); + << this->GetInput()->GetDataObjectType()); return 0; } diff --git a/IO/vtkXMLGenericDataObjectReader.cxx b/IO/vtkXMLGenericDataObjectReader.cxx index 103a3a640b6..58214698fb4 100644 --- a/IO/vtkXMLGenericDataObjectReader.cxx +++ b/IO/vtkXMLGenericDataObjectReader.cxx @@ -246,7 +246,7 @@ int vtkXMLGenericDataObjectReader::RequestDataObject( if(result) { vtkInformation* outInfo = outputVector->GetInformationObject(0); - output->SetPipelineInformation(outInfo); + outInfo->Set(vtkDataObject::DATA_OBJECT(), output); // outInfo->Set(vtkDataObject::DATA_OBJECT(),output); if(output!=0) diff --git a/IO/vtkXMLPDataSetWriter.cxx b/IO/vtkXMLPDataSetWriter.cxx index a219dbab4eb..f4cfa927e8b 100644 --- a/IO/vtkXMLPDataSetWriter.cxx +++ b/IO/vtkXMLPDataSetWriter.cxx @@ -56,41 +56,41 @@ vtkDataSet* vtkXMLPDataSetWriter::GetInput() //---------------------------------------------------------------------------- int vtkXMLPDataSetWriter::WriteInternal() { - vtkDataSet* input = this->GetInput(); + vtkAlgorithmOutput* input = this->GetInputConnection(0, 0); vtkXMLPDataWriter* writer = 0; // Create a writer based on the data set type. - switch (input->GetDataObjectType()) + switch (this->GetInput()->GetDataObjectType()) { case VTK_IMAGE_DATA: case VTK_STRUCTURED_POINTS: { vtkXMLPImageDataWriter* w = vtkXMLPImageDataWriter::New(); - w->SetInput(static_cast<vtkImageData*>(input)); + w->SetInputConnection(input); writer = w; } break; case VTK_STRUCTURED_GRID: { vtkXMLPStructuredGridWriter* w = vtkXMLPStructuredGridWriter::New(); - w->SetInput(static_cast<vtkStructuredGrid*>(input)); + w->SetInputConnection(input); writer = w; } break; case VTK_RECTILINEAR_GRID: { vtkXMLPRectilinearGridWriter* w = vtkXMLPRectilinearGridWriter::New(); - w->SetInput(static_cast<vtkRectilinearGrid*>(input)); + w->SetInputConnection(input); writer = w; } break; case VTK_UNSTRUCTURED_GRID: { vtkXMLPUnstructuredGridWriter* w = vtkXMLPUnstructuredGridWriter::New(); - w->SetInput(static_cast<vtkUnstructuredGrid*>(input)); + w->SetInputConnection(input); writer = w; } break; case VTK_POLY_DATA: { vtkXMLPPolyDataWriter* w = vtkXMLPPolyDataWriter::New(); - w->SetInput(static_cast<vtkPolyData*>(input)); + w->SetInputConnection(input); writer = w; } break; } @@ -99,7 +99,7 @@ int vtkXMLPDataSetWriter::WriteInternal() if(!writer) { vtkErrorMacro("Cannot write dataset type: " - << input->GetDataObjectType()); + << this->GetInput()->GetDataObjectType()); return 0; } diff --git a/IO/vtkXMLPImageDataWriter.cxx b/IO/vtkXMLPImageDataWriter.cxx index cc423f31d2e..c717f29051b 100644 --- a/IO/vtkXMLPImageDataWriter.cxx +++ b/IO/vtkXMLPImageDataWriter.cxx @@ -81,7 +81,7 @@ vtkXMLPImageDataWriter::CreateStructuredPieceWriter() { // Create the writer for the piece. vtkXMLImageDataWriter* pWriter = vtkXMLImageDataWriter::New(); - pWriter->SetInput(this->GetInput()); + pWriter->SetInputConnection(this->GetInputConnection(0, 0)); return pWriter; } diff --git a/IO/vtkXMLPPolyDataWriter.cxx b/IO/vtkXMLPPolyDataWriter.cxx index cbce8247405..9e8109eb681 100644 --- a/IO/vtkXMLPPolyDataWriter.cxx +++ b/IO/vtkXMLPPolyDataWriter.cxx @@ -61,7 +61,7 @@ vtkXMLPPolyDataWriter::CreateUnstructuredPieceWriter() { // Create the writer for the piece. vtkXMLPolyDataWriter* pWriter = vtkXMLPolyDataWriter::New(); - pWriter->SetInput(this->GetInput()); + pWriter->SetInputConnection(this->GetInputConnection(0, 0)); return pWriter; } diff --git a/IO/vtkXMLPRectilinearGridWriter.cxx b/IO/vtkXMLPRectilinearGridWriter.cxx index 145d1045a65..6c3460a760d 100644 --- a/IO/vtkXMLPRectilinearGridWriter.cxx +++ b/IO/vtkXMLPRectilinearGridWriter.cxx @@ -62,7 +62,7 @@ vtkXMLPRectilinearGridWriter::CreateStructuredPieceWriter() { // Create the writer for the piece. vtkXMLRectilinearGridWriter* pWriter = vtkXMLRectilinearGridWriter::New(); - pWriter->SetInput(this->GetInput()); + pWriter->SetInputConnection(this->GetInputConnection(0, 0)); return pWriter; } diff --git a/IO/vtkXMLPStructuredGridWriter.cxx b/IO/vtkXMLPStructuredGridWriter.cxx index 5363bddcdd4..808a260064c 100644 --- a/IO/vtkXMLPStructuredGridWriter.cxx +++ b/IO/vtkXMLPStructuredGridWriter.cxx @@ -63,7 +63,7 @@ vtkXMLPStructuredGridWriter::CreateStructuredPieceWriter() { // Create the writer for the piece. vtkXMLStructuredGridWriter* pWriter = vtkXMLStructuredGridWriter::New(); - pWriter->SetInput(this->GetInput()); + pWriter->SetInputConnection(this->GetInputConnection(0, 0)); return pWriter; } diff --git a/IO/vtkXMLPUnstructuredGridWriter.cxx b/IO/vtkXMLPUnstructuredGridWriter.cxx index dc22a47e980..7bbedbcfe1d 100644 --- a/IO/vtkXMLPUnstructuredGridWriter.cxx +++ b/IO/vtkXMLPUnstructuredGridWriter.cxx @@ -61,7 +61,7 @@ vtkXMLPUnstructuredGridWriter::CreateUnstructuredPieceWriter() { // Create the writer for the piece. vtkXMLUnstructuredGridWriter* pWriter = vtkXMLUnstructuredGridWriter::New(); - pWriter->SetInput(this->GetInput()); + pWriter->SetInputConnection(this->GetInputConnection(0, 0)); return pWriter; } diff --git a/IO/vtkXMLWriter.cxx b/IO/vtkXMLWriter.cxx index ae47c6c95fc..631b5c6c828 100644 --- a/IO/vtkXMLWriter.cxx +++ b/IO/vtkXMLWriter.cxx @@ -365,23 +365,15 @@ void vtkXMLWriter::PrintSelf(ostream& os, vtkIndent indent) } //---------------------------------------------------------------------------- -void vtkXMLWriter::SetInput(vtkDataObject* input) +void vtkXMLWriter::SetInputData(vtkDataObject* input) { - this->SetInput(0, input); + this->SetInputData(0, input); } //---------------------------------------------------------------------------- -void vtkXMLWriter::SetInput(int index, vtkDataObject* input) +void vtkXMLWriter::SetInputData(int index, vtkDataObject* input) { - if(input) - { - this->SetInputConnection(index, input->GetProducerPort()); - } - else - { - // Setting a NULL input removes the connection. - this->SetInputConnection(index, 0); - } + this->SetInputDataInternal(index, input); } //---------------------------------------------------------------------------- diff --git a/IO/vtkXMLWriter.h b/IO/vtkXMLWriter.h index ab5ffa78052..63c62284e0c 100644 --- a/IO/vtkXMLWriter.h +++ b/IO/vtkXMLWriter.h @@ -159,10 +159,11 @@ public: vtkBooleanMacro(EncodeAppendedData, int); // Description: - // Set/Get an input of this algorithm. You should not override these - // methods because they are not the only way to connect a pipeline - void SetInput(vtkDataObject *); - void SetInput(int, vtkDataObject*); + // Assign a data object as input. Note that this method does not + // establish a pipeline connection. Use SetInputConnection() to + // setup a pipeline connection. + void SetInputData(vtkDataObject *); + void SetInputData(int, vtkDataObject*); vtkDataObject *GetInput(int port); vtkDataObject *GetInput() { return this->GetInput(0); }; diff --git a/IO/vtkXMLWriterC.cxx b/IO/vtkXMLWriterC.cxx index ee3d9cb90ea..b75209a0cff 100644 --- a/IO/vtkXMLWriterC.cxx +++ b/IO/vtkXMLWriterC.cxx @@ -139,7 +139,7 @@ void vtkXMLWriterC_SetDataObjectType(vtkXMLWriterC* self, int objType) // Set the data object as input to the writer. if(self->Writer && self->DataObject) { - self->Writer->SetInput(self->DataObject); + self->Writer->SetInputData(self->DataObject); } else { diff --git a/Imaging/Testing/Cxx/FastSplatter.cxx b/Imaging/Testing/Cxx/FastSplatter.cxx index 4f9dc0ff926..a99fae5b761 100644 --- a/Imaging/Testing/Cxx/FastSplatter.cxx +++ b/Imaging/Testing/Cxx/FastSplatter.cxx @@ -86,11 +86,11 @@ int FastSplatter(int argc, char *argv[]) SplatPoints->SetPoints(Points); VTK_CREATE(vtkFastSplatter, splatter); - splatter->SetInput( SplatPoints ); + splatter->SetInputData( SplatPoints ); splatter->SetOutputDimensions( 2*SPLAT_IMAGE_SIZE, 2*SPLAT_IMAGE_SIZE, 1 ); - splatter->SetInput(1, SplatImage ); + splatter->SetInputData(1, SplatImage ); // The image viewers and writers are only happy with unsigned char // images. This will convert the floats into that format. @@ -98,7 +98,7 @@ int FastSplatter(int argc, char *argv[]) resultScale->SetOutputScalarTypeToUnsignedChar(); resultScale->SetShift(0); resultScale->SetScale(255); - resultScale->SetInput( splatter->GetOutput() ); + resultScale->SetInputConnection( splatter->GetOutputPort() ); splatter->Update(); resultScale->Update(); @@ -108,7 +108,7 @@ int FastSplatter(int argc, char *argv[]) // vtkImageMapper, vtkRenderer, and vtkRenderWindow. All you need // to supply is the interactor and hooray, Bob's your uncle. VTK_CREATE(vtkImageViewer2, ImageViewer); - ImageViewer->SetInput( resultScale->GetOutput() ); + ImageViewer->SetInputConnection( resultScale->GetOutputPort() ); ImageViewer->SetColorLevel(127); ImageViewer->SetColorWindow(255); diff --git a/Imaging/Testing/Cxx/ImageWeightedSum.cxx b/Imaging/Testing/Cxx/ImageWeightedSum.cxx index e42f29a94cd..f55dce77ce7 100644 --- a/Imaging/Testing/Cxx/ImageWeightedSum.cxx +++ b/Imaging/Testing/Cxx/ImageWeightedSum.cxx @@ -72,8 +72,8 @@ int ImageWeightedSum(int argc, char *argv[]) // Substract the original image vtkImageMathematics *math = vtkImageMathematics::New(); math->SetOperationToSubtract(); - math->SetInput1( reader->GetOutput() ); - math->SetInput2( sum->GetOutput() ); + math->SetInputConnection( 0, reader->GetOutputPort() ); + math->SetInputConnection( 1, sum->GetOutputPort() ); math->Update(); math->GetOutput()->GetScalarRange( range ); @@ -99,8 +99,8 @@ int ImageWeightedSum(int argc, char *argv[]) sum->AddInputConnection( reader->GetOutputPort() ); sum->AddInputConnection( shift->GetOutputPort() ); - math->SetInput1( shift->GetOutput() ); - math->SetInput2( sum->GetOutput() ); + math->SetInputConnection( 0, shift->GetOutputPort() ); + math->SetInputConnection( 1, sum->GetOutputPort() ); //math->Update(); //math->GetOutput()->GetScalarRange( range ); diff --git a/Imaging/vtkBooleanTexture.cxx b/Imaging/vtkBooleanTexture.cxx index 9589c37dae0..6a8aeb7142a 100644 --- a/Imaging/vtkBooleanTexture.cxx +++ b/Imaging/vtkBooleanTexture.cxx @@ -64,11 +64,13 @@ int vtkBooleanTexture::RequestInformation ( return 1; } -void vtkBooleanTexture::ExecuteData(vtkDataObject *outp) +void vtkBooleanTexture::ExecuteData(vtkDataObject *outp, + vtkInformation* outInfo) { int i, j; int midILower, midJLower, midIUpper, midJUpper; - vtkImageData *output = this->AllocateOutputData(outp); + vtkImageData *output = this->AllocateOutputData( + outp, outInfo); vtkUnsignedCharArray *newScalars = vtkUnsignedCharArray::SafeDownCast(output->GetPointData()->GetScalars()); diff --git a/Imaging/vtkBooleanTexture.h b/Imaging/vtkBooleanTexture.h index 3ba866e9e81..d91db827050 100644 --- a/Imaging/vtkBooleanTexture.h +++ b/Imaging/vtkBooleanTexture.h @@ -116,7 +116,7 @@ protected: ~vtkBooleanTexture() {}; virtual int RequestInformation (vtkInformation *, vtkInformationVector**, vtkInformationVector *); - virtual void ExecuteData(vtkDataObject *data); + virtual void ExecuteData(vtkDataObject *data, vtkInformation* outInfo); int XSize; int YSize; diff --git a/Imaging/vtkGaussianSplatter.cxx b/Imaging/vtkGaussianSplatter.cxx index 4370677249f..9ef37b2c90d 100644 --- a/Imaging/vtkGaussianSplatter.cxx +++ b/Imaging/vtkGaussianSplatter.cxx @@ -115,7 +115,7 @@ int vtkGaussianSplatter::RequestData( output->SetExtent( outInfo->Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT())); - output->AllocateScalars(); + output->AllocateScalars(outInfo); vtkIdType numPts, numNewPts, ptId, idx, i; int j, k; diff --git a/Imaging/vtkImageAccumulate.cxx b/Imaging/vtkImageAccumulate.cxx index 517a8084836..579c24da121 100644 --- a/Imaging/vtkImageAccumulate.cxx +++ b/Imaging/vtkImageAccumulate.cxx @@ -105,9 +105,9 @@ void vtkImageAccumulate::GetComponentExtent(int extent[6]) //---------------------------------------------------------------------------- -void vtkImageAccumulate::SetStencil(vtkImageStencilData *stencil) +void vtkImageAccumulate::SetStencilData(vtkImageStencilData *stencil) { - this->SetInput(1, stencil); + this->SetInputData(1, stencil); } @@ -287,7 +287,7 @@ int vtkImageAccumulate::RequestData( // We need to allocate our own scalars since we are overriding // the superclasses "Execute()" method. outData->SetExtent(outInfo->Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT())); - outData->AllocateScalars(); + outData->AllocateScalars(outInfo); vtkDataArray *inArray = this->GetInputArrayToProcess(0,inputVector); inPtr = inData->GetArrayPointerForExtent(inArray, uExt); diff --git a/Imaging/vtkImageAccumulate.h b/Imaging/vtkImageAccumulate.h index 1fbd51c9dab..bf58b7d9d7a 100644 --- a/Imaging/vtkImageAccumulate.h +++ b/Imaging/vtkImageAccumulate.h @@ -88,7 +88,7 @@ public: // Backcompatible methods. // It set and get the stencil on input port 1. // Initial value is NULL. - void SetStencil(vtkImageStencilData *stencil); + void SetStencilData(vtkImageStencilData *stencil); vtkImageStencilData *GetStencil(); // Description: diff --git a/Imaging/vtkImageAppend.cxx b/Imaging/vtkImageAppend.cxx index 975fe63ed21..3f0bf7307da 100644 --- a/Imaging/vtkImageAppend.cxx +++ b/Imaging/vtkImageAppend.cxx @@ -72,10 +72,9 @@ void vtkImageAppend::ReplaceNthInputConnection(int idx, // The default vtkImageAlgorithm semantics are that SetInput() puts // each input on a different port, we want all the image inputs to // go on the first port. -void vtkImageAppend::SetInput(int idx, vtkDataObject *input) +void vtkImageAppend::SetInputData(int idx, vtkDataObject *input) { - // Ask the superclass to connect the input. - this->SetNthInputConnection(0, idx, (input ? input->GetProducerPort() : 0)); + this->SetInputDataInternal(idx, input); } //---------------------------------------------------------------------------- diff --git a/Imaging/vtkImageAppend.h b/Imaging/vtkImageAppend.h index 1eb4da7be0f..7209eef4af9 100644 --- a/Imaging/vtkImageAppend.h +++ b/Imaging/vtkImageAppend.h @@ -44,12 +44,11 @@ public: virtual void ReplaceNthInputConnection(int idx, vtkAlgorithmOutput* input); // Description: - // Set an Input of this filter. This method is only for support of - // old-style pipeline connections. When writing new code you should - // use SetInputConnection(), AddInputConnection(), and - // ReplaceNthInputConnection() instead. - void SetInput(int num, vtkDataObject *input); - void SetInput(vtkDataObject *input) { this->SetInput(0, input); }; + // Assign a data object as input. Note that this method does not + // establish a pipeline connection. Use SetInputConnection() to + // setup a pipeline connection. + void SetInputData(int num, vtkDataObject *input); + void SetInputData(vtkDataObject *input) { this->SetInputData(0, input); }; // Description: // Get one input to this filter. This method is only for support of diff --git a/Imaging/vtkImageAppendComponents.cxx b/Imaging/vtkImageAppendComponents.cxx index 700efff556d..2b5fb1f52c9 100644 --- a/Imaging/vtkImageAppendComponents.cxx +++ b/Imaging/vtkImageAppendComponents.cxx @@ -53,10 +53,9 @@ void vtkImageAppendComponents::ReplaceNthInputConnection(int idx, // The default vtkImageAlgorithm semantics are that SetInput() puts // each input on a different port, we want all the image inputs to // go on the first port. -void vtkImageAppendComponents::SetInput(int idx, vtkDataObject *input) +void vtkImageAppendComponents::SetInputData(int idx, vtkDataObject *input) { - // Ask the superclass to connect the input. - this->SetNthInputConnection(0, idx, (input ? input->GetProducerPort() : 0)); + this->SetInputDataInternal(idx, input); } //---------------------------------------------------------------------------- diff --git a/Imaging/vtkImageAppendComponents.h b/Imaging/vtkImageAppendComponents.h index 8c7e7ce7c75..c63cfcb7e3e 100644 --- a/Imaging/vtkImageAppendComponents.h +++ b/Imaging/vtkImageAppendComponents.h @@ -41,12 +41,11 @@ public: virtual void ReplaceNthInputConnection(int idx, vtkAlgorithmOutput* input); // Description: - // Set an Input of this filter. This method is only for support of - // old-style pipeline connections. When writing new code you should - // use SetInputConnection(), AddInputConnection(), and - // ReplaceNthInputConnection() instead. - void SetInput(int num, vtkDataObject *input); - void SetInput(vtkDataObject *input) { this->SetInput(0, input); }; + // Assign a data object as input. Note that this method does not + // establish a pipeline connection. Use SetInputConnection() to + // setup a pipeline connection. + void SetInputData(int num, vtkDataObject *input); + void SetInputData(vtkDataObject *input) { this->SetInputData(0, input); }; // Description: // Get one input to this filter. This method is only for support of diff --git a/Imaging/vtkImageBlend.cxx b/Imaging/vtkImageBlend.cxx index 054448c818d..fd6dcb6c412 100644 --- a/Imaging/vtkImageBlend.cxx +++ b/Imaging/vtkImageBlend.cxx @@ -78,10 +78,9 @@ void vtkImageBlend::ReplaceNthInputConnection(int idx, // The default vtkImageAlgorithm semantics are that SetInput() puts // each input on a different port, we want all the image inputs to // go on the first port. -void vtkImageBlend::SetInput(int idx, vtkDataObject *input) +void vtkImageBlend::SetInputData(int idx, vtkDataObject *input) { - // Ask the superclass to connect the input. - this->SetNthInputConnection(0, idx, (input ? input->GetProducerPort() : 0)); + this->SetInputDataInternal(idx, input); } //---------------------------------------------------------------------------- @@ -96,11 +95,9 @@ vtkDataObject *vtkImageBlend::GetInput(int idx) } //---------------------------------------------------------------------------- -void vtkImageBlend::SetStencil(vtkImageStencilData *stencil) +void vtkImageBlend::SetStencilData(vtkImageStencilData *stencil) { - // if stencil is null, then set the input port to null - this->SetNthInputConnection(1, 0, - (stencil ? stencil->GetProducerPort() : 0)); + this->SetInputDataInternal(1, stencil); } diff --git a/Imaging/vtkImageBlend.h b/Imaging/vtkImageBlend.h index 2dcdeb1859a..a7b4f846557 100644 --- a/Imaging/vtkImageBlend.h +++ b/Imaging/vtkImageBlend.h @@ -94,12 +94,11 @@ public: virtual void ReplaceNthInputConnection(int idx, vtkAlgorithmOutput* input); // Description: - // Set an Input of this filter. This method is only for support of - // old-style pipeline connections. When writing new code you should - // use SetInputConnection(), AddInputConnection(), and - // ReplaceNthInputConnection() instead. - void SetInput(int num, vtkDataObject *input); - void SetInput(vtkDataObject *input) { this->SetInput(0, input); }; + // Assign a data object as input. Note that this method does not + // establish a pipeline connection. Use SetInputConnection() to + // setup a pipeline connection. + void SetInputData(int num, vtkDataObject *input); + void SetInputData(vtkDataObject *input) { this->SetInputData(0, input); }; // Description: // Get one input to this filter. This method is only for support of @@ -122,7 +121,7 @@ public: // Description: // Set a stencil to apply when blending the data. - void SetStencil(vtkImageStencilData *stencil); + void SetStencilData(vtkImageStencilData *stencil); vtkImageStencilData *GetStencil(); // Description: diff --git a/Imaging/vtkImageCanvasSource2D.cxx b/Imaging/vtkImageCanvasSource2D.cxx index d27532a488c..0a56d819bd9 100644 --- a/Imaging/vtkImageCanvasSource2D.cxx +++ b/Imaging/vtkImageCanvasSource2D.cxx @@ -167,7 +167,7 @@ void vtkImageCanvasSource2D::DrawImage(int x0, int y0, } vtkImageClip* clip = vtkImageClip::New(); - clip->SetInput(image); + clip->SetInputData(image); int *extent; int ext[6]; @@ -1531,7 +1531,9 @@ void vtkImageCanvasSource2D::SetExtent(int xMin, int xMax, { this->Modified(); this->ImageData->SetExtent(this->WholeExtent); - this->ImageData->AllocateScalars(); + this->ImageData->AllocateScalars( + this->ImageData->GetScalarType(), + this->ImageData->GetNumberOfScalarComponents()); } } diff --git a/Imaging/vtkImageChangeInformation.cxx b/Imaging/vtkImageChangeInformation.cxx index 1abdd239adc..dd18a337155 100644 --- a/Imaging/vtkImageChangeInformation.cxx +++ b/Imaging/vtkImageChangeInformation.cxx @@ -47,9 +47,9 @@ vtkImageChangeInformation::vtkImageChangeInformation() } // Specify a source object at a specified table location. -void vtkImageChangeInformation::SetInformationInput(vtkImageData *pd) +void vtkImageChangeInformation::SetInformationInputData(vtkImageData *pd) { - this->SetInput(1, pd); + this->SetInputData(1, pd); } // Get a pointer to a source object at a specified table location. diff --git a/Imaging/vtkImageChangeInformation.h b/Imaging/vtkImageChangeInformation.h index d1d4e67c5c4..674ee7a10a7 100644 --- a/Imaging/vtkImageChangeInformation.h +++ b/Imaging/vtkImageChangeInformation.h @@ -35,7 +35,7 @@ public: // Description: // Copy the information from another data set. By default, // the information is copied from the input. - virtual void SetInformationInput(vtkImageData*); + virtual void SetInformationInputData(vtkImageData*); virtual vtkImageData *GetInformationInput(); // Description: diff --git a/Imaging/vtkImageCheckerboard.h b/Imaging/vtkImageCheckerboard.h index e0826c280e9..118adf1268a 100644 --- a/Imaging/vtkImageCheckerboard.h +++ b/Imaging/vtkImageCheckerboard.h @@ -40,8 +40,8 @@ public: // Description: // Set the two inputs to this filter - virtual void SetInput1(vtkDataObject *in) { this->SetInput(0,in); } - virtual void SetInput2(vtkDataObject *in) { this->SetInput(1,in); } + virtual void SetInput1Data(vtkDataObject *in) { this->SetInputData(0,in); } + virtual void SetInput2Data(vtkDataObject *in) { this->SetInputData(1,in); } protected: vtkImageCheckerboard(); diff --git a/Imaging/vtkImageCityBlockDistance.cxx b/Imaging/vtkImageCityBlockDistance.cxx index 50094bf3e13..734024fa10e 100644 --- a/Imaging/vtkImageCityBlockDistance.cxx +++ b/Imaging/vtkImageCityBlockDistance.cxx @@ -31,7 +31,8 @@ vtkImageCityBlockDistance::vtkImageCityBlockDistance() //---------------------------------------------------------------------------- void vtkImageCityBlockDistance::AllocateOutputScalars(vtkImageData *outData, int* uExt, - int* wholeExtent) + int* wholeExtent, + vtkInformation* outInfo) { int updateExtent[6], idx; @@ -42,7 +43,7 @@ void vtkImageCityBlockDistance::AllocateOutputScalars(vtkImageData *outData, updateExtent[idx*2+1] = wholeExtent[idx*2+1]; } outData->SetExtent(updateExtent); - outData->AllocateScalars(); + outData->AllocateScalars(outInfo); } @@ -81,7 +82,7 @@ int vtkImageCityBlockDistance::IterativeRequestData( int *uExt = outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT()); int *wExt = outInfo->Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT()); - this->AllocateOutputScalars(outData, uExt, wExt); + this->AllocateOutputScalars(outData, uExt, wExt, outInfo); short *inPtr0, *inPtr1, *inPtr2, *inPtrC; short *outPtr0, *outPtr1, *outPtr2, *outPtrC; diff --git a/Imaging/vtkImageCityBlockDistance.h b/Imaging/vtkImageCityBlockDistance.h index 9060cffdb54..d48882f91f6 100644 --- a/Imaging/vtkImageCityBlockDistance.h +++ b/Imaging/vtkImageCityBlockDistance.h @@ -50,7 +50,8 @@ protected: void AllocateOutputScalars(vtkImageData *outData, int* updateExtent, - int* wholeExtent); + int* wholeExtent, + vtkInformation* outInfo); private: vtkImageCityBlockDistance(const vtkImageCityBlockDistance&); // Not implemented. diff --git a/Imaging/vtkImageCorrelation.h b/Imaging/vtkImageCorrelation.h index 403f03a543c..f18bdd0218a 100644 --- a/Imaging/vtkImageCorrelation.h +++ b/Imaging/vtkImageCorrelation.h @@ -43,11 +43,11 @@ public: // Description: // Set the input image. - virtual void SetInput1(vtkDataObject *in) { this->SetInput(0,in); } + virtual void SetInput1Data(vtkDataObject *in) { this->SetInputData(0,in); } // Description: // Set the correlation kernel. - virtual void SetInput2(vtkDataObject *in) { this->SetInput(1,in); } + virtual void SetInput2Data(vtkDataObject *in) { this->SetInputData(1,in); } protected: vtkImageCorrelation(); diff --git a/Imaging/vtkImageDataStreamer.cxx b/Imaging/vtkImageDataStreamer.cxx index 112cc1e25b2..0cbf5d417e4 100644 --- a/Imaging/vtkImageDataStreamer.cxx +++ b/Imaging/vtkImageDataStreamer.cxx @@ -110,7 +110,7 @@ int vtkImageDataStreamer::ProcessRequest(vtkInformation* request, { // Tell the pipeline to start looping. request->Set(vtkStreamingDemandDrivenPipeline::CONTINUE_EXECUTING(), 1); - this->AllocateOutputData(output); + this->AllocateOutputData(output, outInfo); } // actually copy the data diff --git a/Imaging/vtkImageDifference.h b/Imaging/vtkImageDifference.h index 87a0caaf61c..fbc8cd1f0b6 100644 --- a/Imaging/vtkImageDifference.h +++ b/Imaging/vtkImageDifference.h @@ -45,7 +45,11 @@ public: // Description: // Specify the Image to compare the input to. - void SetImage(vtkDataObject *image) {this->SetInput(1,image);} + void SetImageConnection(vtkAlgorithmOutput* output) + { + this->SetInputConnection(1, output); + } + void SetImageData(vtkDataObject *image) {this->SetInputData(1,image);} vtkImageData *GetImage(); // Description: diff --git a/Imaging/vtkImageDotProduct.h b/Imaging/vtkImageDotProduct.h index 3b9fdba3a0e..709e669c0d9 100644 --- a/Imaging/vtkImageDotProduct.h +++ b/Imaging/vtkImageDotProduct.h @@ -32,8 +32,8 @@ public: // Description: // Set the two inputs to this filter - virtual void SetInput1(vtkDataObject *in) { this->SetInput(0,in); } - virtual void SetInput2(vtkDataObject *in) { this->SetInput(1,in); } + virtual void SetInput1Data(vtkDataObject *in) { this->SetInputData(0,in); } + virtual void SetInput2Data(vtkDataObject *in) { this->SetInputData(1,in); } protected: vtkImageDotProduct(); diff --git a/Imaging/vtkImageEllipsoidSource.cxx b/Imaging/vtkImageEllipsoidSource.cxx index 03a72fdf4e0..20150ea0b18 100644 --- a/Imaging/vtkImageEllipsoidSource.cxx +++ b/Imaging/vtkImageEllipsoidSource.cxx @@ -241,7 +241,7 @@ int vtkImageEllipsoidSource::RequestData( outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT(),extent); data->SetExtent(extent); - data->AllocateScalars(); + data->AllocateScalars(outInfo); void *ptr; ptr = data->GetScalarPointerForExtent(extent); diff --git a/Imaging/vtkImageEuclideanDistance.cxx b/Imaging/vtkImageEuclideanDistance.cxx index 40f21a2f7fc..e28247dc16d 100644 --- a/Imaging/vtkImageEuclideanDistance.cxx +++ b/Imaging/vtkImageEuclideanDistance.cxx @@ -556,10 +556,11 @@ void vtkImageEuclideanDistanceExecuteSaitoCached( } //---------------------------------------------------------------------------- void vtkImageEuclideanDistance::AllocateOutputScalars(vtkImageData *outData, - int outExt[6]) + int outExt[6], + vtkInformation* outInfo) { outData->SetExtent(outExt); - outData->AllocateScalars(); + outData->AllocateScalars(outInfo); } //---------------------------------------------------------------------------- @@ -579,7 +580,7 @@ int vtkImageEuclideanDistance::IterativeRequestData( int outExt[6]; outInfo->Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(), outExt); - this->AllocateOutputScalars(outData, outExt); + this->AllocateOutputScalars(outData, outExt, outInfo); void *inPtr; void *outPtr; diff --git a/Imaging/vtkImageEuclideanDistance.h b/Imaging/vtkImageEuclideanDistance.h index 65f5ddc0848..2915f0ad67c 100644 --- a/Imaging/vtkImageEuclideanDistance.h +++ b/Imaging/vtkImageEuclideanDistance.h @@ -115,7 +115,8 @@ protected: // Replaces "EnlargeOutputUpdateExtent" virtual void AllocateOutputScalars(vtkImageData *outData, - int outExt[6]); + int outExt[6], + vtkInformation* outInfo); virtual int IterativeRequestInformation(vtkInformation* in, vtkInformation* out); diff --git a/Imaging/vtkImageGaussianSource.cxx b/Imaging/vtkImageGaussianSource.cxx index fc442a67f85..8291dacbf20 100644 --- a/Imaging/vtkImageGaussianSource.cxx +++ b/Imaging/vtkImageGaussianSource.cxx @@ -118,7 +118,7 @@ int vtkImageGaussianSource::RequestData( vtkInformation *outInfo = outputVector->GetInformationObject(0); vtkImageData *output = vtkImageData::SafeDownCast( outInfo->Get(vtkDataObject::DATA_OBJECT())); - vtkImageData *data = this->AllocateOutputData(output); + vtkImageData *data = this->AllocateOutputData(output, outInfo); if (data->GetScalarType() != VTK_DOUBLE) { diff --git a/Imaging/vtkImageGridSource.cxx b/Imaging/vtkImageGridSource.cxx index 83738ba305c..c053b9d9d56 100644 --- a/Imaging/vtkImageGridSource.cxx +++ b/Imaging/vtkImageGridSource.cxx @@ -146,9 +146,10 @@ void vtkImageGridSourceExecute(vtkImageGridSource *self, } //---------------------------------------------------------------------------- -void vtkImageGridSource::ExecuteData(vtkDataObject *output) +void vtkImageGridSource::ExecuteData(vtkDataObject *output, + vtkInformation* outInfo) { - vtkImageData *data = this->AllocateOutputData(output); + vtkImageData *data = this->AllocateOutputData(output, outInfo); int *outExt = data->GetExtent(); void *outPtr = data->GetScalarPointerForExtent(outExt); diff --git a/Imaging/vtkImageGridSource.h b/Imaging/vtkImageGridSource.h index ddead063ae8..ebf7788a3ce 100644 --- a/Imaging/vtkImageGridSource.h +++ b/Imaging/vtkImageGridSource.h @@ -100,7 +100,7 @@ protected: virtual int RequestInformation (vtkInformation*, vtkInformationVector**, vtkInformationVector*); - virtual void ExecuteData(vtkDataObject *data); + virtual void ExecuteData(vtkDataObject *data, vtkInformation* outInfo); private: vtkImageGridSource(const vtkImageGridSource&); // Not implemented. diff --git a/Imaging/vtkImageImport.cxx b/Imaging/vtkImageImport.cxx index 2c37ec14b50..8c0f976cf29 100644 --- a/Imaging/vtkImageImport.cxx +++ b/Imaging/vtkImageImport.cxx @@ -240,14 +240,15 @@ int vtkImageImport::RequestInformation ( } //---------------------------------------------------------------------------- -void vtkImageImport::ExecuteData(vtkDataObject *output) +void vtkImageImport::ExecuteData(vtkDataObject *output, + vtkInformation* outInfo) { // If set, use the callbacks to prepare our input data. this->InvokeExecuteDataCallbacks(); vtkImageData *data = vtkImageData::SafeDownCast(output); data->SetExtent(0,0,0,0,0,0); - data->AllocateScalars(); + data->AllocateScalars(outInfo); void *ptr = this->GetImportVoidPointer(); int size = (this->DataExtent[1] - this->DataExtent[0]+1) * diff --git a/Imaging/vtkImageImport.h b/Imaging/vtkImageImport.h index a09141c5404..f3641026d30 100644 --- a/Imaging/vtkImageImport.h +++ b/Imaging/vtkImageImport.h @@ -275,7 +275,7 @@ protected: BufferPointerCallbackType BufferPointerCallback; //ETX - virtual void ExecuteData(vtkDataObject *d); + virtual void ExecuteData(vtkDataObject *d, vtkInformation* outInfo); private: vtkImageImport(const vtkImageImport&); // Not implemented. diff --git a/Imaging/vtkImageIslandRemoval2D.cxx b/Imaging/vtkImageIslandRemoval2D.cxx index 49385876fcf..01f3077e07a 100644 --- a/Imaging/vtkImageIslandRemoval2D.cxx +++ b/Imaging/vtkImageIslandRemoval2D.cxx @@ -501,7 +501,7 @@ int vtkImageIslandRemoval2D::RequestData( extent[2] = wholeExtent[2]; extent[3] = wholeExtent[3]; outData->SetExtent(extent); - outData->AllocateScalars(); + outData->AllocateScalars(outInfo); // this filter expects that input is the same type as output. if (inData->GetScalarType() != outData->GetScalarType()) diff --git a/Imaging/vtkImageIterateFilter.cxx b/Imaging/vtkImageIterateFilter.cxx index b64bc8063e6..b11b45d091e 100644 --- a/Imaging/vtkImageIterateFilter.cxx +++ b/Imaging/vtkImageIterateFilter.cxx @@ -53,31 +53,6 @@ void vtkImageIterateFilter::PrintSelf(ostream& os, vtkIndent indent) // this->Iteration } - -//---------------------------------------------------------------------------- -vtkImageData *vtkImageIterateFilter::GetIterationInput() -{ - if (this->IterationData == NULL || this->Iteration == 0) - { - // error, or return input ??? - return vtkImageData::SafeDownCast(this->GetInput()); - } - return this->IterationData[this->Iteration]; -} - - -//---------------------------------------------------------------------------- -vtkImageData *vtkImageIterateFilter::GetIterationOutput() -{ - if (this->IterationData == NULL || - this->Iteration == this->NumberOfIterations-1) - { - // error, or return output ??? - return this->GetOutput(); - } - return this->IterationData[this->Iteration+1]; -} - //---------------------------------------------------------------------------- int vtkImageIterateFilter @@ -87,22 +62,22 @@ vtkImageIterateFilter { vtkInformation* inInfo = inputVector[0]->GetInformationObject(0); vtkInformation* outInfo = outputVector->GetInformationObject(0); - vtkImageData* input = - vtkImageData::SafeDownCast(inInfo->Get(vtkDataObject::DATA_OBJECT())); - vtkImageData* output = - vtkImageData::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT())); - - this->IterationData[0] = input; - this->IterationData[this->NumberOfIterations] = output; vtkInformation* in = inInfo; for(int i=0; i < this->NumberOfIterations; ++i) { this->Iteration = i; - vtkInformation* out = this->IterationData[i+1]->GetPipelineInformation(); - vtkDataObject* outData = out->Get(vtkDataObject::DATA_OBJECT()); - outData->CopyInformationToPipeline(request, in); + int next = i + 1; + vtkInformation* out; + if (next == this->NumberOfIterations) + { + out = outInfo; + } + else + { + vtkInformation* out = this->IterationData[next]->GetOutputInformation(0); + } out->CopyEntry(in, vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT()); if (!this->IterativeRequestInformation(in, out)) @@ -120,15 +95,24 @@ vtkImageIterateFilter int vtkImageIterateFilter ::RequestUpdateExtent(vtkInformation*, - vtkInformationVector**, + vtkInformationVector** inputVector, vtkInformationVector* outputVector) { + vtkInformation* inInfo = inputVector[0]->GetInformationObject(0); vtkInformation* out = outputVector->GetInformationObject(0); for(int i=this->NumberOfIterations-1; i >= 0; --i) { this->Iteration = i; - vtkInformation* in = this->IterationData[i]->GetPipelineInformation(); + vtkInformation* in; + if (i == 0) + { + in = inInfo; + } + else + { + in = this->IterationData[i]->GetInputInformation(0, 0); + } in->CopyEntry(out, vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT()); if (!this->IterativeRequestUpdateExtent(in, out)) @@ -148,13 +132,23 @@ int vtkImageIterateFilter::RequestData(vtkInformation* request, vtkInformationVector* outputVector) { vtkInformation* in = inputVector[0]->GetInformationObject(0); + vtkInformation* outInfo = outputVector->GetInformationObject(0); + for(int i=0; i < this->NumberOfIterations; ++i) { this->Iteration = i; - vtkInformation* out = this->IterationData[i+1]->GetPipelineInformation(); + int next = i + 1; + vtkInformation* out; + if (next == this->NumberOfIterations) + { + out = outInfo; + } + else + { + vtkInformation* out = this->IterationData[next]->GetOutputInformation(0); + } vtkDataObject* outData = out->Get(vtkDataObject::DATA_OBJECT()); - outData->CopyInformationFromPipeline(request, out); this->InputVector->SetInformationObject(0, in); this->OutputVector->SetInformationObject(0, out); @@ -239,14 +233,16 @@ void vtkImageIterateFilter::SetNumberOfIterations(int num) // create new ones (first and last set later to input and output) this->IterationData = - reinterpret_cast<vtkImageData **>( new void *[num + 1]); + reinterpret_cast<vtkAlgorithm **>( new void *[num + 1]); this->IterationData[0] = this->IterationData[num] = NULL; for (idx = 1; idx < num; ++idx) { - this->IterationData[idx] = vtkImageData::New(); + vtkImageData* cache = vtkImageData::New(); vtkTrivialProducer* tp = vtkTrivialProducer::New(); tp->ReleaseDataFlagOn(); - tp->SetOutput(this->IterationData[idx]); + tp->SetOutput(cache); + this->IterationData[idx] = tp; + cache->Delete(); } this->NumberOfIterations = num; diff --git a/Imaging/vtkImageIterateFilter.h b/Imaging/vtkImageIterateFilter.h index 3e0f221b9ec..ed8d2d0d60f 100644 --- a/Imaging/vtkImageIterateFilter.h +++ b/Imaging/vtkImageIterateFilter.h @@ -72,12 +72,8 @@ protected: int Iteration; // A list of intermediate caches that is created when // is called SetNumberOfIterations() - vtkImageData **IterationData; + vtkAlgorithm **IterationData; - // returns correct vtkImageDatas based on current iteration. - vtkImageData *GetIterationInput(); - vtkImageData *GetIterationOutput(); - vtkInformationVector* InputVector; vtkInformationVector* OutputVector; private: diff --git a/Imaging/vtkImageLogic.h b/Imaging/vtkImageLogic.h index d760a200a09..60abc8f2db1 100644 --- a/Imaging/vtkImageLogic.h +++ b/Imaging/vtkImageLogic.h @@ -61,11 +61,11 @@ public: // Description: // Set the Input1 of this filter. - virtual void SetInput1(vtkDataObject *input) { this->SetInput(0,input);}; + virtual void SetInput1Data(vtkDataObject *input) { this->SetInputData(0,input);}; // Description: // Set the Input2 of this filter. - virtual void SetInput2(vtkDataObject *input) { this->SetInput(1,input);}; + virtual void SetInput2Data(vtkDataObject *input) { this->SetInputData(1,input);}; protected: vtkImageLogic(); diff --git a/Imaging/vtkImageMandelbrotSource.cxx b/Imaging/vtkImageMandelbrotSource.cxx index a9806394c62..a52cf4f6496 100644 --- a/Imaging/vtkImageMandelbrotSource.cxx +++ b/Imaging/vtkImageMandelbrotSource.cxx @@ -345,7 +345,7 @@ int vtkImageMandelbrotSource::RequestData( // the superclasses "Execute()" method. int *ext = outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT()); data->SetExtent(ext); - data->AllocateScalars(); + data->AllocateScalars(outInfo); int a0, a1, a2; float *ptr; diff --git a/Imaging/vtkImageMask.cxx b/Imaging/vtkImageMask.cxx index 37e786e4571..39978e83f17 100644 --- a/Imaging/vtkImageMask.cxx +++ b/Imaging/vtkImageMask.cxx @@ -41,15 +41,15 @@ vtkImageMask::~vtkImageMask() } //---------------------------------------------------------------------------- -void vtkImageMask::SetImageInput(vtkImageData *in) +void vtkImageMask::SetImageInputData(vtkImageData *in) { - this->SetInput1(in); + this->SetInput1Data(in); } //---------------------------------------------------------------------------- -void vtkImageMask::SetMaskInput(vtkImageData *in) +void vtkImageMask::SetMaskInputData(vtkImageData *in) { - this->SetInput2(in); + this->SetInput2Data(in); } //---------------------------------------------------------------------------- diff --git a/Imaging/vtkImageMask.h b/Imaging/vtkImageMask.h index a59b363999c..bc2c461bead 100644 --- a/Imaging/vtkImageMask.h +++ b/Imaging/vtkImageMask.h @@ -59,11 +59,11 @@ public: // Description: // Set the input to be masked. - void SetImageInput(vtkImageData *in); + void SetImageInputData(vtkImageData *in); // Description: // Set the mask to be used. - void SetMaskInput(vtkImageData *in); + void SetMaskInputData(vtkImageData *in); // Description: // When Not Mask is on, the mask is passed through a boolean not @@ -76,8 +76,8 @@ public: // Description: // Set the two inputs to this filter - virtual void SetInput1(vtkDataObject *in) { this->SetInput(0,in); } - virtual void SetInput2(vtkDataObject *in) { this->SetInput(1,in); } + virtual void SetInput1Data(vtkDataObject *in) { this->SetInputData(0,in); } + virtual void SetInput2Data(vtkDataObject *in) { this->SetInputData(1,in); } protected: vtkImageMask(); diff --git a/Imaging/vtkImageMathematics.h b/Imaging/vtkImageMathematics.h index 5ecd6e03453..f9c7618e593 100644 --- a/Imaging/vtkImageMathematics.h +++ b/Imaging/vtkImageMathematics.h @@ -177,8 +177,8 @@ public: // Description: // Set the two inputs to this filter. For some operations, the second input // is not used. - virtual void SetInput1(vtkDataObject *in) { this->SetInput(0,in); } - virtual void SetInput2(vtkDataObject *in) { this->SetInput(1,in); } + virtual void SetInput1Data(vtkDataObject *in) { this->SetInputData(0,in); } + virtual void SetInput2Data(vtkDataObject *in) { this->SetInputData(1,in); } protected: vtkImageMathematics(); diff --git a/Imaging/vtkImageNoiseSource.cxx b/Imaging/vtkImageNoiseSource.cxx index 7b66528c897..8c0adb506cb 100644 --- a/Imaging/vtkImageNoiseSource.cxx +++ b/Imaging/vtkImageNoiseSource.cxx @@ -93,9 +93,10 @@ int vtkImageNoiseSource::RequestInformation ( return 1; } -void vtkImageNoiseSource::ExecuteData(vtkDataObject *output) +void vtkImageNoiseSource::ExecuteData(vtkDataObject *output, + vtkInformation *outInfo) { - vtkImageData *data = this->AllocateOutputData(output); + vtkImageData *data = this->AllocateOutputData(output, outInfo); if (data->GetScalarType() != VTK_DOUBLE) { diff --git a/Imaging/vtkImageNoiseSource.h b/Imaging/vtkImageNoiseSource.h index 61e63ee0558..4f77781a75d 100644 --- a/Imaging/vtkImageNoiseSource.h +++ b/Imaging/vtkImageNoiseSource.h @@ -61,7 +61,7 @@ protected: int WholeExtent[6]; virtual int RequestInformation (vtkInformation *, vtkInformationVector**, vtkInformationVector *); - virtual void ExecuteData(vtkDataObject *data); + virtual void ExecuteData(vtkDataObject *data, vtkInformation* outInfo); private: vtkImageNoiseSource(const vtkImageNoiseSource&); // Not implemented. void operator=(const vtkImageNoiseSource&); // Not implemented. diff --git a/Imaging/vtkImageNonMaximumSuppression.h b/Imaging/vtkImageNonMaximumSuppression.h index 282abec3f80..968c19d6f4a 100644 --- a/Imaging/vtkImageNonMaximumSuppression.h +++ b/Imaging/vtkImageNonMaximumSuppression.h @@ -40,8 +40,8 @@ public: // Description: // Set the magnitude and vector inputs. - void SetMagnitudeInput(vtkImageData *input) {this->SetInput(0,input);}; - void SetVectorInput(vtkImageData *input) {this->SetInput(1,input);}; + void SetMagnitudeInputData(vtkImageData *input) {this->SetInputData(0,input);}; + void SetVectorInputData(vtkImageData *input) {this->SetInputData(1,input);}; // Description: // If "HandleBoundariesOn" then boundary pixels are duplicated diff --git a/Imaging/vtkImageQuantizeRGBToIndex.cxx b/Imaging/vtkImageQuantizeRGBToIndex.cxx index 67b2d4abe81..b5ae393c9f2 100644 --- a/Imaging/vtkImageQuantizeRGBToIndex.cxx +++ b/Imaging/vtkImageQuantizeRGBToIndex.cxx @@ -597,7 +597,7 @@ int vtkImageQuantizeRGBToIndex::RequestData( outData->SetExtent( outInfo->Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT())); - outData->AllocateScalars(); + outData->AllocateScalars(outInfo); int inExt[6]; inData->GetExtent(inExt); diff --git a/Imaging/vtkImageRectilinearWipe.h b/Imaging/vtkImageRectilinearWipe.h index 373e5aef9d5..6ab3f74aecb 100644 --- a/Imaging/vtkImageRectilinearWipe.h +++ b/Imaging/vtkImageRectilinearWipe.h @@ -75,8 +75,8 @@ public: // Description: // Set the two inputs to this filter. - virtual void SetInput1(vtkDataObject *in) { this->SetInput(0,in); } - virtual void SetInput2(vtkDataObject *in) { this->SetInput(1,in); } + virtual void SetInput1Data(vtkDataObject *in) { this->SetInputData(0,in); } + virtual void SetInput2Data(vtkDataObject *in) { this->SetInputData(1,in); } // Description: // Specify the wipe mode. This mode determnis how input 0 and input diff --git a/Imaging/vtkImageReslice.cxx b/Imaging/vtkImageReslice.cxx index 1f8a418c959..1577cee584d 100644 --- a/Imaging/vtkImageReslice.cxx +++ b/Imaging/vtkImageReslice.cxx @@ -441,9 +441,9 @@ const char *vtkImageReslice::GetInterpolationModeAsString() } //---------------------------------------------------------------------------- -void vtkImageReslice::SetStencil(vtkImageStencilData *stencil) +void vtkImageReslice::SetStencilData(vtkImageStencilData *stencil) { - this->SetInput(1, stencil); + this->SetInputData(1, stencil); } //---------------------------------------------------------------------------- @@ -878,11 +878,12 @@ int vtkImageReslice::FillOutputPortInformation(int port, vtkInformation* info) //---------------------------------------------------------------------------- void vtkImageReslice::AllocateOutputData(vtkImageData *output, + vtkInformation* outInfo, int *uExtent) { // set the extent to be the update extent output->SetExtent(uExtent); - output->AllocateScalars(); + output->AllocateScalars(outInfo); vtkImageStencilData *stencil = this->GetStencilOutput(); if (stencil && this->GenerateStencilOutput) @@ -893,9 +894,10 @@ void vtkImageReslice::AllocateOutputData(vtkImageData *output, } //---------------------------------------------------------------------------- -vtkImageData *vtkImageReslice::AllocateOutputData(vtkDataObject *output) +vtkImageData *vtkImageReslice::AllocateOutputData(vtkDataObject *output, + vtkInformation* outInfo) { - return this->Superclass::AllocateOutputData(output); + return this->Superclass::AllocateOutputData(output, outInfo); } //---------------------------------------------------------------------------- diff --git a/Imaging/vtkImageReslice.h b/Imaging/vtkImageReslice.h index c0805de2bf2..112fd908e61 100644 --- a/Imaging/vtkImageReslice.h +++ b/Imaging/vtkImageReslice.h @@ -316,7 +316,7 @@ public: // Use a stencil to limit the calculations to a specific region of // the output. Portions of the output that are 'outside' the stencil // will be cleared to the background color. - void SetStencil(vtkImageStencilData *stencil); + void SetStencilData(vtkImageStencilData *stencil); vtkImageStencilData *GetStencil(); // Description: @@ -394,8 +394,8 @@ protected: count, idX, idY, idZ, threadId); } void GetAutoCroppedOutputBounds(vtkInformation *inInfo, double bounds[6]); - virtual void AllocateOutputData(vtkImageData *output, int *uExtent); - virtual vtkImageData *AllocateOutputData(vtkDataObject *); + virtual void AllocateOutputData(vtkImageData *output, vtkInformation *outInfo, int *uExtent); + virtual vtkImageData *AllocateOutputData(vtkDataObject *, vtkInformation *); virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *); virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, diff --git a/Imaging/vtkImageSeedConnectivity.cxx b/Imaging/vtkImageSeedConnectivity.cxx index e9734812765..4c89150e483 100644 --- a/Imaging/vtkImageSeedConnectivity.cxx +++ b/Imaging/vtkImageSeedConnectivity.cxx @@ -138,7 +138,7 @@ int vtkImageSeedConnectivity::RequestData( outData->SetExtent( outInfo->Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT())); - outData->AllocateScalars(); + outData->AllocateScalars(outInfo); if (inData->GetScalarType() != VTK_UNSIGNED_CHAR || outData->GetScalarType() != VTK_UNSIGNED_CHAR) diff --git a/Imaging/vtkImageSeparableConvolution.cxx b/Imaging/vtkImageSeparableConvolution.cxx index e17a12fa8f2..4a4f882e7ab 100644 --- a/Imaging/vtkImageSeparableConvolution.cxx +++ b/Imaging/vtkImageSeparableConvolution.cxx @@ -331,7 +331,7 @@ int vtkImageSeparableConvolution::IterativeRequestData( outData->SetExtent(outInfo->Get( vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT())); - outData->AllocateScalars(); + outData->AllocateScalars(outInfo); if ( XKernel ) { diff --git a/Imaging/vtkImageSinusoidSource.cxx b/Imaging/vtkImageSinusoidSource.cxx index 6e81e068952..3d092cf30b8 100644 --- a/Imaging/vtkImageSinusoidSource.cxx +++ b/Imaging/vtkImageSinusoidSource.cxx @@ -137,9 +137,10 @@ int vtkImageSinusoidSource::RequestInformation ( } //---------------------------------------------------------------------------- -void vtkImageSinusoidSource::ExecuteData(vtkDataObject *output) +void vtkImageSinusoidSource::ExecuteData(vtkDataObject *output, + vtkInformation* outInfo) { - vtkImageData *data = this->AllocateOutputData(output); + vtkImageData *data = this->AllocateOutputData(output, outInfo); double *outPtr; int idxX, idxY, idxZ; int maxX, maxY, maxZ; diff --git a/Imaging/vtkImageSinusoidSource.h b/Imaging/vtkImageSinusoidSource.h index 7c9ebdf8585..192e740aacd 100644 --- a/Imaging/vtkImageSinusoidSource.h +++ b/Imaging/vtkImageSinusoidSource.h @@ -68,7 +68,7 @@ protected: double Amplitude; virtual int RequestInformation (vtkInformation *, vtkInformationVector**, vtkInformationVector *); - virtual void ExecuteData(vtkDataObject *data); + virtual void ExecuteData(vtkDataObject *data, vtkInformation* outInfo); private: vtkImageSinusoidSource(const vtkImageSinusoidSource&); // Not implemented. void operator=(const vtkImageSinusoidSource&); // Not implemented. diff --git a/Imaging/vtkImageSkeleton2D.cxx b/Imaging/vtkImageSkeleton2D.cxx index e899074516c..b5630efb4b8 100644 --- a/Imaging/vtkImageSkeleton2D.cxx +++ b/Imaging/vtkImageSkeleton2D.cxx @@ -315,10 +315,17 @@ void vtkImageSkeleton2DExecute(vtkImageSkeleton2D *self, //---------------------------------------------------------------------------- // This method contains the first switch statement that calls the correct // templated function for the input and output region types. -void vtkImageSkeleton2D::ThreadedExecute(vtkImageData *inData, - vtkImageData *outData, - int outExt[6], int id) +void vtkImageSkeleton2D::ThreadedRequestData( + vtkInformation* vtkNotUsed( request ), + vtkInformationVector** inputVector, + vtkInformationVector* vtkNotUsed( outputVector ), + vtkImageData ***inDataV, + vtkImageData **outDataV, + int outExt[6], + int id) { + vtkImageData* inData = inDataV[0][0]; + vtkImageData* outData = outDataV[0]; void *inPtr; void *outPtr = outData->GetScalarPointerForExtent(outExt); vtkImageData *tempData; @@ -332,7 +339,7 @@ void vtkImageSkeleton2D::ThreadedExecute(vtkImageData *inData, return; } - vtkInformation* inInfo = inData->GetPipelineInformation(); + vtkInformation* inInfo = inputVector[0]->GetInformationObject(0); inInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT(), inExt); inInfo->Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(), wholeExt); diff --git a/Imaging/vtkImageSkeleton2D.h b/Imaging/vtkImageSkeleton2D.h index 4880d69116e..f332892fc74 100644 --- a/Imaging/vtkImageSkeleton2D.h +++ b/Imaging/vtkImageSkeleton2D.h @@ -56,8 +56,14 @@ protected: virtual int IterativeRequestUpdateExtent(vtkInformation* in, vtkInformation* out); - void ThreadedExecute(vtkImageData *inData, vtkImageData *outData, - int outExt[6], int id); + void ThreadedRequestData( + vtkInformation* request, + vtkInformationVector** inputVector, + vtkInformationVector* outputVector, + vtkImageData ***inDataV, + vtkImageData **outDataV, + int outExt[6], + int id); private: vtkImageSkeleton2D(const vtkImageSkeleton2D&); // Not implemented. void operator=(const vtkImageSkeleton2D&); // Not implemented. diff --git a/Imaging/vtkImageStencil.cxx b/Imaging/vtkImageStencil.cxx index 1394b578ddf..75e7c87b8cd 100644 --- a/Imaging/vtkImageStencil.cxx +++ b/Imaging/vtkImageStencil.cxx @@ -45,9 +45,9 @@ vtkImageStencil::~vtkImageStencil() } //---------------------------------------------------------------------------- -void vtkImageStencil::SetStencil(vtkImageStencilData *stencil) +void vtkImageStencil::SetStencilData(vtkImageStencilData *stencil) { - this->SetInput(2, stencil); + this->SetInputData(2, stencil); } //---------------------------------------------------------------------------- @@ -65,9 +65,9 @@ vtkImageStencilData *vtkImageStencil::GetStencil() } //---------------------------------------------------------------------------- -void vtkImageStencil::SetBackgroundInput(vtkImageData *data) +void vtkImageStencil::SetBackgroundInputData(vtkImageData *data) { - this->SetInput(1, data); + this->SetInputData(1, data); } //---------------------------------------------------------------------------- diff --git a/Imaging/vtkImageStencil.h b/Imaging/vtkImageStencil.h index 9cf3709772c..ea1ad313fd2 100644 --- a/Imaging/vtkImageStencil.h +++ b/Imaging/vtkImageStencil.h @@ -34,10 +34,18 @@ public: // Description: // Specify the stencil to use. The stencil can be created - // from a vtkImplicitFunction or a vtkPolyData. - virtual void SetStencil(vtkImageStencilData *stencil); + // from a vtkImplicitFunction or a vtkPolyData. This + // function does not setup a pipeline connection. + virtual void SetStencilData(vtkImageStencilData *stencil); vtkImageStencilData *GetStencil(); + // Description: + // Specify the stencil to use. This sets up a pipeline connection. + void SetStencilConnection(vtkAlgorithmOutput* outputPort) + { + this->SetInputConnection(2, outputPort); + } + // Description: // Reverse the stencil. vtkSetMacro(ReverseStencil, int); @@ -48,7 +56,7 @@ public: // Set the second input. This image will be used for the 'outside' of the // stencil. If not set, the output voxels will be filled with // BackgroundValue instead. - virtual void SetBackgroundInput(vtkImageData *input); + virtual void SetBackgroundInputData(vtkImageData *input); vtkImageData *GetBackgroundInput(); // Description: diff --git a/Imaging/vtkImageStencilToImage.cxx b/Imaging/vtkImageStencilToImage.cxx index 65c9a80b430..648e68a0c0d 100644 --- a/Imaging/vtkImageStencilToImage.cxx +++ b/Imaging/vtkImageStencilToImage.cxx @@ -140,7 +140,7 @@ int vtkImageStencilToImage::RequestData( updateExtent); vtkImageData *outData = static_cast<vtkImageData *>( outInfo->Get(vtkDataObject::DATA_OBJECT())); - this->AllocateOutputData(outData, updateExtent); + this->AllocateOutputData(outData, outInfo, updateExtent); void *outPtr = outData->GetScalarPointerForExtent(updateExtent); vtkInformation *inInfo = inputVector[0]->GetInformationObject(0); diff --git a/Imaging/vtkImageToImageStencil.cxx b/Imaging/vtkImageToImageStencil.cxx index 929cead3a2d..02fe265738e 100644 --- a/Imaging/vtkImageToImageStencil.cxx +++ b/Imaging/vtkImageToImageStencil.cxx @@ -50,16 +50,9 @@ void vtkImageToImageStencil::PrintSelf(ostream& os, vtkIndent indent) } //---------------------------------------------------------------------------- -void vtkImageToImageStencil::SetInput(vtkImageData *input) +void vtkImageToImageStencil::SetInputData(vtkImageData *input) { - if (input) - { - this->SetInputConnection(0, input->GetProducerPort()); - } - else - { - this->SetInputConnection(0, 0); - } + this->SetInputDataInternal(0, input); } //---------------------------------------------------------------------------- diff --git a/Imaging/vtkImageToImageStencil.h b/Imaging/vtkImageToImageStencil.h index 309195d5f09..945aacb7c13 100644 --- a/Imaging/vtkImageToImageStencil.h +++ b/Imaging/vtkImageToImageStencil.h @@ -37,7 +37,7 @@ public: // Description: // Specify the image data to convert into a stencil. - void SetInput(vtkImageData *input); + void SetInputData(vtkImageData *input); vtkImageData *GetInput(); // Description: diff --git a/Imaging/vtkPointLoad.cxx b/Imaging/vtkPointLoad.cxx index 5f2dbe1e91f..aae3e2696a4 100644 --- a/Imaging/vtkPointLoad.cxx +++ b/Imaging/vtkPointLoad.cxx @@ -121,7 +121,7 @@ int vtkPointLoad::RequestInformation ( // // Generate tensors and scalars for point load on semi-infinite domain. // -void vtkPointLoad::ExecuteData(vtkDataObject *outp) +void vtkPointLoad::ExecuteData(vtkDataObject *outp, vtkInformation* outInfo) { int i, j, k; vtkFloatArray *newTensors; @@ -130,7 +130,7 @@ void vtkPointLoad::ExecuteData(vtkDataObject *outp) double P, twoPi, xP[3], rho, rho2, rho3, rho5, nu; double x, x2, y, y2, z, z2, rhoPlusz2, zPlus2rho, txy, txz, tyz; double sx, sy, sz, seff; - vtkImageData *output = this->AllocateOutputData(outp); + vtkImageData *output = this->AllocateOutputData(outp, outInfo); vtkFloatArray *newScalars = vtkFloatArray::SafeDownCast(output->GetPointData()->GetScalars()); double *spacing, *origin; diff --git a/Imaging/vtkPointLoad.h b/Imaging/vtkPointLoad.h index 74bbaa29925..c8ccc8fdf02 100644 --- a/Imaging/vtkPointLoad.h +++ b/Imaging/vtkPointLoad.h @@ -82,7 +82,7 @@ protected: virtual int RequestInformation (vtkInformation *, vtkInformationVector **, vtkInformationVector *); - virtual void ExecuteData(vtkDataObject *); + virtual void ExecuteData(vtkDataObject *, vtkInformation *); double LoadValue; double PoissonsRatio; diff --git a/Imaging/vtkRTAnalyticSource.cxx b/Imaging/vtkRTAnalyticSource.cxx index 35c60716211..a0bd5010991 100644 --- a/Imaging/vtkRTAnalyticSource.cxx +++ b/Imaging/vtkRTAnalyticSource.cxx @@ -119,7 +119,8 @@ int vtkRTAnalyticSource::RequestInformation( return 1; } -void vtkRTAnalyticSource::ExecuteData(vtkDataObject *output) +void vtkRTAnalyticSource::ExecuteData(vtkDataObject *output, + vtkInformation *outInfo) { vtkImageData *data; float *outPtr; @@ -134,7 +135,7 @@ void vtkRTAnalyticSource::ExecuteData(vtkDataObject *output) unsigned long count = 0; unsigned long target; - data = this->AllocateOutputData(output); + data = this->AllocateOutputData(output, outInfo); if (data->GetScalarType() != VTK_FLOAT) { vtkErrorMacro("Execute: This source only outputs floats"); diff --git a/Imaging/vtkRTAnalyticSource.h b/Imaging/vtkRTAnalyticSource.h index dbeaf8c3a8b..6250de3e1cd 100644 --- a/Imaging/vtkRTAnalyticSource.h +++ b/Imaging/vtkRTAnalyticSource.h @@ -116,7 +116,7 @@ protected: virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector); - virtual void ExecuteData(vtkDataObject *data); + virtual void ExecuteData(vtkDataObject *data, vtkInformation *outInfo); private: vtkRTAnalyticSource(const vtkRTAnalyticSource&); // Not implemented. void operator=(const vtkRTAnalyticSource&); // Not implemented. diff --git a/Imaging/vtkSampleFunction.cxx b/Imaging/vtkSampleFunction.cxx index 767707eb8d4..82f84248358 100644 --- a/Imaging/vtkSampleFunction.cxx +++ b/Imaging/vtkSampleFunction.cxx @@ -138,7 +138,7 @@ int vtkSampleFunction::RequestInformation ( } -void vtkSampleFunction::ExecuteData(vtkDataObject *outp) +void vtkSampleFunction::ExecuteData(vtkDataObject *outp, vtkInformation *outInfo) { vtkIdType idx, i, j, k; vtkFloatArray *newNormals=NULL; @@ -150,7 +150,7 @@ void vtkSampleFunction::ExecuteData(vtkDataObject *outp) vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT()); output->SetExtent(extent); - output = this->AllocateOutputData(outp); + output = this->AllocateOutputData(outp, outInfo); vtkDataArray *newScalars =output->GetPointData()->GetScalars(); vtkDebugMacro(<< "Sampling implicit function"); diff --git a/Imaging/vtkSampleFunction.h b/Imaging/vtkSampleFunction.h index c58ce610c0e..b2443e9ad71 100644 --- a/Imaging/vtkSampleFunction.h +++ b/Imaging/vtkSampleFunction.h @@ -142,7 +142,7 @@ protected: virtual void ReportReferences(vtkGarbageCollector*); - void ExecuteData(vtkDataObject *); + void ExecuteData(vtkDataObject *, vtkInformation *); virtual int RequestInformation (vtkInformation *, vtkInformationVector **, vtkInformationVector *); diff --git a/Imaging/vtkShepardMethod.cxx b/Imaging/vtkShepardMethod.cxx index 0a779a923ab..c707cb0338c 100644 --- a/Imaging/vtkShepardMethod.cxx +++ b/Imaging/vtkShepardMethod.cxx @@ -153,7 +153,7 @@ int vtkShepardMethod::RequestData( // the superclasses "Execute()" method. output->SetExtent( outInfo->Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT())); - output->AllocateScalars(); + output->AllocateScalars(outInfo); vtkIdType ptId, i; int j, k; diff --git a/Imaging/vtkSurfaceReconstructionFilter.cxx b/Imaging/vtkSurfaceReconstructionFilter.cxx index 65d2ba91788..b507b6ddff2 100644 --- a/Imaging/vtkSurfaceReconstructionFilter.cxx +++ b/Imaging/vtkSurfaceReconstructionFilter.cxx @@ -430,7 +430,7 @@ int vtkSurfaceReconstructionFilter::RequestData( outInfo->Set(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(), 0, dim[0]-1, 0, dim[1]-1, 0, dim[2]-1); output->SetExtent(0, dim[0]-1, 0, dim[1]-1, 0, dim[2]-1); - output->AllocateScalars(); + output->AllocateScalars(outInfo); outInfo->Set(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT(), 0, dim[0]-1, 0, dim[1]-1, 0, dim[2]-1); diff --git a/Imaging/vtkTriangularTexture.cxx b/Imaging/vtkTriangularTexture.cxx index dc77045adc1..d9c36bb7424 100644 --- a/Imaging/vtkTriangularTexture.cxx +++ b/Imaging/vtkTriangularTexture.cxx @@ -155,9 +155,10 @@ int vtkTriangularTexture::RequestInformation ( return 1; } -void vtkTriangularTexture::ExecuteData(vtkDataObject *outp) +void vtkTriangularTexture::ExecuteData(vtkDataObject *outp, + vtkInformation *outInfo) { - vtkImageData *output = this->AllocateOutputData(outp); + vtkImageData *output = this->AllocateOutputData(outp, outInfo); vtkUnsignedCharArray *newScalars = vtkUnsignedCharArray::SafeDownCast(output->GetPointData()->GetScalars()); diff --git a/Imaging/vtkTriangularTexture.h b/Imaging/vtkTriangularTexture.h index bc17d8598e0..3ae7fcbd7b7 100644 --- a/Imaging/vtkTriangularTexture.h +++ b/Imaging/vtkTriangularTexture.h @@ -69,7 +69,7 @@ protected: ~vtkTriangularTexture() {}; virtual int RequestInformation (vtkInformation *, vtkInformationVector**, vtkInformationVector *); - virtual void ExecuteData(vtkDataObject *data); + virtual void ExecuteData(vtkDataObject *data, vtkInformation *outInfo); int XSize; int YSize; diff --git a/Imaging/vtkVoxelModeller.cxx b/Imaging/vtkVoxelModeller.cxx index 6f92d0db968..7bf6bfa12e2 100644 --- a/Imaging/vtkVoxelModeller.cxx +++ b/Imaging/vtkVoxelModeller.cxx @@ -131,7 +131,7 @@ int vtkVoxelModeller::RequestData( // the superclasses "Execute()" method. output->SetExtent(outInfo->Get( vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT())); - output->AllocateScalars(); + output->AllocateScalars(outInfo); vtkIdType cellNum, i; int j, k; diff --git a/Infovis/Testing/Cxx/ArrayDotProductSimilarity.cxx b/Infovis/Testing/Cxx/ArrayDotProductSimilarity.cxx index 95cf9d70c10..fe36fc5f4a0 100644 --- a/Infovis/Testing/Cxx/ArrayDotProductSimilarity.cxx +++ b/Infovis/Testing/Cxx/ArrayDotProductSimilarity.cxx @@ -60,8 +60,8 @@ int ArrayDotProductSimilarity(int vtkNotUsed(argc), char *vtkNotUsed(argv)[]) vtkSmartPointer<vtkArrayData> matrix_data_a = vtkSmartPointer<vtkArrayData>::New(); matrix_data_a->AddArray(matrix_a); - vtkSmartPointer<vtkDotProductSimilarity> similarity = vtkSmartPointer<vtkDotProductSimilarity>::New(); - similarity->SetInputConnection(0, matrix_data_a->GetProducerPort()); + vtkSmartPointer<vtkDotProductSimilarity> similarity = vtkSmartPointer<vtkDotProductSimilarity>::New(); + similarity->SetInputData(0, matrix_data_a); similarity->SetVectorDimension(1); similarity->SetMinimumThreshold(0); similarity->SetMinimumCount(0); @@ -113,7 +113,7 @@ int ArrayDotProductSimilarity(int vtkNotUsed(argc), char *vtkNotUsed(argv)[]) vtkSmartPointer<vtkArrayData> matrix_data_b = vtkSmartPointer<vtkArrayData>::New(); matrix_data_b->AddArray(matrix_b); - similarity->SetInputConnection(1, matrix_data_b->GetProducerPort()); + similarity->SetInputData(1, matrix_data_b); similarity->SetFirstSecond(true); similarity->SetSecondFirst(false); diff --git a/Infovis/Testing/Cxx/ArrayExtractFactoredArray.cxx b/Infovis/Testing/Cxx/ArrayExtractFactoredArray.cxx index a51bee9b4f1..b10129f8cd8 100644 --- a/Infovis/Testing/Cxx/ArrayExtractFactoredArray.cxx +++ b/Infovis/Testing/Cxx/ArrayExtractFactoredArray.cxx @@ -46,7 +46,7 @@ int ArrayExtractFactoredArray(int vtkNotUsed(argc), char *vtkNotUsed(argv)[]) factored->AddArray(b); vtkSmartPointer<vtkExtractArray> extract = vtkSmartPointer<vtkExtractArray>::New(); - extract->AddInputConnection(factored->GetProducerPort()); + extract->SetInputData(factored); extract->SetIndex(0); extract->Update(); diff --git a/Infovis/Testing/Cxx/ArrayMatricizeArray.cxx b/Infovis/Testing/Cxx/ArrayMatricizeArray.cxx index a54719fc4df..8f2b44dacf3 100644 --- a/Infovis/Testing/Cxx/ArrayMatricizeArray.cxx +++ b/Infovis/Testing/Cxx/ArrayMatricizeArray.cxx @@ -64,7 +64,7 @@ int ArrayMatricizeArray(int vtkNotUsed(argc), char *vtkNotUsed(argv)[]) // Matricize it ... vtkSmartPointer<vtkMatricizeArray> matricize = vtkSmartPointer<vtkMatricizeArray>::New(); - matricize->SetInput(array_data); + matricize->SetInputData(array_data); matricize->SetSliceDimension(0); matricize->Update(); diff --git a/Infovis/Testing/Cxx/ArraySparseArrayToTable.cxx b/Infovis/Testing/Cxx/ArraySparseArrayToTable.cxx index 3a9d1c8f883..0dbc35cfbd3 100644 --- a/Infovis/Testing/Cxx/ArraySparseArrayToTable.cxx +++ b/Infovis/Testing/Cxx/ArraySparseArrayToTable.cxx @@ -52,7 +52,7 @@ int ArraySparseArrayToTable(int vtkNotUsed(argc), char *vtkNotUsed(argv)[]) array_data->AddArray(array); vtkSmartPointer<vtkSparseArrayToTable> convert = vtkSmartPointer<vtkSparseArrayToTable>::New(); - convert->SetInputConnection(0, array_data->GetProducerPort()); + convert->SetInputData(0, array_data); convert->SetValueColumn("value"); convert->Update(); diff --git a/Infovis/Testing/Cxx/ArrayTableToSparseArray.cxx b/Infovis/Testing/Cxx/ArrayTableToSparseArray.cxx index 861cbdfbefd..f8c501479e5 100644 --- a/Infovis/Testing/Cxx/ArrayTableToSparseArray.cxx +++ b/Infovis/Testing/Cxx/ArrayTableToSparseArray.cxx @@ -78,7 +78,7 @@ int ArrayTableToSparseArray(int vtkNotUsed(argc), char *vtkNotUsed(argv)[]) table->SetValue(2, 3, 3); vtkSmartPointer<vtkTableToSparseArray> source = vtkSmartPointer<vtkTableToSparseArray>::New(); - source->AddInputConnection(table->GetProducerPort()); + source->SetInputData(table); source->AddCoordinateColumn("i"); source->AddCoordinateColumn("j"); source->AddCoordinateColumn("k"); diff --git a/Infovis/Testing/Cxx/ArrayToTable.cxx b/Infovis/Testing/Cxx/ArrayToTable.cxx index ed7d67ff4cf..797b0f44bdf 100644 --- a/Infovis/Testing/Cxx/ArrayToTable.cxx +++ b/Infovis/Testing/Cxx/ArrayToTable.cxx @@ -49,7 +49,7 @@ int ArrayToTable(int vtkNotUsed(argc), char *vtkNotUsed(argv)[]) b->AddArray(a); vtkSmartPointer<vtkArrayToTable> c = vtkSmartPointer<vtkArrayToTable>::New(); - c->SetInputConnection(0, b->GetProducerPort()); + c->SetInputData(0, b); c->Update(); test_expression(c->GetOutput()->GetNumberOfColumns() == 1); @@ -67,7 +67,7 @@ int ArrayToTable(int vtkNotUsed(argc), char *vtkNotUsed(argv)[]) e->AddArray(d); vtkSmartPointer<vtkArrayToTable> f = vtkSmartPointer<vtkArrayToTable>::New(); - f->SetInputConnection(0, e->GetProducerPort()); + f->SetInputData(0, e); f->Update(); test_expression(f->GetOutput()->GetNumberOfColumns() == 2); diff --git a/Infovis/Testing/Cxx/ArrayTransposeMatrix.cxx b/Infovis/Testing/Cxx/ArrayTransposeMatrix.cxx index 5c8af1a4422..11ccfc2d9e0 100644 --- a/Infovis/Testing/Cxx/ArrayTransposeMatrix.cxx +++ b/Infovis/Testing/Cxx/ArrayTransposeMatrix.cxx @@ -53,7 +53,7 @@ int ArrayTransposeMatrix(int vtkNotUsed(argc), char *vtkNotUsed(argv)[]) source_data->AddArray(source); vtkSmartPointer<vtkTransposeMatrix> transpose = vtkSmartPointer<vtkTransposeMatrix>::New(); - transpose->AddInputConnection(source_data->GetProducerPort()); + transpose->SetInputData(source_data); transpose->Update(); vtkSparseArray<double>* const output = vtkSparseArray<double>::SafeDownCast( diff --git a/Infovis/Testing/Cxx/TestArcEdges.cxx b/Infovis/Testing/Cxx/TestArcEdges.cxx index 8924b7d969e..70dd087d151 100644 --- a/Infovis/Testing/Cxx/TestArcEdges.cxx +++ b/Infovis/Testing/Cxx/TestArcEdges.cxx @@ -75,12 +75,12 @@ int TestArcEdges(int argc, char* argv[]) } delete [] pts; - graphToPoly->SetInput(g); + graphToPoly->SetInputData(g); edgeMapper->SetInputConnection(graphToPoly->GetOutputPort()); edgeActor->SetMapper(edgeMapper); ren->AddActor(edgeActor); - vertGlyph->SetInput(g); + vertGlyph->SetInputData(g); vertMapper->SetInputConnection(vertGlyph->GetOutputPort()); vertActor->SetMapper(vertMapper); vertActor->GetProperty()->SetPointSize(1); diff --git a/Infovis/Testing/Cxx/TestAssignCoordinates.cxx b/Infovis/Testing/Cxx/TestAssignCoordinates.cxx index d294ab5d90b..04b19563133 100644 --- a/Infovis/Testing/Cxx/TestAssignCoordinates.cxx +++ b/Infovis/Testing/Cxx/TestAssignCoordinates.cxx @@ -60,7 +60,7 @@ int TestAssignCoordinates(int argc, char *argv[]) cerr << "Sending graph through vtkAssignCoordinates ..." << endl; VTK_CREATE(vtkAssignCoordinates, assign); - assign->SetInput(g); + assign->SetInputData(g); assign->SetXCoordArrayName("x"); assign->SetYCoordArrayName("y"); assign->SetZCoordArrayName("z"); diff --git a/Infovis/Testing/Cxx/TestBoostAlgorithms.cxx b/Infovis/Testing/Cxx/TestBoostAlgorithms.cxx index b8d92a31eee..068d9203ef1 100644 --- a/Infovis/Testing/Cxx/TestBoostAlgorithms.cxx +++ b/Infovis/Testing/Cxx/TestBoostAlgorithms.cxx @@ -161,35 +161,35 @@ int TestBoostAlgorithms(int argc, char* argv[]) // Test biconnected components // Only available in Boost 1.33 or later VTK_CREATE(vtkBoostBiconnectedComponents, biconn); - biconn->SetInput(g); + biconn->SetInputData(g); RenderGraph(ren, biconn.GetPointer(), 0, 0, "biconnected component", -1, 3, "biconnected component", -1, 3); // Test breadth first search VTK_CREATE(vtkBoostBreadthFirstSearch, bfs); - bfs->SetInput(g); + bfs->SetInputData(g); RenderGraph(ren, bfs.GetPointer(), 2, 0, "BFS", 0, 3, NULL, 0, 0); // Test centrality VTK_CREATE(vtkBoostBrandesCentrality, centrality); - centrality->SetInput(g); + centrality->SetInputData(g); RenderGraph(ren, centrality.GetPointer(), 0, 2, "centrality", 0, 1, NULL, 0, 0); // Test connected components VTK_CREATE(vtkBoostConnectedComponents, comp); - comp->SetInput(g); + comp->SetInputData(g); RenderGraph(ren, comp.GetPointer(), 2, 2, "component", 0, 2, NULL, 0, 0); // Test breadth first search tree VTK_CREATE(vtkBoostBreadthFirstSearchTree, bfsTree); - bfsTree->SetInput(g); + bfsTree->SetInputData(g); VTK_CREATE(vtkBoostBreadthFirstSearch, bfs2); bfs2->SetInputConnection(bfsTree->GetOutputPort()); RenderGraph(ren, bfs2.GetPointer(), 0, 4, "BFS", 0, 3, NULL, 0, 0); // Test Prim's MST VTK_CREATE(vtkBoostPrimMinimumSpanningTree, prim); - prim->SetInput(g2); + prim->SetInputData(g2); prim->SetOriginVertex(0); prim->SetEdgeWeightArrayName("weight"); RenderGraph(ren, prim.GetPointer(), 2, 4, NULL, 0, 0, NULL, 0, 0); diff --git a/Infovis/Testing/Cxx/TestBoostBetweennessClustering.cxx b/Infovis/Testing/Cxx/TestBoostBetweennessClustering.cxx index 4bb1c912d32..647f26c5961 100644 --- a/Infovis/Testing/Cxx/TestBoostBetweennessClustering.cxx +++ b/Infovis/Testing/Cxx/TestBoostBetweennessClustering.cxx @@ -99,7 +99,7 @@ int TestBoostBetweennessClustering(int vtkNotUsed(argc), // Test centrality vtkSmartPointer<vtkBoostBetweennessClustering> bbc ( vtkSmartPointer<vtkBoostBetweennessClustering>::New()); - bbc->SetInput(g); + bbc->SetInputData(g); bbc->SetThreshold(4); bbc->SetEdgeWeightArrayName("weights"); bbc->SetEdgeCentralityArrayName("bbc_centrality"); diff --git a/Infovis/Testing/Cxx/TestBoostBrandesCentrality.cxx b/Infovis/Testing/Cxx/TestBoostBrandesCentrality.cxx index 65c8bb941b8..df9476e877e 100644 --- a/Infovis/Testing/Cxx/TestBoostBrandesCentrality.cxx +++ b/Infovis/Testing/Cxx/TestBoostBrandesCentrality.cxx @@ -116,7 +116,7 @@ int TestBoostBrandesCentrality(int argc, char* argv[]) // Test centrality VTK_CREATE(vtkBoostBrandesCentrality, centrality); - centrality->SetInput(g); + centrality->SetInputData(g); centrality->SetEdgeWeightArrayName("weights"); centrality->SetInvertEdgeWeightArray(1); centrality->UseEdgeWeightArrayOn(); diff --git a/Infovis/Testing/Cxx/TestBoostExtractLargestComponent.cxx b/Infovis/Testing/Cxx/TestBoostExtractLargestComponent.cxx index f7b693a1627..6d894ed5f23 100644 --- a/Infovis/Testing/Cxx/TestBoostExtractLargestComponent.cxx +++ b/Infovis/Testing/Cxx/TestBoostExtractLargestComponent.cxx @@ -64,7 +64,7 @@ int TestNormal(vtkMutableUndirectedGraph* g) // Test normal operation (extract largest connected component) vtkSmartPointer<vtkBoostExtractLargestComponent> filter = vtkSmartPointer<vtkBoostExtractLargestComponent>::New(); - filter->SetInputConnection(g->GetProducerPort()); + filter->SetInputData(g); filter->Update(); if(filter->GetOutput()->GetNumberOfVertices() != 3) @@ -81,7 +81,7 @@ int TestInverse(vtkMutableUndirectedGraph* g) // Test inverse operation (extract everything but largest connected component) vtkSmartPointer<vtkBoostExtractLargestComponent> filter = vtkSmartPointer<vtkBoostExtractLargestComponent>::New(); - filter->SetInputConnection(g->GetProducerPort()); + filter->SetInputData(g); filter->SetInvertSelection(true); filter->Update(); diff --git a/Infovis/Testing/Cxx/TestCirclePackLayoutStrategy.cxx b/Infovis/Testing/Cxx/TestCirclePackLayoutStrategy.cxx index 6a763bd3c4c..19f211edb9a 100644 --- a/Infovis/Testing/Cxx/TestCirclePackLayoutStrategy.cxx +++ b/Infovis/Testing/Cxx/TestCirclePackLayoutStrategy.cxx @@ -648,7 +648,7 @@ int TestCirclePackLayoutStrategy(int argc, char* argv[]) } VTK_CREATE(vtkTreeFieldAggregator, agg); - agg->SetInput(tree); + agg->SetInputData(tree); agg->SetField("size"); agg->SetLeafVertexUnitSize(false); diff --git a/Infovis/Testing/Cxx/TestCollapseVerticesByArray.cxx b/Infovis/Testing/Cxx/TestCollapseVerticesByArray.cxx index 0aef2104d4d..1123f27ecb9 100644 --- a/Infovis/Testing/Cxx/TestCollapseVerticesByArray.cxx +++ b/Infovis/Testing/Cxx/TestCollapseVerticesByArray.cxx @@ -108,7 +108,7 @@ int TestCollapseVerticesByArray(int vtkNotUsed(argc), char* vtkNotUsed(argv)[]) cvs->SetVerticesCollapsedArray("weight_vertices"); cvs->SetVertexArray("owner_company"); cvs->AddAggregateEdgeArray("data_transfer"); - cvs->SetInput(inGraph); + cvs->SetInputData(inGraph); cvs->Update(); // Check values here. diff --git a/Infovis/Testing/Cxx/TestContingencyStatistics.cxx b/Infovis/Testing/Cxx/TestContingencyStatistics.cxx index 5b8dbeef52c..a0829eb6530 100644 --- a/Infovis/Testing/Cxx/TestContingencyStatistics.cxx +++ b/Infovis/Testing/Cxx/TestContingencyStatistics.cxx @@ -103,7 +103,7 @@ int TestContingencyStatistics( int, char *[] ) cout << "done.\n"; // Prepare first test with data - cs->SetInput( vtkStatisticsAlgorithm::INPUT_DATA, datasetTable ); + cs->SetInputData( vtkStatisticsAlgorithm::INPUT_DATA, datasetTable ); vtkTable* outputData = cs->GetOutput( vtkStatisticsAlgorithm::OUTPUT_DATA ); datasetTable->Delete(); diff --git a/Infovis/Testing/Cxx/TestCorrelativeStatistics.cxx b/Infovis/Testing/Cxx/TestCorrelativeStatistics.cxx index e79528a2204..1d71a69f183 100644 --- a/Infovis/Testing/Cxx/TestCorrelativeStatistics.cxx +++ b/Infovis/Testing/Cxx/TestCorrelativeStatistics.cxx @@ -158,7 +158,7 @@ int TestCorrelativeStatistics( int, char *[] ) cout << "done.\n"; // Prepare first test with data - cs1->SetInput( vtkStatisticsAlgorithm::INPUT_DATA, datasetTable1 ); + cs1->SetInputData( vtkStatisticsAlgorithm::INPUT_DATA, datasetTable1 ); datasetTable1->Delete(); // Select Column Pairs of Interest ( Learn Mode ) @@ -351,7 +351,7 @@ int TestCorrelativeStatistics( int, char *[] ) // Set correlative statistics algorithm and its input data port vtkCorrelativeStatistics* cs2 = vtkCorrelativeStatistics::New(); - cs2->SetInput( vtkStatisticsAlgorithm::INPUT_DATA, datasetTable2 ); + cs2->SetInputData( vtkStatisticsAlgorithm::INPUT_DATA, datasetTable2 ); datasetTable2->Delete(); // Select all column pairs as pairs of interest @@ -395,7 +395,7 @@ int TestCorrelativeStatistics( int, char *[] ) cs0->Aggregate( doc, aggregated ); // Finally, calculate the derived statistics of the aggregated model - cs0->SetInput( vtkStatisticsAlgorithm::INPUT_MODEL, aggregated ); + cs0->SetInputData( vtkStatisticsAlgorithm::INPUT_MODEL, aggregated ); cs0->SetLearnOption( false ); cs0->SetDeriveOption( true ); cs0->SetAssessOption( false ); @@ -572,7 +572,7 @@ int TestCorrelativeStatistics( int, char *[] ) // Set descriptive statistics algorithm and its input data port vtkCorrelativeStatistics* cs4 = vtkCorrelativeStatistics::New(); - cs4->SetInput( vtkStatisticsAlgorithm::INPUT_DATA, testTable ); + cs4->SetInputData( vtkStatisticsAlgorithm::INPUT_DATA, testTable ); testTable->Delete(); // Select Column Pairs of Interest ( Learn Mode ) diff --git a/Infovis/Testing/Cxx/TestCosmicTreeLayoutStrategy.cxx b/Infovis/Testing/Cxx/TestCosmicTreeLayoutStrategy.cxx index c835c031e22..09f37fe43f6 100644 --- a/Infovis/Testing/Cxx/TestCosmicTreeLayoutStrategy.cxx +++ b/Infovis/Testing/Cxx/TestCosmicTreeLayoutStrategy.cxx @@ -143,7 +143,7 @@ int TestCosmicTreeLayoutStrategy(int argc, char* argv[]) strategy->SizeLeafNodesOnlyOn(); strategy->SetNodeSizeArrayName( "inputRadius" ); VTK_CREATE(vtkGraphLayout, layout); - layout->SetInput( tree ); + layout->SetInputData( tree ); layout->SetLayoutStrategy( strategy ); VTK_CREATE(vtkGraphToPolyData, poly); diff --git a/Infovis/Testing/Cxx/TestDataObjectToTable.cxx b/Infovis/Testing/Cxx/TestDataObjectToTable.cxx index f360de107b7..5bcf9c93c7d 100644 --- a/Infovis/Testing/Cxx/TestDataObjectToTable.cxx +++ b/Infovis/Testing/Cxx/TestDataObjectToTable.cxx @@ -65,7 +65,7 @@ int TestDataObjectToTable(int vtkNotUsed(argc), char* vtkNotUsed(argv)[]) cerr << "... done" << endl; int errors = 0; - toTable->SetInput(pd); + toTable->SetInputData(pd); for (int type = 0; type < 3; type++) { cerr << "Converting "; diff --git a/Infovis/Testing/Cxx/TestDescriptiveStatistics.cxx b/Infovis/Testing/Cxx/TestDescriptiveStatistics.cxx index 70f13ea8c85..c9a5bcae0c8 100644 --- a/Infovis/Testing/Cxx/TestDescriptiveStatistics.cxx +++ b/Infovis/Testing/Cxx/TestDescriptiveStatistics.cxx @@ -151,7 +151,7 @@ int TestDescriptiveStatistics( int, char *[] ) cout << "done.\n"; // Prepare first test with data - ds1->SetInput( vtkStatisticsAlgorithm::INPUT_DATA, datasetTable1 ); + ds1->SetInputData( vtkStatisticsAlgorithm::INPUT_DATA, datasetTable1 ); datasetTable1->Delete(); // Select Columns of Interest @@ -330,7 +330,7 @@ int TestDescriptiveStatistics( int, char *[] ) modifiedModel->SetBlock( 1, modifiedDerived ); // Run with Assess option only (do not recalculate nor rederive a model) - ds1->SetInput( vtkStatisticsAlgorithm::INPUT_MODEL, modifiedModel ); + ds1->SetInputData( vtkStatisticsAlgorithm::INPUT_MODEL, modifiedModel ); ds1->SetLearnOption( false ); ds1->SetDeriveOption( false ); ds1->SetTestOption( true ); @@ -408,7 +408,7 @@ int TestDescriptiveStatistics( int, char *[] ) // Set descriptive statistics algorithm and its input data port vtkDescriptiveStatistics* ds2 = vtkDescriptiveStatistics::New(); - ds2->SetInput( vtkStatisticsAlgorithm::INPUT_DATA, datasetTable2 ); + ds2->SetInputData( vtkStatisticsAlgorithm::INPUT_DATA, datasetTable2 ); // Select Columns of Interest (all of them) for ( int i = 0; i< nMetrics; ++ i ) @@ -445,11 +445,11 @@ int TestDescriptiveStatistics( int, char *[] ) ds2->Delete(); // Test model aggregation by adding new data to engine which already has a model - ds1->SetInput( vtkStatisticsAlgorithm::INPUT_DATA, datasetTable2 ); + ds1->SetInputData( vtkStatisticsAlgorithm::INPUT_DATA, datasetTable2 ); datasetTable2->Delete(); vtkMultiBlockDataSet* model = vtkMultiBlockDataSet::New(); model->ShallowCopy( outputMetaDS1 ); - ds1->SetInput( vtkStatisticsAlgorithm::INPUT_MODEL, model ); + ds1->SetInputData( vtkStatisticsAlgorithm::INPUT_MODEL, model ); model->Delete(); // Update with Learn and Derive options only @@ -552,7 +552,7 @@ int TestDescriptiveStatistics( int, char *[] ) // Set descriptive statistics algorithm and its input data port vtkDescriptiveStatistics* ds3 = vtkDescriptiveStatistics::New(); - ds3->SetInput( vtkStatisticsAlgorithm::INPUT_DATA, simpleTable ); + ds3->SetInputData( vtkStatisticsAlgorithm::INPUT_DATA, simpleTable ); simpleTable->Delete(); // Select column of interest @@ -677,7 +677,7 @@ int TestDescriptiveStatistics( int, char *[] ) // Set descriptive statistics algorithm and its input data port vtkDescriptiveStatistics* ds4 = vtkDescriptiveStatistics::New(); - ds4->SetInput( vtkStatisticsAlgorithm::INPUT_DATA, gaussianTable ); + ds4->SetInputData( vtkStatisticsAlgorithm::INPUT_DATA, gaussianTable ); gaussianTable->Delete(); // Select Column of Interest diff --git a/Infovis/Testing/Cxx/TestExtractSelectedGraph.cxx b/Infovis/Testing/Cxx/TestExtractSelectedGraph.cxx index 5e52cdbcabe..c1a5a6a1214 100644 --- a/Infovis/Testing/Cxx/TestExtractSelectedGraph.cxx +++ b/Infovis/Testing/Cxx/TestExtractSelectedGraph.cxx @@ -94,7 +94,7 @@ int TestExtractSelectedGraph(int argc, char* argv[]) valueArr->SetName("value"); graph->GetVertexData()->AddArray(valueArr); VTK_CREATE(vtkGraphLayout, layout); - layout->SetInput(graph); + layout->SetInputData(graph); VTK_CREATE(vtkCircularLayoutStrategy, circular); layout->SetLayoutStrategy(circular); RenderGraph(layout, ren, 1, 1, 1, 0.01, 2.0f); @@ -114,7 +114,7 @@ int TestExtractSelectedGraph(int argc, char* argv[]) VTK_CREATE(vtkExtractSelectedGraph, extractThreshold); extractThreshold->SetInputConnection(0, layout->GetOutputPort()); - extractThreshold->SetInput(1, threshold); + extractThreshold->SetInputData(1, threshold); RenderGraph(extractThreshold, ren, 1, 0, 0, -0.01, 5.0f); cerr << "...done." << endl; @@ -132,7 +132,7 @@ int TestExtractSelectedGraph(int argc, char* argv[]) VTK_CREATE(vtkExtractSelectedGraph, extractIndices); extractIndices->SetInputConnection(0, layout->GetOutputPort()); - extractIndices->SetInput(1, indices); + extractIndices->SetInputData(1, indices); RenderGraph(extractIndices, ren, 0, 1, 0, -0.02, 9.0f); cerr << "...done." << endl; diff --git a/Infovis/Testing/Cxx/TestGraphAlgorithms.cxx b/Infovis/Testing/Cxx/TestGraphAlgorithms.cxx index ddda04daa78..6b65b80b337 100644 --- a/Infovis/Testing/Cxx/TestGraphAlgorithms.cxx +++ b/Infovis/Testing/Cxx/TestGraphAlgorithms.cxx @@ -111,7 +111,7 @@ int TestGraphAlgorithms(int argc, char* argv[]) // Test vertex degree VTK_CREATE(vtkVertexDegree, degree); - degree->SetInput(g); + degree->SetInputData(g); PerformAlgorithm(ren, degree, 0, 0, "VertexDegree", 0, 4); VTK_CREATE(vtkRenderWindowInteractor, iren); diff --git a/Infovis/Testing/Cxx/TestGraphHierarchicalBundle.cxx b/Infovis/Testing/Cxx/TestGraphHierarchicalBundle.cxx index 40972e99baa..ad095bf83c1 100644 --- a/Infovis/Testing/Cxx/TestGraphHierarchicalBundle.cxx +++ b/Infovis/Testing/Cxx/TestGraphHierarchicalBundle.cxx @@ -317,11 +317,11 @@ int TestGraphHierarchicalBundle(int argc, char* argv[]) treeStrategy->SetLeafSpacing(leafSpacing); VTK_CREATE(vtkGraphLayout, treeLayout); - treeLayout->SetInput(realTree); + treeLayout->SetInputData(realTree); treeLayout->SetLayoutStrategy(treeStrategy); VTK_CREATE(vtkGraphHierarchicalBundle, bundle); - bundle->SetInput(0, graph); + bundle->SetInputData(0, graph); bundle->SetInputConnection(1, treeLayout->GetOutputPort(0)); bundle->SetBundlingStrength(bundlingStrength); bundle->SetDirectMapping(true); diff --git a/Infovis/Testing/Cxx/TestGroupLeafVertices.cxx b/Infovis/Testing/Cxx/TestGroupLeafVertices.cxx index 63a5146ac2d..893f29c63af 100644 --- a/Infovis/Testing/Cxx/TestGroupLeafVertices.cxx +++ b/Infovis/Testing/Cxx/TestGroupLeafVertices.cxx @@ -111,7 +111,7 @@ int TestGroupLeafVertices(int argc, char* argv[]) // VTK_CREATE(vtkTableToTreeFilter, tableToTree); - tableToTree->SetInput(table); + tableToTree->SetInputData(table); tableToTree->Update(); vtkTree* tree = tableToTree->GetOutput(); for (vtkIdType i = 0; i < tree->GetNumberOfVertices(); i++) diff --git a/Infovis/Testing/Cxx/TestKMeansStatistics.cxx b/Infovis/Testing/Cxx/TestKMeansStatistics.cxx index ce061046065..d4e9e849463 100644 --- a/Infovis/Testing/Cxx/TestKMeansStatistics.cxx +++ b/Infovis/Testing/Cxx/TestKMeansStatistics.cxx @@ -108,7 +108,7 @@ int TestKMeansStatistics( int, char *[] ) cout << "done.\n"; // Prepare first test with data - haruspex->SetInput( vtkStatisticsAlgorithm::INPUT_DATA, inputData ); + haruspex->SetInputData( vtkStatisticsAlgorithm::INPUT_DATA, inputData ); haruspex->SetColumnStatus( inputData->GetColumnName( 0 ) , 1 ); haruspex->SetColumnStatus( inputData->GetColumnName( 2 ) , 1 ); haruspex->SetColumnStatus( "Testing", 1 ); @@ -163,7 +163,7 @@ int TestKMeansStatistics( int, char *[] ) } - haruspex->SetInput( vtkStatisticsAlgorithm::LEARN_PARAMETERS, paramData ); + haruspex->SetInputData( vtkStatisticsAlgorithm::LEARN_PARAMETERS, paramData ); cout << "## Testing with input table:" << "\n"; @@ -234,7 +234,7 @@ int TestKMeansStatistics( int, char *[] ) vtkMultiBlockDataSet* paramsTables = vtkMultiBlockDataSet::New(); paramsTables->ShallowCopy( outputMetaDS ); - haruspex->SetInput( vtkStatisticsAlgorithm::INPUT_MODEL, paramsTables ); + haruspex->SetInputData( vtkStatisticsAlgorithm::INPUT_MODEL, paramsTables ); // Test Assess option only (do not recalculate nor rederive a model) haruspex->SetLearnOption( false ); diff --git a/Infovis/Testing/Cxx/TestKdTreeBoxSelection.cxx b/Infovis/Testing/Cxx/TestKdTreeBoxSelection.cxx index 4573320cdf6..461bb918e25 100644 --- a/Infovis/Testing/Cxx/TestKdTreeBoxSelection.cxx +++ b/Infovis/Testing/Cxx/TestKdTreeBoxSelection.cxx @@ -161,7 +161,7 @@ int TestKdTreeBoxSelection(int argc, char *argv[]) selectSphere->SetRadius(1.1*glyphSize); VTK_CREATE(vtkGlyph3D, selectGlyph); - selectGlyph->SetInput(0, selectPoly); + selectGlyph->SetInputData(0, selectPoly); selectGlyph->SetInputConnection(1, selectSphere->GetOutputPort()); VTK_CREATE(vtkPolyDataMapper, selectMapper); @@ -205,7 +205,7 @@ int TestKdTreeBoxSelection(int argc, char *argv[]) } VTK_CREATE(vtkTreeLevelsFilter, treeLevels); - treeLevels->SetInput(realTree); + treeLevels->SetInputData(realTree); VTK_CREATE(vtkTreeMapToPolyData, treePoly); treePoly->SetInputConnection(treeLevels->GetOutputPort()); @@ -227,7 +227,7 @@ int TestKdTreeBoxSelection(int argc, char *argv[]) // VTK_CREATE(vtkGraphToPolyData, graphToPoly); - graphToPoly->SetInput(g); + graphToPoly->SetInputData(g); VTK_CREATE(vtkTransform, transform); if (threedim) diff --git a/Infovis/Testing/Cxx/TestMergeGraphs.cxx b/Infovis/Testing/Cxx/TestMergeGraphs.cxx index 5a1d6f5415f..b878193fb48 100644 --- a/Infovis/Testing/Cxx/TestMergeGraphs.cxx +++ b/Infovis/Testing/Cxx/TestMergeGraphs.cxx @@ -135,14 +135,14 @@ int TestMergeGraphs(int, char*[]) BuildTable(edge_table2, edge_data2, 3); vtkSmartPointer<vtkTableToGraph> ttg1 = vtkSmartPointer<vtkTableToGraph>::New(); - ttg1->SetInput(0, edge_table1); - ttg1->SetInput(1, vert_table1); + ttg1->SetInputData(0, edge_table1); + ttg1->SetInputData(1, vert_table1); ttg1->AddLinkVertex("src", "id"); ttg1->AddLinkVertex("tgt", "id"); ttg1->AddLinkEdge("src", "tgt"); vtkSmartPointer<vtkTableToGraph> ttg2 = vtkSmartPointer<vtkTableToGraph>::New(); - ttg2->SetInput(0, edge_table2); - ttg2->SetInput(1, vert_table2); + ttg2->SetInputData(0, edge_table2); + ttg2->SetInputData(1, vert_table2); ttg2->AddLinkVertex("src", "id"); ttg2->AddLinkVertex("tgt", "id"); ttg2->AddLinkEdge("src", "tgt"); diff --git a/Infovis/Testing/Cxx/TestMergeTables.cxx b/Infovis/Testing/Cxx/TestMergeTables.cxx index 73f7611d1ae..52ecd8081ac 100644 --- a/Infovis/Testing/Cxx/TestMergeTables.cxx +++ b/Infovis/Testing/Cxx/TestMergeTables.cxx @@ -62,8 +62,8 @@ TestMergeTables(int argc, char* argv[]) table2->Dump(10); VTK_CREATE(vtkMergeTables,merge); - merge->SetInput(0, table1); - merge->SetInput(1, table2); + merge->SetInputData(0, table1); + merge->SetInputData(1, table2); merge->SetMergeColumnsByName(true); merge->Update(); diff --git a/Infovis/Testing/Cxx/TestMultiCorrelativeStatistics.cxx b/Infovis/Testing/Cxx/TestMultiCorrelativeStatistics.cxx index 410a13611e3..9e96d21b3bc 100644 --- a/Infovis/Testing/Cxx/TestMultiCorrelativeStatistics.cxx +++ b/Infovis/Testing/Cxx/TestMultiCorrelativeStatistics.cxx @@ -99,7 +99,7 @@ int TestMultiCorrelativeStatistics( int, char *[] ) cout << "done.\n"; // Prepare first test with data - mcs->SetInput( vtkStatisticsAlgorithm::INPUT_DATA, datasetTable ); + mcs->SetInputData( vtkStatisticsAlgorithm::INPUT_DATA, datasetTable ); datasetTable->Delete(); @@ -149,7 +149,7 @@ int TestMultiCorrelativeStatistics( int, char *[] ) vtkMultiBlockDataSet* paramsTables = vtkMultiBlockDataSet::New(); paramsTables->ShallowCopy( outputMetaDS ); - mcs->SetInput( vtkStatisticsAlgorithm::INPUT_MODEL, paramsTables ); + mcs->SetInputData( vtkStatisticsAlgorithm::INPUT_MODEL, paramsTables ); paramsTables->Delete(); // Test Assess only (Do not recalculate nor rederive a model) diff --git a/Infovis/Testing/Cxx/TestOrderStatistics.cxx b/Infovis/Testing/Cxx/TestOrderStatistics.cxx index 7840b5e582c..e5fb1ae8efa 100644 --- a/Infovis/Testing/Cxx/TestOrderStatistics.cxx +++ b/Infovis/Testing/Cxx/TestOrderStatistics.cxx @@ -135,7 +135,7 @@ int TestOrderStatistics( int, char *[] ) cout << "done.\n"; // Prepare first test with data - os->SetInput( vtkStatisticsAlgorithm::INPUT_DATA, datasetTable ); + os->SetInputData( vtkStatisticsAlgorithm::INPUT_DATA, datasetTable ); datasetTable->Delete(); // Select Columns of Interest @@ -433,7 +433,7 @@ int TestOrderStatistics( int, char *[] ) // Set order statistics engine vtkOrderStatistics* os2 = vtkOrderStatistics::New(); - os2->SetInput( vtkStatisticsAlgorithm::INPUT_DATA, textTable ); + os2->SetInputData( vtkStatisticsAlgorithm::INPUT_DATA, textTable ); textTable->Delete(); os2->AddColumn( "Text" ); // Add column of interest os2->RequestSelectedColumns(); diff --git a/Infovis/Testing/Cxx/TestPBGLAlgorithms.cxx b/Infovis/Testing/Cxx/TestPBGLAlgorithms.cxx index 31d0565ca15..687e6415446 100644 --- a/Infovis/Testing/Cxx/TestPBGLAlgorithms.cxx +++ b/Infovis/Testing/Cxx/TestPBGLAlgorithms.cxx @@ -130,7 +130,7 @@ void TestDirectedGraph() // Build the breadth-first search filter vtkSmartPointer<vtkPBGLBreadthFirstSearch> bfs = vtkSmartPointer<vtkPBGLBreadthFirstSearch>::New(); - bfs->SetInput(graph); + bfs->SetInputData(graph); bfs->SetOriginVertex(helper->MakeDistributedId(0, verticesPerNode)); // Run the breadth-first search @@ -262,7 +262,7 @@ void TestUndirectedGraph() // Build the breadth-first search filter vtkSmartPointer<vtkPBGLBreadthFirstSearch> bfs = vtkSmartPointer<vtkPBGLBreadthFirstSearch>::New(); - bfs->SetInput(graph); + bfs->SetInputData(graph); bfs->SetOriginVertex(helper->MakeDistributedId(0, verticesPerNode)); // Run the breadth-first search diff --git a/Infovis/Testing/Cxx/TestPCAStatistics.cxx b/Infovis/Testing/Cxx/TestPCAStatistics.cxx index a2e08a0ac42..977f4d8a64b 100644 --- a/Infovis/Testing/Cxx/TestPCAStatistics.cxx +++ b/Infovis/Testing/Cxx/TestPCAStatistics.cxx @@ -117,7 +117,7 @@ int TestPCAStatistics( int argc, char* argv[] ) cout << "done.\n"; // Prepare first test with data - pcas->SetInput( vtkStatisticsAlgorithm::INPUT_DATA, datasetTable ); + pcas->SetInputData( vtkStatisticsAlgorithm::INPUT_DATA, datasetTable ); pcas->SetNormalizationSchemeByName( normScheme ); pcas->SetBasisSchemeByName( "FixedBasisEnergy" ); pcas->SetFixedBasisEnergy( 1. - 1e-8 ); @@ -226,7 +226,7 @@ int TestPCAStatistics( int argc, char* argv[] ) vtkMultiBlockDataSet* paramsTables = vtkMultiBlockDataSet::New(); paramsTables->ShallowCopy( outputMetaDS ); - pcas->SetInput( vtkStatisticsAlgorithm::INPUT_MODEL, paramsTables ); + pcas->SetInputData( vtkStatisticsAlgorithm::INPUT_MODEL, paramsTables ); paramsTables->Delete(); // Test Assess only (Do not recalculate nor rederive nor retest a model) @@ -291,7 +291,7 @@ bool TestEigen() vtkSmartPointer<vtkPCAStatistics> pcaStatistics = vtkSmartPointer<vtkPCAStatistics>::New(); - pcaStatistics->SetInput( vtkStatisticsAlgorithm::INPUT_DATA, datasetTable ); + pcaStatistics->SetInputData( vtkStatisticsAlgorithm::INPUT_DATA, datasetTable ); pcaStatistics->SetColumnStatus("M0", 1 ); pcaStatistics->SetColumnStatus("M1", 1 ); diff --git a/Infovis/Testing/Cxx/TestParallelKMeansStatisticsMPI.cxx b/Infovis/Testing/Cxx/TestParallelKMeansStatisticsMPI.cxx index 5e8c08e376f..ce55bcc8399 100644 --- a/Infovis/Testing/Cxx/TestParallelKMeansStatisticsMPI.cxx +++ b/Infovis/Testing/Cxx/TestParallelKMeansStatisticsMPI.cxx @@ -164,9 +164,9 @@ void RandomSampleStatistics( vtkMultiProcessController* controller, void* arg ) // Instantiate a parallel KMeans statistics engine and set its ports vtkPKMeansStatistics* pks = vtkPKMeansStatistics::New(); - pks->SetInput( vtkStatisticsAlgorithm::INPUT_DATA, inputData ); + pks->SetInputData( vtkStatisticsAlgorithm::INPUT_DATA, inputData ); pks->SetMaxNumIterations( 10 ); - pks->SetInput( vtkStatisticsAlgorithm::LEARN_PARAMETERS, paramData ); + pks->SetInputData( vtkStatisticsAlgorithm::LEARN_PARAMETERS, paramData ); // Select columns for testing pks->SetColumnStatus( inputData->GetColumnName( 0 ) , 1 ); diff --git a/Infovis/Testing/Cxx/TestParallelRandomStatisticsMPI.cxx b/Infovis/Testing/Cxx/TestParallelRandomStatisticsMPI.cxx index c2eed08287b..b9e25fb2f84 100644 --- a/Infovis/Testing/Cxx/TestParallelRandomStatisticsMPI.cxx +++ b/Infovis/Testing/Cxx/TestParallelRandomStatisticsMPI.cxx @@ -148,7 +148,7 @@ void RandomSampleStatistics( vtkMultiProcessController* controller, void* arg ) // For verification, instantiate a serial descriptive statistics engine and set its ports vtkDescriptiveStatistics* ds = vtkDescriptiveStatistics::New(); - ds->SetInput( vtkStatisticsAlgorithm::INPUT_DATA, inputData ); + ds->SetInputData( vtkStatisticsAlgorithm::INPUT_DATA, inputData ); // Select all columns for ( int c = 0; c < nVariables; ++ c ) @@ -341,7 +341,7 @@ void RandomSampleStatistics( vtkMultiProcessController* controller, void* arg ) // Instantiate a parallel descriptive statistics engine and set its input data vtkPDescriptiveStatistics* pds = vtkPDescriptiveStatistics::New(); - pds->SetInput( vtkStatisticsAlgorithm::INPUT_DATA, inputData ); + pds->SetInputData( vtkStatisticsAlgorithm::INPUT_DATA, inputData ); // Select all columns for ( int c = 0; c < nVariables; ++ c ) @@ -515,7 +515,7 @@ void RandomSampleStatistics( vtkMultiProcessController* controller, void* arg ) // Instantiate a parallel correlative statistics engine and set its input vtkPCorrelativeStatistics* pcs = vtkPCorrelativeStatistics::New(); - pcs->SetInput( vtkStatisticsAlgorithm::INPUT_DATA, inputData ); + pcs->SetInputData( vtkStatisticsAlgorithm::INPUT_DATA, inputData ); // Select column pairs (uniform vs. uniform, normal vs. normal) pcs->AddColumnPair( columnNames[0], columnNames[1] ); @@ -587,7 +587,7 @@ void RandomSampleStatistics( vtkMultiProcessController* controller, void* arg ) // Instantiate a parallel correlative statistics engine and set its ports vtkPMultiCorrelativeStatistics* pmcs = vtkPMultiCorrelativeStatistics::New(); - pmcs->SetInput( 0, inputData ); + pmcs->SetInputData( 0, inputData ); outputData = pmcs->GetOutput( vtkStatisticsAlgorithm::OUTPUT_DATA ); // Select column pairs (uniform vs. uniform, normal vs. normal) @@ -649,7 +649,7 @@ void RandomSampleStatistics( vtkMultiProcessController* controller, void* arg ) // Instantiate a parallel pca statistics engine and set its ports vtkPPCAStatistics* pcas = vtkPPCAStatistics::New(); - pcas->SetInput( vtkStatisticsAlgorithm::INPUT_DATA, inputData ); + pcas->SetInputData( vtkStatisticsAlgorithm::INPUT_DATA, inputData ); outputData = pcas->GetOutput( vtkStatisticsAlgorithm::OUTPUT_DATA ); // Select column pairs (uniform vs. uniform, normal vs. normal) diff --git a/Infovis/Testing/Cxx/TestPassArrays.cxx b/Infovis/Testing/Cxx/TestPassArrays.cxx index 143676695fe..79278cf1ec9 100644 --- a/Infovis/Testing/Cxx/TestPassArrays.cxx +++ b/Infovis/Testing/Cxx/TestPassArrays.cxx @@ -65,7 +65,7 @@ int TestPassArrays(int vtkNotUsed(argc), char* vtkNotUsed(argv)[]) cerr << "... done" << endl; int errors = 0; - pass->SetInput(pd); + pass->SetInputData(pd); for (int type = 0; type < 3; type++) { diff --git a/Infovis/Testing/Cxx/TestPassThrough.cxx b/Infovis/Testing/Cxx/TestPassThrough.cxx index cb85f2a17b9..aed3f0d0d85 100644 --- a/Infovis/Testing/Cxx/TestPassThrough.cxx +++ b/Infovis/Testing/Cxx/TestPassThrough.cxx @@ -93,7 +93,7 @@ int TestPassThrough(int , char* []) cerr << "... done" << endl; VTK_CREATE(vtkPassThrough, pass); - pass->SetInput(g); + pass->SetInputData(g); pass->Update(); vtkGraph *output = vtkGraph::SafeDownCast(pass->GetOutput()); diff --git a/Infovis/Testing/Cxx/TestPruneTreeFilter.cxx b/Infovis/Testing/Cxx/TestPruneTreeFilter.cxx index 3103c1c6838..b8ccb30ce06 100644 --- a/Infovis/Testing/Cxx/TestPruneTreeFilter.cxx +++ b/Infovis/Testing/Cxx/TestPruneTreeFilter.cxx @@ -65,7 +65,7 @@ int TestPruneTreeFilter(int argc, char* argv[]) tree->GetVertexData()->AddArray(idArr); VTK_CREATE(vtkPruneTreeFilter, prune); - prune->SetInput(tree); + prune->SetInputData(tree); prune->SetParentVertex(2); VTK_CREATE(vtkTreeLayoutStrategy, strategy); diff --git a/Infovis/Testing/Cxx/TestRandomPContingencyStatisticsMPI.cxx b/Infovis/Testing/Cxx/TestRandomPContingencyStatisticsMPI.cxx index e3382f2f294..e48247c93f2 100644 --- a/Infovis/Testing/Cxx/TestRandomPContingencyStatisticsMPI.cxx +++ b/Infovis/Testing/Cxx/TestRandomPContingencyStatisticsMPI.cxx @@ -107,7 +107,7 @@ void RandomContingencyStatistics( vtkMultiProcessController* controller, void* a // Instantiate a parallel contingency statistics engine and set its ports vtkPContingencyStatistics* pcs = vtkPContingencyStatistics::New(); - pcs->SetInput( vtkStatisticsAlgorithm::INPUT_DATA, inputData ); + pcs->SetInputData( vtkStatisticsAlgorithm::INPUT_DATA, inputData ); vtkMultiBlockDataSet* outputMetaDS = vtkMultiBlockDataSet::SafeDownCast( pcs->GetOutputDataObject( vtkStatisticsAlgorithm::OUTPUT_MODEL ) ); // Select column pairs (uniform vs. uniform, normal vs. normal) diff --git a/Infovis/Testing/Cxx/TestRandomPOrderStatisticsMPI.cxx b/Infovis/Testing/Cxx/TestRandomPOrderStatisticsMPI.cxx index 8754f32be32..85060ce726c 100644 --- a/Infovis/Testing/Cxx/TestRandomPOrderStatisticsMPI.cxx +++ b/Infovis/Testing/Cxx/TestRandomPOrderStatisticsMPI.cxx @@ -145,7 +145,7 @@ void RandomOrderStatistics( vtkMultiProcessController* controller, void* arg ) // Instantiate a parallel order statistics engine and set its ports vtkPOrderStatistics* pos = vtkPOrderStatistics::New(); - pos->SetInput( vtkStatisticsAlgorithm::INPUT_DATA, inputData ); + pos->SetInputData( vtkStatisticsAlgorithm::INPUT_DATA, inputData ); vtkMultiBlockDataSet* outputModelDS = vtkMultiBlockDataSet::SafeDownCast( pos->GetOutputDataObject( vtkStatisticsAlgorithm::OUTPUT_MODEL ) ); // Select column pairs (uniform vs. uniform, normal vs. normal) diff --git a/Infovis/Testing/Cxx/TestRemoveIsolatedVertices.cxx b/Infovis/Testing/Cxx/TestRemoveIsolatedVertices.cxx index 2f970a63dd5..1c0e39e8bef 100644 --- a/Infovis/Testing/Cxx/TestRemoveIsolatedVertices.cxx +++ b/Infovis/Testing/Cxx/TestRemoveIsolatedVertices.cxx @@ -35,7 +35,7 @@ int TestRemoveIsolatedVertices(int, char *[]) vtkSmartPointer<vtkRemoveIsolatedVertices> filter = vtkSmartPointer<vtkRemoveIsolatedVertices>::New(); - filter->SetInputConnection(g->GetProducerPort()); + filter->SetInputData(g); filter->Update(); if(filter->GetOutput()->GetNumberOfVertices() != 2) diff --git a/Infovis/Testing/Cxx/TestSimple3DCirclesStrategy.cxx b/Infovis/Testing/Cxx/TestSimple3DCirclesStrategy.cxx index 488d3d356bf..34f27a60eb3 100644 --- a/Infovis/Testing/Cxx/TestSimple3DCirclesStrategy.cxx +++ b/Infovis/Testing/Cxx/TestSimple3DCirclesStrategy.cxx @@ -81,7 +81,7 @@ int TestSimple3DCirclesStrategy(int argc, char *argv[]) strategy->AutoHeightOn(); strategy->SetDirection(0.0,-1.0,0.0); strategy->SetMinimumDegree( 45.0 ); - layout->SetInput( graph ); + layout->SetInputData( graph ); layout->SetLayoutStrategy( strategy ); // Uncomment the following for a more interesting result! @@ -99,8 +99,8 @@ int TestSimple3DCirclesStrategy(int argc, char *argv[]) edgeLayout->Update(); graphToPoly->EdgeGlyphOutputOn(); - graphToPoly->SetInput( edgeLayout->GetOutput() ); - vertGlyph->SetInput( edgeLayout->GetOutput() ); + graphToPoly->SetInputConnection( edgeLayout->GetOutputPort() ); + vertGlyph->SetInputConnection( edgeLayout->GetOutputPort() ); edgeMapper->ScalarVisibilityOff(); edgeMapper->ImmediateModeRenderingOn(); diff --git a/Infovis/Testing/Cxx/TestStreamGraph.cxx b/Infovis/Testing/Cxx/TestStreamGraph.cxx index cf9dfbf2109..eabf3c284a5 100644 --- a/Infovis/Testing/Cxx/TestStreamGraph.cxx +++ b/Infovis/Testing/Cxx/TestStreamGraph.cxx @@ -22,7 +22,7 @@ int TestStreamGraph(int, char*[]) table->AddColumn(tgt); table->AddColumn(time); vtkSmartPointer<vtkTableToGraph> t2g = vtkSmartPointer<vtkTableToGraph>::New(); - t2g->SetInput(table); + t2g->SetInputData(table); t2g->AddLinkVertex("source"); t2g->AddLinkVertex("target"); t2g->AddLinkEdge("source", "target"); diff --git a/Infovis/Testing/Cxx/TestStringToCategory.cxx b/Infovis/Testing/Cxx/TestStringToCategory.cxx index 515e9cd9376..14986aede94 100644 --- a/Infovis/Testing/Cxx/TestStringToCategory.cxx +++ b/Infovis/Testing/Cxx/TestStringToCategory.cxx @@ -75,7 +75,7 @@ int TestStringToCategory(int argc, char* argv[]) graph->GetEdgeData()->AddArray(edgeString); VTK_CREATE(vtkStringToCategory, vertexCategory); - vertexCategory->SetInput(graph); + vertexCategory->SetInputData(graph); vertexCategory->SetInputArrayToProcess(0, 0, 0, vtkDataObject::FIELD_ASSOCIATION_VERTICES, "vertex string"); vertexCategory->SetCategoryArrayName("vertex category"); diff --git a/Infovis/Testing/Cxx/TestTableSplitColumnComponents.cxx b/Infovis/Testing/Cxx/TestTableSplitColumnComponents.cxx index 1131c5216f4..6afab13d8c1 100644 --- a/Infovis/Testing/Cxx/TestTableSplitColumnComponents.cxx +++ b/Infovis/Testing/Cxx/TestTableSplitColumnComponents.cxx @@ -47,7 +47,7 @@ int TestTableSplitColumnComponents(int, char*[]) // Merge the two tables VTK_CREATE(vtkSplitColumnComponents, split); - split->SetInput(table); + split->SetInputData(table); split->Update(); vtkTable* out = split->GetOutput(0); diff --git a/Infovis/Testing/Cxx/TestTableToArray.cxx b/Infovis/Testing/Cxx/TestTableToArray.cxx index cff4ac32b85..2085ce768ad 100644 --- a/Infovis/Testing/Cxx/TestTableToArray.cxx +++ b/Infovis/Testing/Cxx/TestTableToArray.cxx @@ -70,7 +70,7 @@ int TestTableToArray(int vtkNotUsed(argc), char* vtkNotUsed(argv)[]) table->AddColumn(string_array); VTK_CREATE(vtkTableToArray, table_to_array); - table_to_array->SetInputConnection(0, table->GetProducerPort()); + table_to_array->SetInputData(0, table); table_to_array->AddColumn("C"); table_to_array->AddColumn(1); table_to_array->AddColumn(static_cast<vtkIdType>(0)); diff --git a/Infovis/Testing/Cxx/TestTableToGraph.cxx b/Infovis/Testing/Cxx/TestTableToGraph.cxx index 2aeedd5be22..1dc05af6dec 100644 --- a/Infovis/Testing/Cxx/TestTableToGraph.cxx +++ b/Infovis/Testing/Cxx/TestTableToGraph.cxx @@ -84,7 +84,7 @@ void TestTableToGraphRender(vtkRenderer* ren, vtkGraphAlgorithm* alg, graph->DeepCopy(output); VTK_CREATE(vtkGraphLayout, layout); - layout->SetInput(graph); + layout->SetInputData(graph); if (circular) { VTK_CREATE(vtkCircularLayoutStrategy, strategy); diff --git a/Infovis/Testing/Cxx/TestThresholdTable.cxx b/Infovis/Testing/Cxx/TestThresholdTable.cxx index 42d771c0a2c..19067a8901b 100644 --- a/Infovis/Testing/Cxx/TestThresholdTable.cxx +++ b/Infovis/Testing/Cxx/TestThresholdTable.cxx @@ -60,7 +60,7 @@ int TestThresholdTable(int vtkNotUsed(argc), char* vtkNotUsed(argv)[]) // Use the ThresholdTable VTK_CREATE(vtkThresholdTable, threshold); - threshold->SetInput(table); + threshold->SetInputData(table); int errors = 0; threshold->SetInputArrayToProcess(0, 0, 0, vtkDataObject::FIELD_ASSOCIATION_ROWS, "intArr"); diff --git a/Infovis/Testing/Cxx/TestTimePoint.cxx b/Infovis/Testing/Cxx/TestTimePoint.cxx index 2e466f07f3b..12fe9798f14 100644 --- a/Infovis/Testing/Cxx/TestTimePoint.cxx +++ b/Infovis/Testing/Cxx/TestTimePoint.cxx @@ -82,7 +82,7 @@ int TestTimePoint(int, char*[]) table->AddColumn(timeArray); cerr << "Testing vtkTimePointToString on a vtkTable with datetime array ..." << endl; - timeToString->SetInput(table); + timeToString->SetInputData(table); timeToString->SetInputArrayToProcess(0, 0, 0, vtkDataObject::FIELD_ASSOCIATION_ROWS, "datetime"); timeToString->SetOutputArrayName("datetime [to string]"); timeToString->SetISO8601Format(vtkTimePointUtility::ISO8601_DATETIME_MILLIS); @@ -101,7 +101,7 @@ int TestTimePoint(int, char*[]) } cerr << "Converting string array back to a datetime ..." << endl; - stringToTime->SetInput(tableOutput); + stringToTime->SetInputData(tableOutput); stringToTime->SetInputArrayToProcess(0, 0, 0, vtkDataObject::FIELD_ASSOCIATION_ROWS, "datetime [to string]"); stringToTime->SetOutputArrayName("datetime [to string] [to datetime]"); stringToTime->Update(); @@ -124,7 +124,7 @@ int TestTimePoint(int, char*[]) } cerr << "Testing vtkTimePointToString on a vtkTable with date array ..." << endl; - timeToString->SetInput(table); + timeToString->SetInputData(table); timeToString->SetInputArrayToProcess(0, 0, 0, vtkDataObject::FIELD_ASSOCIATION_ROWS, "date"); timeToString->SetISO8601Format(vtkTimePointUtility::ISO8601_DATE); timeToString->SetOutputArrayName("date [to string]"); @@ -143,7 +143,7 @@ int TestTimePoint(int, char*[]) } cerr << "Converting string array back to a date ..." << endl; - stringToTime->SetInput(tableOutput); + stringToTime->SetInputData(tableOutput); stringToTime->SetInputArrayToProcess(0, 0, 0, vtkDataObject::FIELD_ASSOCIATION_ROWS, "date [to string]"); stringToTime->SetOutputArrayName("date [to string] [to date]"); stringToTime->Update(); @@ -166,7 +166,7 @@ int TestTimePoint(int, char*[]) } cerr << "Testing vtkTimePointToString on a vtkTable with time array ..." << endl; - timeToString->SetInput(table); + timeToString->SetInputData(table); timeToString->SetInputArrayToProcess(0, 0, 0, vtkDataObject::FIELD_ASSOCIATION_ROWS, "time"); timeToString->SetISO8601Format(vtkTimePointUtility::ISO8601_TIME_MILLIS); timeToString->SetOutputArrayName("time [to string]"); @@ -185,7 +185,7 @@ int TestTimePoint(int, char*[]) } cerr << "Converting string array back to a time ..." << endl; - stringToTime->SetInput(tableOutput); + stringToTime->SetInputData(tableOutput); stringToTime->SetInputArrayToProcess(0, 0, 0, vtkDataObject::FIELD_ASSOCIATION_ROWS, "time [to string]"); stringToTime->SetOutputArrayName("time [to string] [to time]"); stringToTime->Update(); @@ -215,7 +215,7 @@ int TestTimePoint(int, char*[]) vtkGraph* graph = graphSource->GetOutput(); graph->GetVertexData()->AddArray(dateTimeArray); - timeToString->SetInput(graph); + timeToString->SetInputData(graph); timeToString->SetInputArrayToProcess(0, 0, 0, vtkDataObject::FIELD_ASSOCIATION_VERTICES, "datetime"); timeToString->SetOutputArrayName("datetime [to string]"); timeToString->SetISO8601Format(vtkTimePointUtility::ISO8601_DATE); diff --git a/Infovis/Testing/Cxx/TestTreeMapLayoutStrategy.cxx b/Infovis/Testing/Cxx/TestTreeMapLayoutStrategy.cxx index 361c482e7c0..8d79c9aacce 100644 --- a/Infovis/Testing/Cxx/TestTreeMapLayoutStrategy.cxx +++ b/Infovis/Testing/Cxx/TestTreeMapLayoutStrategy.cxx @@ -97,7 +97,7 @@ int TestTreeMapLayoutStrategy(int argc, char* argv[]) } VTK_CREATE(vtkTreeFieldAggregator, agg); - agg->SetInput(tree); + agg->SetInputData(tree); agg->SetField("size"); agg->SetLeafVertexUnitSize(false); diff --git a/Infovis/vtkAreaLayout.cxx b/Infovis/vtkAreaLayout.cxx index 57c2ef111fa..ff28efaff7c 100644 --- a/Infovis/vtkAreaLayout.cxx +++ b/Infovis/vtkAreaLayout.cxx @@ -113,7 +113,7 @@ int vtkAreaLayout::RequestData( vtkSmartPointer<vtkTree> t = vtkSmartPointer<vtkTree>::New(); t->ShallowCopy(outputTree); - agg->SetInput(t); + agg->SetInputData(t); agg->SetField("size"); agg->SetLeafVertexUnitSize(true); agg->Update(); diff --git a/Infovis/vtkAssignCoordinatesLayoutStrategy.cxx b/Infovis/vtkAssignCoordinatesLayoutStrategy.cxx index f48b2970778..936b4d00c52 100644 --- a/Infovis/vtkAssignCoordinatesLayoutStrategy.cxx +++ b/Infovis/vtkAssignCoordinatesLayoutStrategy.cxx @@ -76,7 +76,7 @@ const char* vtkAssignCoordinatesLayoutStrategy::GetZCoordArrayName() void vtkAssignCoordinatesLayoutStrategy::Layout() { - this->AssignCoordinates->SetInput(this->Graph); + this->AssignCoordinates->SetInputData(this->Graph); this->AssignCoordinates->Update(); this->Graph->ShallowCopy(this->AssignCoordinates->GetOutput()); } diff --git a/Infovis/vtkAttributeClustering2DLayoutStrategy.cxx b/Infovis/vtkAttributeClustering2DLayoutStrategy.cxx index 2f221e7239d..b7acedc2598 100644 --- a/Infovis/vtkAttributeClustering2DLayoutStrategy.cxx +++ b/Infovis/vtkAttributeClustering2DLayoutStrategy.cxx @@ -309,7 +309,7 @@ void vtkAttributeClustering2DLayoutStrategy::Initialize() // Set up the image splatter this->GenerateGaussianSplat(this->SplatImage, 41, 41); - this->DensityGrid->SetInput(1, this->SplatImage); + this->DensityGrid->SetInputData(1, this->SplatImage); this->DensityGrid->SetOutputDimensions(100, 100, 1); } @@ -335,7 +335,7 @@ void vtkAttributeClustering2DLayoutStrategy::Layout() } // Set my graph as input into the density grid - this->DensityGrid->SetInput(this->Graph); + this->DensityGrid->SetInputData(this->Graph); // Set up some variables vtkPoints* pts = this->Graph->GetPoints(); diff --git a/Infovis/vtkCirclePackToPolyData.cxx b/Infovis/vtkCirclePackToPolyData.cxx index 6287e13ef73..0db0e344361 100644 --- a/Infovis/vtkCirclePackToPolyData.cxx +++ b/Infovis/vtkCirclePackToPolyData.cxx @@ -99,7 +99,7 @@ int vtkCirclePackToPolyData::RequestData( circle[2], this->Resolution, circlePData); - appendFilter->AddInput(circlePData); + appendFilter->AddInputData(circlePData); if ( i%1000 == 0 ) { diff --git a/Infovis/vtkClustering2DLayoutStrategy.cxx b/Infovis/vtkClustering2DLayoutStrategy.cxx index 606645cbe2d..7a1c42f3ad6 100644 --- a/Infovis/vtkClustering2DLayoutStrategy.cxx +++ b/Infovis/vtkClustering2DLayoutStrategy.cxx @@ -286,7 +286,7 @@ void vtkClustering2DLayoutStrategy::Initialize() // Set up the image splatter this->GenerateGaussianSplat(this->SplatImage, 41, 41); - this->DensityGrid->SetInput(1, this->SplatImage); + this->DensityGrid->SetInputData(1, this->SplatImage); this->DensityGrid->SetOutputDimensions(100, 100, 1); } @@ -305,7 +305,7 @@ void vtkClustering2DLayoutStrategy::Layout() } // Set my graph as input into the density grid - this->DensityGrid->SetInput(this->Graph); + this->DensityGrid->SetInputData(this->Graph); // Set up some variables vtkPoints* pts = this->Graph->GetPoints(); diff --git a/Infovis/vtkCommunity2DLayoutStrategy.cxx b/Infovis/vtkCommunity2DLayoutStrategy.cxx index 7af6272dff5..3ad90d61af3 100644 --- a/Infovis/vtkCommunity2DLayoutStrategy.cxx +++ b/Infovis/vtkCommunity2DLayoutStrategy.cxx @@ -275,7 +275,7 @@ void vtkCommunity2DLayoutStrategy::Initialize() // Set up the image splatter this->GenerateGaussianSplat(this->SplatImage, 41, 41); - this->DensityGrid->SetInput(1, this->SplatImage); + this->DensityGrid->SetInputData(1, this->SplatImage); this->DensityGrid->SetOutputDimensions(100, 100, 1); } @@ -294,7 +294,7 @@ void vtkCommunity2DLayoutStrategy::Layout() } // Set my graph as input into the density grid - this->DensityGrid->SetInput(this->Graph); + this->DensityGrid->SetInputData(this->Graph); // Set up some variables vtkPoints* pts = this->Graph->GetPoints(); diff --git a/Infovis/vtkComputeHistogram2DOutliers.cxx b/Infovis/vtkComputeHistogram2DOutliers.cxx index 56c21ce39d5..49bbae0308c 100644 --- a/Infovis/vtkComputeHistogram2DOutliers.cxx +++ b/Infovis/vtkComputeHistogram2DOutliers.cxx @@ -304,7 +304,7 @@ int vtkComputeHistogram2DOutliers::ComputeOutlierThresholds(vtkImageData* histog return 0; vtkSmartPointer<vtkImageMedian3D> median = vtkSmartPointer<vtkImageMedian3D>::New(); - median->SetInputConnection(histogram->GetProducerPort()); + median->SetInputData(histogram); median->SetKernelSize(3,3,1); median->Update(); diff --git a/Infovis/vtkConstrained2DLayoutStrategy.cxx b/Infovis/vtkConstrained2DLayoutStrategy.cxx index 791b924acf2..832e3e819c6 100644 --- a/Infovis/vtkConstrained2DLayoutStrategy.cxx +++ b/Infovis/vtkConstrained2DLayoutStrategy.cxx @@ -271,7 +271,7 @@ void vtkConstrained2DLayoutStrategy::Initialize() // Set up the image splatter this->GenerateGaussianSplat(this->SplatImage, 41, 41); - this->DensityGrid->SetInput(1, this->SplatImage); + this->DensityGrid->SetInputData(1, this->SplatImage); this->DensityGrid->SetOutputDimensions(100, 100, 1); } @@ -290,7 +290,7 @@ void vtkConstrained2DLayoutStrategy::Layout() } // Set my graph as input into the density grid - this->DensityGrid->SetInput(this->Graph); + this->DensityGrid->SetInputData(this->Graph); // Set up some variables vtkPoints* pts = this->Graph->GetPoints(); diff --git a/Infovis/vtkDelimitedTextReader.cxx b/Infovis/vtkDelimitedTextReader.cxx index e10d7288468..97505a3337e 100644 --- a/Infovis/vtkDelimitedTextReader.cxx +++ b/Infovis/vtkDelimitedTextReader.cxx @@ -639,7 +639,7 @@ int vtkDelimitedTextReader::RequestData( vtkStringToNumeric* convertor = vtkStringToNumeric::New(); vtkTable* clone = output_table->NewInstance(); clone->ShallowCopy(output_table); - convertor->SetInput(clone); + convertor->SetInputData(clone); convertor->Update(); clone->Delete(); output_table->ShallowCopy(convertor->GetOutputDataObject(0)); diff --git a/Infovis/vtkExtractSelectedGraph.cxx b/Infovis/vtkExtractSelectedGraph.cxx index 499393fdf9a..204e0dc727c 100644 --- a/Infovis/vtkExtractSelectedGraph.cxx +++ b/Infovis/vtkExtractSelectedGraph.cxx @@ -131,7 +131,7 @@ int vtkExtractSelectedGraph::RequestDataObject( { output = input->NewInstance(); } - output->SetPipelineInformation(info); + info->Set(vtkDataObject::DATA_OBJECT(), output); output->Delete(); } return 1; diff --git a/Infovis/vtkFast2DLayoutStrategy.cxx b/Infovis/vtkFast2DLayoutStrategy.cxx index 6eb358f4848..82d38a9c1fe 100644 --- a/Infovis/vtkFast2DLayoutStrategy.cxx +++ b/Infovis/vtkFast2DLayoutStrategy.cxx @@ -271,7 +271,7 @@ void vtkFast2DLayoutStrategy::Initialize() // Set up the image splatter this->GenerateGaussianSplat(this->SplatImage, 41, 41); - this->DensityGrid->SetInput(1, this->SplatImage); + this->DensityGrid->SetInputData(1, this->SplatImage); this->DensityGrid->SetOutputDimensions(100, 100, 1); } @@ -297,7 +297,7 @@ void vtkFast2DLayoutStrategy::Layout() } // Set my graph as input into the graph to polydata - this->GraphToPoly->SetInput(this->Graph); + this->GraphToPoly->SetInputData(this->Graph); // Set the polydata graph as input to the fast splatter this->DensityGrid->SetInputConnection(this->GraphToPoly->GetOutputPort()); diff --git a/Infovis/vtkGenerateIndexArray.cxx b/Infovis/vtkGenerateIndexArray.cxx index 58c83b2a397..c6121797025 100644 --- a/Infovis/vtkGenerateIndexArray.cxx +++ b/Infovis/vtkGenerateIndexArray.cxx @@ -88,7 +88,7 @@ int vtkGenerateIndexArray::RequestDataObject( if (!output || !output->IsA(input->GetClassName())) { vtkDataObject* newOutput = input->NewInstance(); - newOutput->SetPipelineInformation(info); + info->Set(vtkDataObject::DATA_OBJECT(), newOutput); newOutput->Delete(); } } diff --git a/Infovis/vtkMergeTables.cxx b/Infovis/vtkMergeTables.cxx index bb12d73a995..9f6d60df27b 100644 --- a/Infovis/vtkMergeTables.cxx +++ b/Infovis/vtkMergeTables.cxx @@ -193,7 +193,7 @@ int vtkMergeTables::RequestData( vtkMergeColumns* mergeColumns = vtkMergeColumns::New(); vtkTable* temp = vtkTable::New(); temp->ShallowCopy(output); - mergeColumns->SetInput(temp); + mergeColumns->SetInputData(temp); if (this->MergeColumnsByName) { for (vtkIdType i = 0; i < toMerge->GetNumberOfValues(); i += 3) diff --git a/Infovis/vtkPCAStatistics.cxx b/Infovis/vtkPCAStatistics.cxx index 289fb09acd1..4bf9aac4e81 100644 --- a/Infovis/vtkPCAStatistics.cxx +++ b/Infovis/vtkPCAStatistics.cxx @@ -456,7 +456,7 @@ vtkTable* vtkPCAStatistics::GetSpecifiedNormalization() void vtkPCAStatistics::SetSpecifiedNormalization( vtkTable* normSpec ) { - this->SetInput( 3, normSpec ); + this->SetInputData( 3, normSpec ); } // ---------------------------------------------------------------------- diff --git a/Infovis/vtkPCAStatistics.h b/Infovis/vtkPCAStatistics.h index b882b6d35ac..329ce454cae 100644 --- a/Infovis/vtkPCAStatistics.h +++ b/Infovis/vtkPCAStatistics.h @@ -122,6 +122,9 @@ public: // Any missing entries will be set to 1.0 and a warning issued. // An error will occur if the third input to the filter is not set and the // NormalizationScheme is DIAGONAL_SPECIFIED or TRIANGLE_SPECIFIED. + // + // NOTE: SetSpecifiedNormalization( table ) is equivalent to SetInputData(3, table) + // and therefore does not make a pipeline connection. virtual vtkTable* GetSpecifiedNormalization(); virtual void SetSpecifiedNormalization( vtkTable* ); diff --git a/Infovis/vtkPairwiseExtractHistogram2D.cxx b/Infovis/vtkPairwiseExtractHistogram2D.cxx index 5ae2f1a3887..2fa69c552cf 100644 --- a/Infovis/vtkPairwiseExtractHistogram2D.cxx +++ b/Infovis/vtkPairwiseExtractHistogram2D.cxx @@ -139,7 +139,7 @@ void vtkPairwiseExtractHistogram2D::Learn(vtkTable *inData, // create a new histogram filter vtkSmartPointer<vtkExtractHistogram2D> f; f.TakeReference(this->NewHistogramFilter()); - f->SetInput(inDataCopy); + f->SetInputData(inDataCopy); f->SetNumberOfBins(this->NumberOfBins); vtkstd::pair<vtkStdString,vtkStdString> colpair(inData->GetColumn(i)->GetName(),inData->GetColumn(i+1)->GetName()); f->AddColumnPair(colpair.first.c_str(),colpair.second.c_str()); diff --git a/Infovis/vtkPassArrays.cxx b/Infovis/vtkPassArrays.cxx index e130b4e4358..1fad99d8534 100644 --- a/Infovis/vtkPassArrays.cxx +++ b/Infovis/vtkPassArrays.cxx @@ -210,7 +210,7 @@ int vtkPassArrays::RequestDataObject( if (!output || !output->IsA(input->GetClassName())) { vtkDataObject* newOutput = input->NewInstance(); - newOutput->SetPipelineInformation(info); + info->Set(vtkDataObject::DATA_OBJECT(), newOutput); newOutput->Delete(); } } diff --git a/Infovis/vtkRemoveHiddenData.cxx b/Infovis/vtkRemoveHiddenData.cxx index c8b00df71f2..edc67935bcd 100644 --- a/Infovis/vtkRemoveHiddenData.cxx +++ b/Infovis/vtkRemoveHiddenData.cxx @@ -140,15 +140,15 @@ int vtkRemoveHiddenData::RequestData( if (graph) { - this->ExtractGraph->SetInput(input); - this->ExtractGraph->SetInput(1, selection); + this->ExtractGraph->SetInputData(input); + this->ExtractGraph->SetInputData(1, selection); this->ExtractGraph->Update(); output->ShallowCopy(this->ExtractGraph->GetOutput()); } else if (table) { - this->ExtractTable->SetInput(input); - this->ExtractTable->SetInput(1, selection); + this->ExtractTable->SetInputData(input); + this->ExtractTable->SetInputData(1, selection); this->ExtractTable->Update(); output->ShallowCopy(this->ExtractTable->GetOutput()); } diff --git a/Infovis/vtkSQLGraphReader.cxx b/Infovis/vtkSQLGraphReader.cxx index e3b69a3ed03..c58d44ff2da 100644 --- a/Infovis/vtkSQLGraphReader.cxx +++ b/Infovis/vtkSQLGraphReader.cxx @@ -139,7 +139,6 @@ int vtkSQLGraphReader::RequestData( vtkSmartPointer<vtkRowQueryToTable> edgeReader = vtkSmartPointer<vtkRowQueryToTable>::New(); edgeReader->SetQuery(this->EdgeQuery); edgeReader->Update(); - vtkTable* edgeTable = edgeReader->GetOutput(); const char* domain = "default"; if (this->VertexIdField) @@ -147,7 +146,7 @@ int vtkSQLGraphReader::RequestData( domain = this->VertexIdField; } - filter->SetInput(0, edgeTable); + filter->SetInputConnection(edgeReader->GetOutputPort()); filter->AddLinkVertex(this->SourceField, domain); filter->AddLinkVertex(this->TargetField, domain); filter->AddLinkEdge(this->SourceField, this->TargetField); @@ -161,8 +160,7 @@ int vtkSQLGraphReader::RequestData( vtkSmartPointer<vtkRowQueryToTable> vertexReader = vtkSmartPointer<vtkRowQueryToTable>::New(); vertexReader->SetQuery(this->VertexQuery); vertexReader->Update(); - vtkTable* vertexTable = vertexReader->GetOutput(); - filter->SetInput(1, vertexTable); + filter->SetInputConnection(1, vertexReader->GetOutputPort()); if (this->XField != NULL) { assign->SetXCoordArrayName(this->XField); diff --git a/Infovis/vtkSpanTreeLayoutStrategy.cxx b/Infovis/vtkSpanTreeLayoutStrategy.cxx index 15091d236c5..1db96305f94 100644 --- a/Infovis/vtkSpanTreeLayoutStrategy.cxx +++ b/Infovis/vtkSpanTreeLayoutStrategy.cxx @@ -243,7 +243,7 @@ void vtkSpanTreeLayoutStrategy::Layout() // Layout the tree using the layout filter provided. layoutWorker->SetLayoutStrategy(this->TreeLayout); - layoutWorker->SetInput(spanningDAG); + layoutWorker->SetInputData(spanningDAG); layoutWorker->Update(); layout = layoutWorker->GetOutput()->GetPoints(); diff --git a/Infovis/vtkStackedTreeLayoutStrategy.cxx b/Infovis/vtkStackedTreeLayoutStrategy.cxx index 1ce607c8c79..bd1f8ed25a8 100644 --- a/Infovis/vtkStackedTreeLayoutStrategy.cxx +++ b/Infovis/vtkStackedTreeLayoutStrategy.cxx @@ -103,7 +103,7 @@ void vtkStackedTreeLayoutStrategy::Layout(vtkTree* inputTree, VTK_CREATE(vtkTreeLevelsFilter, levelFilter); VTK_CREATE(vtkTree, newTree); newTree->ShallowCopy( inputTree ); - levelFilter->SetInput( newTree ); + levelFilter->SetInputData( newTree ); levelFilter->Update(); vtkTree* levelTree = levelFilter->GetOutput(); @@ -226,7 +226,7 @@ void vtkStackedTreeLayoutStrategy::LayoutEdgePoints( VTK_CREATE(vtkTreeLevelsFilter, levelFilter); VTK_CREATE(vtkTree, newTree); newTree->ShallowCopy( inputTree ); - levelFilter->SetInput( newTree ); + levelFilter->SetInputData( newTree ); levelFilter->Update(); vtkTree* levelTree = levelFilter->GetOutput(); outputTree->ShallowCopy( levelTree ); diff --git a/Infovis/vtkStatisticsAlgorithm.h b/Infovis/vtkStatisticsAlgorithm.h index 2e21d3b7454..33963a10467 100644 --- a/Infovis/vtkStatisticsAlgorithm.h +++ b/Infovis/vtkStatisticsAlgorithm.h @@ -97,9 +97,9 @@ public: // Description: // A convenience method for setting learn input parameters (if one is expected or allowed). - // It is equivalent to calling SetInput( 1, params ); + // It is equivalent to calling SetInputData( 1, params ); virtual void SetLearnOptionParameters( vtkDataObject* params ) - { this->SetInput( vtkStatisticsAlgorithm::LEARN_PARAMETERS, params ); } + { this->SetInputData( vtkStatisticsAlgorithm::LEARN_PARAMETERS, params ); } // Description: // A convenience method for setting the input model connection (if one is expected or allowed). @@ -109,9 +109,9 @@ public: // Description: // A convenience method for setting the input model (if one is expected or allowed). - // It is equivalent to calling SetInput( 2, model ); + // It is equivalent to calling SetInputData( 2, model ); virtual void SetInputModel( vtkDataObject* model ) - { this->SetInput( vtkStatisticsAlgorithm::INPUT_MODEL, model ); } + { this->SetInputData( vtkStatisticsAlgorithm::INPUT_MODEL, model ); } // Description: // Set/Get the Learn option. diff --git a/Infovis/vtkStreamingStatistics.cxx b/Infovis/vtkStreamingStatistics.cxx index 648faadd17d..d2f13803ac6 100644 --- a/Infovis/vtkStreamingStatistics.cxx +++ b/Infovis/vtkStreamingStatistics.cxx @@ -140,7 +140,7 @@ int vtkStreamingStatistics::RequestData( vtkInformation*, } // Set the input into my stats algorithms - this->StatisticsAlgorithm->SetInput(inData); + this->StatisticsAlgorithm->SetInputData(inData); this->StatisticsAlgorithm->SetLearnOptionParameters( inParameters ); this->StatisticsAlgorithm->SetInputModel( this->InternalModel ); diff --git a/Infovis/vtkStringToCategory.cxx b/Infovis/vtkStringToCategory.cxx index 691973432d7..53e123c1382 100644 --- a/Infovis/vtkStringToCategory.cxx +++ b/Infovis/vtkStringToCategory.cxx @@ -180,7 +180,7 @@ int vtkStringToCategory::RequestDataObject( if (!output || !output->IsA(input->GetClassName())) { vtkDataObject* newOutput = input->NewInstance(); - newOutput->SetPipelineInformation(info); + info->Set(vtkDataObject::DATA_OBJECT(), newOutput); newOutput->Delete(); } } diff --git a/Infovis/vtkStringToNumeric.cxx b/Infovis/vtkStringToNumeric.cxx index caf12b48e2b..23c99335938 100644 --- a/Infovis/vtkStringToNumeric.cxx +++ b/Infovis/vtkStringToNumeric.cxx @@ -303,7 +303,7 @@ int vtkStringToNumeric::RequestDataObject( if (!output || !output->IsA(input->GetClassName())) { vtkDataObject* newOutput = input->NewInstance(); - newOutput->SetPipelineInformation(info); + info->Set(vtkDataObject::DATA_OBJECT(), newOutput); newOutput->Delete(); } } diff --git a/Infovis/vtkStringToTimePoint.cxx b/Infovis/vtkStringToTimePoint.cxx index 3a297a1cd51..d5e8cdb7a4d 100644 --- a/Infovis/vtkStringToTimePoint.cxx +++ b/Infovis/vtkStringToTimePoint.cxx @@ -217,7 +217,7 @@ int vtkStringToTimePoint::RequestDataObject( if (!output || !output->IsA(input->GetClassName())) { vtkDataObject* newOutput = input->NewInstance(); - newOutput->SetPipelineInformation(info); + info->Set(vtkDataObject::DATA_OBJECT(), newOutput); newOutput->Delete(); } } diff --git a/Infovis/vtkTableToGraph.cxx b/Infovis/vtkTableToGraph.cxx index cf89dcc9e16..592739e0f9f 100644 --- a/Infovis/vtkTableToGraph.cxx +++ b/Infovis/vtkTableToGraph.cxx @@ -416,8 +416,8 @@ int vtkTableToGraph::RequestData( list->InsertNextValue(1); activeSelNode->SetSelectionList(list); vtkExtractSelectedGraph* extract = vtkExtractSelectedGraph::New(); - extract->SetInput(0, this->LinkGraph); - extract->SetInput(1, activeSel); + extract->SetInputData(0, this->LinkGraph); + extract->SetInputData(1, activeSel); extract->Update(); vtkGraph* g = extract->GetOutput(); this->LinkGraph->ShallowCopy(g); diff --git a/Infovis/vtkThresholdGraph.cxx b/Infovis/vtkThresholdGraph.cxx index 908e8f300c2..796d746a364 100644 --- a/Infovis/vtkThresholdGraph.cxx +++ b/Infovis/vtkThresholdGraph.cxx @@ -151,8 +151,8 @@ int vtkThresholdGraph::RequestData(vtkInformation* vtkNotUsed(request), inputClone.TakeReference(inDataObj->NewInstance()); inputClone->ShallowCopy(inDataObj); - extractThreshold->SetInput(0, inputClone); - extractThreshold->SetInput(1, threshold); + extractThreshold->SetInputData(0, inputClone); + extractThreshold->SetInputData(1, threshold); extractThreshold->Update(); diff --git a/Infovis/vtkTimePointToString.cxx b/Infovis/vtkTimePointToString.cxx index 3b32a91b49d..6d16c45a9c8 100644 --- a/Infovis/vtkTimePointToString.cxx +++ b/Infovis/vtkTimePointToString.cxx @@ -273,7 +273,7 @@ int vtkTimePointToString::RequestDataObject( if (!output || !output->IsA(input->GetClassName())) { vtkDataObject* newOutput = input->NewInstance(); - newOutput->SetPipelineInformation(info); + info->Set(vtkDataObject::DATA_OBJECT(), newOutput); newOutput->Delete(); } } diff --git a/Parallel/Testing/Cxx/DistributedData.cxx b/Parallel/Testing/Cxx/DistributedData.cxx index f3c68db053c..27f6c5fadb3 100644 --- a/Parallel/Testing/Cxx/DistributedData.cxx +++ b/Parallel/Testing/Cxx/DistributedData.cxx @@ -143,7 +143,7 @@ void MyProcess::Execute() vtkDistributedDataFilter *dd = vtkDistributedDataFilter::New(); - dd->SetInput(ds); + dd->SetInputData(ds); dd->SetController(this->Controller); dd->SetBoundaryModeToSplitBoundaryCells(); // clipping diff --git a/Parallel/Testing/Cxx/DistributedDataRenderPass.cxx b/Parallel/Testing/Cxx/DistributedDataRenderPass.cxx index ea69a94c337..a3db45f9230 100644 --- a/Parallel/Testing/Cxx/DistributedDataRenderPass.cxx +++ b/Parallel/Testing/Cxx/DistributedDataRenderPass.cxx @@ -166,7 +166,7 @@ void MyProcess::Execute() vtkDistributedDataFilter *dd = vtkDistributedDataFilter::New(); - dd->SetInput(ds); + dd->SetInputData(ds); dd->SetController(this->Controller); dd->SetBoundaryModeToSplitBoundaryCells(); // clipping diff --git a/Parallel/Testing/Cxx/ParallelIso.cxx b/Parallel/Testing/Cxx/ParallelIso.cxx index 56c889c48d0..562f2cb0787 100644 --- a/Parallel/Testing/Cxx/ParallelIso.cxx +++ b/Parallel/Testing/Cxx/ParallelIso.cxx @@ -189,7 +189,7 @@ void MyMain( vtkMultiProcessController *controller, void *arg ) controller->Receive(pd, i, ISO_OUTPUT_TAG); if (j == ISO_NUM - 1) { - app->AddInput(pd); + app->AddInputData(pd); } pd->Delete(); } @@ -203,7 +203,7 @@ void MyMain( vtkMultiProcessController *controller, void *arg ) vtkPolyData* outputCopy = vtkPolyData::New(); outputCopy->ShallowCopy(elev->GetOutput()); - app->AddInput(outputCopy); + app->AddInputData(outputCopy); outputCopy->Delete(); app->Update(); renWindow->Render(); diff --git a/Parallel/Testing/Cxx/PrmMagnify.cxx b/Parallel/Testing/Cxx/PrmMagnify.cxx index b2f47a99d1f..b278831f776 100644 --- a/Parallel/Testing/Cxx/PrmMagnify.cxx +++ b/Parallel/Testing/Cxx/PrmMagnify.cxx @@ -34,6 +34,7 @@ #include "vtkSphereSource.h" #include "vtkImageActor.h" +#include "vtkImageMapper3D.h" #include "vtkImageData.h" #include "vtkImageMandelbrotSource.h" #include "vtkImageShiftScale.h" @@ -242,7 +243,7 @@ int PrmMagnify(int argc, char *argv[]) charImage->SetOutputScalarTypeToUnsignedChar(); VTK_CREATE(vtkImageActor, actor); - actor->SetInput(charImage->GetOutput()); + actor->GetMapper()->SetInputConnection(charImage->GetOutputPort()); actor->InterpolateOff(); vtkSmartPointer<vtkRenderer> renderer = prm->MakeRenderer(); diff --git a/Parallel/Testing/Cxx/SocketClient.cxx b/Parallel/Testing/Cxx/SocketClient.cxx index d201ec34cbe..c0741677e89 100644 --- a/Parallel/Testing/Cxx/SocketClient.cxx +++ b/Parallel/Testing/Cxx/SocketClient.cxx @@ -207,7 +207,7 @@ int main(int argc, char** argv) } VTK_CREATE(vtkDataSetMapper, umapper); - umapper->SetInput(ugrid); + umapper->SetInputData(ugrid); VTK_CREATE(vtkActor, uactor); uactor->SetMapper(umapper); @@ -275,7 +275,7 @@ int main(int argc, char** argv) VTK_CREATE(vtkPolyDataMapper, pmapper); VTK_CREATE(vtkPolyData, pd); comm->Receive(pd, 1, 11); - pmapper->SetInput(pd); + pmapper->SetInputData(pd); VTK_CREATE(vtkActor, pactor); pactor->SetMapper(pmapper); @@ -283,7 +283,7 @@ int main(int argc, char** argv) VTK_CREATE(vtkDataSetMapper, rgmapper); VTK_CREATE(vtkRectilinearGrid, rg); comm->Receive(rg, 1, 11); - rgmapper->SetInput(rg); + rgmapper->SetInputData(rg); VTK_CREATE(vtkActor, rgactor); rgactor->SetMapper(rgmapper); @@ -293,7 +293,7 @@ int main(int argc, char** argv) VTK_CREATE(vtkContourFilter, iso2); VTK_CREATE(vtkStructuredGrid, sg); comm->Receive(sg, 1, 11); - iso2->SetInput(sg); + iso2->SetInputData(sg); iso2->SetValue(0, .205); VTK_CREATE(vtkPolyDataMapper, sgmapper); @@ -308,7 +308,7 @@ int main(int argc, char** argv) comm->Receive(id, 1, 11); VTK_CREATE(vtkImageActor, imactor); - imactor->SetInput(id); + imactor->SetInputData(id); imactor->SetPosition(10, 0, 10); imactor->SetScale(0.02, 0.02, 0.02); diff --git a/Parallel/Testing/Cxx/TestMultiBlockExodusWrite.cxx b/Parallel/Testing/Cxx/TestMultiBlockExodusWrite.cxx index abf4343e163..acf4f541e38 100644 --- a/Parallel/Testing/Cxx/TestMultiBlockExodusWrite.cxx +++ b/Parallel/Testing/Cxx/TestMultiBlockExodusWrite.cxx @@ -138,7 +138,7 @@ int TestMultiBlockExodusWrite (int argc, char *argv[]) } VTK_CREATE (vtkDataSetMapper, mapper); - mapper->SetInput (ds); + mapper->SetInputData (ds); VTK_CREATE (vtkActor, actor); actor->SetMapper (mapper); diff --git a/Parallel/Testing/Cxx/TestPRMATGraphSource.cxx b/Parallel/Testing/Cxx/TestPRMATGraphSource.cxx index cf8f81e0d8a..3c272e51c37 100644 --- a/Parallel/Testing/Cxx/TestPRMATGraphSource.cxx +++ b/Parallel/Testing/Cxx/TestPRMATGraphSource.cxx @@ -178,7 +178,7 @@ int main(int argc, char* argv[]) { vtkSmartPointer<vtkPBGLBreadthFirstSearch> bfs = vtkSmartPointer<vtkPBGLBreadthFirstSearch>::New(); - bfs->SetInput(g); + bfs->SetInputData(g); bfs->SetOriginVertex(g->GetDistributedGraphHelper()->MakeDistributedId(0, 0)); // Run the breadth-first search @@ -204,7 +204,7 @@ int main(int argc, char* argv[]) { vtkSmartPointer<vtkPBGLShortestPaths> sssp = vtkSmartPointer<vtkPBGLShortestPaths>::New(); - sssp->SetInput(g); + sssp->SetInputData(g); sssp->SetOriginVertex(g->GetDistributedGraphHelper()->MakeDistributedId(0, 0)); sssp->SetEdgeWeightArrayName("Weight"); @@ -299,7 +299,7 @@ int main(int argc, char* argv[]) { vtkSmartPointer<vtkPBGLConnectedComponents> cc = vtkSmartPointer<vtkPBGLConnectedComponents>::New(); - cc->SetInput(g); + cc->SetInputData(g); // Run the connected components algorithm if (world.rank() == 0) diff --git a/Parallel/Testing/Cxx/TestPRandomGraphSource.cxx b/Parallel/Testing/Cxx/TestPRandomGraphSource.cxx index 73a7be940b6..c5148d5a243 100644 --- a/Parallel/Testing/Cxx/TestPRandomGraphSource.cxx +++ b/Parallel/Testing/Cxx/TestPRandomGraphSource.cxx @@ -216,7 +216,7 @@ int main(int argc, char* argv[]) { vtkSmartPointer<vtkPBGLBreadthFirstSearch> bfs = vtkSmartPointer<vtkPBGLBreadthFirstSearch>::New(); - bfs->SetInput(g); + bfs->SetInputData(g); bfs->SetOriginVertex(g->GetDistributedGraphHelper()->MakeDistributedId(0, 0)); // Run the breadth-first search @@ -243,7 +243,7 @@ int main(int argc, char* argv[]) { vtkSmartPointer<vtkPBGLVertexColoring> coloring = vtkSmartPointer<vtkPBGLVertexColoring>::New(); - coloring->SetInput(g); + coloring->SetInputData(g); // Run the vertex-coloring if (world.rank() == 0) @@ -317,7 +317,7 @@ int main(int argc, char* argv[]) { vtkSmartPointer<vtkPBGLConnectedComponents> cc = vtkSmartPointer<vtkPBGLConnectedComponents>::New(); - cc->SetInput(g); + cc->SetInputData(g); // Run the connected components algorithm if (world.rank() == 0) @@ -392,7 +392,7 @@ int main(int argc, char* argv[]) { vtkSmartPointer<vtkPBGLMinimumSpanningTree> mst = vtkSmartPointer<vtkPBGLMinimumSpanningTree>::New(); - mst->SetInput(g); + mst->SetInputData(g); mst->SetEdgeWeightArrayName("Weight"); // Create an edge-weight array with edge weights in [0, 1). diff --git a/Parallel/Testing/Cxx/TestPStream.cxx b/Parallel/Testing/Cxx/TestPStream.cxx index f32d515c83b..1b09b2ca131 100644 --- a/Parallel/Testing/Cxx/TestPStream.cxx +++ b/Parallel/Testing/Cxx/TestPStream.cxx @@ -134,7 +134,7 @@ void MyMain( vtkMultiProcessController *controller, void *arg ) vtkDistributedStreamTracer* Stream0 = vtkDistributedStreamTracer::New();; Stream0->SetInputConnection(tv->GetOutputPort()); - Stream0->SetSource(LineSourceWidget0->GetOutput()); + Stream0->SetSourceConnection(LineSourceWidget0->GetOutputPort()); Stream0->SetIntegrationStepUnit(2); Stream0->SetMaximumPropagation(5); Stream0->SetInitialIntegrationStep(0.5); diff --git a/Parallel/Testing/Cxx/ThreadedCommunicator.cxx b/Parallel/Testing/Cxx/ThreadedCommunicator.cxx index 62437686b19..f7bea0d08d3 100644 --- a/Parallel/Testing/Cxx/ThreadedCommunicator.cxx +++ b/Parallel/Testing/Cxx/ThreadedCommunicator.cxx @@ -288,7 +288,7 @@ void Process1(vtkMultiProcessController *contr, void *arg) ip->GetPolyDataOutput()->Update(); vtkPolyDataMapper* pmapper = vtkPolyDataMapper::New(); - pmapper->SetInput(ip->GetPolyDataOutput()); + pmapper->SetInputConnection(ip->GetOutputPort()); vtkActor* pactor = vtkActor::New(); pactor->SetMapper(pmapper); diff --git a/Parallel/Testing/Cxx/TransmitImageData.cxx b/Parallel/Testing/Cxx/TransmitImageData.cxx index 212e4d27da4..30dcd1912ad 100644 --- a/Parallel/Testing/Cxx/TransmitImageData.cxx +++ b/Parallel/Testing/Cxx/TransmitImageData.cxx @@ -144,7 +144,7 @@ void MyProcess::Execute() pass->SetController(this->Controller); if (me == 0) { - pass->SetInput(sp); + pass->SetInputData(sp); } else { @@ -152,19 +152,19 @@ void MyProcess::Execute() // FILTERING vtkContourFilter *cf = vtkContourFilter::New(); - cf->SetInput(pass->GetOutput()); + cf->SetInputConnection(pass->GetOutputPort()); cf->SetNumberOfContours(1); cf->SetValue(0,10.0); // I am not sure why this is needed. //(cf->GetInput())->RequestExactExtentOn(); cf->ComputeNormalsOff(); vtkElevationFilter *elev = vtkElevationFilter::New(); - elev->SetInput(cf->GetOutput()); + elev->SetInputConnection(cf->GetOutputPort()); elev->SetScalarRange(me, me + .001); // COMPOSITE RENDER vtkPolyDataMapper *mapper = vtkPolyDataMapper::New(); - mapper->SetInput(vtkPolyData::SafeDownCast(elev->GetOutput())); + mapper->SetInputConnection(elev->GetOutputPort()); mapper->SetScalarRange(0, numProcs); vtkActor *actor = vtkActor::New(); actor->SetMapper(mapper); diff --git a/Parallel/Testing/Cxx/TransmitImageDataRenderPass.cxx b/Parallel/Testing/Cxx/TransmitImageDataRenderPass.cxx index d946eb9eb1d..f7845cd8cfc 100644 --- a/Parallel/Testing/Cxx/TransmitImageDataRenderPass.cxx +++ b/Parallel/Testing/Cxx/TransmitImageDataRenderPass.cxx @@ -154,7 +154,7 @@ void MyProcess::Execute() pass->SetController(this->Controller); if (me == 0) { - pass->SetInput(sp); + pass->SetInputData(sp); } else { @@ -162,19 +162,19 @@ void MyProcess::Execute() // FILTERING vtkContourFilter *cf = vtkContourFilter::New(); - cf->SetInput(pass->GetOutput()); + cf->SetInputConnection(pass->GetOutputPort()); cf->SetNumberOfContours(1); cf->SetValue(0,10.0); // I am not sure that this is needed. //(cf->GetInput())->RequestExactExtentOn(); cf->ComputeNormalsOff(); vtkElevationFilter *elev = vtkElevationFilter::New(); - elev->SetInput(cf->GetOutput()); + elev->SetInputConnection(cf->GetOutputPort()); elev->SetScalarRange(me, me + .001); // COMPOSITE RENDER vtkPolyDataMapper *mapper = vtkPolyDataMapper::New(); - mapper->SetInput(vtkPolyData::SafeDownCast(elev->GetOutput())); + mapper->SetInputConnection(elev->GetOutputPort()); mapper->SetScalarRange(0, numProcs); vtkActor *actor = vtkActor::New(); actor->SetMapper(mapper); diff --git a/Parallel/Testing/Cxx/TransmitRectilinearGrid.cxx b/Parallel/Testing/Cxx/TransmitRectilinearGrid.cxx index 2c7da9b3946..f59b7099e21 100644 --- a/Parallel/Testing/Cxx/TransmitRectilinearGrid.cxx +++ b/Parallel/Testing/Cxx/TransmitRectilinearGrid.cxx @@ -136,24 +136,24 @@ void MyProcess::Execute() pass->SetController(this->Controller); if (me == 0) { - pass->SetInput(rg); + pass->SetInputData(rg); } // FILTERING vtkContourFilter *cf = vtkContourFilter::New(); - cf->SetInput(pass->GetOutput()); + cf->SetInputConnection(pass->GetOutputPort()); cf->SetNumberOfContours(1); cf->SetValue(0,0.1); // I don't think this is needed //(cf->GetInput())->RequestExactExtentOn(); cf->ComputeNormalsOff(); vtkElevationFilter *elev = vtkElevationFilter::New(); - elev->SetInput(cf->GetOutput()); + elev->SetInputConnection(cf->GetOutputPort()); elev->SetScalarRange(me, me + .001); // COMPOSITE RENDER vtkPolyDataMapper *mapper = vtkPolyDataMapper::New(); - mapper->SetInput(vtkPolyData::SafeDownCast(elev->GetOutput())); + mapper->SetInputConnection(elev->GetOutputPort()); mapper->SetScalarRange(0, numProcs); vtkActor *actor = vtkActor::New(); actor->SetMapper(mapper); diff --git a/Parallel/Testing/Cxx/TransmitStructuredGrid.cxx b/Parallel/Testing/Cxx/TransmitStructuredGrid.cxx index a3466f53447..122cd3ed3ec 100644 --- a/Parallel/Testing/Cxx/TransmitStructuredGrid.cxx +++ b/Parallel/Testing/Cxx/TransmitStructuredGrid.cxx @@ -135,24 +135,24 @@ void MyProcess::Execute() pass->SetController(this->Controller); if (me == 0) { - pass->SetInput(sg); + pass->SetInputData(sg); } // FILTERING vtkContourFilter *cf = vtkContourFilter::New(); - cf->SetInput(pass->GetOutput()); + cf->SetInputConnection(pass->GetOutputPort()); cf->SetNumberOfContours(1); cf->SetValue(0,0.7); // I don't think that this is needed // (cf->GetInput())->RequestExactExtentOn(); cf->ComputeNormalsOff(); vtkElevationFilter *elev = vtkElevationFilter::New(); - elev->SetInput(cf->GetOutput()); + elev->SetInputConnection(cf->GetOutputPort()); elev->SetScalarRange(me, me + .001); // COMPOSITE RENDER vtkPolyDataMapper *mapper = vtkPolyDataMapper::New(); - mapper->SetInput(vtkPolyData::SafeDownCast(elev->GetOutput())); + mapper->SetInputConnection(elev->GetOutputPort()); mapper->SetScalarRange(0, numProcs); vtkActor *actor = vtkActor::New(); actor->SetMapper(mapper); diff --git a/Parallel/vtkCollectGraph.cxx b/Parallel/vtkCollectGraph.cxx index 1ced321db37..69090ba5409 100644 --- a/Parallel/vtkCollectGraph.cxx +++ b/Parallel/vtkCollectGraph.cxx @@ -133,7 +133,7 @@ int vtkCollectGraph::RequestDataObject( return 0; } vtkInformation *info = outputVector->GetInformationObject(0); - output->SetPipelineInformation(info); + info->Set(vtkDataObject::DATA_OBJECT(), output); output->Delete(); return 1; diff --git a/Parallel/vtkCollectPolyData.cxx b/Parallel/vtkCollectPolyData.cxx index a216a9015d0..3eeb31ff05f 100644 --- a/Parallel/vtkCollectPolyData.cxx +++ b/Parallel/vtkCollectPolyData.cxx @@ -149,13 +149,13 @@ int vtkCollectPolyData::RequestData( pd->CopyStructure(input); pd->GetPointData()->PassData(input->GetPointData()); pd->GetCellData()->PassData(input->GetCellData()); - append->AddInput(pd); + append->AddInputData(pd); pd->Delete(); for (idx = 1; idx < numProcs; ++idx) { pd = vtkPolyData::New(); this->Controller->Receive(pd, idx, 121767); - append->AddInput(pd); + append->AddInputData(pd); pd->Delete(); pd = NULL; } diff --git a/Parallel/vtkCommunicator.cxx b/Parallel/vtkCommunicator.cxx index 7014b3927af..8d665f5b202 100644 --- a/Parallel/vtkCommunicator.cxx +++ b/Parallel/vtkCommunicator.cxx @@ -655,7 +655,7 @@ int vtkCommunicator::MarshalDataObject(vtkDataObject *object, } } writer->WriteToOutputStringOn(); - writer->SetInput(copy); + writer->SetInputData(copy); if (!writer->Write()) { diff --git a/Parallel/vtkCutMaterial.cxx b/Parallel/vtkCutMaterial.cxx index 4eeedd53148..b1d4169f377 100644 --- a/Parallel/vtkCutMaterial.cxx +++ b/Parallel/vtkCutMaterial.cxx @@ -104,7 +104,7 @@ int vtkCutMaterial::RequestData( // It would be nice to get rid of this in the future. thresh = vtkThreshold::New(); - thresh->SetInput(input); + thresh->SetInputData(input); thresh->SetInputArrayToProcess(0,0,0,vtkDataObject::FIELD_ASSOCIATION_CELLS, this->MaterialArrayName); thresh->ThresholdBetween(this->Material-0.5, this->Material+0.5); @@ -122,7 +122,7 @@ int vtkCutMaterial::RequestData( this->PlaneFunction->SetNormal(this->Normal); cutter = vtkCutter::New(); - cutter->SetInput(thresh->GetOutput()); + cutter->SetInputConnection(thresh->GetOutputPort()); cutter->SetCutFunction(this->PlaneFunction); cutter->SetValue(0, 0.0); cutter->Update(); diff --git a/Parallel/vtkDistributedDataFilter.cxx b/Parallel/vtkDistributedDataFilter.cxx index 46db5136377..b7612730010 100644 --- a/Parallel/vtkDistributedDataFilter.cxx +++ b/Parallel/vtkDistributedDataFilter.cxx @@ -2734,7 +2734,7 @@ char *vtkDistributedDataFilter::MarshallDataSet(vtkUnstructuredGrid *extractedGr writer->SetFileTypeToBinary(); } writer->WriteToOutputStringOn(); - writer->SetInput(copy); + writer->SetInputData(copy); writer->Write(); @@ -2815,7 +2815,7 @@ vtkUnstructuredGrid vtkExtractCells *extCells = vtkExtractCells::New(); - extCells->SetInput(tmpInput); + extCells->SetInputData(tmpInput); for (int i=0; i<nlists; i++) { @@ -2860,7 +2860,7 @@ vtkUnstructuredGrid vtkExtractCells *extCells = vtkExtractCells::New(); - extCells->SetInput(tmpInput); + extCells->SetInputData(tmpInput); extCells->Update(); // extract no cells @@ -2998,7 +2998,7 @@ void vtkDistributedDataFilter::ClipWithVtkClipDataSet( clipped->SetValue(0.0); clipped->InsideOutOn(); - clipped->SetInput(grid); + clipped->SetInputData(grid); if (outside) { @@ -3036,7 +3036,7 @@ void vtkDistributedDataFilter::ClipWithBoxClipDataSet( clipped->SetBoxClip(bounds[0], bounds[1], bounds[2], bounds[3], bounds[4], bounds[5]); - clipped->SetInput(grid); + clipped->SetInputData(grid); if (outside) { @@ -3123,7 +3123,7 @@ void vtkDistributedDataFilter::ClipCellsToSpatialRegion(vtkUnstructuredGrid *gri ep->GetExecutive()->GetOutputInformation(0)->Set( vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_GHOST_LEVELS(), this->GhostLevel); - ep->SetInput(combined); + ep->SetInputData(combined); ep->Update(); @@ -4745,7 +4745,7 @@ int vtkDistributedDataFilter::RequestDataObject(vtkInformation*, { newOutput = vtkUnstructuredGrid::New(); } - newOutput->SetPipelineInformation(outInfo); + outInfo->Set(vtkDataObject::DATA_OBJECT(), newOutput); newOutput->Delete(); } return 1; diff --git a/Parallel/vtkDuplicatePolyData.cxx b/Parallel/vtkDuplicatePolyData.cxx index fb201a238fc..bef2580bf14 100644 --- a/Parallel/vtkDuplicatePolyData.cxx +++ b/Parallel/vtkDuplicatePolyData.cxx @@ -252,7 +252,7 @@ int vtkDuplicatePolyData::RequestData( pd->CopyStructure(input); pd->GetPointData()->PassData(input->GetPointData()); pd->GetCellData()->PassData(input->GetCellData()); - append->AddInput(pd); + append->AddInputData(pd); pd->Delete(); for (idx = 0; idx < this->ScheduleLength; ++idx) @@ -268,7 +268,7 @@ int vtkDuplicatePolyData::RequestData( pd = vtkPolyData::New(); this->Controller->Receive(pd, partner, 131767); - append->AddInput(pd); + append->AddInputData(pd); pd->Delete(); pd = NULL; } @@ -276,7 +276,7 @@ int vtkDuplicatePolyData::RequestData( { pd = vtkPolyData::New(); this->Controller->Receive(pd, partner, 131767); - append->AddInput(pd); + append->AddInputData(pd); pd->Delete(); pd = NULL; diff --git a/Parallel/vtkEnSightWriter.cxx b/Parallel/vtkEnSightWriter.cxx index eb3c082d677..6857afebed3 100644 --- a/Parallel/vtkEnSightWriter.cxx +++ b/Parallel/vtkEnSightWriter.cxx @@ -162,9 +162,9 @@ int vtkEnSightWriter::FillInputPortInformation( int vtkNotUsed(port), vtkInforma //---------------------------------------------------------------------------- // Specify the input data or filter. -void vtkEnSightWriter::SetInput(vtkUnstructuredGrid *input) +void vtkEnSightWriter::SetInputData(vtkUnstructuredGrid *input) { - this->Superclass::SetInput(0, input); + this->SetInputDataInternal(0, input); } diff --git a/Parallel/vtkEnSightWriter.h b/Parallel/vtkEnSightWriter.h index 3c4816cfe7e..f592dc541e1 100644 --- a/Parallel/vtkEnSightWriter.h +++ b/Parallel/vtkEnSightWriter.h @@ -101,7 +101,7 @@ public: // Description: // Specify the input data or filter. - virtual void SetInput(vtkUnstructuredGrid *input); + virtual void SetInputData(vtkUnstructuredGrid *input); virtual vtkUnstructuredGrid* GetInput(); // Description diff --git a/Parallel/vtkExodusIIWriter.cxx b/Parallel/vtkExodusIIWriter.cxx index 10f979d2d12..1219a709e93 100644 --- a/Parallel/vtkExodusIIWriter.cxx +++ b/Parallel/vtkExodusIIWriter.cxx @@ -630,7 +630,7 @@ void vtkExodusIIWriter::RemoveGhostCells() if (da) { vtkThreshold *t = vtkThreshold::New(); - t->SetInput(this->FlattenedInput[i]); + t->SetInputData(this->FlattenedInput[i]); t->ThresholdByLower(0); t->SetInputArrayToProcess( 0, 0, 0, vtkDataObject::FIELD_ASSOCIATION_CELLS, "vtkGhostLevels"); diff --git a/Parallel/vtkExtractCTHPart.cxx b/Parallel/vtkExtractCTHPart.cxx index 1ba4a0d895b..4d9d8745f58 100644 --- a/Parallel/vtkExtractCTHPart.cxx +++ b/Parallel/vtkExtractCTHPart.cxx @@ -455,7 +455,7 @@ int vtkExtractCTHPart::RequestData( vtkWarningMacro("RectilinearGrid does not contain CellData named " << arrayName); vtkPolyData *tmp=vtkPolyData::New(); - tmps[idx]->AddInput(tmp); + tmps[idx]->AddInputData(tmp); tmp->Delete(); } } @@ -478,7 +478,7 @@ int vtkExtractCTHPart::RequestData( { // We need another clip for the plane. Sneak it in. clip2 = vtkClipPolyData::New(); - clip2->SetInput(clip->GetOutput()); + clip2->SetInputConnection(clip->GetOutputPort()); clip->Delete(); clip2->SetClipFunction(this->ClipPlane); } @@ -501,14 +501,14 @@ int vtkExtractCTHPart::RequestData( #else appendSurface[idx]->GetOutput()->GetPointData()->SetActiveScalars(arrayName); #endif - clip->SetInput(appendSurface[idx]->GetOutput()); + clip->SetInputConnection(appendSurface[idx]->GetOutputPort()); clip2->Update(); } #if 1 - tmps[idx]->AddInput(clip2->GetOutput()); + tmps[idx]->AddInputConnection(clip2->GetOutputPort()); #else - tmps[idx]->AddInput(appendSurface[idx]->GetOutput()); + tmps[idx]->AddInputConnection(appendSurface[idx]->GetOutputPort()); #endif output = vtkPolyData::SafeDownCast(pieces->GetBlock(processNumber)); @@ -758,7 +758,7 @@ void vtkExtractCTHPart::ExecutePart(const char *arrayName, vtkWarningMacro("Rectilinear Grid does not contain CellData named " << arrayName << " aborting extraction"); vtkPolyData *tmp=vtkPolyData::New(); - append->AddInput(tmp); + append->AddInputData(tmp); tmp->Delete(); return; } @@ -783,7 +783,7 @@ void vtkExtractCTHPart::ExecutePart(const char *arrayName, vtkWarningMacro("Uniform Grid does not contain CellData named " << arrayName << " aborting extraction"); vtkPolyData *tmp=vtkPolyData::New(); - append->AddInput(tmp); + append->AddInputData(tmp); tmp->Delete(); return; } @@ -896,7 +896,7 @@ void vtkExtractCTHPart::ExecutePartOnUniformGrid( { tmp=vtkPolyData::New(); tmp->ShallowCopy(this->SurfacePolyData); - appendSurface->AddInput(tmp); + appendSurface->AddInputData(tmp); tmp->Delete(); } @@ -923,7 +923,7 @@ void vtkExtractCTHPart::ExecutePartOnUniformGrid( tmp=vtkPolyData::New(); tmp->ShallowCopy(this->PolyData); - append->AddInput(tmp); + append->AddInputData(tmp); tmp->Delete(); vtkTimerLog::MarkEndEvent("Execute Part"); @@ -945,7 +945,7 @@ void vtkExtractCTHPart::CreateInternalPipeline() #endif this->Contour=vtkContourFilter::New(); - this->Contour->SetInput(this->Data); + this->Contour->SetInputData(this->Data); this->Contour->SetValue(0, this->VolumeFractionSurfaceValueInternal); @@ -955,19 +955,19 @@ void vtkExtractCTHPart::CreateInternalPipeline() this->Append2 = vtkAppendPolyData::New(); // Clip the volume fraction iso surface. this->Clip1=vtkClipPolyData::New(); - this->Clip1->SetInput(this->Contour->GetOutput()); + this->Clip1->SetInputConnection(this->Contour->GetOutputPort()); this->Clip1->SetClipFunction(this->ClipPlane); - this->Append2->AddInput(this->Clip1->GetOutput()); + this->Append2->AddInputConnection(this->Clip1->GetOutputPort()); // We need to create a capping surface. this->Cut = vtkCutter::New(); this->Cut->SetCutFunction(this->ClipPlane); this->Cut->SetValue(0, 0.0); - this->Cut->SetInput(this->Data); + this->Cut->SetInputData(this->Data); this->Clip2 = vtkClipPolyData::New(); - this->Clip2->SetInput(this->Cut->GetOutput()); + this->Clip2->SetInputConnection(this->Cut->GetOutputPort()); this->Clip2->SetValue(this->VolumeFractionSurfaceValueInternal); - this->Append2->AddInput(this->Clip2->GetOutput()); + this->Append2->AddInputConnection(this->Clip2->GetOutputPort()); this->PolyData = this->Append2->GetOutput(); this->PolyDataProducer = this->Append2; } @@ -982,7 +982,7 @@ void vtkExtractCTHPart::CreateInternalPipeline() this->RData = vtkRectilinearGrid::New(); this->RContour=vtkContourFilter::New(); - this->RContour->SetInput(this->RData); + this->RContour->SetInputData(this->RData); this->RContour->SetValue(0,this->VolumeFractionSurfaceValueInternal); if(this->ClipPlane) @@ -991,19 +991,19 @@ void vtkExtractCTHPart::CreateInternalPipeline() this->RAppend2 = vtkAppendPolyData::New(); // Clip the volume fraction iso surface. this->RClip1=vtkClipPolyData::New(); - this->RClip1->SetInput(this->RContour->GetOutput()); + this->RClip1->SetInputConnection(this->RContour->GetOutputPort()); this->RClip1->SetClipFunction(this->ClipPlane); - this->RAppend2->AddInput(this->RClip1->GetOutput()); + this->RAppend2->AddInputConnection(this->RClip1->GetOutputPort()); // We need to create a capping surface. this->RCut = vtkCutter::New(); - this->RCut->SetInput(this->RData); + this->RCut->SetInputData(this->RData); this->RCut->SetCutFunction(this->ClipPlane); this->RCut->SetValue(0, 0.0); this->RClip2 = vtkClipPolyData::New(); - this->RClip2->SetInput(this->RCut->GetOutput()); + this->RClip2->SetInputConnection(this->RCut->GetOutputPort()); this->RClip2->SetValue(this->VolumeFractionSurfaceValueInternal); - this->RAppend2->AddInput(this->RClip2->GetOutput()); + this->RAppend2->AddInputConnection(this->RClip2->GetOutputPort()); this->RPolyData = this->RAppend2->GetOutput(); this->RPolyDataProducer = this->RAppend2; } @@ -1188,7 +1188,7 @@ void vtkExtractCTHPart::ExecutePartOnRectilinearGrid( tmp=vtkPolyData::New(); tmp->ShallowCopy(this->SurfacePolyData); assert("check: valid_copy" && tmp->CheckAttributes()==0); - appendSurface->AddInput(tmp); + appendSurface->AddInputData(tmp); tmp->Delete(); } @@ -1221,7 +1221,7 @@ void vtkExtractCTHPart::ExecutePartOnRectilinearGrid( tmp=vtkPolyData::New(); tmp->ShallowCopy(this->RPolyData); - append->AddInput(tmp); + append->AddInputData(tmp); tmp->Delete(); vtkTimerLog::MarkEndEvent("Execute Part"); diff --git a/Parallel/vtkExtractPiece.cxx b/Parallel/vtkExtractPiece.cxx index 8aa7c9ae948..742981b3aa6 100644 --- a/Parallel/vtkExtractPiece.cxx +++ b/Parallel/vtkExtractPiece.cxx @@ -72,7 +72,6 @@ int vtkExtractPiece::RequestDataObject( if (!output || !output->IsA(input->GetClassName())) { vtkDataObject* outData = input->NewInstance(); - outData->SetPipelineInformation(outInfo); outInfo->Set(vtkDataObject::DATA_OBJECT(), outData); outData->Delete(); } @@ -182,7 +181,7 @@ void vtkExtractPiece::ExtractImageData( translate->PieceToExtent(); translate->GetExtent(ext); - extractID->SetInput(imageData); + extractID->SetInputData(imageData); extractID->SetOutputWholeExtent(ext); extractExecutive = vtkStreamingDemandDrivenPipeline::SafeDownCast( extractID->GetExecutive()); @@ -211,7 +210,7 @@ void vtkExtractPiece::ExtractPolyData( vtkInformation *extractInfo; vtkExtractPolyDataPiece *extractPD = vtkExtractPolyDataPiece::New(); - extractPD->SetInput(polyData); + extractPD->SetInputData(polyData); extractExecutive = vtkStreamingDemandDrivenPipeline::SafeDownCast( extractPD->GetExecutive()); extractInfo = extractExecutive->GetOutputInformation(0); @@ -253,7 +252,7 @@ void vtkExtractPiece::ExtractRectilinearGrid( translate->PieceToExtent(); translate->GetExtent(ext); - extractRG->SetInput(rGrid); + extractRG->SetInputData(rGrid); extractExecutive = vtkStreamingDemandDrivenPipeline::SafeDownCast( extractRG->GetExecutive()); extractInfo = extractExecutive->GetOutputInformation(0); @@ -292,7 +291,7 @@ void vtkExtractPiece::ExtractStructuredGrid( translate->PieceToExtent(); translate->GetExtent(ext); - extractSG->SetInput(sGrid); + extractSG->SetInputData(sGrid); extractExecutive = vtkStreamingDemandDrivenPipeline::SafeDownCast( extractSG->GetExecutive()); extractInfo = extractExecutive->GetOutputInformation(0); @@ -322,7 +321,7 @@ void vtkExtractPiece::ExtractUnstructuredGrid( vtkExtractUnstructuredGridPiece *extractUG = vtkExtractUnstructuredGridPiece::New(); - extractUG->SetInput(uGrid); + extractUG->SetInputData(uGrid); extractExecutive = vtkStreamingDemandDrivenPipeline::SafeDownCast( extractUG->GetExecutive()); extractInfo = extractExecutive->GetOutputInformation(0); diff --git a/Parallel/vtkMPIImageReader.cxx b/Parallel/vtkMPIImageReader.cxx index 414dd6b9e1e..280522e6494 100644 --- a/Parallel/vtkMPIImageReader.cxx +++ b/Parallel/vtkMPIImageReader.cxx @@ -388,18 +388,19 @@ void vtkMPIImageReader::TransformData(vtkImageData *) #endif // VTK_USE_MPI_IO //----------------------------------------------------------------------------- -void vtkMPIImageReader::ExecuteData(vtkDataObject *output) +void vtkMPIImageReader::ExecuteData(vtkDataObject *output, + vtkInformation *outInfo) { #ifdef VTK_USE_MPI_IO vtkMPIController *MPIController = vtkMPIController::SafeDownCast(this->Controller); if (!MPIController) { - this->Superclass::ExecuteData(output); + this->Superclass::ExecuteData(output, outInfo); return; } - vtkImageData *data = this->AllocateOutputData(output); + vtkImageData *data = this->AllocateOutputData(output, outInfo); if (!this->FileName && !this->FilePattern && !this->FileNames) { diff --git a/Parallel/vtkMPIImageReader.h b/Parallel/vtkMPIImageReader.h index 54512ca5002..61bdd0e9bd6 100644 --- a/Parallel/vtkMPIImageReader.h +++ b/Parallel/vtkMPIImageReader.h @@ -110,7 +110,8 @@ protected: void SetGroupedController(vtkMultiProcessController *); vtkMultiProcessController *GroupedController; - virtual void ExecuteData(vtkDataObject *data); + virtual void ExecuteData(vtkDataObject *data, + vtkInformation *outInfo); private: vtkMPIImageReader(const vtkMPIImageReader &); // Not implemented diff --git a/Parallel/vtkMemoryLimitImageDataStreamer.cxx b/Parallel/vtkMemoryLimitImageDataStreamer.cxx index 2149ff59287..fd48609d029 100644 --- a/Parallel/vtkMemoryLimitImageDataStreamer.cxx +++ b/Parallel/vtkMemoryLimitImageDataStreamer.cxx @@ -23,6 +23,7 @@ #include "vtkObjectFactory.h" #include "vtkPipelineSize.h" #include "vtkStreamingDemandDrivenPipeline.h" +#include "vtkInformationExecutivePortKey.h" vtkStandardNewMacro(vtkMemoryLimitImageDataStreamer); @@ -107,11 +108,12 @@ vtkMemoryLimitImageDataStreamer VTK_UPDATE_EXTENT_REPLACE); // then propagate it - vtkAlgorithm *alg = input->GetProducerPort()->GetProducer(); - int index = input->GetProducerPort()->GetIndex(); - vtkStreamingDemandDrivenPipeline *exec = - vtkStreamingDemandDrivenPipeline::SafeDownCast(alg->GetExecutive()); - exec->PropagateUpdateExtent(index); + vtkExecutive* exec = vtkExecutive::PRODUCER()->GetExecutive( + inInfo); + int index = vtkExecutive::PRODUCER()->GetPort(inInfo); + vtkStreamingDemandDrivenPipeline *sddp = + vtkStreamingDemandDrivenPipeline::SafeDownCast(exec); + sddp->PropagateUpdateExtent(index); // then reset the INITIALIZED flag to the default value COMBINE inInfo->Set( diff --git a/Parallel/vtkPChacoReader.cxx b/Parallel/vtkPChacoReader.cxx index 47c165e1de6..652d9699c73 100644 --- a/Parallel/vtkPChacoReader.cxx +++ b/Parallel/vtkPChacoReader.cxx @@ -503,7 +503,7 @@ vtkUnstructuredGrid * vtkExtractCells *ec = vtkExtractCells::New(); ec->AddCellRange(from, to); - ec->SetInput(tmp); + ec->SetInputData(tmp); ec->Update(); tmp->Initialize(); @@ -529,7 +529,7 @@ char *vtkPChacoReader::MarshallDataSet(vtkUnstructuredGrid *extractedGrid, int & writer->SetFileTypeToBinary(); } writer->WriteToOutputStringOn(); - writer->SetInput(copy); + writer->SetInputData(copy); writer->Write(); diff --git a/Parallel/vtkPDataSetReader.cxx b/Parallel/vtkPDataSetReader.cxx index baabb0e09c7..e61a95077c2 100644 --- a/Parallel/vtkPDataSetReader.cxx +++ b/Parallel/vtkPDataSetReader.cxx @@ -196,8 +196,8 @@ int vtkPDataSetReader::RequestDataObject( vtkWarningMacro("Creating a new output of type " << newOutput->GetClassName()); } - - newOutput->SetPipelineInformation(info); + + info->Set(vtkDataObject::DATA_OBJECT(), newOutput); newOutput->Delete(); return 1; @@ -1016,7 +1016,7 @@ int vtkPDataSetReader::PolyDataExecute(vtkInformation*, } else { - append->AddInput(tmp); + append->AddInputConnection(reader->GetOutputPort()); } reader->Delete(); } @@ -1083,7 +1083,7 @@ int vtkPDataSetReader::UnstructuredGridExecute( } else { - append->AddInput(reader->GetUnstructuredGridOutput()); + append->AddInputConnection(reader->GetOutputPort()); } reader->Delete(); } @@ -1120,7 +1120,7 @@ int vtkPDataSetReader::ImageDataExecute( // Allocate the data object. vtkStreamingDemandDrivenPipeline::GetUpdateExtent(info, uExt); output->SetExtent(uExt); - output->AllocateScalars(); + output->AllocateScalars(info); // Get the pieces that will be read. pieceMask = new int[this->NumberOfPieces]; diff --git a/Parallel/vtkPDataSetWriter.cxx b/Parallel/vtkPDataSetWriter.cxx index b2343aa0a5e..c5e8884ab2f 100644 --- a/Parallel/vtkPDataSetWriter.cxx +++ b/Parallel/vtkPDataSetWriter.cxx @@ -254,7 +254,7 @@ int vtkPDataSetWriter::Write() // in ParaViews release. copy->Crop(vtkStreamingDemandDrivenPipeline::GetUpdateExtent( this->GetInputInformation())); - writer->SetInput(vtkDataSet::SafeDownCast(copy)); + writer->SetInputData(vtkDataSet::SafeDownCast(copy)); writer->Write(); copy->Delete(); copy = NULL; diff --git a/Parallel/vtkPImageWriter.cxx b/Parallel/vtkPImageWriter.cxx index 0491f3baa06..dbb5f19b778 100644 --- a/Parallel/vtkPImageWriter.cxx +++ b/Parallel/vtkPImageWriter.cxx @@ -122,31 +122,23 @@ void vtkPImageWriter::RecursiveWrite(int axis, vtkImageData *cache, this->WriteFileHeader(file, cache, inInfo->Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT())); ++this->FileNumber; } - + // Get the pipeline information for the input vtkImageData *input = this->GetInput(); - vtkAlgorithm *alg = input->GetProducerPort()->GetProducer(); - int idx = input->GetProducerPort()->GetIndex(); - vtkStreamingDemandDrivenPipeline *exec = - vtkStreamingDemandDrivenPipeline::SafeDownCast(alg->GetExecutive()); + vtkAlgorithm *inAlg = this->GetInputAlgorithm(); - if (exec) - { - vtkInformation *info = exec->GetOutputInformation(idx); + // Set a hint not to combine with previous requests + inInfo->Set( + vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT_INITIALIZED(), + VTK_UPDATE_EXTENT_REPLACE); - // Set a hint not to combine with previous requests - info->Set( - vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT_INITIALIZED(), - VTK_UPDATE_EXTENT_REPLACE); + // Propagate the update extent so we can determine pipeline size + inAlg->PropagateUpdateExtent(); - // Propagate the update extent so we can determine pipeline size - exec->PropagateUpdateExtent(idx); - - // Go back to the previous behaviour - info->Set( - vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT_INITIALIZED(), - VTK_UPDATE_EXTENT_COMBINE); - } + // Go back to the previous behaviour + inInfo->Set( + vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT_INITIALIZED(), + VTK_UPDATE_EXTENT_COMBINE); // Now we can ask how big the pipeline will be inputMemorySize = this->SizeEstimator->GetEstimatedSize(this,0,0); diff --git a/Parallel/vtkPStreamTracer.cxx b/Parallel/vtkPStreamTracer.cxx index 435535a3b8f..4a27b89818e 100644 --- a/Parallel/vtkPStreamTracer.cxx +++ b/Parallel/vtkPStreamTracer.cxx @@ -397,7 +397,7 @@ int vtkPStreamTracer::RequestData( vtkPolyData* inp = it->GetPointer(); if ( inp->GetNumberOfCells() > 0 ) { - append->AddInput(inp); + append->AddInputData(inp); } } if (append->GetNumberOfInputConnections(0) > 0) diff --git a/Parallel/vtkPieceRequestFilter.cxx b/Parallel/vtkPieceRequestFilter.cxx index b79ad966f67..3fbb5ba8c41 100644 --- a/Parallel/vtkPieceRequestFilter.cxx +++ b/Parallel/vtkPieceRequestFilter.cxx @@ -44,23 +44,15 @@ vtkDataObject* vtkPieceRequestFilter::GetOutput(int port) } //---------------------------------------------------------------------------- -void vtkPieceRequestFilter::SetInput(vtkDataObject* input) +void vtkPieceRequestFilter::SetInputData(vtkDataObject* input) { - this->SetInput(0, input); + this->SetInputData(0, input); } //---------------------------------------------------------------------------- -void vtkPieceRequestFilter::SetInput(int index, vtkDataObject* input) +void vtkPieceRequestFilter::SetInputData(int index, vtkDataObject* input) { - if(input) - { - this->SetInputConnection(index, input->GetProducerPort()); - } - else - { - // Setting a NULL input removes the connection. - this->SetInputConnection(index, 0); - } + this->SetInputDataInternal(index, input); } //---------------------------------------------------------------------------- @@ -113,7 +105,7 @@ int vtkPieceRequestFilter::RequestDataObject( if (!output || !output->IsA(input->GetClassName())) { vtkDataObject* newOutput = input->NewInstance(); - newOutput->SetPipelineInformation(info); + info->Set(vtkDataObject::DATA_OBJECT(), newOutput); newOutput->Delete(); } } diff --git a/Parallel/vtkPieceRequestFilter.h b/Parallel/vtkPieceRequestFilter.h index 199f49b2411..d6ed3f63030 100644 --- a/Parallel/vtkPieceRequestFilter.h +++ b/Parallel/vtkPieceRequestFilter.h @@ -48,8 +48,8 @@ public: // Description: // Set an input of this algorithm. - void SetInput(vtkDataObject*); - void SetInput(int, vtkDataObject*); + void SetInputData(vtkDataObject*); + void SetInputData(int, vtkDataObject*); // Description: // see vtkAlgorithm for details diff --git a/Parallel/vtkSynchronizedRenderers.cxx b/Parallel/vtkSynchronizedRenderers.cxx index b15c08846a4..9f2a2ff590b 100644 --- a/Parallel/vtkSynchronizedRenderers.cxx +++ b/Parallel/vtkSynchronizedRenderers.cxx @@ -533,7 +533,7 @@ void vtkSynchronizedRenderers::vtkRawImage::SaveAsPNG(const char* filename) vtkPNGWriter* writer = vtkPNGWriter::New(); writer->SetFileName(filename); - writer->SetInput(img); + writer->SetInputData(img); writer->Write(); writer->Delete(); img->Delete(); diff --git a/Parallel/vtkTemporalStreamTracer.cxx b/Parallel/vtkTemporalStreamTracer.cxx index 219ade48efe..d37ea9c1128 100644 --- a/Parallel/vtkTemporalStreamTracer.cxx +++ b/Parallel/vtkTemporalStreamTracer.cxx @@ -1123,10 +1123,10 @@ int vtkTemporalStreamTracer::RequestData( this->ParticleWriter->SetFileName(this->ParticleFileName); this->ParticleWriter->SetTimeStep(this->ActualTimeStep); this->ParticleWriter->SetTimeValue(this->CurrentTimeSteps[1]); - this->ParticleWriter->SetInput(polys); + this->ParticleWriter->SetInputData(polys); this->ParticleWriter->Write(); this->ParticleWriter->CloseFile(); - this->ParticleWriter->SetInput(NULL); + this->ParticleWriter->SetInputData(NULL); #ifdef VTK_USE_MPI this->Controller->Barrier(); #endif diff --git a/Parallel/vtkTransmitImageDataPiece.cxx b/Parallel/vtkTransmitImageDataPiece.cxx index f7e0c308975..1d772856813 100644 --- a/Parallel/vtkTransmitImageDataPiece.cxx +++ b/Parallel/vtkTransmitImageDataPiece.cxx @@ -228,7 +228,7 @@ void vtkTransmitImageDataPiece::RootExecute(vtkImageData *input, // First, set up the pipeline and handle local request. tmp->ShallowCopy(input); - extract->SetInput(tmp); + extract->SetInputData(tmp); extractExecutive->UpdateDataObject(); vtkInformation *extractOutInfo = extractExecutive->GetOutputInformation(0); diff --git a/Parallel/vtkTransmitPolyDataPiece.cxx b/Parallel/vtkTransmitPolyDataPiece.cxx index 91845dde5d0..d0152a31a1e 100644 --- a/Parallel/vtkTransmitPolyDataPiece.cxx +++ b/Parallel/vtkTransmitPolyDataPiece.cxx @@ -157,7 +157,7 @@ void vtkTransmitPolyDataPiece::RootExecute(vtkPolyData *input, // First, set up the pipeline and handle local request. tmp->ShallowCopy(input); extract->SetCreateGhostCells(this->CreateGhostCells); - extract->SetInput(tmp); + extract->SetInputData(tmp); extractExecutive->UpdateDataObject(); extractInfo->Set(vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_PIECES(), diff --git a/Parallel/vtkTransmitRectilinearGridPiece.cxx b/Parallel/vtkTransmitRectilinearGridPiece.cxx index 89609b13e89..9bad547d8e6 100644 --- a/Parallel/vtkTransmitRectilinearGridPiece.cxx +++ b/Parallel/vtkTransmitRectilinearGridPiece.cxx @@ -202,7 +202,7 @@ void vtkTransmitRectilinearGridPiece::RootExecute(vtkRectilinearGrid *input, // First, set up the pipeline and handle local request. tmp->ShallowCopy(input); - extract->SetInput(tmp); + extract->SetInputData(tmp); extractExecutive->UpdateDataObject(); vtkInformation *extractOutInfo = extractExecutive->GetOutputInformation(0); diff --git a/Parallel/vtkTransmitStructuredGridPiece.cxx b/Parallel/vtkTransmitStructuredGridPiece.cxx index a078de0c226..cd9ace241ba 100644 --- a/Parallel/vtkTransmitStructuredGridPiece.cxx +++ b/Parallel/vtkTransmitStructuredGridPiece.cxx @@ -214,7 +214,7 @@ void vtkTransmitStructuredGridPiece::RootExecute(vtkStructuredGrid *input, // First, set up the pipeline and handle local request. tmp->ShallowCopy(input); - extract->SetInput(tmp); + extract->SetInputData(tmp); extractExecutive->UpdateDataObject(); vtkInformation *extractOutInfo = extractExecutive->GetOutputInformation(0); diff --git a/Parallel/vtkTransmitUnstructuredGridPiece.cxx b/Parallel/vtkTransmitUnstructuredGridPiece.cxx index d5237e61b88..fa517dcecd7 100644 --- a/Parallel/vtkTransmitUnstructuredGridPiece.cxx +++ b/Parallel/vtkTransmitUnstructuredGridPiece.cxx @@ -170,7 +170,7 @@ void vtkTransmitUnstructuredGridPiece::RootExecute(vtkUnstructuredGrid *input, // First, set up the pipeline and handle local request. tmp->ShallowCopy(input); extract->SetCreateGhostCells(this->CreateGhostCells); - extract->SetInput(tmp); + extract->SetInputData(tmp); extractExecutive->UpdateDataObject(); vtkInformation *extractOutInfo = extractExecutive->GetOutputInformation(0); diff --git a/Rendering/Testing/Cxx/RenderNonFinite.cxx b/Rendering/Testing/Cxx/RenderNonFinite.cxx index 8bbeba7fa5c..e9db67922c8 100644 --- a/Rendering/Testing/Cxx/RenderNonFinite.cxx +++ b/Rendering/Testing/Cxx/RenderNonFinite.cxx @@ -165,7 +165,7 @@ static vtkSmartPointer<vtkRenderer> CreateRenderer(vtkPolyData *input, int interpolate) { VTK_CREATE(vtkPolyDataMapper, mapper); - mapper->SetInput(input); + mapper->SetInputData(input); mapper->SetLookupTable(lut); mapper->SetInterpolateScalarsBeforeMapping(interpolate); diff --git a/Rendering/Testing/Cxx/TestAreaSelections.cxx b/Rendering/Testing/Cxx/TestAreaSelections.cxx index 1eea8bd8e41..7f3d1a7d02a 100644 --- a/Rendering/Testing/Cxx/TestAreaSelections.cxx +++ b/Rendering/Testing/Cxx/TestAreaSelections.cxx @@ -89,19 +89,19 @@ static void EndPick(vtkObject *vtkNotUsed( caller ), MY_CREATE_NEW(vtkExtractSelectedPolyDataIds, extr); if (cellids) { - extr->SetInput(0, SS1->GetOutput()); + extr->SetInputConnection(0, SS1->GetOutputPort()); vtkSmartPointer<vtkSelection> temp= vtkSmartPointer<vtkSelection>::New(); temp->AddNode(cellids); - extr->SetInput(1, temp); + extr->SetInputData(1, temp); extr->Update(); - sMap->SetInput(extr->GetOutput()); + sMap->SetInputConnection(extr->GetOutputPort()); } else { cerr << "Empty color buffer selection -" << endl; cerr << "Check display color depth. Must be at least 24 bit." << endl; - sMap->SetInput(emptyPD); + sMap->SetInputData(emptyPD); } } @@ -137,7 +137,7 @@ int TestAreaSelections(int argc, char* argv[]) delete [] cfname; MY_CREATE_NEW(vtkDataSetMapper, map1); - map1->SetInput(reader->GetOutput()); + map1->SetInputConnection(reader->GetOutputPort()); MY_CREATE_NEW(vtkActor, act1); act1->SetMapper(map1); @@ -151,7 +151,7 @@ int TestAreaSelections(int argc, char* argv[]) extractor->SetFrustum(areaPicker->GetFrustum()); MY_CREATE_NEW(vtkDataSetMapper, eMap); - eMap->SetInput(vtkDataSet::SafeDownCast(extractor->GetOutput())); + eMap->SetInputConnection(extractor->GetOutputPort()); MY_CREATE_NEW(vtkActor, eAct); eAct->SetPosition(2,0,0); @@ -169,7 +169,7 @@ int TestAreaSelections(int argc, char* argv[]) SS1->SetRadius(0.5); SS1->SetCenter(0.5,-1.5,0); MY_CREATE_NEW(vtkPolyDataMapper, map2); - map2->SetInput(SS1->GetOutput()); + map2->SetInputConnection(SS1->GetOutputPort()); MY_CREATE_NEW(vtkActor, act2); act2->SetMapper(map2); @@ -177,7 +177,7 @@ int TestAreaSelections(int argc, char* argv[]) renderer->AddActor(act2); sMap = vtkSmartPointer<vtkDataSetMapper>::New(); - sMap->SetInput(SS1->GetOutput()); + sMap->SetInputConnection(SS1->GetOutputPort()); MY_CREATE_NEW(vtkActor, sAct); sAct->SetMapper(sMap); diff --git a/Rendering/Testing/Cxx/TestDynamic2DLabelMapper.cxx b/Rendering/Testing/Cxx/TestDynamic2DLabelMapper.cxx index 490f0a6c4a7..3f431178941 100644 --- a/Rendering/Testing/Cxx/TestDynamic2DLabelMapper.cxx +++ b/Rendering/Testing/Cxx/TestDynamic2DLabelMapper.cxx @@ -67,12 +67,12 @@ int TestDynamic2DLabelMapper(int argc, char* argv[]) poly->GetPointData()->AddArray(nameArray); VTK_CREATE(vtkDynamic2DLabelMapper, mapper); - mapper->SetInput(poly); + mapper->SetInputData(poly); VTK_CREATE(vtkActor2D, actor); actor->SetMapper(mapper); VTK_CREATE(vtkPolyDataMapper, polyMapper); - polyMapper->SetInput(poly); + polyMapper->SetInputData(poly); VTK_CREATE(vtkActor, polyActor); polyActor->SetMapper(polyMapper); diff --git a/Rendering/Testing/Cxx/TestFollowerPicking.cxx b/Rendering/Testing/Cxx/TestFollowerPicking.cxx index 1815ce600d6..8d7ad8e9ea3 100644 --- a/Rendering/Testing/Cxx/TestFollowerPicking.cxx +++ b/Rendering/Testing/Cxx/TestFollowerPicking.cxx @@ -17,6 +17,7 @@ // #include "vtkJPEGReader.h" #include "vtkImageActor.h" +#include "vtkImageMapper3D.h" #include "vtkPlaneSource.h" #include "vtkPolyDataMapper.h" #include "vtkFollower.h" @@ -271,7 +272,7 @@ int TestFollowerPicking( int argc, char* argv[] ) delete[] fname; VTK_CREATE(vtkImageActor,ia); - ia->SetInput(pnmReader->GetOutput()); + ia->GetMapper()->SetInputConnection(pnmReader->GetOutputPort()); ia->SetScale(0.01,0.01,0.01); VTK_CREATE(vtkProp3DFollower,p3dFollower); diff --git a/Rendering/Testing/Cxx/TestGlyph3DMapperArrow.cxx b/Rendering/Testing/Cxx/TestGlyph3DMapperArrow.cxx index 8400b87b394..b1b874c4a65 100644 --- a/Rendering/Testing/Cxx/TestGlyph3DMapperArrow.cxx +++ b/Rendering/Testing/Cxx/TestGlyph3DMapperArrow.cxx @@ -58,7 +58,7 @@ int TestGlyph3DMapperArrow(int argc, char *argv[]) reader->Update(); vtkExtractGrid *eg=vtkExtractGrid::New(); - eg->SetInput(reader->GetOutput()->GetBlock(0)); + eg->SetInputData(reader->GetOutput()->GetBlock(0)); reader->Delete(); eg->SetSampleRate(4,4,4); eg->Update(); diff --git a/Rendering/Testing/Cxx/TestGlyph3DMapperPicking.cxx b/Rendering/Testing/Cxx/TestGlyph3DMapperPicking.cxx index 22d641d949c..9588b910dc2 100644 --- a/Rendering/Testing/Cxx/TestGlyph3DMapperPicking.cxx +++ b/Rendering/Testing/Cxx/TestGlyph3DMapperPicking.cxx @@ -215,7 +215,7 @@ int TestGlyph3DMapperPicking(int argc, char* argv[]) glypher2->SetMasking(1); glypher2->SetMaskArray("mask"); - glypher2->SetInputConnection(0, selection->GetProducerPort()); + glypher2->SetInputData(selection); glypher2->SetScaleFactor(0.1); glypher2->SetSourceConnection(squad->GetOutputPort()); glyphActor2->SetMapper(glypher2); diff --git a/Rendering/Testing/Cxx/TestLODActor.cxx b/Rendering/Testing/Cxx/TestLODActor.cxx index e8473d083c4..e572301313b 100644 --- a/Rendering/Testing/Cxx/TestLODActor.cxx +++ b/Rendering/Testing/Cxx/TestLODActor.cxx @@ -343,7 +343,7 @@ int TestLODActor( int argc, char* argv[]) iren->SetRenderWindow(renWin); vtkLoopSubdivisionFilter *subdivide = vtkLoopSubdivisionFilter::New(); - subdivide->SetInput (model); + subdivide->SetInputData (model); subdivide->SetNumberOfSubdivisions(6); vtkDataSetMapper *mapper = vtkDataSetMapper::New(); diff --git a/Rendering/Testing/Cxx/TestLabelPlacementMapper2D.cxx b/Rendering/Testing/Cxx/TestLabelPlacementMapper2D.cxx index f83462a0447..3a57492fff8 100644 --- a/Rendering/Testing/Cxx/TestLabelPlacementMapper2D.cxx +++ b/Rendering/Testing/Cxx/TestLabelPlacementMapper2D.cxx @@ -2675,7 +2675,7 @@ int TestLabelPlacementMapper2D( int argc, char* argv[] ) tprop->SetFontFamily( vtkTextProperty::GetFontFamilyFromString( "Arial" ) ); vtkPointSetToLabelHierarchy* labelHierarchy = vtkPointSetToLabelHierarchy::New(); - labelHierarchy->SetInput( polyData ); + labelHierarchy->SetInputData( polyData ); labelHierarchy->SetTextProperty( tprop ); labelHierarchy->SetPriorityArrayName( "Priorities" ); labelHierarchy->SetLabelArrayName( "LabelText" ); diff --git a/Rendering/Testing/Cxx/TestLabelPlacementMapperCoincidentPoints.cxx b/Rendering/Testing/Cxx/TestLabelPlacementMapperCoincidentPoints.cxx index ba3e8106c59..ecdb9ef92e1 100644 --- a/Rendering/Testing/Cxx/TestLabelPlacementMapperCoincidentPoints.cxx +++ b/Rendering/Testing/Cxx/TestLabelPlacementMapperCoincidentPoints.cxx @@ -170,7 +170,7 @@ int TestLabelPlacementMapperCoincidentPoints(int argc, char *argv[]) tprop->SetFontFamily( vtkTextProperty::GetFontFamilyFromString( "Arial" ) ); tprop->SetColor( 0.0, 0.8, 0.2 ); - pointSetToLabelHierarchy->SetInput(polyData); + pointSetToLabelHierarchy->SetInputData(polyData); pointSetToLabelHierarchy->SetTextProperty(tprop); pointSetToLabelHierarchy->SetPriorityArrayName("Priority"); pointSetToLabelHierarchy->SetLabelArrayName("PlaceNames"); @@ -182,7 +182,7 @@ int TestLabelPlacementMapperCoincidentPoints(int argc, char *argv[]) labelPlacer->SetMaximumLabelFraction( labelRatio ); //labelPlacer->SetIteratorType(1); // Quadtree is only available type for 2-D. - polyDataMapper->SetInput(polyData); + polyDataMapper->SetInputData(polyData); //polyDataMapper2->SetInputConnection(labelPlacer->GetOutputPort(2)); actor->SetMapper(polyDataMapper); diff --git a/Rendering/Testing/Cxx/TestLabelPlacer2D.cxx b/Rendering/Testing/Cxx/TestLabelPlacer2D.cxx index 304fab80323..8a7bdc60ec7 100644 --- a/Rendering/Testing/Cxx/TestLabelPlacer2D.cxx +++ b/Rendering/Testing/Cxx/TestLabelPlacer2D.cxx @@ -2671,7 +2671,7 @@ int TestLabelPlacer2D( int argc, char* argv[] ) polyData->GetPointData()->AddArray( priorities ); vtkLabelSizeCalculator* sizeCalc = vtkLabelSizeCalculator::New(); - sizeCalc->SetInput( polyData ); + sizeCalc->SetInputData( polyData ); sizeCalc->GetFontProperty()->SetFontSize( 12 ); sizeCalc->GetFontProperty()->SetFontFamily( vtkTextProperty::GetFontFamilyFromString( "Arial" ) ); sizeCalc->SetInputArrayToProcess( 0, 0, 0, vtkDataObject::FIELD_ASSOCIATION_POINTS, "LabelText" ); diff --git a/Rendering/Testing/Cxx/TestLabelPlacerCoincidentPoints.cxx b/Rendering/Testing/Cxx/TestLabelPlacerCoincidentPoints.cxx index 516eb5613c0..1be4f438e8d 100644 --- a/Rendering/Testing/Cxx/TestLabelPlacerCoincidentPoints.cxx +++ b/Rendering/Testing/Cxx/TestLabelPlacerCoincidentPoints.cxx @@ -169,7 +169,7 @@ int TestLabelPlacerCoincidentPoints(int argc, char *argv[]) polyData->GetPointData()->AddArray(stringData); - labelSizeCalculator->SetInput(polyData); + labelSizeCalculator->SetInputData(polyData); labelSizeCalculator->GetFontProperty()->SetFontSize( 12 ); labelSizeCalculator->GetFontProperty()->SetFontFamily( vtkTextProperty::GetFontFamilyFromString( "Arial" ) ); labelSizeCalculator->SetInputArrayToProcess( 0, 0, 0, vtkDataObject::FIELD_ASSOCIATION_POINTS, "PlaceNames" ); @@ -189,7 +189,7 @@ int TestLabelPlacerCoincidentPoints(int argc, char *argv[]) labelPlacer->SetMaximumLabelFraction( labelRatio ); //labelPlacer->SetIteratorType(1); // Quadtree is only available type for 2-D. - polyDataMapper->SetInput(polyData); + polyDataMapper->SetInputData(polyData); //polyDataMapper2->SetInputConnection(labelPlacer->GetOutputPort(2)); actor->SetMapper(polyDataMapper); diff --git a/Rendering/Testing/Cxx/TestMultiTexturing.cxx b/Rendering/Testing/Cxx/TestMultiTexturing.cxx index 5a83c2db547..5360d1a2e34 100644 --- a/Rendering/Testing/Cxx/TestMultiTexturing.cxx +++ b/Rendering/Testing/Cxx/TestMultiTexturing.cxx @@ -120,7 +120,7 @@ int TestMultiTexturing(int argc, char *argv[]) iren->SetRenderWindow(renWin); vtkPolyDataMapper * mapper = vtkPolyDataMapper::New(); - mapper->SetInput(polyData); + mapper->SetInputData(polyData); vtkActor * actor = vtkActor::New(); diff --git a/Rendering/Testing/Cxx/TestMultiTexturingGLSL.cxx b/Rendering/Testing/Cxx/TestMultiTexturingGLSL.cxx index 2f08cff9f2c..83445b88124 100644 --- a/Rendering/Testing/Cxx/TestMultiTexturingGLSL.cxx +++ b/Rendering/Testing/Cxx/TestMultiTexturingGLSL.cxx @@ -138,7 +138,7 @@ int TestMultiTexturingGLSL(int argc, char *argv[]) vtkRenderWindow * renWin = vtkRenderWindow::New(); vtkPolyDataMapper * mapper = vtkPolyDataMapper::New(); - mapper->SetInput(polyData); + mapper->SetInputData(polyData); vtkActor * actor = vtkActor::New(); diff --git a/Rendering/Testing/Cxx/TestMultiTexturingTransform.cxx b/Rendering/Testing/Cxx/TestMultiTexturingTransform.cxx index ad8de5af595..aab1364dc32 100644 --- a/Rendering/Testing/Cxx/TestMultiTexturingTransform.cxx +++ b/Rendering/Testing/Cxx/TestMultiTexturingTransform.cxx @@ -128,7 +128,7 @@ int TestMultiTexturingTransform(int argc, char *argv[]) iren->SetRenderWindow(renWin); vtkPolyDataMapper * mapper = vtkPolyDataMapper::New(); - mapper->SetInput(polyData); + mapper->SetInputData(polyData); vtkActor * actor = vtkActor::New(); vtkOpenGLHardwareSupport * hardware = diff --git a/Rendering/Testing/Cxx/TestOrderedTriangulator.cxx b/Rendering/Testing/Cxx/TestOrderedTriangulator.cxx index f4c0b105e08..293cee5b636 100644 --- a/Rendering/Testing/Cxx/TestOrderedTriangulator.cxx +++ b/Rendering/Testing/Cxx/TestOrderedTriangulator.cxx @@ -158,7 +158,7 @@ int TestOrderedTriangulator(int argc, char *argv[]) //First tets: vtkShrinkFilter *shrink1 = vtkShrinkFilter::New(); - shrink1->SetInput( aTetraGrid1 ); + shrink1->SetInputData( aTetraGrid1 ); shrink1->SetShrinkFactor( 0.7 ); vtkDataSetMapper *aTetraMapper1 = vtkDataSetMapper::New(); @@ -169,7 +169,7 @@ int TestOrderedTriangulator(int argc, char *argv[]) //Second tets: vtkShrinkFilter *shrink2 = vtkShrinkFilter::New(); - shrink2->SetInput( aTetraGrid2 ); + shrink2->SetInputData( aTetraGrid2 ); shrink2->SetShrinkFactor( 0.7 ); vtkDataSetMapper *aTetraMapper2 = vtkDataSetMapper::New(); @@ -181,7 +181,7 @@ int TestOrderedTriangulator(int argc, char *argv[]) //iso cases: //First tets: vtkShrinkFilter *isoshrink1 = vtkShrinkFilter::New(); - isoshrink1->SetInput( isoTetraGrid1 ); + isoshrink1->SetInputData( isoTetraGrid1 ); isoshrink1->SetShrinkFactor( 0.7 ); vtkDataSetMapper *isoTetraMapper1 = vtkDataSetMapper::New(); @@ -192,7 +192,7 @@ int TestOrderedTriangulator(int argc, char *argv[]) //Second tets: vtkShrinkFilter *isoshrink2 = vtkShrinkFilter::New(); - isoshrink2->SetInput( isoTetraGrid2 ); + isoshrink2->SetInputData( isoTetraGrid2 ); isoshrink2->SetShrinkFactor( 0.7 ); vtkDataSetMapper *isoTetraMapper2 = vtkDataSetMapper::New(); diff --git a/Rendering/Testing/Cxx/TestPOVExporter.cxx b/Rendering/Testing/Cxx/TestPOVExporter.cxx index da6e1b4cab6..be0914646d6 100644 --- a/Rendering/Testing/Cxx/TestPOVExporter.cxx +++ b/Rendering/Testing/Cxx/TestPOVExporter.cxx @@ -57,7 +57,7 @@ int TestPOVExporter(int vtkNotUsed(argc), char *vtkNotUsed(argv)[]) cone->SetResolution(20); vtkGlyph3D *glyph = vtkGlyph3D::New(); glyph->SetInputConnection(sphere->GetOutputPort()); - glyph->SetSource(cone->GetOutput()); + glyph->SetSourceConnection(cone->GetOutputPort()); glyph->SetVectorModeToUseNormal(); glyph->SetScaleModeToScaleByVector(); glyph->SetScaleFactor(0.25); diff --git a/Rendering/Testing/Cxx/TestQtImages.cxx b/Rendering/Testing/Cxx/TestQtImages.cxx index 39be4037f29..fbcc4b0f21b 100644 --- a/Rendering/Testing/Cxx/TestQtImages.cxx +++ b/Rendering/Testing/Cxx/TestQtImages.cxx @@ -85,7 +85,7 @@ int TestQtImages( int argc, char* argv[] ) cis->SetQImage( &image ); VTK_CREATE(vtkImageActor, imgactor); - imgactor->SetInput(cis->GetOutput()); + imgactor->SetInputConnection(cis->GetOutputPort()); vtkImageData* id = imgactor->GetInput(); VTK_CREATE(vtkRenderer, renderer); diff --git a/Rendering/Testing/Cxx/TestQtLabelSizeCalculator.cxx b/Rendering/Testing/Cxx/TestQtLabelSizeCalculator.cxx index d4d1b07f1c5..4b884e4e680 100644 --- a/Rendering/Testing/Cxx/TestQtLabelSizeCalculator.cxx +++ b/Rendering/Testing/Cxx/TestQtLabelSizeCalculator.cxx @@ -129,7 +129,7 @@ int TestQtLabelSizeCalculator(int argc, char *argv[]) polyData->GetPointData()->AddArray(stringData); - qtLabelSizeCalculator->SetInput(polyData); + qtLabelSizeCalculator->SetInputData(polyData); qtLabelSizeCalculator->DebugOn(); qtLabelSizeCalculator->GetFontProperty()->SetFontSize( 12 ); qtLabelSizeCalculator->GetFontProperty()->SetFontFamily( vtkTextProperty::GetFontFamilyFromString( "Arial" ) ); @@ -137,7 +137,7 @@ int TestQtLabelSizeCalculator(int argc, char *argv[]) qtLabelSizeCalculator->SetInputArrayToProcess( 0, 0, 0, vtkDataObject::FIELD_ASSOCIATION_POINTS, "PlaceNames" ); qtLabelSizeCalculator->SetLabelSizeArrayName( "LabelSize" ); - labelSizeCalculator->SetInput(polyData); + labelSizeCalculator->SetInputData(polyData); labelSizeCalculator->DebugOn(); labelSizeCalculator->GetFontProperty()->SetFontSize( 12 ); labelSizeCalculator->GetFontProperty()->SetFontFamily( vtkTextProperty::GetFontFamilyFromString( "Arial" ) ); @@ -172,7 +172,7 @@ int TestQtLabelSizeCalculator(int argc, char *argv[]) actor2->SetMapper( polyDataMapper2 ); qtLabelPlacer->Update(); VTK_CREATE( vtkTexture, texture ); - texture->SetInput( qtLabelPlacer->GetOutput() ); + texture->SetInputConnection( qtLabelPlacer->GetOutputPort() ); actor2->SetTexture( texture ); renderer->AddActor(actor2); diff --git a/Rendering/Testing/Cxx/TestQtLabeler.cxx b/Rendering/Testing/Cxx/TestQtLabeler.cxx index 65865c541c6..5fd54d2bdc4 100644 --- a/Rendering/Testing/Cxx/TestQtLabeler.cxx +++ b/Rendering/Testing/Cxx/TestQtLabeler.cxx @@ -149,7 +149,7 @@ int TestQtLabeler(int argc, char *argv[]) polyData->GetPointData()->AddArray(stringData); - labelSizeCalculator->SetInput(polyData); + labelSizeCalculator->SetInputData(polyData); labelSizeCalculator->GetFontProperty()->SetFontSize( 12 ); labelSizeCalculator->GetFontProperty()->SetFontFamily( vtkTextProperty::GetFontFamilyFromString( "Arial" ) ); labelSizeCalculator->GetFontProperty()->SetColor(1., 0., 0.); @@ -208,7 +208,7 @@ int TestQtLabeler(int argc, char *argv[]) actor2->SetMapper( polyDataMapper2 ); cairoLabelPlacer->Update(); VTK_CREATE( vtkTexture, texture ); - texture->SetInput( cairoLabelPlacer->GetOutput() ); + texture->SetInputConnection( cairoLabelPlacer->GetOutputPort() ); texture->SetBlendingMode( vtkTexture::VTK_TEXTURE_BLENDING_MODE_NONE ); actor2->SetTexture( texture ); VTK_CREATE( vtkPNGWriter, pngw ); diff --git a/Rendering/Testing/Cxx/TestScenePicker.cxx b/Rendering/Testing/Cxx/TestScenePicker.cxx index 84a48ae28e3..2d7fd9585ac 100644 --- a/Rendering/Testing/Cxx/TestScenePicker.cxx +++ b/Rendering/Testing/Cxx/TestScenePicker.cxx @@ -84,7 +84,7 @@ vtkActor * CreateActor2( int vtkNotUsed(argc), char **vtkNotUsed(argv), vtkRende ss->SetPhiResolution(30); ss->SetRadius(150.0); vtkPolyDataMapper *mapper = vtkPolyDataMapper::New(); - mapper->SetInput(ss->GetOutput()); + mapper->SetInputConnection(ss->GetOutputPort()); vtkActor *actor = vtkActor::New(); actor->SetMapper(mapper); actor->GetProperty()->SetColor(0.0,1.0,0.0); diff --git a/Rendering/Testing/Cxx/TestSurfaceLIC.h b/Rendering/Testing/Cxx/TestSurfaceLIC.h index 385b3e18640..8ec92f7c365 100644 --- a/Rendering/Testing/Cxx/TestSurfaceLIC.h +++ b/Rendering/Testing/Cxx/TestSurfaceLIC.h @@ -163,7 +163,7 @@ int SurfaceLIC( int argc, char * argv[] ) painter->SetStepSize(step_size); // Set the mapper input - mapper->SetInput(polydata); + mapper->SetInputData(polydata); VTK_CREATE_NEW(actor, vtkActor); actor->SetMapper(mapper); diff --git a/Rendering/Testing/Cxx/TestTStripsColorsTCoords.cxx b/Rendering/Testing/Cxx/TestTStripsColorsTCoords.cxx index 30c12f12af1..6a0910d0dd6 100644 --- a/Rendering/Testing/Cxx/TestTStripsColorsTCoords.cxx +++ b/Rendering/Testing/Cxx/TestTStripsColorsTCoords.cxx @@ -85,7 +85,7 @@ int TestTStripsColorsTCoords(int argc, char *argv[]) colors->Delete(); vtkPolyDataMapper *mapper = vtkPolyDataMapper::New(); - mapper->SetInput(polyData); + mapper->SetInputData(polyData); polyData->Delete(); vtkActor *actor = vtkActor::New(); diff --git a/Rendering/Testing/Cxx/TestTStripsNormalsColorsTCoords.cxx b/Rendering/Testing/Cxx/TestTStripsNormalsColorsTCoords.cxx index 78c41bcbd30..bace1231552 100644 --- a/Rendering/Testing/Cxx/TestTStripsNormalsColorsTCoords.cxx +++ b/Rendering/Testing/Cxx/TestTStripsNormalsColorsTCoords.cxx @@ -84,7 +84,7 @@ int TestTStripsNormalsColorsTCoords(int argc, char *argv[]) colors->Delete(); vtkPolyDataMapper *mapper = vtkPolyDataMapper::New(); - mapper->SetInput(polyData); + mapper->SetInputData(polyData); polyData->Delete(); vtkActor *actor = vtkActor::New(); diff --git a/Rendering/Testing/Cxx/TestTStripsNormalsTCoords.cxx b/Rendering/Testing/Cxx/TestTStripsNormalsTCoords.cxx index 2c1b5034250..e22cb0371af 100644 --- a/Rendering/Testing/Cxx/TestTStripsNormalsTCoords.cxx +++ b/Rendering/Testing/Cxx/TestTStripsNormalsTCoords.cxx @@ -67,7 +67,7 @@ int TestTStripsNormalsTCoords(int argc, char *argv[]) stripper->Delete(); vtkPolyDataMapper *mapper = vtkPolyDataMapper::New(); - mapper->SetInput(polyData); + mapper->SetInputData(polyData); polyData->Delete(); vtkActor *actor = vtkActor::New(); diff --git a/Rendering/Testing/Cxx/TestTStripsTCoords.cxx b/Rendering/Testing/Cxx/TestTStripsTCoords.cxx index e6727523497..283caf98862 100644 --- a/Rendering/Testing/Cxx/TestTStripsTCoords.cxx +++ b/Rendering/Testing/Cxx/TestTStripsTCoords.cxx @@ -68,7 +68,7 @@ int TestTStripsTCoords(int argc, char *argv[]) polyData->GetPointData()->SetNormals(NULL); vtkPolyDataMapper *mapper = vtkPolyDataMapper::New(); - mapper->SetInput(polyData); + mapper->SetInputData(polyData); polyData->Delete(); vtkActor *actor = vtkActor::New(); diff --git a/Rendering/Testing/Cxx/TestTextureRGBA.cxx b/Rendering/Testing/Cxx/TestTextureRGBA.cxx index 8d4d29a0d9b..18b2607daa5 100644 --- a/Rendering/Testing/Cxx/TestTextureRGBA.cxx +++ b/Rendering/Testing/Cxx/TestTextureRGBA.cxx @@ -51,7 +51,7 @@ int TestTextureRGBA(int argc, char *argv[]) planeSource->Update(); vtkPolyDataMapper *mapper = vtkPolyDataMapper::New(); - mapper->SetInput(planeSource->GetOutput()); + mapper->SetInputConnection(planeSource->GetOutputPort()); planeSource->Delete(); vtkActor *actor = vtkActor::New(); diff --git a/Rendering/Testing/Cxx/TestTextureRGBADepthPeeling.cxx b/Rendering/Testing/Cxx/TestTextureRGBADepthPeeling.cxx index c75dcb82b32..02db2864a39 100644 --- a/Rendering/Testing/Cxx/TestTextureRGBADepthPeeling.cxx +++ b/Rendering/Testing/Cxx/TestTextureRGBADepthPeeling.cxx @@ -50,7 +50,7 @@ int TestTextureRGBADepthPeeling(int argc, char *argv[]) planeSource->Update(); vtkPolyDataMapper *mapper = vtkPolyDataMapper::New(); - mapper->SetInput(planeSource->GetOutput()); + mapper->SetInputConnection(planeSource->GetOutputPort()); planeSource->Delete(); vtkActor *actor = vtkActor::New(); diff --git a/Rendering/Testing/Cxx/TestTilingCxx.cxx b/Rendering/Testing/Cxx/TestTilingCxx.cxx index df088485e95..1be2dc5dbeb 100644 --- a/Rendering/Testing/Cxx/TestTilingCxx.cxx +++ b/Rendering/Testing/Cxx/TestTilingCxx.cxx @@ -76,7 +76,7 @@ int TestTilingCxx(int argc, char* argv[]) // mapper and actor VTK_CREATE(vtkPolyDataMapper, mapper); - mapper->SetInput(randomColors->GetPolyDataOutput()); + mapper->SetInputConnection(randomColors->GetOutputPort()); mapper->SetScalarRange(randomColors->GetPolyDataOutput()->GetScalarRange()); VTK_CREATE(vtkActor, sphereActor); @@ -131,7 +131,7 @@ int TestTilingCxx(int argc, char* argv[]) outputData->DeepCopy(w2i->GetOutput()); VTK_CREATE(vtkImageMapper, ia); - ia->SetInput(outputData); + ia->SetInputData(outputData); scalarBar->ReleaseGraphicsResources(renWin); sphereActor->ReleaseGraphicsResources(renWin); ia->SetColorWindow(255); diff --git a/Rendering/Testing/Cxx/TestTranslucentImageActorAlphaBlending.cxx b/Rendering/Testing/Cxx/TestTranslucentImageActorAlphaBlending.cxx index 4f49e86b400..10901bc31b8 100644 --- a/Rendering/Testing/Cxx/TestTranslucentImageActorAlphaBlending.cxx +++ b/Rendering/Testing/Cxx/TestTranslucentImageActorAlphaBlending.cxx @@ -27,6 +27,7 @@ #include "vtkActor.h" #include "vtkPNGReader.h" #include "vtkImageActor.h" +#include "vtkImageMapper3D.h" #include "vtkCamera.h" int TestTranslucentImageActorAlphaBlending(int argc, char* argv[]) @@ -45,7 +46,7 @@ int TestTranslucentImageActorAlphaBlending(int argc, char* argv[]) ia->Delete(); vtkPNGReader *pnmReader=vtkPNGReader::New(); - ia->SetInput(pnmReader->GetOutput()); + ia->GetMapper()->SetInputConnection(pnmReader->GetOutputPort()); pnmReader->Delete(); char* fname = vtkTestUtilities::ExpandDataFileName( diff --git a/Rendering/Testing/Cxx/TestTranslucentImageActorDepthPeeling.cxx b/Rendering/Testing/Cxx/TestTranslucentImageActorDepthPeeling.cxx index 62dc0895b7f..2f08482d355 100644 --- a/Rendering/Testing/Cxx/TestTranslucentImageActorDepthPeeling.cxx +++ b/Rendering/Testing/Cxx/TestTranslucentImageActorDepthPeeling.cxx @@ -27,6 +27,7 @@ #include "vtkActor.h" #include "vtkPNGReader.h" #include "vtkImageActor.h" +#include "vtkImageMapper3D.h" #include "vtkCamera.h" int TestTranslucentImageActorDepthPeeling(int argc, char* argv[]) @@ -52,7 +53,7 @@ int TestTranslucentImageActorDepthPeeling(int argc, char* argv[]) ia->Delete(); vtkPNGReader *pnmReader=vtkPNGReader::New(); - ia->SetInput(pnmReader->GetOutput()); + ia->GetMapper()->SetInputConnection(pnmReader->GetOutputPort()); pnmReader->Delete(); char* fname = vtkTestUtilities::ExpandDataFileName( diff --git a/Rendering/Testing/Cxx/TimeRenderer.cxx b/Rendering/Testing/Cxx/TimeRenderer.cxx index 3513028c1c9..0a550e520d0 100644 --- a/Rendering/Testing/Cxx/TimeRenderer.cxx +++ b/Rendering/Testing/Cxx/TimeRenderer.cxx @@ -149,10 +149,10 @@ int main( int argc, char *argv[] ) cells->InsertNextCell(aPnts, cdata); data->SetVerts(cells); data->SetPoints(pnts); - tfilter->SetInput(cube); + tfilter->SetInputData(cube); stripper->SetInputConnection(tfilter->GetOutputPort()); - filter->SetSource(stripper->GetOutput()); - filter->SetInput(data); + filter->SetSourceConnection(stripper->GetOutputPort()); + filter->SetInputData(data); mapper->SetInputConnection(filter->GetOutputPort()); actor->SetMapper(mapper); ren1->AddActor(actor); diff --git a/Rendering/vtkAxisActor2D.cxx b/Rendering/vtkAxisActor2D.cxx index 49da3d1694f..a4283227332 100644 --- a/Rendering/vtkAxisActor2D.cxx +++ b/Rendering/vtkAxisActor2D.cxx @@ -93,7 +93,7 @@ vtkAxisActor2D::vtkAxisActor2D() this->Axis = vtkPolyData::New(); this->AxisMapper = vtkPolyDataMapper2D::New(); - this->AxisMapper->SetInput(this->Axis); + this->AxisMapper->SetInputData(this->Axis); this->AxisActor = vtkActor2D::New(); this->AxisActor->SetMapper(this->AxisMapper); diff --git a/Rendering/vtkCompositePolyDataMapper.cxx b/Rendering/vtkCompositePolyDataMapper.cxx index 090c92d7422..8e86c568142 100644 --- a/Rendering/vtkCompositePolyDataMapper.cxx +++ b/Rendering/vtkCompositePolyDataMapper.cxx @@ -95,7 +95,7 @@ void vtkCompositePolyDataMapper::BuildPolyDataMapper() newpd->ShallowCopy(pd); vtkPolyDataMapper *pdmapper = this->MakeAMapper(); pdmapper->Register( this ); - pdmapper->SetInput(newpd); + pdmapper->SetInputData(newpd); this->Internal->Mappers.push_back(pdmapper); newpd->Delete(); pdmapper->Delete(); @@ -123,7 +123,7 @@ void vtkCompositePolyDataMapper::BuildPolyDataMapper() newpd->ShallowCopy(pd); vtkPolyDataMapper *pdmapper = this->MakeAMapper(); pdmapper->Register(this); - pdmapper->SetInput(newpd); + pdmapper->SetInputData(newpd); this->Internal->Mappers.push_back(pdmapper); newpd->Delete(); pdmapper->Delete(); diff --git a/Rendering/vtkDataSetMapper.cxx b/Rendering/vtkDataSetMapper.cxx index 4146eb6af3a..6a0d1062ac4 100644 --- a/Rendering/vtkDataSetMapper.cxx +++ b/Rendering/vtkDataSetMapper.cxx @@ -47,17 +47,9 @@ vtkDataSetMapper::~vtkDataSetMapper() } //---------------------------------------------------------------------------- -void vtkDataSetMapper::SetInput(vtkDataSet *input) +void vtkDataSetMapper::SetInputData(vtkDataSet *input) { - if(input) - { - this->SetInputConnection(0, input->GetProducerPort()); - } - else - { - // Setting a NULL input removes the connection. - this->SetInputConnection(0, 0); - } + this->SetInputDataInternal(0, input); } //---------------------------------------------------------------------------- @@ -102,7 +94,7 @@ void vtkDataSetMapper::Render(vtkRenderer *ren, vtkActor *act) { vtkDataSetSurfaceFilter *gf = vtkDataSetSurfaceFilter::New(); vtkPolyDataMapper *pm = vtkPolyDataMapper::New(); - pm->SetInput(gf->GetOutput()); + pm->SetInputConnection(gf->GetOutputPort()); this->GeometryExtractor = gf; this->PolyDataMapper = pm; @@ -120,12 +112,14 @@ void vtkDataSetMapper::Render(vtkRenderer *ren, vtkActor *act) // if ( this->GetInput()->GetDataObjectType() == VTK_POLY_DATA ) { - this->PolyDataMapper->SetInput(static_cast<vtkPolyData*>(this->GetInput())); + this->PolyDataMapper->SetInputConnection( + this->GetInputConnection(0, 0)); } else { - this->GeometryExtractor->SetInput(this->GetInput()); - this->PolyDataMapper->SetInput(this->GeometryExtractor->GetOutput()); + this->GeometryExtractor->SetInputData(this->GetInput()); + this->PolyDataMapper->SetInputConnection( + this->GeometryExtractor->GetOutputPort()); } // update ourselves in case something has changed diff --git a/Rendering/vtkDataSetMapper.h b/Rendering/vtkDataSetMapper.h index 6ad8179262f..1bb20ffffec 100644 --- a/Rendering/vtkDataSetMapper.h +++ b/Rendering/vtkDataSetMapper.h @@ -53,7 +53,7 @@ public: // Description: // Set the Input of this mapper. - void SetInput(vtkDataSet *input); + void SetInputData(vtkDataSet *input); vtkDataSet *GetInput(); protected: diff --git a/Rendering/vtkDataTransferHelper.cxx b/Rendering/vtkDataTransferHelper.cxx index 4ede84d4b6c..1a0d9fd7c0f 100644 --- a/Rendering/vtkDataTransferHelper.cxx +++ b/Rendering/vtkDataTransferHelper.cxx @@ -239,7 +239,7 @@ bool vtkDataTransferHelper::Upload(int components, vtkSmartPointer<vtkImageData> tempImg = vtkSmartPointer<vtkImageData>::New(); tempImg->SetDimensions(1, 1, 1); // scalars are needed for ComputeIncrements(). - tempImg->AllocateScalars(); + tempImg->AllocateScalars(VTK_DOUBLE, 1); tempImg->SetExtent(this->CPUExtent); vtkIdType continuousInc[3]; @@ -526,7 +526,7 @@ bool vtkDataTransferHelper::DownloadAsync2() vtkSmartPointer<vtkImageData> tempImg = vtkSmartPointer<vtkImageData>::New(); tempImg->SetDimensions(1, 1, 1); // scalars are needed for ComputeIncrements(). - tempImg->AllocateScalars(); + tempImg->AllocateScalars(VTK_DOUBLE, 1); tempImg->SetExtent(this->CPUExtent); vtkIdType continuousInc[3]; diff --git a/Rendering/vtkGlyph3DMapper.cxx b/Rendering/vtkGlyph3DMapper.cxx index a4578cdb188..f6bc741448a 100644 --- a/Rendering/vtkGlyph3DMapper.cxx +++ b/Rendering/vtkGlyph3DMapper.cxx @@ -34,6 +34,7 @@ #include "vtkStreamingDemandDrivenPipeline.h" #include "vtkTimerLog.h" #include "vtkTransform.h" +#include "vtkTrivialProducer.h" #include <assert.h> #include <vtkstd/vector> @@ -233,45 +234,51 @@ void vtkGlyph3DMapper::SetSourceConnection(int idx, // --------------------------------------------------------------------------- // Specify a source object at a specified table location. -void vtkGlyph3DMapper::SetSource(int idx, vtkPolyData *pd) +void vtkGlyph3DMapper::SetSourceData(int idx, vtkPolyData *pd) { - if (idx < 0) + int numConnections = this->GetNumberOfInputConnections(1); + + if (idx < 0 || idx > numConnections) { vtkErrorMacro("Bad index " << idx << " for source."); return; } - int numConnections = this->GetNumberOfInputConnections(1); - vtkAlgorithmOutput *algOutput = 0; + vtkTrivialProducer* tp = 0; if (pd) { - algOutput = pd->GetProducerPort(); - } - else - { - vtkErrorMacro("Cannot set NULL source."); - return; + tp = vtkTrivialProducer::New(); + tp->SetOutput(pd); } if (idx < numConnections) { - if (algOutput) + if (tp) { - this->SetNthInputConnection(1, idx, algOutput); + this->SetNthInputConnection(1, idx, tp->GetOutputPort()); + } + else + { + this->SetNthInputConnection(1, idx, 0); } } - else if (idx == numConnections && algOutput) + else if (idx == numConnections && tp) { - this->AddInputConnection(1, algOutput); + this->AddInputConnection(1, tp->GetOutputPort()); + } + + if (tp) + { + tp->Delete(); } } // --------------------------------------------------------------------------- // Description: // Set the source to use for he glyph. Old style. See SetSourceConnection. -void vtkGlyph3DMapper::SetSource(vtkPolyData *pd) +void vtkGlyph3DMapper::SetSourceData(vtkPolyData *pd) { - this->SetSource(0,pd); + this->SetSourceData(0,pd); } // --------------------------------------------------------------------------- @@ -461,7 +468,6 @@ bool vtkGlyph3DMapper::GetBoundsInternal(vtkDataSet* ds, double ds_bounds[6]) defaultPointIds[1] = 1; defaultSource->SetPoints(defaultPoints); defaultSource->InsertNextCell(VTK_LINE, 2, defaultPointIds); - this->SetSource(defaultSource); defaultSource->Delete(); defaultSource = NULL; defaultPoints->Delete(); @@ -660,3 +666,9 @@ void vtkGlyph3DMapper::Render(vtkRenderer *, vtkActor *) { cerr << "Calling wrong render method!!\n"; } + +//--------------------------------------------------------------------------- +void vtkGlyph3DMapper::SetInputData(vtkDataObject* input) +{ + this->SetInputDataInternal(0, input); +} diff --git a/Rendering/vtkGlyph3DMapper.h b/Rendering/vtkGlyph3DMapper.h index 52fb3037abc..78a6a261abc 100644 --- a/Rendering/vtkGlyph3DMapper.h +++ b/Rendering/vtkGlyph3DMapper.h @@ -56,13 +56,19 @@ public: this->SetSourceConnection(0, algOutput); } + // Description: + // Assign a data object as input. Note that this method does not + // establish a pipeline connection. Use SetInputConnection() to + // setup a pipeline connection. + void SetInputData(vtkDataObject *); + // Description: // Specify a source object at a specified table location. - void SetSource(int idx, vtkPolyData *pd); + void SetSourceData(int idx, vtkPolyData *pd); // Description: // Set the source to use for he glyph. Old style. See SetSourceConnection. - void SetSource(vtkPolyData *pd); + void SetSourceData(vtkPolyData *pd); // Description: // Get a pointer to a source object at a specified table location. diff --git a/Rendering/vtkGraphMapper.cxx b/Rendering/vtkGraphMapper.cxx index 56119e643ff..d1172e3dc3f 100644 --- a/Rendering/vtkGraphMapper.cxx +++ b/Rendering/vtkGraphMapper.cxx @@ -188,7 +188,7 @@ void vtkGraphMapper::SetScaledGlyphs(bool arg) if (this->ScalingArrayName) { vtkPolyData *circle = this->CreateCircle(true); - this->CircleGlyph->SetSource(circle); + this->CircleGlyph->SetSourceData(circle); circle->Delete(); this->CircleGlyph->SetInputConnection(this->VertexGlyph->GetOutputPort()); this->CircleGlyph->SetScaling(1); @@ -198,7 +198,7 @@ void vtkGraphMapper::SetScaledGlyphs(bool arg) this->VertexMapper->SetInputConnection(this->CircleGlyph->GetOutputPort()); vtkPolyData *outline = this->CreateCircle(false); - this->CircleOutlineGlyph->SetSource(outline); + this->CircleOutlineGlyph->SetSourceData(outline); outline->Delete(); this->CircleOutlineGlyph->SetInputConnection(this->VertexGlyph->GetOutputPort()); this->CircleOutlineGlyph->SetScaling(1); @@ -425,17 +425,9 @@ vtkTexture *vtkGraphMapper::GetIconTexture() } //---------------------------------------------------------------------------- -void vtkGraphMapper::SetInput(vtkGraph *input) +void vtkGraphMapper::SetInputData(vtkGraph *input) { - if(input) - { - this->SetInputConnection(0, input->GetProducerPort()); - } - else - { - // Setting a NULL input removes the connection. - this->SetInputConnection(0, 0); - } + this->SetInputDataInternal(0, input); } //---------------------------------------------------------------------------- @@ -485,8 +477,8 @@ void vtkGraphMapper::Render(vtkRenderer *ren, vtkActor * vtkNotUsed(act)) } graph->ShallowCopy(input); - this->GraphToPoly->SetInput(graph); - this->VertexGlyph->SetInput(graph); + this->GraphToPoly->SetInputData(graph); + this->VertexGlyph->SetInputData(graph); graph->Delete(); this->GraphToPoly->Update(); this->VertexGlyph->Update(); diff --git a/Rendering/vtkGraphMapper.h b/Rendering/vtkGraphMapper.h index cca22c68539..f37217838c7 100644 --- a/Rendering/vtkGraphMapper.h +++ b/Rendering/vtkGraphMapper.h @@ -188,7 +188,7 @@ public: // Description: // Set the Input of this mapper. - void SetInput(vtkGraph *input); + void SetInputData(vtkGraph *input); vtkGraph *GetInput(); // Description: diff --git a/Rendering/vtkGraphToGlyphs.cxx b/Rendering/vtkGraphToGlyphs.cxx index 0e9beb4401e..92c924e0cdd 100644 --- a/Rendering/vtkGraphToGlyphs.cxx +++ b/Rendering/vtkGraphToGlyphs.cxx @@ -138,7 +138,7 @@ int vtkGraphToGlyphs::RequestData( this->DistanceToCamera->SetScreenSize(this->ScreenSize); this->GlyphSource->SetFilled(this->Filled); - this->GraphToPoints->SetInput(inputCopy); + this->GraphToPoints->SetInputData(inputCopy); vtkAbstractArray* arr = this->GetInputArrayToProcess(0, inputVector); if (arr) { diff --git a/Rendering/vtkIVExporter.cxx b/Rendering/vtkIVExporter.cxx index bc619d1efe6..04d7ace9a6f 100644 --- a/Rendering/vtkIVExporter.cxx +++ b/Rendering/vtkIVExporter.cxx @@ -287,23 +287,27 @@ void vtkIVExporter::WriteAnActor(vtkActor *anActor, FILE *fp) // get the mappers input and matrix ds = anActor->GetMapper()->GetInput(); - + + vtkAlgorithmOutput* pdProducer = 0; // we really want polydata if ( ds->GetDataObjectType() != VTK_POLY_DATA ) { gf = vtkGeometryFilter::New(); - gf->SetInput(ds); + gf->SetInputConnection( + anActor->GetMapper()->GetInputConnection(0, 0)); gf->Update(); pd = gf->GetOutput(); + pdProducer = gf->GetOutputPort(); } else { anActor->GetMapper()->GetInputAlgorithm()->Update(); pd = static_cast<vtkPolyData *>(ds); + pdProducer = anActor->GetMapper()->GetInputConnection(0, 0); } pm = vtkPolyDataMapper::New(); - pm->SetInput(pd); + pm->SetInputConnection(pdProducer); pm->SetScalarRange(anActor->GetMapper()->GetScalarRange()); pm->SetScalarVisibility(anActor->GetMapper()->GetScalarVisibility()); pm->SetLookupTable(anActor->GetMapper()->GetLookupTable()); diff --git a/Rendering/vtkImageActor.cxx b/Rendering/vtkImageActor.cxx index 8cb3b009417..9e7215db023 100644 --- a/Rendering/vtkImageActor.cxx +++ b/Rendering/vtkImageActor.cxx @@ -67,11 +67,11 @@ vtkImageActor::~vtkImageActor() } //---------------------------------------------------------------------------- -void vtkImageActor::SetInput(vtkImageData *input) +void vtkImageActor::SetInputData(vtkImageData *input) { if (this->Mapper && input != this->Mapper->GetInput()) { - this->Mapper->SetInput(input); + this->Mapper->SetInputData(input); this->Modified(); } } diff --git a/Rendering/vtkImageActor.h b/Rendering/vtkImageActor.h index 852c8984b48..a2201befd50 100644 --- a/Rendering/vtkImageActor.h +++ b/Rendering/vtkImageActor.h @@ -50,7 +50,7 @@ public: // Set/Get the image data input for the image actor. This is for // backwards compatibility, for a proper pipeline connection you // should use GetMapper()->SetInputConnection() instead. - virtual void SetInput(vtkImageData *); + virtual void SetInputData(vtkImageData *); virtual vtkImageData *GetInput(); // Description: diff --git a/Rendering/vtkImageMapper.cxx b/Rendering/vtkImageMapper.cxx index ec6461c8116..f38716951ce 100644 --- a/Rendering/vtkImageMapper.cxx +++ b/Rendering/vtkImageMapper.cxx @@ -58,17 +58,9 @@ vtkImageMapper::~vtkImageMapper() } //---------------------------------------------------------------------------- -void vtkImageMapper::SetInput(vtkImageData *input) +void vtkImageMapper::SetInputData(vtkImageData *input) { - if(input) - { - this->SetInputConnection(0, input->GetProducerPort()); - } - else - { - // Setting a NULL input removes the connection. - this->SetInputConnection(0, 0); - } + this->SetInputDataInternal(0, input); } //---------------------------------------------------------------------------- diff --git a/Rendering/vtkImageMapper.h b/Rendering/vtkImageMapper.h index 4df44a66fee..551f147a32b 100644 --- a/Rendering/vtkImageMapper.h +++ b/Rendering/vtkImageMapper.h @@ -83,7 +83,7 @@ public: // Description: // Set the Input of a filter. - virtual void SetInput(vtkImageData *input); + virtual void SetInputData(vtkImageData *input); vtkImageData *GetInput(); // Description: diff --git a/Rendering/vtkImageMapper3D.cxx b/Rendering/vtkImageMapper3D.cxx index 83be4ea7d23..0dee8f82818 100644 --- a/Rendering/vtkImageMapper3D.cxx +++ b/Rendering/vtkImageMapper3D.cxx @@ -91,17 +91,9 @@ vtkImageMapper3D::~vtkImageMapper3D() } //---------------------------------------------------------------------------- -void vtkImageMapper3D::SetInput(vtkImageData *input) +void vtkImageMapper3D::SetInputData(vtkImageData *input) { - if (input) - { - this->SetInputConnection(0, input->GetProducerPort()); - } - else - { - // Setting a NULL input removes the connection. - this->SetInputConnection(0, 0); - } + this->SetInputDataInternal(0, input); } //---------------------------------------------------------------------------- diff --git a/Rendering/vtkImageMapper3D.h b/Rendering/vtkImageMapper3D.h index 0fb8131f24e..12a9f986e6b 100644 --- a/Rendering/vtkImageMapper3D.h +++ b/Rendering/vtkImageMapper3D.h @@ -57,7 +57,7 @@ public: // Description: // The input data for this mapper. - void SetInput(vtkImageData *input); + void SetInputData(vtkImageData *input); vtkImageData *GetInput(); vtkDataSet *GetDataSetInput(); vtkDataObject *GetDataObjectInput(); diff --git a/Rendering/vtkImageViewer.h b/Rendering/vtkImageViewer.h index 19e9bd6dc95..39f3b076fe5 100644 --- a/Rendering/vtkImageViewer.h +++ b/Rendering/vtkImageViewer.h @@ -51,7 +51,7 @@ public: // Description: // Set/Get the input to the viewer. - void SetInput(vtkImageData *in) {this->ImageMapper->SetInput(in);}; + void SetInputData(vtkImageData *in) {this->ImageMapper->SetInputData(in);}; vtkImageData *GetInput() { return this->ImageMapper->GetInput();}; virtual void SetInputConnection(vtkAlgorithmOutput* input) { this->ImageMapper->SetInputConnection(input);}; diff --git a/Rendering/vtkImageViewer2.cxx b/Rendering/vtkImageViewer2.cxx index 7969acbe698..98b6423f86b 100644 --- a/Rendering/vtkImageViewer2.cxx +++ b/Rendering/vtkImageViewer2.cxx @@ -18,7 +18,7 @@ #include "vtkCommand.h" #include "vtkImageActor.h" #include "vtkImageData.h" -#include "vtkImageData.h" +#include "vtkImageMapper3D.h" #include "vtkImageMapToWindowLevelColors.h" #include "vtkInformation.h" #include "vtkInteractorStyleImage.h" @@ -614,7 +614,8 @@ void vtkImageViewer2::InstallPipeline() if (this->ImageActor && this->WindowLevel) { - this->ImageActor->SetInput(this->WindowLevel->GetOutput()); + this->ImageActor->GetMapper()->SetInputConnection( + this->WindowLevel->GetOutputPort()); } } @@ -623,7 +624,7 @@ void vtkImageViewer2::UnInstallPipeline() { if (this->ImageActor) { - this->ImageActor->SetInput(NULL); + this->ImageActor->GetMapper()->SetInputConnection(NULL); } if (this->Renderer && this->ImageActor) @@ -718,9 +719,9 @@ int vtkImageViewer2::GetOffScreenRendering() } //---------------------------------------------------------------------------- -void vtkImageViewer2::SetInput(vtkImageData *in) +void vtkImageViewer2::SetInputData(vtkImageData *in) { - this->WindowLevel->SetInput(in); + this->WindowLevel->SetInputData(in); this->UpdateDisplayExtent(); } //---------------------------------------------------------------------------- diff --git a/Rendering/vtkImageViewer2.h b/Rendering/vtkImageViewer2.h index aba327d1818..630b25b7c9f 100644 --- a/Rendering/vtkImageViewer2.h +++ b/Rendering/vtkImageViewer2.h @@ -33,7 +33,8 @@ // // It is possible to mix images and geometry, using the methods: // -// viewer->SetInput( myImage ); +// viewer->SetInputConnection( imageSource->GetOutputPort() ); +// // or viewer->SetInputData ( image ); // viewer->GetRenderer()->AddActor( myActor ); // // This can be used to annotate an image with a PolyData of "edges" or @@ -84,7 +85,7 @@ public: // Description: // Set/Get the input image to the viewer. - virtual void SetInput(vtkImageData *in); + virtual void SetInputData(vtkImageData *in); virtual vtkImageData *GetInput(); virtual void SetInputConnection(vtkAlgorithmOutput* input); diff --git a/Rendering/vtkInteractorStyle.cxx b/Rendering/vtkInteractorStyle.cxx index 266501eba88..eb39f82513b 100644 --- a/Rendering/vtkInteractorStyle.cxx +++ b/Rendering/vtkInteractorStyle.cxx @@ -61,7 +61,8 @@ vtkInteractorStyle::vtkInteractorStyle() this->OutlineActor = NULL; this->OutlineMapper = vtkPolyDataMapper::New(); - this->OutlineMapper->SetInput(this->Outline->GetOutput()); + this->OutlineMapper->SetInputConnection( + this->Outline->GetOutputPort()); this->PickedRenderer = NULL; this->CurrentProp = NULL; diff --git a/Rendering/vtkInteractorStyleTerrain.cxx b/Rendering/vtkInteractorStyleTerrain.cxx index fb25305ec87..8de2f0e5dc3 100644 --- a/Rendering/vtkInteractorStyleTerrain.cxx +++ b/Rendering/vtkInteractorStyleTerrain.cxx @@ -379,13 +379,15 @@ void vtkInteractorStyleTerrain::CreateLatLong() if (this->LatLongExtractEdges == NULL) { this->LatLongExtractEdges = vtkExtractEdges::New(); - this->LatLongExtractEdges->SetInput(this->LatLongSphere->GetOutput()); + this->LatLongExtractEdges->SetInputConnection( + this->LatLongSphere->GetOutputPort()); } if (this->LatLongMapper == NULL) { this->LatLongMapper = vtkPolyDataMapper::New(); - this->LatLongMapper->SetInput(this->LatLongExtractEdges->GetOutput()); + this->LatLongMapper->SetInputConnection( + this->LatLongExtractEdges->GetOutputPort()); } if (this->LatLongActor == NULL) diff --git a/Rendering/vtkInteractorStyleUnicam.cxx b/Rendering/vtkInteractorStyleUnicam.cxx index 94f9e2df407..7ce5cdbb706 100644 --- a/Rendering/vtkInteractorStyleUnicam.cxx +++ b/Rendering/vtkInteractorStyleUnicam.cxx @@ -72,7 +72,7 @@ vtkInteractorStyleUnicam::vtkInteractorStyleUnicam() sphere->SetThetaResolution(6); sphere->SetPhiResolution(6); vtkPolyDataMapper *sphereMapper = vtkPolyDataMapper::New(); - sphereMapper->SetInput(sphere->GetOutput()); + sphereMapper->SetInputConnection(sphere->GetOutputPort()); sphere->Delete(); // XXX - would like to make the focus sphere not be affected by diff --git a/Rendering/vtkLODActor.cxx b/Rendering/vtkLODActor.cxx index a2ab5795267..73793708220 100644 --- a/Rendering/vtkLODActor.cxx +++ b/Rendering/vtkLODActor.cxx @@ -331,8 +331,10 @@ void vtkLODActor::UpdateOwnLODs() } // connect the filters to the mapper, and set parameters - this->MediumResFilter->SetInput(this->Mapper->GetInput()); - this->LowResFilter->SetInput(this->Mapper->GetInput()); + this->MediumResFilter->SetInputConnection( + this->Mapper->GetInputConnection(0, 0)); + this->LowResFilter->SetInputConnection( + this->Mapper->GetInputConnection(0, 0)); // If the medium res filter is a vtkMaskPoints, then set the ivar in here. // In reality, we should deprecate the vtkLODActor::SetNumberOfCloudPoints @@ -345,10 +347,12 @@ void vtkLODActor::UpdateOwnLODs() // copy all parameters including LUTs, scalar range, etc. this->MediumMapper->ShallowCopy(this->Mapper); - this->MediumMapper->SetInput(this->MediumResFilter->GetOutput()); + this->MediumMapper->SetInputConnection( + this->MediumResFilter->GetOutputPort()); this->LowMapper->ShallowCopy(this->Mapper); this->LowMapper->ScalarVisibilityOff(); - this->LowMapper->SetInput(this->LowResFilter->GetOutput()); + this->LowMapper->SetInputConnection( + this->LowResFilter->GetOutputPort()); this->BuildTime.Modified(); } diff --git a/Rendering/vtkLabelHierarchyAlgorithm.cxx b/Rendering/vtkLabelHierarchyAlgorithm.cxx index 29706cec889..6e5fc6cca8d 100644 --- a/Rendering/vtkLabelHierarchyAlgorithm.cxx +++ b/Rendering/vtkLabelHierarchyAlgorithm.cxx @@ -20,7 +20,6 @@ #include "vtkObjectFactory.h" #include "vtkLabelHierarchy.h" #include "vtkStreamingDemandDrivenPipeline.h" -#include "vtkTrivialProducer.h" vtkStandardNewMacro(vtkLabelHierarchyAlgorithm); @@ -143,7 +142,6 @@ int vtkLabelHierarchyAlgorithm::RequestDataObject( output = vtkLabelHierarchy::New(); outInfo->Set( vtkDataObject::DATA_OBJECT(), output ); output->FastDelete(); - output->SetPipelineInformation( outInfo ); } } return 1; @@ -191,37 +189,26 @@ int vtkLabelHierarchyAlgorithm::RequestData( } //---------------------------------------------------------------------------- -void vtkLabelHierarchyAlgorithm::SetInput(vtkDataObject* input) +void vtkLabelHierarchyAlgorithm::SetInputData(vtkDataObject* input) { - this->SetInput(0, input); + this->SetInputData(0, input); } //---------------------------------------------------------------------------- -void vtkLabelHierarchyAlgorithm::SetInput(int index, vtkDataObject* input) +void vtkLabelHierarchyAlgorithm::SetInputData(int index, vtkDataObject* input) { - if(input) - { - this->SetInputConnection(index, input->GetProducerPort()); - } - else - { - // Setting a NULL input removes the connection. - this->SetInputConnection(index, 0); - } + this->SetInputDataInternal(index, input); } //---------------------------------------------------------------------------- -void vtkLabelHierarchyAlgorithm::AddInput(vtkDataObject* input) +void vtkLabelHierarchyAlgorithm::AddInputData(vtkDataObject* input) { - this->AddInput(0, input); + this->AddInputData(0, input); } //---------------------------------------------------------------------------- -void vtkLabelHierarchyAlgorithm::AddInput(int index, vtkDataObject* input) +void vtkLabelHierarchyAlgorithm::AddInputData(int index, vtkDataObject* input) { - if(input) - { - this->AddInputConnection(index, input->GetProducerPort()); - } + this->AddInputDataInternal(index, input); } diff --git a/Rendering/vtkLabelHierarchyAlgorithm.h b/Rendering/vtkLabelHierarchyAlgorithm.h index be536408fd2..b0a7c95dd9d 100644 --- a/Rendering/vtkLabelHierarchyAlgorithm.h +++ b/Rendering/vtkLabelHierarchyAlgorithm.h @@ -61,23 +61,18 @@ public: vtkLabelHierarchy* GetLabelHierarchyInput(int port); // Description: - // Set an input of this algorithm. You should not override these - // methods because they are not the only way to connect a pipeline. - // Note that these methods support old-style pipeline connections. - // When writing new code you should use the more general - // vtkAlgorithm::SetInputConnection(). These methods transform the - // input index to the input port index, not an index of a connection - // within a single port. - void SetInput( vtkDataObject* ); - void SetInput( int, vtkDataObject* ); + // Assign a data object as input. Note that this method does not + // establish a pipeline connection. Use SetInputConnection() to + // setup a pipeline connection. + void SetInputData( vtkDataObject* ); + void SetInputData( int, vtkDataObject* ); // Description: - // Add an input of this algorithm. Note that these methods support - // old-style pipeline connections. When writing new code you should - // use the more general vtkAlgorithm::AddInputConnection(). See - // SetInput() for details. - void AddInput( vtkDataObject* ); - void AddInput( int, vtkDataObject* ); + // Assign a data object as input. Note that this method does not + // establish a pipeline connection. Use AddInputConnection() to + // setup a pipeline connection. + void AddInputData( vtkDataObject* ); + void AddInputData( int, vtkDataObject* ); protected: vtkLabelHierarchyAlgorithm(); diff --git a/Rendering/vtkLabelPlacementMapper.cxx b/Rendering/vtkLabelPlacementMapper.cxx index 779540593cb..32f15bc89af 100644 --- a/Rendering/vtkLabelPlacementMapper.cxx +++ b/Rendering/vtkLabelPlacementMapper.cxx @@ -224,7 +224,7 @@ public: { poly->SetPolys(cells); } - mapper->SetInput(poly); + mapper->SetInputData(poly); actor->SetMapper(mapper); actor->GetProperty()->SetColor(color); actor->GetProperty()->SetOpacity(opacity); @@ -875,7 +875,7 @@ void vtkLabelPlacementMapper::RenderOverlay(vtkViewport *viewport, vtkSmartPointer<vtkActor2D> boundsActor = vtkSmartPointer<vtkActor2D>::New(); trans->SetInputCoordinateSystemToWorld(); trans->SetOutputCoordinateSystemToDisplay(); - trans->SetInput( boundsPoly ); + trans->SetInputData( boundsPoly ); trans->SetViewport( ren ); boundsMapper->SetInputConnection( trans->GetOutputPort() ); boundsMapper->RenderOverlay( ren, boundsActor ); diff --git a/Rendering/vtkLabeledDataMapper.cxx b/Rendering/vtkLabeledDataMapper.cxx index 0fdd1cc39bc..7c0fad4c6f6 100644 --- a/Rendering/vtkLabeledDataMapper.cxx +++ b/Rendering/vtkLabeledDataMapper.cxx @@ -172,17 +172,9 @@ vtkTextProperty* vtkLabeledDataMapper::GetLabelTextProperty(int type) } //---------------------------------------------------------------------------- -void vtkLabeledDataMapper::SetInput(vtkDataObject* input) +void vtkLabeledDataMapper::SetInputData(vtkDataObject* input) { - if (input) - { - this->SetInputConnection(0, input->GetProducerPort()); - } - else - { - // Setting a NULL input removes the connection. - this->SetInputConnection(0, 0); - } + this->SetInputDataInternal(0, input); } //---------------------------------------------------------------------------- diff --git a/Rendering/vtkLabeledDataMapper.h b/Rendering/vtkLabeledDataMapper.h index 6681cfc76a0..36fa0b768fb 100644 --- a/Rendering/vtkLabeledDataMapper.h +++ b/Rendering/vtkLabeledDataMapper.h @@ -109,7 +109,7 @@ public: // Description: // Set the input dataset to the mapper. This mapper handles any type of data. - virtual void SetInput(vtkDataObject*); + virtual void SetInputData(vtkDataObject*); // Description: // Use GetInputDataObject() to get the input data object for composite diff --git a/Rendering/vtkLeaderActor2D.cxx b/Rendering/vtkLeaderActor2D.cxx index 92df5269ca1..e4dd4e8b6a3 100644 --- a/Rendering/vtkLeaderActor2D.cxx +++ b/Rendering/vtkLeaderActor2D.cxx @@ -85,7 +85,7 @@ vtkLeaderActor2D::vtkLeaderActor2D() this->Leader->SetPolys(this->LeaderArrows); this->LeaderMapper = vtkPolyDataMapper2D::New(); - this->LeaderMapper->SetInput(this->Leader); + this->LeaderMapper->SetInputData(this->Leader); this->LeaderActor = vtkActor2D::New(); this->LeaderActor->SetMapper(this->LeaderMapper); diff --git a/Rendering/vtkOBJExporter.cxx b/Rendering/vtkOBJExporter.cxx index 555f789a8d1..642190d3f01 100644 --- a/Rendering/vtkOBJExporter.cxx +++ b/Rendering/vtkOBJExporter.cxx @@ -171,7 +171,8 @@ void vtkOBJExporter::WriteAnActor(vtkActor *anActor, FILE *fpObj, FILE *fpMtl, if ( ds->GetDataObjectType() != VTK_POLY_DATA ) { gf = vtkGeometryFilter::New(); - gf->SetInput(ds); + gf->SetInputConnection( + anActor->GetMapper()->GetInputConnection(0, 0)); gf->Update(); pd = gf->GetOutput(); } diff --git a/Rendering/vtkOOGLExporter.cxx b/Rendering/vtkOOGLExporter.cxx index 5855fede5d7..6fa97b5c4d0 100644 --- a/Rendering/vtkOOGLExporter.cxx +++ b/Rendering/vtkOOGLExporter.cxx @@ -293,22 +293,26 @@ void vtkOOGLExporter::WriteAnActor(vtkActor *anActor, FILE *fp, int count) // get the mappers input and matrix ds = anActor->GetMapper()->GetInput(); + vtkAlgorithmOutput* pdProducer = 0; // we really want polydata if ( ds->GetDataObjectType() != VTK_POLY_DATA ) { gf = vtkGeometryFilter::New(); - gf->SetInput(ds); + gf->SetInputConnection( + anActor->GetMapper()->GetInputConnection(0, 0)); gf->Update(); pd = gf->GetOutput(); + pdProducer = gf->GetOutputPort(); } else { anActor->GetMapper()->GetInputAlgorithm()->Update(); pd = static_cast<vtkPolyData *>(ds); + pdProducer = anActor->GetMapper()->GetInputConnection(0, 0); } pm = vtkPolyDataMapper::New(); - pm->SetInput(pd); + pm->SetInputConnection(pdProducer); pm->SetScalarRange(anActor->GetMapper()->GetScalarRange()); pm->SetScalarVisibility(anActor->GetMapper()->GetScalarVisibility()); pm->SetLookupTable(anActor->GetMapper()->GetLookupTable()); diff --git a/Rendering/vtkOpenGLGlyph3DMapper.cxx b/Rendering/vtkOpenGLGlyph3DMapper.cxx index a9d2bb78f27..a5c8af01307 100644 --- a/Rendering/vtkOpenGLGlyph3DMapper.cxx +++ b/Rendering/vtkOpenGLGlyph3DMapper.cxx @@ -225,7 +225,7 @@ void vtkOpenGLGlyph3DMapper::Render(vtkRenderer *ren, vtkActor *actor) defaultPointIds[1] = 1; defaultSource->SetPoints(defaultPoints); defaultSource->InsertNextCell(VTK_LINE, 2, defaultPointIds); - this->SetSource(defaultSource); + this->SetSourceData(defaultSource); defaultSource->Delete(); defaultSource = NULL; defaultPoints->Delete(); @@ -269,7 +269,7 @@ void vtkOpenGLGlyph3DMapper::Render(vtkRenderer *ren, vtkActor *actor) if (ss==0) { ss = vtkPolyData::New(); - this->SourceMappers->Mappers[cc]->SetInput(ss); + this->SourceMappers->Mappers[cc]->SetInputData(ss); ss->Delete(); ss->ShallowCopy(s); } diff --git a/Rendering/vtkOpenGLImageResliceMapper.cxx b/Rendering/vtkOpenGLImageResliceMapper.cxx index 5d136be29f8..7898e4c5da8 100644 --- a/Rendering/vtkOpenGLImageResliceMapper.cxx +++ b/Rendering/vtkOpenGLImageResliceMapper.cxx @@ -509,7 +509,7 @@ void vtkOpenGLImageResliceMapper::Render(vtkRenderer *ren, vtkImageSlice *prop) { this->RenderColorAndLighting(1.0, 1.0, 1.0, opacity, ambient, diffuse); - this->ImageReslice->SetInput(this->GetInput()); + this->ImageReslice->SetInputConnection(this->GetInputConnection(0, 0)); this->ImageReslice->UpdateWholeExtent(); this->RecursiveRenderTexturedPolygon( diff --git a/Rendering/vtkOpenGLPolyDataMapper.cxx b/Rendering/vtkOpenGLPolyDataMapper.cxx index 0cc10496e94..7e65a02c8de 100644 --- a/Rendering/vtkOpenGLPolyDataMapper.cxx +++ b/Rendering/vtkOpenGLPolyDataMapper.cxx @@ -176,7 +176,7 @@ void vtkOpenGLPolyDataMapper::RenderPiece(vtkRenderer *ren, vtkActor *act) this->InternalColorTexture = vtkOpenGLTexture::New(); this->InternalColorTexture->RepeatOff(); } - this->InternalColorTexture->SetInput(this->ColorTextureMap); + this->InternalColorTexture->SetInputData(this->ColorTextureMap); // Keep color from interacting with texture. float info[4]; info[0] = info[1] = info[2] = info[3] = 1.0; diff --git a/Rendering/vtkOpenGLScalarsToColorsPainter.cxx b/Rendering/vtkOpenGLScalarsToColorsPainter.cxx index bae875290d2..71d2ef57379 100644 --- a/Rendering/vtkOpenGLScalarsToColorsPainter.cxx +++ b/Rendering/vtkOpenGLScalarsToColorsPainter.cxx @@ -103,7 +103,7 @@ void vtkOpenGLScalarsToColorsPainter::RenderInternal(vtkRenderer *renderer, this->InternalColorTexture = vtkOpenGLTexture::New(); this->InternalColorTexture->RepeatOff(); } - this->InternalColorTexture->SetInput(this->ColorTextureMap); + this->InternalColorTexture->SetInputData(this->ColorTextureMap); // Keep color from interacting with texture. float info[4]; info[0] = info[1] = info[2] = info[3] = 1.0; diff --git a/Rendering/vtkPOVExporter.cxx b/Rendering/vtkPOVExporter.cxx index e0a66b51224..1a39f66c794 100644 --- a/Rendering/vtkPOVExporter.cxx +++ b/Rendering/vtkPOVExporter.cxx @@ -325,7 +325,7 @@ void vtkPOVExporter::WriteActor(vtkActor *actor) if (cd) { vtkCompositeDataGeometryFilter* gf = vtkCompositeDataGeometryFilter::New(); - gf->SetInput(cd); + gf->SetInputConnection(actor->GetMapper()->GetInputConnection(0, 0)); gf->Update(); tempDS = gf->GetOutput(); gf->Delete(); @@ -349,7 +349,8 @@ void vtkPOVExporter::WriteActor(vtkActor *actor) if (dataset->GetDataObjectType() != VTK_POLY_DATA) { geometryFilter = vtkGeometryFilter::New(); - geometryFilter->SetInput(dataset); + geometryFilter->SetInputConnection( + actor->GetMapper()->GetInputConnection(0, 0)); geometryFilter->Update(); polys = geometryFilter->GetOutput(); } diff --git a/Rendering/vtkParallelCoordinatesActor.cxx b/Rendering/vtkParallelCoordinatesActor.cxx index 2042b633500..0a1895e68f3 100644 --- a/Rendering/vtkParallelCoordinatesActor.cxx +++ b/Rendering/vtkParallelCoordinatesActor.cxx @@ -61,7 +61,7 @@ vtkParallelCoordinatesActor::vtkParallelCoordinatesActor() this->PlotData = vtkPolyData::New(); this->PlotMapper = vtkPolyDataMapper2D::New(); - this->PlotMapper->SetInput(this->PlotData); + this->PlotMapper->SetInputData(this->PlotData); this->PlotActor = vtkActor2D::New(); this->PlotActor->SetMapper(this->PlotMapper); diff --git a/Rendering/vtkPolyDataMapper.cxx b/Rendering/vtkPolyDataMapper.cxx index 0913088388f..c66a7b505af 100644 --- a/Rendering/vtkPolyDataMapper.cxx +++ b/Rendering/vtkPolyDataMapper.cxx @@ -77,17 +77,9 @@ void vtkPolyDataMapper::Render(vtkRenderer *ren, vtkActor *act) } //---------------------------------------------------------------------------- -void vtkPolyDataMapper::SetInput(vtkPolyData *input) +void vtkPolyDataMapper::SetInputData(vtkPolyData *input) { - if(input) - { - this->SetInputConnection(0, input->GetProducerPort()); - } - else - { - // Setting a NULL input removes the connection. - this->SetInputConnection(0, 0); - } + this->SetInputDataInternal(0, input); } //---------------------------------------------------------------------------- @@ -172,7 +164,7 @@ void vtkPolyDataMapper::ShallowCopy(vtkAbstractMapper *mapper) vtkPolyDataMapper *m = vtkPolyDataMapper::SafeDownCast(mapper); if ( m != NULL ) { - this->SetInput(m->GetInput()); + this->SetInputConnection(m->GetInputConnection(0, 0)); this->SetGhostLevel(m->GetGhostLevel()); this->SetNumberOfPieces(m->GetNumberOfPieces()); this->SetNumberOfSubPieces(m->GetNumberOfSubPieces()); diff --git a/Rendering/vtkPolyDataMapper.h b/Rendering/vtkPolyDataMapper.h index eb2ec222f5f..d100c785be2 100644 --- a/Rendering/vtkPolyDataMapper.h +++ b/Rendering/vtkPolyDataMapper.h @@ -46,7 +46,7 @@ public: // Description: // Specify the input data to map. - void SetInput(vtkPolyData *in); + void SetInputData(vtkPolyData *in); vtkPolyData *GetInput(); // Description: diff --git a/Rendering/vtkPolyDataMapper2D.cxx b/Rendering/vtkPolyDataMapper2D.cxx index 5858de20c9a..8f8cf9dd256 100644 --- a/Rendering/vtkPolyDataMapper2D.cxx +++ b/Rendering/vtkPolyDataMapper2D.cxx @@ -88,17 +88,9 @@ vtkPolyDataMapper2D::~vtkPolyDataMapper2D() } //---------------------------------------------------------------------------- -void vtkPolyDataMapper2D::SetInput(vtkPolyData *input) +void vtkPolyDataMapper2D::SetInputData(vtkPolyData *input) { - if(input) - { - this->SetInputConnection(0, input->GetProducerPort()); - } - else - { - // Setting a NULL input removes the connection. - this->SetInputConnection(0, 0); - } + this->SetInputDataInternal(0, input); } //---------------------------------------------------------------------------- diff --git a/Rendering/vtkPolyDataMapper2D.h b/Rendering/vtkPolyDataMapper2D.h index 825918eec85..4c6c999a82e 100644 --- a/Rendering/vtkPolyDataMapper2D.h +++ b/Rendering/vtkPolyDataMapper2D.h @@ -47,7 +47,7 @@ public: // Description: // Set the input to the mapper. - void SetInput(vtkPolyData *in); + void SetInputData(vtkPolyData *in); vtkPolyData *GetInput(); // Description: diff --git a/Rendering/vtkProperty.cxx b/Rendering/vtkProperty.cxx index f02db0747c7..8cf9f0fabc8 100644 --- a/Rendering/vtkProperty.cxx +++ b/Rendering/vtkProperty.cxx @@ -904,7 +904,7 @@ void vtkProperty::LoadTexture(vtkXMLDataElement* elem ) { reader->SetFileName(filename); vtkTexture* t = vtkTexture::New(); - t->SetInput(reader->GetOutput()); + t->SetInputConnection(reader->GetOutputPort()); t->InterpolateOn(); this->SetTexture(name, t); t->Delete(); diff --git a/Rendering/vtkQuadricLODActor.cxx b/Rendering/vtkQuadricLODActor.cxx index 9cced882e07..2cf44a3b0d5 100644 --- a/Rendering/vtkQuadricLODActor.cxx +++ b/Rendering/vtkQuadricLODActor.cxx @@ -266,7 +266,7 @@ void vtkQuadricLODActor::Render(vtkRenderer *ren, vtkMapper *vtkNotUsed(m)) vtkDebugMacro("QC bin size: " << dim); this->LODFilter->AutoAdjustNumberOfDivisionsOff(); - this->LODFilter->SetInput(pd); + this->LODFilter->SetInputConnection(this->Mapper->GetInputConnection(0, 0)); this->LODFilter->Update(); nCells = this->GetDisplayListSize(this->LODFilter->GetOutput()); this->LODMapper->SetInputConnection(this->LODFilter->GetOutputPort()); diff --git a/Rendering/vtkRendererSource.cxx b/Rendering/vtkRendererSource.cxx index 717de402d2d..a4f8947c807 100644 --- a/Rendering/vtkRendererSource.cxx +++ b/Rendering/vtkRendererSource.cxx @@ -69,7 +69,7 @@ void vtkRendererSource::RequestData(vtkInformation*, info->Get(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT(), uExtent); output->SetExtent(uExtent); - output->AllocateScalars(); + output->AllocateScalars(info); vtkUnsignedCharArray *outScalars = vtkUnsignedCharArray::SafeDownCast(output->GetPointData()->GetScalars()); diff --git a/Rendering/vtkScalarBarActor.cxx b/Rendering/vtkScalarBarActor.cxx index cba3887dfe1..292731d5c8b 100644 --- a/Rendering/vtkScalarBarActor.cxx +++ b/Rendering/vtkScalarBarActor.cxx @@ -81,7 +81,7 @@ vtkScalarBarActor::vtkScalarBarActor() this->ScalarBar = vtkPolyData::New(); this->ScalarBarMapper = vtkPolyDataMapper2D::New(); - this->ScalarBarMapper->SetInput(this->ScalarBar); + this->ScalarBarMapper->SetInputData(this->ScalarBar); this->ScalarBarActor = vtkActor2D::New(); this->ScalarBarActor->SetMapper(this->ScalarBarMapper); this->ScalarBarActor->GetPositionCoordinate()-> @@ -98,7 +98,7 @@ vtkScalarBarActor::vtkScalarBarActor() this->TexturePolyData = vtkPolyData::New(); vtkPolyDataMapper2D * textureMapper = vtkPolyDataMapper2D::New(); - textureMapper->SetInput(this->TexturePolyData); + textureMapper->SetInputData(this->TexturePolyData); this->TextureActor = vtkActor2D::New(); this->TextureActor->SetMapper(textureMapper); textureMapper->Delete(); @@ -147,7 +147,7 @@ vtkScalarBarActor::vtkScalarBarActor() } this->Texture = vtkTexture::New(); - this->Texture->SetInput( image ); + this->Texture->SetInputData( image ); this->Texture->RepeatOn(); image->Delete(); diff --git a/Rendering/vtkTesting.cxx b/Rendering/vtkTesting.cxx index 73bcc6e5103..a056d6b1be9 100644 --- a/Rendering/vtkTesting.cxx +++ b/Rendering/vtkTesting.cxx @@ -439,7 +439,7 @@ int vtkTesting::RegressionTest(vtkAlgorithm* imageSource, VTK_CREATE(vtkImageClip, ic2); ic2->SetClipData(1); - ic2->SetInput(rt_png->GetOutput()); + ic2->SetInputConnection(rt_png->GetOutputPort()); int* wExt1 = ic1->GetInputInformation()->Get( vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT()); @@ -460,10 +460,10 @@ int vtkTesting::RegressionTest(vtkAlgorithm* imageSource, wExt2[5]); int ext1[6], ext2[6]; - rt_id->SetInput(ic1->GetOutput()); + rt_id->SetInputConnection(ic1->GetOutputPort()); ic1->Update(); ic1->GetOutput()->GetExtent(ext1); - rt_id->SetImage(ic2->GetOutput()); + rt_id->SetImageConnection(ic2->GetOutputPort()); ic2->Update(); ic2->GetOutput()->GetExtent(ext2); diff --git a/Rendering/vtkTextActor.cxx b/Rendering/vtkTextActor.cxx index 83ebe4e47ad..b440a33f34b 100644 --- a/Rendering/vtkTextActor.cxx +++ b/Rendering/vtkTextActor.cxx @@ -70,7 +70,7 @@ vtkTextActor::vtkTextActor() this->ImageData = vtkImageData::New(); this->Texture = NULL; vtkTexture* texture = vtkTexture::New(); - texture->SetInput(this->ImageData); + texture->SetInputData(this->ImageData); this->SetTexture(texture); texture->Delete(); @@ -155,7 +155,7 @@ void vtkTextActor::SetMapper(vtkPolyDataMapper2D *mapper) if (mapper) { - mapper->SetInput(this->Rectangle); + mapper->SetInputData(this->Rectangle); } } @@ -307,7 +307,7 @@ int vtkTextActor::RenderOpaqueGeometry(vtkViewport *viewport) this->ComputeRectangle(viewport); this->ImageData->Modified(); - this->Texture->SetInput(this->ImageData); + this->Texture->SetInputData(this->ImageData); this->Texture->Modified(); this->InputRendered = true; this->BuildTime.Modified(); diff --git a/Rendering/vtkTextActor3D.cxx b/Rendering/vtkTextActor3D.cxx index 0658d8ec2d7..6e8aed668d2 100644 --- a/Rendering/vtkTextActor3D.cxx +++ b/Rendering/vtkTextActor3D.cxx @@ -210,7 +210,7 @@ int vtkTextActor3D::UpdateImageActor() { if (this->ImageActor) { - this->ImageActor->SetInput(NULL); + this->ImageActor->SetInputData(0); } return 1; } @@ -251,7 +251,7 @@ int vtkTextActor3D::UpdateImageActor() // Associate the image data (should be up to date now) to the image actor if (this->ImageActor) { - this->ImageActor->SetInput(this->ImageData); + this->ImageActor->SetInputData(this->ImageData); this->ImageActor->SetDisplayExtent(this->ImageData->GetExtent()); } diff --git a/Rendering/vtkVRMLExporter.cxx b/Rendering/vtkVRMLExporter.cxx index 07789802c8a..29abcd30e27 100644 --- a/Rendering/vtkVRMLExporter.cxx +++ b/Rendering/vtkVRMLExporter.cxx @@ -284,29 +284,35 @@ void vtkVRMLExporter::WriteAnActor(vtkActor *anActor, FILE *fp) return; } // we really want polydata + vtkAlgorithmOutput* pdProducer = 0; if (inputDO->IsA("vtkCompositeDataSet")) { vtkCompositeDataGeometryFilter* gf = vtkCompositeDataGeometryFilter::New(); - gf->SetInput(inputDO); + gf->SetInputConnection( + anActor->GetMapper()->GetInputConnection(0, 0)); gf->Update(); pd = gf->GetOutput(); + pdProducer = gf->GetOutputPort(); gf->Delete(); } else if (inputDO->GetDataObjectType() != VTK_POLY_DATA) { vtkGeometryFilter *gf = vtkGeometryFilter::New(); - gf->SetInput(inputDO); + gf->SetInputConnection( + anActor->GetMapper()->GetInputConnection(0, 0)); gf->Update(); pd = gf->GetOutput(); + pdProducer = gf->GetOutputPort(); gf->Delete(); } else { pd = static_cast<vtkPolyData *>(inputDO); + pdProducer = anActor->GetMapper()->GetInputConnection(0, 0); } pm = vtkPolyDataMapper::New(); - pm->SetInput(pd); + pm->SetInputConnection(pdProducer); pm->SetScalarRange(anActor->GetMapper()->GetScalarRange()); pm->SetScalarVisibility(anActor->GetMapper()->GetScalarVisibility()); pm->SetLookupTable(anActor->GetMapper()->GetLookupTable()); diff --git a/Rendering/vtkWindowToImageFilter.cxx b/Rendering/vtkWindowToImageFilter.cxx index 72c0b913228..dd4140ddffb 100644 --- a/Rendering/vtkWindowToImageFilter.cxx +++ b/Rendering/vtkWindowToImageFilter.cxx @@ -228,7 +228,7 @@ void vtkWindowToImageFilter::RequestData( vtkImageData::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT())); out->SetExtent( outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT())); - out->AllocateScalars(); + out->AllocateScalars(outInfo); if (!this->Input) { diff --git a/Views/Testing/Cxx/TestConeLayoutStrategy.cxx b/Views/Testing/Cxx/TestConeLayoutStrategy.cxx index 84c3a6516ce..6f0f059ef2d 100644 --- a/Views/Testing/Cxx/TestConeLayoutStrategy.cxx +++ b/Views/Testing/Cxx/TestConeLayoutStrategy.cxx @@ -76,7 +76,7 @@ int TestConeLayoutStrategy(int argc, char* argv[]) t->GetEdgeData()->AddArray(label); VTK_CREATE(vtkStringToNumeric, numeric); - numeric->SetInput(t); + numeric->SetInputData(t); // Graph layout view VTK_CREATE(vtkGraphLayoutView, view); diff --git a/Views/Testing/Cxx/TestGraphLayoutView.cxx b/Views/Testing/Cxx/TestGraphLayoutView.cxx index c2337f010cb..159549e9b99 100644 --- a/Views/Testing/Cxx/TestGraphLayoutView.cxx +++ b/Views/Testing/Cxx/TestGraphLayoutView.cxx @@ -1113,7 +1113,7 @@ int TestGraphLayoutView(int argc, char* argv[]) t->GetEdgeData()->AddArray(label); VTK_CREATE(vtkStringToNumeric, numeric); - numeric->SetInput(t); + numeric->SetInputData(t); // Graph layout view VTK_CREATE(vtkGraphLayoutView, view); diff --git a/Views/Testing/Cxx/TestGraphLayoutViewWithUnicode.cxx b/Views/Testing/Cxx/TestGraphLayoutViewWithUnicode.cxx index 5dae024bec3..14122ec63f9 100644 --- a/Views/Testing/Cxx/TestGraphLayoutViewWithUnicode.cxx +++ b/Views/Testing/Cxx/TestGraphLayoutViewWithUnicode.cxx @@ -1155,7 +1155,7 @@ int TestGraphLayoutViewWithUnicode(int argc, char* argv[]) t->GetVertexData()->AddArray(vlabel); VTK_CREATE(vtkStringToNumeric, numeric); - numeric->SetInput(t); + numeric->SetInputData(t); // Graph layout view VTK_CREATE(vtkGraphLayoutView, view); diff --git a/Views/Testing/Cxx/TestInteractorStyleTreeMapHover.cxx b/Views/Testing/Cxx/TestInteractorStyleTreeMapHover.cxx index ae6f3d1453e..873d0e5ff93 100644 --- a/Views/Testing/Cxx/TestInteractorStyleTreeMapHover.cxx +++ b/Views/Testing/Cxx/TestInteractorStyleTreeMapHover.cxx @@ -615,7 +615,7 @@ int TestInteractorStyleTreeMapHover(int argc, char* argv[]) } VTK_CREATE(vtkTreeFieldAggregator, agg); - agg->SetInput(tree); + agg->SetInputData(tree); agg->SetField("size"); agg->SetLeafVertexUnitSize(false); diff --git a/Views/Testing/Cxx/TestQtLabelStrategy.cxx b/Views/Testing/Cxx/TestQtLabelStrategy.cxx index 87cab732b00..d82dcd1a822 100644 --- a/Views/Testing/Cxx/TestQtLabelStrategy.cxx +++ b/Views/Testing/Cxx/TestQtLabelStrategy.cxx @@ -101,7 +101,7 @@ int TestQtLabelStrategy(int argc, char* argv[]) pd->GetPointData()->AddArray(orient); VTK_CREATE(vtkPointSetToLabelHierarchy, hier); - hier->SetInput(pd); + hier->SetInputData(pd); hier->SetOrientationArrayName("orientation"); hier->SetLabelArrayName("label"); hier->GetTextProperty()->SetColor(0.0, 0.0, 0.0); @@ -124,7 +124,7 @@ int TestQtLabelStrategy(int argc, char* argv[]) lactor->SetMapper(lmapper); VTK_CREATE(vtkPolyDataMapper, mapper); - mapper->SetInput(pd); + mapper->SetInputData(pd); VTK_CREATE(vtkActor, actor); actor->SetMapper(mapper); diff --git a/Views/vtkDataRepresentation.cxx b/Views/vtkDataRepresentation.cxx index 90cbd07f2ab..1689db9cbda 100644 --- a/Views/vtkDataRepresentation.cxx +++ b/Views/vtkDataRepresentation.cxx @@ -20,6 +20,7 @@ #include "vtkDataRepresentation.h" +#include "vtkAlgorithmOutput.h" #include "vtkAnnotationLayers.h" #include "vtkAnnotationLink.h" #include "vtkCommand.h" @@ -34,6 +35,7 @@ #include "vtkSelectionNode.h" #include "vtkSmartPointer.h" #include "vtkStringArray.h" +#include "vtkTrivialProducer.h" #include <vtkstd/map> @@ -45,11 +47,11 @@ class vtkDataRepresentation::Internals { public: // This is a cache of shallow copies of inputs provided for convenience. - // It is a map from (port index, connection index) to (original input data object, shallow copy). - // NOTE: The original input data object pointer is not reference counted, so it should + // It is a map from (port index, connection index) to (original input data port, shallow copy port). + // NOTE: The original input data port pointer is not reference counted, so it should // not be assumed to be a valid pointer. It is only used for pointer comparison. vtkstd::map<vtkstd::pair<int, int>, - vtkstd::pair<vtkDataObject*, vtkSmartPointer<vtkDataObject> > > + vtkstd::pair<vtkAlgorithmOutput*, vtkSmartPointer<vtkAlgorithmOutput> > > InputInternal; // This is a cache of vtkConvertSelectionDomain filters provided for convenience. @@ -164,19 +166,24 @@ vtkAlgorithmOutput* vtkDataRepresentation::GetInternalOutputPort(int port, int c // changed, or the shallow copy modified time is less than the // input modified time. vtkstd::pair<int, int> p(port, conn); - vtkDataObject* input = this->GetInputDataObject(port, conn); + vtkAlgorithmOutput* input = this->GetInputConnection(port, conn); if (this->Implementation->InputInternal.find(p) == this->Implementation->InputInternal.end() || this->Implementation->InputInternal[p].first != input || this->Implementation->InputInternal[p].second->GetMTime() < input->GetMTime()) { this->Implementation->InputInternal[p].first = input; - this->Implementation->InputInternal[p].second.TakeReference( - input->NewInstance()); - this->Implementation->InputInternal[p].second->ShallowCopy(input); + vtkDataObject* input = this->GetInputDataObject(port, conn); + vtkDataObject* copy = input->NewInstance(); + copy->ShallowCopy(input); + vtkTrivialProducer* tp = vtkTrivialProducer::New(); + tp->SetOutput(copy); + this->Implementation->InputInternal[p].second = + tp->GetOutputPort(); + tp->Delete(); } - return this->Implementation->InputInternal[p].second->GetProducerPort(); + return this->Implementation->InputInternal[p].second; } //---------------------------------------------------------------------------- diff --git a/Views/vtkHierarchicalGraphView.cxx b/Views/vtkHierarchicalGraphView.cxx index bfc63a46499..bf0f374aba6 100644 --- a/Views/vtkHierarchicalGraphView.cxx +++ b/Views/vtkHierarchicalGraphView.cxx @@ -25,6 +25,7 @@ #include "vtkObjectFactory.h" #include "vtkRenderedHierarchyRepresentation.h" #include "vtkTree.h" +#include "vtkTrivialProducer.h" vtkStandardNewMacro(vtkHierarchicalGraphView); //---------------------------------------------------------------------------- @@ -56,7 +57,7 @@ vtkRenderedGraphRepresentation* vtkHierarchicalGraphView::GetGraphRepresentation graphRep = vtkRenderedHierarchyRepresentation::SafeDownCast( this->AddRepresentationFromInput(t)); vtkSmartPointer<vtkDirectedGraph> g = vtkSmartPointer<vtkDirectedGraph>::New(); - graphRep->SetInput(1, g); + graphRep->SetInputData(1, g); } return graphRep; } @@ -86,7 +87,9 @@ vtkDataRepresentation* vtkHierarchicalGraphView::SetHierarchyFromInputConnection //---------------------------------------------------------------------------- vtkDataRepresentation* vtkHierarchicalGraphView::SetHierarchyFromInput(vtkDataObject* input) { - return this->SetHierarchyFromInputConnection(input->GetProducerPort()); + vtkSmartPointer<vtkTrivialProducer> tp = vtkSmartPointer<vtkTrivialProducer>::New(); + tp->SetOutput(input); + return this->SetHierarchyFromInputConnection(tp->GetOutputPort()); } //---------------------------------------------------------------------------- @@ -99,7 +102,9 @@ vtkDataRepresentation* vtkHierarchicalGraphView::SetGraphFromInputConnection(vtk //---------------------------------------------------------------------------- vtkDataRepresentation* vtkHierarchicalGraphView::SetGraphFromInput(vtkDataObject* input) { - return this->SetGraphFromInputConnection(input->GetProducerPort()); + vtkSmartPointer<vtkTrivialProducer> tp = vtkSmartPointer<vtkTrivialProducer>::New(); + tp->SetOutput(input); + return this->SetGraphFromInputConnection(tp->GetOutputPort()); } //---------------------------------------------------------------------------- diff --git a/Views/vtkInteractorStyleAreaSelectHover.cxx b/Views/vtkInteractorStyleAreaSelectHover.cxx index ace306ba319..1a71fd4f0a3 100644 --- a/Views/vtkInteractorStyleAreaSelectHover.cxx +++ b/Views/vtkInteractorStyleAreaSelectHover.cxx @@ -64,7 +64,7 @@ vtkInteractorStyleAreaSelectHover::vtkInteractorStyleAreaSelectHover() this->HighlightData = vtkPolyData::New(); vtkPolyDataMapper *highMap = vtkPolyDataMapper::New(); - highMap->SetInput(this->HighlightData); + highMap->SetInputData(this->HighlightData); this->HighlightActor = vtkActor::New(); this->HighlightActor->SetMapper(highMap); this->HighlightActor->VisibilityOff(); @@ -259,10 +259,10 @@ void vtkInteractorStyleAreaSelectHover::OnMouseMove() sector->Update(); VTK_CREATE(vtkExtractEdges, extract); - extract->SetInput(sector->GetOutput()); + extract->SetInputConnection(sector->GetOutputPort()); VTK_CREATE(vtkAppendPolyData, append); - append->AddInput(extract->GetOutput()); + append->AddInputConnection(extract->GetOutputPort()); append->Update(); this->HighlightData->ShallowCopy(append->GetOutput()); diff --git a/Views/vtkInteractorStyleTreeMapHover.cxx b/Views/vtkInteractorStyleTreeMapHover.cxx index 120b4912246..cf3f6c0592e 100644 --- a/Views/vtkInteractorStyleTreeMapHover.cxx +++ b/Views/vtkInteractorStyleTreeMapHover.cxx @@ -76,7 +76,7 @@ vtkInteractorStyleTreeMapHover::vtkInteractorStyleTreeMapHover() selData->SetPoints(this->SelectionPoints); selData->SetLines(selA); vtkPolyDataMapper *selMap = vtkPolyDataMapper::New(); - selMap->SetInput(selData); + selMap->SetInputData(selData); this->SelectionActor = vtkActor::New(); this->SelectionActor->SetMapper(selMap); this->SelectionActor->VisibilityOff(); @@ -86,7 +86,7 @@ vtkInteractorStyleTreeMapHover::vtkInteractorStyleTreeMapHover() highData->SetPoints(this->HighlightPoints); highData->SetLines(highA); vtkPolyDataMapper *highMap = vtkPolyDataMapper::New(); - highMap->SetInput(highData); + highMap->SetInputData(highData); this->HighlightActor = vtkActor::New(); this->HighlightActor->SetMapper(highMap); this->HighlightActor->VisibilityOff(); diff --git a/Views/vtkParallelCoordinatesHistogramRepresentation.cxx b/Views/vtkParallelCoordinatesHistogramRepresentation.cxx index 68d72d9a98c..63e4bebd680 100644 --- a/Views/vtkParallelCoordinatesHistogramRepresentation.cxx +++ b/Views/vtkParallelCoordinatesHistogramRepresentation.cxx @@ -64,7 +64,7 @@ vtkParallelCoordinatesHistogramRepresentation::vtkParallelCoordinatesHistogramRe this->UseHistograms = 0; this->HistogramFilter = vtkSmartPointer<vtkPairwiseExtractHistogram2D>::New(); - this->HistogramFilter->SetInputConnection(this->InputArrayTable->GetProducerPort()); + this->HistogramFilter->SetInputData(this->InputArrayTable); this->HistogramLookupTable = vtkSmartPointer<vtkLookupTable>::New(); this->HistogramLookupTable->SetAlphaRange(0,1); @@ -81,8 +81,8 @@ vtkParallelCoordinatesHistogramRepresentation::vtkParallelCoordinatesHistogramRe this->ShowOutliers = 0; this->OutlierFilter = vtkSmartPointer<vtkComputeHistogram2DOutliers>::New(); - this->OutlierFilter->SetInputConnection(vtkComputeHistogram2DOutliers::INPUT_TABLE_DATA, - this->InputArrayTable->GetProducerPort()); + this->OutlierFilter->SetInputData(vtkComputeHistogram2DOutliers::INPUT_TABLE_DATA, + this->InputArrayTable); // this->HistogramFilter->GetOutputPort(vtkPairwiseExtractHistogram2D::REORDERED_INPUT)); this->OutlierFilter->SetInputConnection(vtkComputeHistogram2DOutliers::INPUT_HISTOGRAMS_MULTIBLOCK, this->HistogramFilter->GetOutputPort(vtkPairwiseExtractHistogram2D::HISTOGRAM_IMAGE)); diff --git a/Views/vtkParallelCoordinatesRepresentation.cxx b/Views/vtkParallelCoordinatesRepresentation.cxx index 76d10974f63..da7c4019d2d 100644 --- a/Views/vtkParallelCoordinatesRepresentation.cxx +++ b/Views/vtkParallelCoordinatesRepresentation.cxx @@ -212,7 +212,7 @@ vtkParallelCoordinatesRepresentation::vtkParallelCoordinatesRepresentation() this->InputArrayTable = vtkSmartPointer<vtkTable>::New(); this->LinearThreshold = vtkSmartPointer<vtkBivariateLinearTableThreshold>::New(); - this->LinearThreshold->SetInput(this->InputArrayTable); + this->LinearThreshold->SetInputData(this->InputArrayTable); this->Axes = NULL; this->NumberOfAxisLabels = 2; @@ -459,7 +459,7 @@ int vtkParallelCoordinatesRepresentation::RequestData( if (inputData->IsA("vtkArrayData")) { vtkSmartPointer<vtkArrayToTable> att = vtkSmartPointer<vtkArrayToTable>::New(); - att->SetInput(inputData); + att->SetInputData(inputData); att->Update(); this->InputArrayTable->ShallowCopy(att->GetOutput()); @@ -662,7 +662,7 @@ void vtkParallelCoordinatesRepresentation::SetAxisTitles(vtkStringArray* sa) { vtkSmartPointer<vtkTable> t = vtkSmartPointer<vtkTable>::New(); t->AddColumn(sa); - this->SetInput(1,t); + this->SetInputData(1,t); } //------------------------------------------------------------------------------ void vtkParallelCoordinatesRepresentation::PrintSelf(ostream& os, @@ -2065,7 +2065,7 @@ vtkPolyDataMapper2D* vtkParallelCoordinatesRepresentation::InitializePlotMapper( vtkSmartPointer<vtkCoordinate> dummyCoord = vtkSmartPointer<vtkCoordinate>::New(); dummyCoord->SetCoordinateSystemToNormalizedViewport(); - mapper->SetInput(input); + mapper->SetInputData(input); mapper->SetTransformCoordinate(dummyCoord); mapper->ScalarVisibilityOff(); actor->SetMapper(mapper); diff --git a/Views/vtkParallelCoordinatesView.cxx b/Views/vtkParallelCoordinatesView.cxx index 7fe8f15b3c7..51fde090872 100644 --- a/Views/vtkParallelCoordinatesView.cxx +++ b/Views/vtkParallelCoordinatesView.cxx @@ -70,7 +70,7 @@ vtkParallelCoordinatesView::vtkParallelCoordinatesView() vtkSmartPointer<vtkCoordinate> dummycoord = vtkSmartPointer<vtkCoordinate>::New(); dummycoord->SetCoordinateSystemToNormalizedViewport(); - this->BrushMapper->SetInput(this->BrushData); + this->BrushMapper->SetInputData(this->BrushData); this->BrushMapper->SetTransformCoordinate(dummycoord); this->BrushActor->SetMapper(this->BrushMapper); this->BrushActor->GetProperty()->SetColor(.1,1.0,1.0); diff --git a/Views/vtkRenderedGraphRepresentation.cxx b/Views/vtkRenderedGraphRepresentation.cxx index dd8b9d3a449..1b1914f0266 100644 --- a/Views/vtkRenderedGraphRepresentation.cxx +++ b/Views/vtkRenderedGraphRepresentation.cxx @@ -197,13 +197,13 @@ vtkRenderedGraphRepresentation::vtkRenderedGraphRepresentation() this->GraphToPoints->SetInputConnection(this->VertexDegree->GetOutputPort()); this->EdgeCenters->SetInputConnection(this->VertexDegree->GetOutputPort()); - this->EdgeLabelHierarchy->SetInput(this->EmptyPolyData); - this->VertexLabelHierarchy->SetInput(this->EmptyPolyData); + this->EdgeLabelHierarchy->SetInputData(this->EmptyPolyData); + this->VertexLabelHierarchy->SetInputData(this->EmptyPolyData); // Set default parameters vtkSmartPointer<vtkDirectedGraph> g = vtkSmartPointer<vtkDirectedGraph>::New(); - this->Layout->SetInput(g); + this->Layout->SetInputData(g); vtkSmartPointer<vtkFast2DLayoutStrategy> strategy = vtkSmartPointer<vtkFast2DLayoutStrategy>::New(); this->Layout->SetLayoutStrategy(strategy); @@ -303,7 +303,7 @@ void vtkRenderedGraphRepresentation::SetVertexLabelVisibility(bool b) } else { - this->VertexLabelHierarchy->SetInput(this->EmptyPolyData); + this->VertexLabelHierarchy->SetInputData(this->EmptyPolyData); } } @@ -315,7 +315,7 @@ void vtkRenderedGraphRepresentation::SetEdgeLabelVisibility(bool b) } else { - this->EdgeLabelHierarchy->SetInput(this->EmptyPolyData); + this->EdgeLabelHierarchy->SetInputData(this->EmptyPolyData); } } diff --git a/Views/vtkRenderedTreeAreaRepresentation.cxx b/Views/vtkRenderedTreeAreaRepresentation.cxx index afbcc50861e..43fd9a003cf 100644 --- a/Views/vtkRenderedTreeAreaRepresentation.cxx +++ b/Views/vtkRenderedTreeAreaRepresentation.cxx @@ -152,7 +152,7 @@ vtkRenderedTreeAreaRepresentation::vtkRenderedTreeAreaRepresentation() this->TreeAggregation->LeafVertexUnitSizeOn(); // Highlight - this->HighlightMapper->SetInput(this->HighlightData); + this->HighlightMapper->SetInputData(this->HighlightData); this->HighlightActor->SetMapper(this->HighlightMapper); this->HighlightActor->VisibilityOff(); this->HighlightActor->PickableOff(); @@ -181,7 +181,7 @@ vtkRenderedTreeAreaRepresentation::vtkRenderedTreeAreaRepresentation() this->AreaMapper->SelectColorArray("vtkApplyColors color"); this->AreaActor->SetMapper(this->AreaMapper); - this->AreaLabelHierarchy->SetInput(this->EmptyPolyData); + this->AreaLabelHierarchy->SetInputData(this->EmptyPolyData); // Set the orientation array to be the text rotation array produced by // vtkStackedTreeLayoutStrategy. @@ -502,11 +502,11 @@ void vtkRenderedTreeAreaRepresentation::UpdateHoverHighlight(vtkView* view, int vtkSmartPointer<vtkExtractEdges> extract = vtkSmartPointer<vtkExtractEdges>::New(); - extract->SetInput(sector->GetOutput()); + extract->SetInputConnection(sector->GetOutputPort()); vtkSmartPointer<vtkAppendPolyData> append = vtkSmartPointer<vtkAppendPolyData>::New(); - append->AddInput(extract->GetOutput()); + append->AddInputConnection(extract->GetOutputPort()); append->Update(); this->HighlightData->ShallowCopy(append->GetOutput()); @@ -628,7 +628,7 @@ void vtkRenderedTreeAreaRepresentation::SetAreaLabelVisibility(bool b) } else { - this->AreaLabelHierarchy->SetInput(this->EmptyPolyData); + this->AreaLabelHierarchy->SetInputData(this->EmptyPolyData); } } diff --git a/Views/vtkTreeAreaView.cxx b/Views/vtkTreeAreaView.cxx index a62dcafae3b..f1b7d7f387e 100644 --- a/Views/vtkTreeAreaView.cxx +++ b/Views/vtkTreeAreaView.cxx @@ -90,7 +90,7 @@ vtkDataRepresentation* vtkTreeAreaView::SetTreeFromInputConnection(vtkAlgorithmO //---------------------------------------------------------------------------- vtkDataRepresentation* vtkTreeAreaView::SetTreeFromInput(vtkTree* input) { - this->GetTreeAreaRepresentation()->SetInput(input); + this->GetTreeAreaRepresentation()->SetInputData(input); return this->GetTreeAreaRepresentation(); } @@ -104,7 +104,7 @@ vtkDataRepresentation* vtkTreeAreaView::SetGraphFromInputConnection(vtkAlgorithm //---------------------------------------------------------------------------- vtkDataRepresentation* vtkTreeAreaView::SetGraphFromInput(vtkGraph* input) { - this->GetTreeAreaRepresentation()->SetInput(1, input); + this->GetTreeAreaRepresentation()->SetInputData(1, input); return this->GetTreeAreaRepresentation(); } diff --git a/Views/vtkView.cxx b/Views/vtkView.cxx index c359c9b51ce..66d43ad5dd7 100644 --- a/Views/vtkView.cxx +++ b/Views/vtkView.cxx @@ -31,6 +31,7 @@ #include "vtkStringArray.h" #include "vtkViewTheme.h" #include "vtkSmartPointer.h" +#include "vtkTrivialProducer.h" #include <vtkstd/map> #include <vtkstd/string> @@ -120,13 +121,17 @@ bool vtkView::IsRepresentationPresent(vtkDataRepresentation* rep) //---------------------------------------------------------------------------- vtkDataRepresentation* vtkView::AddRepresentationFromInput(vtkDataObject* input) { - return this->AddRepresentationFromInputConnection(input->GetProducerPort()); + vtkSmartPointer<vtkTrivialProducer> tp = vtkSmartPointer<vtkTrivialProducer>::New(); + tp->SetOutput(input); + return this->AddRepresentationFromInputConnection(tp->GetOutputPort()); } //---------------------------------------------------------------------------- vtkDataRepresentation* vtkView::SetRepresentationFromInput(vtkDataObject* input) { - return this->SetRepresentationFromInputConnection(input->GetProducerPort()); + vtkSmartPointer<vtkTrivialProducer> tp = vtkSmartPointer<vtkTrivialProducer>::New(); + tp->SetOutput(input); + return this->SetRepresentationFromInputConnection(tp->GetOutputPort()); } //---------------------------------------------------------------------------- diff --git a/VolumeRendering/vtkFixedPointVolumeRayCastMapper.cxx b/VolumeRendering/vtkFixedPointVolumeRayCastMapper.cxx index 6e8f577dc8a..287538286d2 100644 --- a/VolumeRendering/vtkFixedPointVolumeRayCastMapper.cxx +++ b/VolumeRendering/vtkFixedPointVolumeRayCastMapper.cxx @@ -1062,7 +1062,7 @@ void vtkFixedPointVolumeRayCastMapper::UpdateMinMaxVolume( vtkVolume *vol ) // Set the update flags, telling the filter what to update... - this->SpaceLeapFilter->SetInput(this->GetInput()); + this->SpaceLeapFilter->SetInputConnection(this->GetInputConnection(0, 0)); this->SpaceLeapFilter->SetCurrentScalars(this->CurrentScalars); this->SpaceLeapFilter->SetIndependentComponents( vol->GetProperty()->GetIndependentComponents()); @@ -1097,7 +1097,7 @@ void vtkFixedPointVolumeRayCastMapper::UpdateMinMaxVolume( vtkVolume *vol ) // "MinMaxVolumeNewComponent0.mha"); // If the line below is commented out, we get reference counting loops - this->SpaceLeapFilter->SetInput(NULL); + this->SpaceLeapFilter->SetInputConnection(NULL); if ( needToUpdate&0x02 ) diff --git a/VolumeRendering/vtkGPUVolumeRayCastMapper.cxx b/VolumeRendering/vtkGPUVolumeRayCastMapper.cxx index c89401254c5..6792cdd5b60 100644 --- a/VolumeRendering/vtkGPUVolumeRayCastMapper.cxx +++ b/VolumeRendering/vtkGPUVolumeRayCastMapper.cxx @@ -529,7 +529,7 @@ void vtkGPUVolumeRayCastMapper::CreateCanonicalView( // Shrink to image to the desired size vtkImageResample *resample = vtkImageResample::New(); - resample->SetInput( bigImage ); + resample->SetInputData( bigImage ); resample->SetAxisMagnificationFactor(0,scale[0]); resample->SetAxisMagnificationFactor(1,scale[1]); resample->SetAxisMagnificationFactor(2,1); diff --git a/VolumeRendering/vtkSmartVolumeMapper.cxx b/VolumeRendering/vtkSmartVolumeMapper.cxx index 34d9bd769b4..79ebcda6bdb 100644 --- a/VolumeRendering/vtkSmartVolumeMapper.cxx +++ b/VolumeRendering/vtkSmartVolumeMapper.cxx @@ -494,7 +494,7 @@ void vtkSmartVolumeMapper::ConnectMapperInput(vtkVolumeMapper *m) // make sure we not create a shallow copy each time to avoid // performance penalty. input2=vtkImageData::New(); - m->SetInputConnection(input2->GetProducerPort()); + m->SetInputConnection(m->GetInputConnection(0, 0)); input2->Delete(); needShallowCopy=true; } @@ -520,7 +520,7 @@ void vtkSmartVolumeMapper::ConnectFilterInput(vtkImageResample *f) // make sure we not create a shallow copy each time to avoid // performance penalty. input2=vtkImageData::New(); - f->SetInputConnection(input2->GetProducerPort()); + f->SetInputConnection(f->GetInputConnection(0, 0)); input2->Delete(); needShallowCopy=true; } diff --git a/VolumeRendering/vtkUnstructuredGridVolumeMapper.cxx b/VolumeRendering/vtkUnstructuredGridVolumeMapper.cxx index c4c96c74f09..54830617f13 100644 --- a/VolumeRendering/vtkUnstructuredGridVolumeMapper.cxx +++ b/VolumeRendering/vtkUnstructuredGridVolumeMapper.cxx @@ -31,14 +31,14 @@ vtkUnstructuredGridVolumeMapper::~vtkUnstructuredGridVolumeMapper() { } -void vtkUnstructuredGridVolumeMapper::SetInput( vtkDataSet *genericInput ) +void vtkUnstructuredGridVolumeMapper::SetInputData( vtkDataSet *genericInput ) { vtkUnstructuredGrid *input = vtkUnstructuredGrid::SafeDownCast( genericInput ); if ( input ) { - this->SetInput( input ); + this->SetInputData( input ); } else { @@ -46,17 +46,9 @@ void vtkUnstructuredGridVolumeMapper::SetInput( vtkDataSet *genericInput ) } } -void vtkUnstructuredGridVolumeMapper::SetInput( vtkUnstructuredGrid *input ) +void vtkUnstructuredGridVolumeMapper::SetInputData( vtkUnstructuredGrid *input ) { - if(input) - { - this->SetInputConnection(0, input->GetProducerPort()); - } - else - { - // Setting a NULL input removes the connection. - this->SetInputConnection(0, 0); - } + this->SetInputDataInternal(0, input); } vtkUnstructuredGrid *vtkUnstructuredGridVolumeMapper::GetInput() diff --git a/VolumeRendering/vtkUnstructuredGridVolumeMapper.h b/VolumeRendering/vtkUnstructuredGridVolumeMapper.h index 7e0d4f8cb2f..0a7705ba5b8 100644 --- a/VolumeRendering/vtkUnstructuredGridVolumeMapper.h +++ b/VolumeRendering/vtkUnstructuredGridVolumeMapper.h @@ -41,8 +41,8 @@ public: // Description: // Set/Get the input data - virtual void SetInput( vtkUnstructuredGrid * ); - virtual void SetInput( vtkDataSet * ); + virtual void SetInputData( vtkUnstructuredGrid * ); + virtual void SetInputData( vtkDataSet * ); vtkUnstructuredGrid *GetInput(); vtkSetMacro( BlendMode, int ); diff --git a/VolumeRendering/vtkUnstructuredGridVolumeZSweepMapper.cxx b/VolumeRendering/vtkUnstructuredGridVolumeZSweepMapper.cxx index 65e3be41d78..7890d35f5a6 100644 --- a/VolumeRendering/vtkUnstructuredGridVolumeZSweepMapper.cxx +++ b/VolumeRendering/vtkUnstructuredGridVolumeZSweepMapper.cxx @@ -3512,7 +3512,7 @@ void vtkUnstructuredGridVolumeZSweepMapper::SavePixelListFrame() vtkXMLPolyDataWriter *writer=vtkXMLPolyDataWriter::New(); writer->SetFileName("pixellistframe.vtp"); - writer->SetInput(dataset); + writer->SetInputData(dataset); writer->SetIdTypeToInt32(); dataset->Delete(); writer->Write(); diff --git a/VolumeRendering/vtkVolumeMapper.cxx b/VolumeRendering/vtkVolumeMapper.cxx index 437a274584b..7eb7034fc52 100644 --- a/VolumeRendering/vtkVolumeMapper.cxx +++ b/VolumeRendering/vtkVolumeMapper.cxx @@ -68,14 +68,14 @@ void vtkVolumeMapper::ConvertCroppingRegionPlanesToVoxels() } } -void vtkVolumeMapper::SetInput( vtkDataSet *genericInput ) +void vtkVolumeMapper::SetInputData( vtkDataSet *genericInput ) { vtkImageData *input = vtkImageData::SafeDownCast( genericInput ); if ( input ) { - this->SetInput( input ); + this->SetInputData( input ); } else { @@ -83,17 +83,9 @@ void vtkVolumeMapper::SetInput( vtkDataSet *genericInput ) } } -void vtkVolumeMapper::SetInput( vtkImageData *input ) +void vtkVolumeMapper::SetInputData( vtkImageData *input ) { - if(input) - { - this->SetInputConnection(0, input->GetProducerPort()); - } - else - { - // Setting a NULL input removes the connection. - this->SetInputConnection(0, 0); - } + this->SetInputDataInternal(0, input); } vtkImageData *vtkVolumeMapper::GetInput() diff --git a/VolumeRendering/vtkVolumeMapper.h b/VolumeRendering/vtkVolumeMapper.h index 2e8d6c1582b..6b0727aa783 100644 --- a/VolumeRendering/vtkVolumeMapper.h +++ b/VolumeRendering/vtkVolumeMapper.h @@ -47,8 +47,8 @@ public: // Description: // Set/Get the input data - virtual void SetInput( vtkImageData * ); - virtual void SetInput( vtkDataSet * ); + virtual void SetInputData( vtkImageData * ); + virtual void SetInputData( vtkDataSet * ); vtkImageData *GetInput(); // Description: diff --git a/VolumeRendering/vtkVolumeRayCastSpaceLeapingImageFilter.cxx b/VolumeRendering/vtkVolumeRayCastSpaceLeapingImageFilter.cxx index 9733a181e95..40f8096780c 100644 --- a/VolumeRendering/vtkVolumeRayCastSpaceLeapingImageFilter.cxx +++ b/VolumeRendering/vtkVolumeRayCastSpaceLeapingImageFilter.cxx @@ -1094,8 +1094,10 @@ unsigned long vtkVolumeRayCastSpaceLeapingImageFilter // invalid outputs and should be turned on, only when this filter is used // as an internal ivar of the vtkFixedPointVolumeRayCastMapper. void vtkVolumeRayCastSpaceLeapingImageFilter -::AllocateOutputData(vtkImageData *output, int *uExtent) -{ +::AllocateOutputData(vtkImageData *output, + vtkInformation* outInfo, + int *uExtent) +{ // set the extent to be the update extent output->SetExtent(uExtent); @@ -1126,15 +1128,15 @@ void vtkVolumeRayCastSpaceLeapingImageFilter } // Otherwise allocate output afresh - output->AllocateScalars(); + output->AllocateScalars(outInfo); } //---------------------------------------------------------------------------- vtkImageData *vtkVolumeRayCastSpaceLeapingImageFilter -::AllocateOutputData(vtkDataObject *output) +::AllocateOutputData(vtkDataObject *output, vtkInformation *outInfo) { // Call the superclass method - return vtkImageAlgorithm::AllocateOutputData(output); + return vtkImageAlgorithm::AllocateOutputData(output, outInfo); } //---------------------------------------------------------------------------- diff --git a/VolumeRendering/vtkVolumeRayCastSpaceLeapingImageFilter.h b/VolumeRendering/vtkVolumeRayCastSpaceLeapingImageFilter.h index 01130077d26..91abbbb3988 100644 --- a/VolumeRendering/vtkVolumeRayCastSpaceLeapingImageFilter.h +++ b/VolumeRendering/vtkVolumeRayCastSpaceLeapingImageFilter.h @@ -224,8 +224,11 @@ protected: // Allocate the output data. If we have a cache with the same metadata as // the output we are going to generate, re-use the cache as we may not be // updating all data in the min-max structure. - virtual void AllocateOutputData( vtkImageData *out, int *uExtent ); - virtual vtkImageData *AllocateOutputData(vtkDataObject *out); + virtual void AllocateOutputData(vtkImageData *out, + vtkInformation* outInfo, + int *uExtent); + virtual vtkImageData *AllocateOutputData(vtkDataObject *out, + vtkInformation *outInfo); private: vtkVolumeRayCastSpaceLeapingImageFilter(const vtkVolumeRayCastSpaceLeapingImageFilter&); // Not implemented. diff --git a/Widgets/Testing/Cxx/BoxWidget.cxx b/Widgets/Testing/Cxx/BoxWidget.cxx index 51b1225aa08..0a000933c37 100644 --- a/Widgets/Testing/Cxx/BoxWidget.cxx +++ b/Widgets/Testing/Cxx/BoxWidget.cxx @@ -474,15 +474,15 @@ int BoxWidget( int , char *[] ) vtkSmartPointer<vtkGlyph3D> glyph = vtkSmartPointer<vtkGlyph3D>::New(); glyph->SetInputConnection(sphere->GetOutputPort()); - glyph->SetSource(cone->GetOutput()); + glyph->SetSourceConnection(cone->GetOutputPort()); glyph->SetVectorModeToUseNormal(); glyph->SetScaleModeToScaleByVector(); glyph->SetScaleFactor(0.25); vtkSmartPointer<vtkAppendPolyData> append = vtkSmartPointer<vtkAppendPolyData>::New(); - append->AddInput(glyph->GetOutput()); - append->AddInput(sphere->GetOutput()); + append->AddInputConnection(glyph->GetOutputPort()); + append->AddInputConnection(sphere->GetOutputPort()); vtkSmartPointer<vtkPolyDataMapper> maceMapper = vtkSmartPointer<vtkPolyDataMapper>::New(); diff --git a/Widgets/Testing/Cxx/BoxWidget2.cxx b/Widgets/Testing/Cxx/BoxWidget2.cxx index 3ad9ba5152a..6ee5aade26c 100644 --- a/Widgets/Testing/Cxx/BoxWidget2.cxx +++ b/Widgets/Testing/Cxx/BoxWidget2.cxx @@ -473,7 +473,7 @@ int BoxWidget2( int , char *[] ) vtkSmartPointer<vtkGlyph3D> glyph = vtkSmartPointer<vtkGlyph3D>::New(); glyph->SetInputConnection(sphere->GetOutputPort()); - glyph->SetSource(cone->GetOutput()); + glyph->SetSourceConnection(cone->GetOutputPort()); glyph->SetVectorModeToUseNormal(); glyph->SetScaleModeToScaleByVector(); glyph->SetScaleFactor(0.25); @@ -481,8 +481,8 @@ int BoxWidget2( int , char *[] ) vtkSmartPointer<vtkAppendPolyData> append = vtkSmartPointer<vtkAppendPolyData>::New(); - append->AddInput(glyph->GetOutput()); - append->AddInput(sphere->GetOutput()); + append->AddInputConnection(glyph->GetOutputPort()); + append->AddInputConnection(sphere->GetOutputPort()); vtkSmartPointer<vtkPolyDataMapper> maceMapper = vtkSmartPointer<vtkPolyDataMapper>::New(); diff --git a/Widgets/Testing/Cxx/ImagePlaneWidget.cxx b/Widgets/Testing/Cxx/ImagePlaneWidget.cxx index 291a9198dc9..ecd33437e8c 100644 --- a/Widgets/Testing/Cxx/ImagePlaneWidget.cxx +++ b/Widgets/Testing/Cxx/ImagePlaneWidget.cxx @@ -19,6 +19,7 @@ #include "vtkCellPicker.h" #include "vtkCommand.h" #include "vtkImageActor.h" +#include "vtkImageMapper3D.h" #include "vtkImageMapToColors.h" #include "vtkImagePlaneWidget.h" #include "vtkImageReader.h" @@ -490,13 +491,13 @@ int ImagePlaneWidget( int argc, char *argv[] ) colorMap->PassAlphaToOutputOff(); colorMap->SetActiveComponent(0); colorMap->SetOutputFormatToLuminance(); - colorMap->SetInput(planeWidgetZ->GetResliceOutput()); + colorMap->SetInputData(planeWidgetZ->GetResliceOutput()); colorMap->SetLookupTable(planeWidgetX->GetLookupTable()); vtkSmartPointer<vtkImageActor> imageActor = vtkSmartPointer<vtkImageActor>::New(); imageActor->PickableOff(); - imageActor->SetInput(colorMap->GetOutput()); + imageActor->GetMapper()->SetInputConnection(colorMap->GetOutputPort()); // Add the actors // diff --git a/Widgets/Testing/Cxx/TerrainPolylineEditor.cxx b/Widgets/Testing/Cxx/TerrainPolylineEditor.cxx index faf10de8042..ad7dea8080a 100644 --- a/Widgets/Testing/Cxx/TerrainPolylineEditor.cxx +++ b/Widgets/Testing/Cxx/TerrainPolylineEditor.cxx @@ -729,11 +729,11 @@ int TerrainPolylineEditor(int argc, char * argv[]) vtkSmartPointer<vtkImageDataGeometryFilter> surface = vtkSmartPointer<vtkImageDataGeometryFilter>::New(); - surface->SetInput(demReader->GetOutput()); + surface->SetInputConnection(demReader->GetOutputPort()); vtkSmartPointer<vtkWarpScalar> warp = vtkSmartPointer<vtkWarpScalar>::New(); - warp->SetInput(surface->GetOutput()); + warp->SetInputConnection(surface->GetOutputPort()); warp->SetScaleFactor(1); warp->UseNormalOn(); warp->SetNormal(0, 0, 1); @@ -752,13 +752,13 @@ int TerrainPolylineEditor(int argc, char * argv[]) vtkSmartPointer<vtkPolyDataNormals> normals = vtkSmartPointer<vtkPolyDataNormals>::New(); - normals->SetInput(warp->GetPolyDataOutput()); + normals->SetInputConnection(warp->GetOutputPort()); normals->SetFeatureAngle(60); normals->SplittingOff(); vtkSmartPointer<vtkPolyDataMapper> demMapper = vtkSmartPointer<vtkPolyDataMapper>::New(); - demMapper->SetInput(normals->GetOutput()); + demMapper->SetInputConnection(normals->GetOutputPort()); normals->Update(); demMapper->SetScalarRange(lo, hi); demMapper->SetLookupTable(lut); diff --git a/Widgets/Testing/Cxx/TestAffineWidget.cxx b/Widgets/Testing/Cxx/TestAffineWidget.cxx index 78210b52eb1..9d3c451f95f 100644 --- a/Widgets/Testing/Cxx/TestAffineWidget.cxx +++ b/Widgets/Testing/Cxx/TestAffineWidget.cxx @@ -22,6 +22,7 @@ #include "vtkAffineRepresentation2D.h" #include "vtkImageActor.h" #include "vtkImageData.h" +#include "vtkImageMapper3D.h" #include "vtkRenderer.h" #include "vtkRenderWindow.h" #include "vtkRenderWindowInteractor.h" @@ -96,7 +97,7 @@ int TestAffineWidget( int argc, char *argv[] ) vtkSmartPointer<vtkImageActor> imageActor = vtkSmartPointer<vtkImageActor>::New(); - imageActor->SetInput(shifter->GetOutput()); + imageActor->GetMapper()->SetInputConnection(shifter->GetOutputPort()); imageActor->VisibilityOn(); imageActor->SetDisplayExtent(0, 63, 0, 63, 46, 46); imageActor->InterpolateOn(); diff --git a/Widgets/Testing/Cxx/TestAngleWidget2D.cxx b/Widgets/Testing/Cxx/TestAngleWidget2D.cxx index 4a3fce261ff..6db0d616ea9 100644 --- a/Widgets/Testing/Cxx/TestAngleWidget2D.cxx +++ b/Widgets/Testing/Cxx/TestAngleWidget2D.cxx @@ -417,7 +417,7 @@ int TestAngleWidget2D( int argc, char *argv[] ) = vtkSmartPointer< vtkSphereSource >::New(); vtkSmartPointer< vtkPolyDataMapper > mapper = vtkSmartPointer< vtkPolyDataMapper >::New(); - mapper->SetInput(ss->GetOutput()); + mapper->SetInputConnection(ss->GetOutputPort()); vtkSmartPointer< vtkActor > actor = vtkSmartPointer< vtkActor >::New(); actor->SetMapper(mapper); diff --git a/Widgets/Testing/Cxx/TestAngleWidget3D.cxx b/Widgets/Testing/Cxx/TestAngleWidget3D.cxx index 5e0f3853ab9..1dd2b26018c 100644 --- a/Widgets/Testing/Cxx/TestAngleWidget3D.cxx +++ b/Widgets/Testing/Cxx/TestAngleWidget3D.cxx @@ -694,7 +694,7 @@ int TestAngleWidget3D( int argc, char *argv[] ) // vtkSmartPointer< vtkPolyDataMapper > mapper = vtkSmartPointer< vtkPolyDataMapper >::New(); - mapper->SetInput(ss->GetOutput()); + mapper->SetInputConnection(ss->GetOutputPort()); vtkSmartPointer< vtkActor > actor = vtkSmartPointer< vtkActor >::New(); actor->SetMapper(mapper); diff --git a/Widgets/Testing/Cxx/TestAxesTransformWidget.cxx b/Widgets/Testing/Cxx/TestAxesTransformWidget.cxx index 7ca265ee6c2..95b99fba79f 100644 --- a/Widgets/Testing/Cxx/TestAxesTransformWidget.cxx +++ b/Widgets/Testing/Cxx/TestAxesTransformWidget.cxx @@ -57,7 +57,7 @@ int TestAxesTransformWidget( int , char *[] ) ss->Update(); vtkSmartPointer<vtkPolyDataMapper> mapper = vtkSmartPointer<vtkPolyDataMapper>::New(); - mapper->SetInput(ss->GetOutput()); + mapper->SetInputConnection(ss->GetOutputPort()); vtkSmartPointer<vtkActor> actor = vtkSmartPointer<vtkActor>::New(); actor->SetMapper(mapper); diff --git a/Widgets/Testing/Cxx/TestBalloonWidget.cxx b/Widgets/Testing/Cxx/TestBalloonWidget.cxx index 2dc50056a77..89972560319 100644 --- a/Widgets/Testing/Cxx/TestBalloonWidget.cxx +++ b/Widgets/Testing/Cxx/TestBalloonWidget.cxx @@ -95,20 +95,20 @@ int TestBalloonWidget( int argc, char *argv[] ) // vtkSmartPointer<vtkSphereSource> ss = vtkSmartPointer<vtkSphereSource>::New(); vtkSmartPointer<vtkPolyDataMapper> mapper = vtkSmartPointer<vtkPolyDataMapper>::New(); - mapper->SetInput(ss->GetOutput()); + mapper->SetInputConnection(ss->GetOutputPort()); vtkSmartPointer<vtkActor> sph = vtkSmartPointer<vtkActor>::New(); sph->SetMapper(mapper); vtkSmartPointer<vtkCylinderSource> cs = vtkSmartPointer<vtkCylinderSource>::New(); vtkSmartPointer<vtkPolyDataMapper> csMapper = vtkSmartPointer<vtkPolyDataMapper>::New(); - csMapper->SetInput(cs->GetOutput()); + csMapper->SetInputConnection(cs->GetOutputPort()); vtkSmartPointer<vtkActor> cyl = vtkSmartPointer<vtkActor>::New(); cyl->SetMapper(csMapper); cyl->AddPosition(5,0,0); vtkSmartPointer<vtkConeSource> coneSource = vtkSmartPointer<vtkConeSource>::New(); vtkSmartPointer<vtkPolyDataMapper> coneMapper = vtkSmartPointer<vtkPolyDataMapper>::New(); - coneMapper->SetInput(coneSource->GetOutput()); + coneMapper->SetInputConnection(coneSource->GetOutputPort()); vtkSmartPointer<vtkActor> cone = vtkSmartPointer<vtkActor>::New(); cone->SetMapper(coneMapper); cone->AddPosition(0,5,0); diff --git a/Widgets/Testing/Cxx/TestBiDimensionalWidget.cxx b/Widgets/Testing/Cxx/TestBiDimensionalWidget.cxx index 436f2710b8a..20ae45df5fb 100644 --- a/Widgets/Testing/Cxx/TestBiDimensionalWidget.cxx +++ b/Widgets/Testing/Cxx/TestBiDimensionalWidget.cxx @@ -21,6 +21,7 @@ #include "vtkBiDimensionalRepresentation2D.h" #include "vtkImageActor.h" #include "vtkImageData.h" +#include "vtkImageMapper3D.h" #include "vtkRenderer.h" #include "vtkRenderWindow.h" #include "vtkRenderWindowInteractor.h" @@ -1126,7 +1127,7 @@ int TestBiDimensionalWidget( int argc, char *argv[] ) vtkSmartPointer<vtkImageActor> imageActor = vtkSmartPointer<vtkImageActor>::New(); - imageActor->SetInput(shifter->GetOutput()); + imageActor->GetMapper()->SetInputConnection(shifter->GetOutputPort()); imageActor->VisibilityOn(); imageActor->SetDisplayExtent(0, 63, 0, 63, 46, 46); imageActor->InterpolateOn(); diff --git a/Widgets/Testing/Cxx/TestBorderWidget.cxx b/Widgets/Testing/Cxx/TestBorderWidget.cxx index b50866fd1e5..c1adf07e56c 100644 --- a/Widgets/Testing/Cxx/TestBorderWidget.cxx +++ b/Widgets/Testing/Cxx/TestBorderWidget.cxx @@ -659,7 +659,7 @@ int TestBorderWidget( int , char *[] ) vtkSmartPointer<vtkSphereSource>::New(); vtkSmartPointer<vtkPolyDataMapper> mapper = vtkSmartPointer<vtkPolyDataMapper>::New(); - mapper->SetInput(ss->GetOutput()); + mapper->SetInputConnection(ss->GetOutputPort()); vtkSmartPointer<vtkActor> actor = vtkSmartPointer<vtkActor>::New(); actor->SetMapper(mapper); diff --git a/Widgets/Testing/Cxx/TestButtonWidget.cxx b/Widgets/Testing/Cxx/TestButtonWidget.cxx index c5bebf9727c..b2049b58007 100644 --- a/Widgets/Testing/Cxx/TestButtonWidget.cxx +++ b/Widgets/Testing/Cxx/TestButtonWidget.cxx @@ -505,7 +505,7 @@ int TestButtonWidget(int argc, char *argv[] ) VTK_CREATE(vtkConeSource, cone); VTK_CREATE(vtkGlyph3D, glyph); glyph->SetInputConnection(sphere->GetOutputPort()); - glyph->SetSource(cone->GetOutput()); + glyph->SetSourceConnection(cone->GetOutputPort()); glyph->SetVectorModeToUseNormal(); glyph->SetScaleModeToScaleByVector(); glyph->SetScaleFactor(0.25); @@ -513,8 +513,8 @@ int TestButtonWidget(int argc, char *argv[] ) // Appending just makes things simpler to manage. VTK_CREATE(vtkAppendPolyData, apd); - apd->AddInput(glyph->GetOutput()); - apd->AddInput(sphere->GetOutput()); + apd->AddInputConnection(glyph->GetOutputPort()); + apd->AddInputConnection(sphere->GetOutputPort()); VTK_CREATE(vtkPolyDataMapper, maceMapper); maceMapper->SetInputConnection(apd->GetOutputPort()); diff --git a/Widgets/Testing/Cxx/TestCameraWidget.cxx b/Widgets/Testing/Cxx/TestCameraWidget.cxx index 9df5773d5bc..4c05ed6376b 100644 --- a/Widgets/Testing/Cxx/TestCameraWidget.cxx +++ b/Widgets/Testing/Cxx/TestCameraWidget.cxx @@ -49,7 +49,7 @@ int TestCameraWidget(int vtkNotUsed(argc), char *vtkNotUsed(argv)[]) vtkSmartPointer<vtkSphereSource>::New(); vtkSmartPointer<vtkPolyDataMapper> mapper = vtkSmartPointer<vtkPolyDataMapper>::New(); - mapper->SetInput(ss->GetOutput()); + mapper->SetInputConnection(ss->GetOutputPort()); vtkSmartPointer<vtkActor> actor = vtkSmartPointer<vtkActor>::New(); actor->SetMapper(mapper); diff --git a/Widgets/Testing/Cxx/TestCaptionWidget.cxx b/Widgets/Testing/Cxx/TestCaptionWidget.cxx index 4b51ce65d40..0df38fa2c2a 100644 --- a/Widgets/Testing/Cxx/TestCaptionWidget.cxx +++ b/Widgets/Testing/Cxx/TestCaptionWidget.cxx @@ -919,7 +919,7 @@ int TestCaptionWidget( int vtkNotUsed(argc), char *vtkNotUsed(argv)[] ) ss->Update(); vtkSmartPointer<vtkPolyDataMapper> mapper = vtkSmartPointer<vtkPolyDataMapper>::New(); - mapper->SetInput(ss->GetOutput()); + mapper->SetInputConnection(ss->GetOutputPort()); vtkSmartPointer<vtkActor> actor = vtkSmartPointer<vtkActor>::New(); actor->SetMapper(mapper); diff --git a/Widgets/Testing/Cxx/TestCenteredSliderWidget2D.cxx b/Widgets/Testing/Cxx/TestCenteredSliderWidget2D.cxx index 6abee6f0e14..43239dff1fa 100644 --- a/Widgets/Testing/Cxx/TestCenteredSliderWidget2D.cxx +++ b/Widgets/Testing/Cxx/TestCenteredSliderWidget2D.cxx @@ -65,8 +65,8 @@ int TestCenteredSliderWidget2D(int vtkNotUsed(argc), char *vtkNotUsed(argv)[]) vtkSmartPointer<vtkConeSource>::New(); vtkSmartPointer<vtkGlyph3D> glyph = vtkSmartPointer<vtkGlyph3D>::New(); - glyph->SetInput(sphereSource->GetOutput()); - glyph->SetSource(cone->GetOutput()); + glyph->SetInputConnection(sphereSource->GetOutputPort()); + glyph->SetSourceConnection(cone->GetOutputPort()); glyph->SetVectorModeToUseNormal(); glyph->SetScaleModeToScaleByVector(); glyph->SetScaleFactor(0.25); @@ -75,12 +75,12 @@ int TestCenteredSliderWidget2D(int vtkNotUsed(argc), char *vtkNotUsed(argv)[]) // This just makes things simpler to manage. vtkSmartPointer<vtkAppendPolyData> apd = vtkSmartPointer<vtkAppendPolyData>::New(); - apd->AddInput(glyph->GetOutput()); - apd->AddInput(sphereSource->GetOutput()); + apd->AddInputConnection(glyph->GetOutputPort()); + apd->AddInputConnection(sphereSource->GetOutputPort()); vtkSmartPointer<vtkPolyDataMapper> maceMapper = vtkSmartPointer<vtkPolyDataMapper>::New(); - maceMapper->SetInput(apd->GetOutput()); + maceMapper->SetInputConnection(apd->GetOutputPort()); vtkSmartPointer<vtkLODActor> maceActor = vtkSmartPointer<vtkLODActor>::New(); diff --git a/Widgets/Testing/Cxx/TestCheckerboardWidget.cxx b/Widgets/Testing/Cxx/TestCheckerboardWidget.cxx index 40a0f1fedc0..5ca2100f31d 100644 --- a/Widgets/Testing/Cxx/TestCheckerboardWidget.cxx +++ b/Widgets/Testing/Cxx/TestCheckerboardWidget.cxx @@ -25,6 +25,7 @@ #include "vtkImageCanvasSource2D.h" #include "vtkImageCheckerboard.h" #include "vtkImageActor.h" +#include "vtkImageMapper3D.h" #include "vtkImageData.h" #include "vtkRenderer.h" #include "vtkRenderWindow.h" @@ -262,7 +263,7 @@ int TestCheckerboardWidget( int, char *[] ) vtkSmartPointer<vtkImageWrapPad> pad1 = vtkSmartPointer<vtkImageWrapPad>::New(); - pad1->SetInput(image1->GetOutput()); + pad1->SetInputConnection(image1->GetOutputPort()); pad1->SetOutputWholeExtent(0,511,0,511,0,0); vtkSmartPointer<vtkImageCanvasSource2D> image2 = @@ -275,18 +276,18 @@ int TestCheckerboardWidget( int, char *[] ) vtkSmartPointer<vtkImageWrapPad> pad2 = vtkSmartPointer<vtkImageWrapPad>::New(); - pad2->SetInput(image2->GetOutput()); + pad2->SetInputConnection(image2->GetOutputPort()); pad2->SetOutputWholeExtent(0,511,0,511,0,0); vtkSmartPointer<vtkImageCheckerboard> checkers = vtkSmartPointer<vtkImageCheckerboard>::New(); - checkers->SetInput(0,pad1->GetOutput()); - checkers->SetInput(1,pad2->GetOutput()); + checkers->SetInputConnection(0,pad1->GetOutputPort()); + checkers->SetInputConnection(1,pad2->GetOutputPort()); checkers->SetNumberOfDivisions(10,6,1); vtkSmartPointer<vtkImageActor> checkerboardActor = vtkSmartPointer<vtkImageActor>::New(); - checkerboardActor->SetInput(checkers->GetOutput()); + checkerboardActor->GetMapper()->SetInputConnection(checkers->GetOutputPort()); // VTK widgets consist of two parts: the widget part that handles event processing; // and the widget representation that defines how the widget appears in the scene diff --git a/Widgets/Testing/Cxx/TestConstrainedHandleWidget.cxx b/Widgets/Testing/Cxx/TestConstrainedHandleWidget.cxx index 4f0a9cf6700..e905a287d5c 100644 --- a/Widgets/Testing/Cxx/TestConstrainedHandleWidget.cxx +++ b/Widgets/Testing/Cxx/TestConstrainedHandleWidget.cxx @@ -28,6 +28,7 @@ #include "vtkCommand.h" #include "vtkInteractorEventRecorder.h" #include "vtkImageActor.h" +#include "vtkImageMapper3D.h" #include "vtkVolume16Reader.h" #include "vtkImageShiftScale.h" #include "vtkTestUtilities.h" @@ -66,7 +67,7 @@ int TestConstrainedHandleWidget( int argc, char *argv[] ) vtkSmartPointer<vtkImageActor> imageActor = vtkSmartPointer<vtkImageActor>::New(); - imageActor->SetInput(shifter->GetOutput()); + imageActor->GetMapper()->SetInputConnection(shifter->GetOutputPort()); imageActor->VisibilityOn(); // imageActor->SetDisplayExtent(0, 63, 0, 63, 46, 46); imageActor->SetDisplayExtent(0, 63, 30, 30, 0, 92); diff --git a/Widgets/Testing/Cxx/TestDijkstraGraphGeodesicPath.cxx b/Widgets/Testing/Cxx/TestDijkstraGraphGeodesicPath.cxx index 63ae70690cd..2e981b2a45d 100644 --- a/Widgets/Testing/Cxx/TestDijkstraGraphGeodesicPath.cxx +++ b/Widgets/Testing/Cxx/TestDijkstraGraphGeodesicPath.cxx @@ -169,7 +169,7 @@ int TestDijkstraGraphGeodesicPath(int argc, char*argv[]) vtkSmartPointer<vtkImageResample> resample = vtkSmartPointer<vtkImageResample>::New(); - resample->SetInput(demReader->GetOutput()); + resample->SetInputConnection(demReader->GetOutputPort()); resample->SetDimensionality(2); resample->SetAxisMagnificationFactor(0,1.0); resample->SetAxisMagnificationFactor(1,1.0); @@ -177,17 +177,17 @@ int TestDijkstraGraphGeodesicPath(int argc, char*argv[]) // Extract geometry vtkSmartPointer<vtkImageDataGeometryFilter> surface = vtkSmartPointer<vtkImageDataGeometryFilter>::New(); - surface->SetInput(resample->GetOutput()); + surface->SetInputConnection(resample->GetOutputPort()); // The Dijkistra interpolator will not accept cells that aren't triangles vtkSmartPointer<vtkTriangleFilter> triangleFilter = vtkSmartPointer<vtkTriangleFilter>::New(); - triangleFilter->SetInput( surface->GetOutput() ); + triangleFilter->SetInputConnection( surface->GetOutputPort() ); triangleFilter->Update(); vtkSmartPointer<vtkWarpScalar> warp = vtkSmartPointer<vtkWarpScalar>::New(); - warp->SetInput(triangleFilter->GetOutput()); + warp->SetInputConnection(triangleFilter->GetOutputPort()); warp->SetScaleFactor(1); warp->UseNormalOn(); warp->SetNormal(0, 0, 1); @@ -221,7 +221,7 @@ int TestDijkstraGraphGeodesicPath(int argc, char*argv[]) if (distanceOffsetSpecified) { - normals->SetInput(warp->GetPolyDataOutput()); + normals->SetInputConnection(warp->GetOutputPort()); normals->SetFeatureAngle(60); normals->SplittingOff(); @@ -237,7 +237,7 @@ int TestDijkstraGraphGeodesicPath(int argc, char*argv[]) vtkSmartPointer<vtkPolyDataMapper> demMapper = vtkSmartPointer<vtkPolyDataMapper>::New(); - demMapper->SetInput(pd); + demMapper->SetInputData(pd); demMapper->SetScalarRange(lo, hi); demMapper->SetLookupTable(lut); diff --git a/Widgets/Testing/Cxx/TestDijkstraImageGeodesicPath.cxx b/Widgets/Testing/Cxx/TestDijkstraImageGeodesicPath.cxx index 858c61733f7..bb61e8728af 100644 --- a/Widgets/Testing/Cxx/TestDijkstraImageGeodesicPath.cxx +++ b/Widgets/Testing/Cxx/TestDijkstraImageGeodesicPath.cxx @@ -22,6 +22,7 @@ #include "vtkImageActorPointPlacer.h" #include "vtkImageAnisotropicDiffusion2D.h" #include "vtkImageData.h" +#include "vtkImageMapper3D.h" #include "vtkImageGradientMagnitude.h" #include "vtkImageMapToWindowLevelColors.h" #include "vtkImageShiftScale.h" @@ -178,7 +179,7 @@ int TestDijkstraImageGeodesicPath(int argc, char*argv[]) vtkSmartPointer<vtkImageActor> actor = vtkSmartPointer<vtkImageActor>::New(); - actor->SetInput( colorMap->GetOutput() ); + actor->GetMapper()->SetInputConnection( colorMap->GetOutputPort() ); actor->SetDisplayExtent( 0, 255, 0, 255, 0, 0 ); renderer->AddActor( actor ); diff --git a/Widgets/Testing/Cxx/TestDistanceWidget.cxx b/Widgets/Testing/Cxx/TestDistanceWidget.cxx index d027415be18..176591cd0a7 100644 --- a/Widgets/Testing/Cxx/TestDistanceWidget.cxx +++ b/Widgets/Testing/Cxx/TestDistanceWidget.cxx @@ -905,7 +905,7 @@ int TestDistanceWidget(int vtkNotUsed(argc), char *vtkNotUsed(argv)[]) // VTK_CREATE(vtkSphereSource, ss); VTK_CREATE(vtkPolyDataMapper, mapper); - mapper->SetInput(ss->GetOutput()); + mapper->SetInputConnection(ss->GetOutputPort()); VTK_CREATE(vtkActor, actor); actor->SetMapper(mapper); diff --git a/Widgets/Testing/Cxx/TestDistanceWidget3D.cxx b/Widgets/Testing/Cxx/TestDistanceWidget3D.cxx index 2c28c5099ea..fa287f9129f 100644 --- a/Widgets/Testing/Cxx/TestDistanceWidget3D.cxx +++ b/Widgets/Testing/Cxx/TestDistanceWidget3D.cxx @@ -907,7 +907,7 @@ int TestDistanceWidget3D( int argc, char *argv[] ) // VTK_CREATE(vtkSphereSource, ss); VTK_CREATE(vtkPolyDataMapper, mapper); - mapper->SetInput(ss->GetOutput()); + mapper->SetInputConnection(ss->GetOutputPort()); VTK_CREATE(vtkActor, actor); actor->SetMapper(mapper); diff --git a/Widgets/Testing/Cxx/TestFocalPlaneContour.cxx b/Widgets/Testing/Cxx/TestFocalPlaneContour.cxx index 24af046ee37..220d2356731 100644 --- a/Widgets/Testing/Cxx/TestFocalPlaneContour.cxx +++ b/Widgets/Testing/Cxx/TestFocalPlaneContour.cxx @@ -28,6 +28,7 @@ #include "vtkCommand.h" #include "vtkInteractorEventRecorder.h" #include "vtkImageActor.h" +#include "vtkImageMapper3D.h" #include "vtkVolume16Reader.h" #include "vtkImageShiftScale.h" #include "vtkTestUtilities.h" @@ -65,7 +66,7 @@ int TestFocalPlaneContour( int argc, char *argv[] ) vtkSmartPointer<vtkImageActor> imageActor = vtkSmartPointer<vtkImageActor>::New(); - imageActor->SetInput(shifter->GetOutput()); + imageActor->GetMapper()->SetInputConnection(shifter->GetOutputPort()); imageActor->VisibilityOn(); imageActor->SetDisplayExtent(0, 63, 0, 63, 46, 46); imageActor->InterpolateOn(); diff --git a/Widgets/Testing/Cxx/TestHandleWidget.cxx b/Widgets/Testing/Cxx/TestHandleWidget.cxx index 32ff0fda659..69d8f90634a 100644 --- a/Widgets/Testing/Cxx/TestHandleWidget.cxx +++ b/Widgets/Testing/Cxx/TestHandleWidget.cxx @@ -582,7 +582,7 @@ int TestHandleWidget( int argc, char *argv[] ) vtkSmartPointer<vtkGlyph3D> glyph = vtkSmartPointer<vtkGlyph3D>::New(); glyph->SetInputConnection(sphere->GetOutputPort()); - glyph->SetSource(cone->GetOutput()); + glyph->SetSourceConnection(cone->GetOutputPort()); glyph->SetVectorModeToUseNormal(); glyph->SetScaleModeToScaleByVector(); glyph->SetScaleFactor(0.25); @@ -591,8 +591,8 @@ int TestHandleWidget( int argc, char *argv[] ) // This just makes things simpler to manage. vtkSmartPointer<vtkAppendPolyData> apd = vtkSmartPointer<vtkAppendPolyData>::New(); - apd->AddInput(glyph->GetOutput()); - apd->AddInput(sphere->GetOutput()); + apd->AddInputConnection(glyph->GetOutputPort()); + apd->AddInputConnection(sphere->GetOutputPort()); // This portion of the code clips the mace with the vtkPlanes // implicit function. The cut region is colored green. diff --git a/Widgets/Testing/Cxx/TestHandleWidget2D.cxx b/Widgets/Testing/Cxx/TestHandleWidget2D.cxx index d350ba73130..067c5b5b2fa 100644 --- a/Widgets/Testing/Cxx/TestHandleWidget2D.cxx +++ b/Widgets/Testing/Cxx/TestHandleWidget2D.cxx @@ -61,7 +61,7 @@ int TestHandleWidget2D(int vtkNotUsed(argc), char *vtkNotUsed(argv)[]) vtkSmartPointer<vtkPolyDataMapper2D> diskMapper = vtkSmartPointer<vtkPolyDataMapper2D>::New(); - diskMapper->SetInput(diskSource->GetOutput()); + diskMapper->SetInputConnection(diskSource->GetOutputPort()); vtkSmartPointer<vtkActor2D> diskActor = vtkSmartPointer<vtkActor2D>::New(); @@ -75,7 +75,7 @@ int TestHandleWidget2D(int vtkNotUsed(argc), char *vtkNotUsed(argv)[]) vtkSmartPointer<vtkPolyDataMapper2D> diskMapper2 = vtkSmartPointer<vtkPolyDataMapper2D>::New(); - diskMapper2->SetInput(diskSource2->GetOutput()); + diskMapper2->SetInputConnection(diskSource2->GetOutputPort()); vtkSmartPointer<vtkActor2D> diskActor2 = vtkSmartPointer<vtkActor2D>::New(); diff --git a/Widgets/Testing/Cxx/TestImageActorContourWidget.cxx b/Widgets/Testing/Cxx/TestImageActorContourWidget.cxx index f050fb806a1..6962da9d6c1 100644 --- a/Widgets/Testing/Cxx/TestImageActorContourWidget.cxx +++ b/Widgets/Testing/Cxx/TestImageActorContourWidget.cxx @@ -853,7 +853,7 @@ int TestImageActorContourWidget(int argc, char *argv[]) vtkSmartPointer<vtkImageViewer2> imageViewer = vtkSmartPointer<vtkImageViewer2>::New(); - imageViewer->SetInput(shifter->GetOutput()); + imageViewer->SetInputConnection(shifter->GetOutputPort()); imageViewer->SetColorLevel(127); imageViewer->SetColorWindow(255); diff --git a/Widgets/Testing/Cxx/TestImageTracerWidget.cxx b/Widgets/Testing/Cxx/TestImageTracerWidget.cxx index 8e70e79ce73..c587f8c16f5 100644 --- a/Widgets/Testing/Cxx/TestImageTracerWidget.cxx +++ b/Widgets/Testing/Cxx/TestImageTracerWidget.cxx @@ -20,6 +20,7 @@ #include "vtkExtractVOI.h" #include "vtkGlyphSource2D.h" #include "vtkImageActor.h" +#include "vtkImageMapper3D.h" #include "vtkImageData.h" #include "vtkImageShiftScale.h" #include "vtkImageStencil.h" @@ -269,7 +270,7 @@ public: if (!closed) { - Actor->SetInput(Extract->GetOutput()); + Actor->GetMapper()->SetInputConnection(Extract->GetOutputPort()); } int npts = tracerWidget->GetNumberOfHandles(); @@ -285,7 +286,7 @@ public: { SplineWidget->GetPolyData(SplinePoly); Stencil->Update(); - Actor->SetInput(Stencil->GetOutput()); + Actor->GetMapper()->SetInputConnection(Stencil->GetOutputPort()); } } @@ -331,7 +332,7 @@ public: } splineWidget->GetPolyData(SplinePoly); Stencil->Update(); - Actor->SetInput(Stencil->GetOutput()); + Actor->GetMapper()->SetInputConnection(Stencil->GetOutputPort()); } TracerWidget->InitializeHandles(Points); @@ -403,7 +404,7 @@ int TestImageTracerWidget( int argc, char *argv[] ) // vtkSmartPointer<vtkImageActor> imageActor1 = vtkSmartPointer<vtkImageActor>::New(); - imageActor1->SetInput(shifter->GetOutput()); + imageActor1->GetMapper()->SetInputConnection(shifter->GetOutputPort()); imageActor1->VisibilityOn(); imageActor1->SetDisplayExtent(31, 31, 0, 63, 0, 92); imageActor1->InterpolateOff(); @@ -418,7 +419,7 @@ int TestImageTracerWidget( int argc, char *argv[] ) vtkSmartPointer<vtkImageActor> imageActor2 = vtkSmartPointer<vtkImageActor>::New(); - imageActor2->SetInput(extract->GetOutput()); + imageActor2->GetMapper()->SetInputConnection(extract->GetOutputPort()); imageActor2->VisibilityOn(); imageActor2->SetDisplayExtent(extract->GetVOI()); imageActor2->InterpolateOff(); @@ -469,7 +470,7 @@ int TestImageTracerWidget( int argc, char *argv[] ) // vtkSmartPointer<vtkLinearExtrusionFilter> extrude = vtkSmartPointer<vtkLinearExtrusionFilter>::New(); - extrude->SetInput(splinePoly); + extrude->SetInputData(splinePoly); extrude->SetScaleFactor(1); extrude->SetExtrusionTypeToNormalExtrusion(); extrude->SetVector(1, 0, 0); @@ -496,7 +497,7 @@ int TestImageTracerWidget( int argc, char *argv[] ) vtkSmartPointer<vtkImageStencil> stencil = vtkSmartPointer<vtkImageStencil>::New(); stencil->SetInputConnection(extract->GetOutputPort()); - stencil->SetStencil(dataToStencil->GetOutput()); + stencil->SetStencilConnection(dataToStencil->GetOutputPort()); stencil->ReverseStencilOff(); stencil->SetBackgroundValue(128); diff --git a/Widgets/Testing/Cxx/TestImplicitPlaneWidget.cxx b/Widgets/Testing/Cxx/TestImplicitPlaneWidget.cxx index 46621a22cbf..b9c20deb9d6 100644 --- a/Widgets/Testing/Cxx/TestImplicitPlaneWidget.cxx +++ b/Widgets/Testing/Cxx/TestImplicitPlaneWidget.cxx @@ -444,7 +444,7 @@ int TestImplicitPlaneWidget(int vtkNotUsed(argc), char *vtkNotUsed(argv)[]) vtkSmartPointer<vtkGlyph3D> glyph = vtkSmartPointer<vtkGlyph3D>::New(); glyph->SetInputConnection(sphere->GetOutputPort()); - glyph->SetSource(cone->GetOutput()); + glyph->SetSourceConnection(cone->GetOutputPort()); glyph->SetVectorModeToUseNormal(); glyph->SetScaleModeToScaleByVector(); glyph->SetScaleFactor(0.25); @@ -453,8 +453,8 @@ int TestImplicitPlaneWidget(int vtkNotUsed(argc), char *vtkNotUsed(argv)[]) // This just makes things simpler to manage. vtkSmartPointer<vtkAppendPolyData> apd = vtkSmartPointer<vtkAppendPolyData>::New(); - apd->AddInput(glyph->GetOutput()); - apd->AddInput(sphere->GetOutput()); + apd->AddInputConnection(glyph->GetOutputPort()); + apd->AddInputConnection(sphere->GetOutputPort()); vtkSmartPointer<vtkPolyDataMapper> maceMapper = vtkSmartPointer<vtkPolyDataMapper>::New(); @@ -510,6 +510,7 @@ int TestImplicitPlaneWidget(int vtkNotUsed(argc), char *vtkNotUsed(argv)[]) vtkSmartPointer<vtkImplicitPlaneWidget>::New(); planeWidget->SetInteractor(iren); planeWidget->SetPlaceFactor(1.25); + glyph->Update(); planeWidget->SetInput(glyph->GetOutput()); planeWidget->PlaceWidget(); planeWidget->AddObserver(vtkCommand::InteractionEvent,myCallback); diff --git a/Widgets/Testing/Cxx/TestImplicitPlaneWidget2.cxx b/Widgets/Testing/Cxx/TestImplicitPlaneWidget2.cxx index 779c926aa2a..00fc4005db2 100644 --- a/Widgets/Testing/Cxx/TestImplicitPlaneWidget2.cxx +++ b/Widgets/Testing/Cxx/TestImplicitPlaneWidget2.cxx @@ -447,7 +447,7 @@ int TestImplicitPlaneWidget2(int vtkNotUsed(argc), char *vtkNotUsed(argv)[]) vtkSmartPointer<vtkGlyph3D> glyph = vtkSmartPointer<vtkGlyph3D>::New(); glyph->SetInputConnection(sphere->GetOutputPort()); - glyph->SetSource(cone->GetOutput()); + glyph->SetSourceConnection(cone->GetOutputPort()); glyph->SetVectorModeToUseNormal(); glyph->SetScaleModeToScaleByVector(); glyph->SetScaleFactor(0.25); @@ -457,8 +457,8 @@ int TestImplicitPlaneWidget2(int vtkNotUsed(argc), char *vtkNotUsed(argv)[]) // This just makes things simpler to manage. vtkSmartPointer<vtkAppendPolyData> apd = vtkSmartPointer<vtkAppendPolyData>::New(); - apd->AddInput(glyph->GetOutput()); - apd->AddInput(sphere->GetOutput()); + apd->AddInputConnection(glyph->GetOutputPort()); + apd->AddInputConnection(sphere->GetOutputPort()); vtkSmartPointer<vtkPolyDataMapper> maceMapper = vtkSmartPointer<vtkPolyDataMapper>::New(); diff --git a/Widgets/Testing/Cxx/TestImplicitPlaneWidget2b.cxx b/Widgets/Testing/Cxx/TestImplicitPlaneWidget2b.cxx index 36e5c133ae9..ecdc6984aa7 100644 --- a/Widgets/Testing/Cxx/TestImplicitPlaneWidget2b.cxx +++ b/Widgets/Testing/Cxx/TestImplicitPlaneWidget2b.cxx @@ -122,7 +122,7 @@ int TestImplicitPlaneWidget2b( int, char *[] ) vtkSmartPointer<vtkGlyph3D> glyph = vtkSmartPointer<vtkGlyph3D>::New(); glyph->SetInputConnection(sphere->GetOutputPort()); - glyph->SetSource(cone->GetOutput()); + glyph->SetSourceConnection(cone->GetOutputPort()); glyph->SetVectorModeToUseNormal(); glyph->SetScaleModeToScaleByVector(); glyph->SetScaleFactor(0.25); @@ -132,8 +132,8 @@ int TestImplicitPlaneWidget2b( int, char *[] ) // This just makes things simpler to manage. vtkSmartPointer<vtkAppendPolyData> apd = vtkSmartPointer<vtkAppendPolyData>::New(); - apd->AddInput(glyph->GetOutput()); - apd->AddInput(sphere->GetOutput()); + apd->AddInputConnection(glyph->GetOutputPort()); + apd->AddInputConnection(sphere->GetOutputPort()); vtkSmartPointer<vtkPolyDataMapper> maceMapper = vtkSmartPointer<vtkPolyDataMapper>::New(); diff --git a/Widgets/Testing/Cxx/TestLineWidget.cxx b/Widgets/Testing/Cxx/TestLineWidget.cxx index cc3f5b95d2a..53845f62efa 100644 --- a/Widgets/Testing/Cxx/TestLineWidget.cxx +++ b/Widgets/Testing/Cxx/TestLineWidget.cxx @@ -274,8 +274,8 @@ int TestLineWidget( int argc, char *argv[] ) vtkSmartPointer<vtkStreamLine> streamer = vtkSmartPointer<vtkStreamLine>::New(); - streamer->SetInput(pl3d_block0); - streamer->SetSource(seeds); + streamer->SetInputData(pl3d_block0); + streamer->SetSourceData(seeds); streamer->SetMaximumPropagationTime(100); streamer->SetIntegrationStepLength(.2); streamer->SetStepLength(.001); @@ -305,7 +305,7 @@ int TestLineWidget( int argc, char *argv[] ) // An outline is shown for context. vtkSmartPointer<vtkStructuredGridOutlineFilter> outline = vtkSmartPointer<vtkStructuredGridOutlineFilter>::New(); - outline->SetInput(pl3d_block0); + outline->SetInputData(pl3d_block0); vtkSmartPointer<vtkPolyDataMapper> outlineMapper = vtkSmartPointer<vtkPolyDataMapper>::New(); diff --git a/Widgets/Testing/Cxx/TestLineWidget2.cxx b/Widgets/Testing/Cxx/TestLineWidget2.cxx index a022b86c9cd..72551a47d0e 100644 --- a/Widgets/Testing/Cxx/TestLineWidget2.cxx +++ b/Widgets/Testing/Cxx/TestLineWidget2.cxx @@ -277,8 +277,8 @@ int TestLineWidget2( int argc, char *argv[] ) vtkSmartPointer<vtkStreamLine> streamer = vtkSmartPointer<vtkStreamLine>::New(); - streamer->SetInput(pl3d_block0); - streamer->SetSource(seeds); + streamer->SetInputData(pl3d_block0); + streamer->SetSourceData(seeds); streamer->SetMaximumPropagationTime(100); streamer->SetIntegrationStepLength(.2); streamer->SetStepLength(.001); @@ -308,7 +308,7 @@ int TestLineWidget2( int argc, char *argv[] ) // An outline is shown for context. vtkSmartPointer<vtkStructuredGridOutlineFilter> outline = vtkSmartPointer<vtkStructuredGridOutlineFilter>::New(); - outline->SetInput(pl3d_block0); + outline->SetInputData(pl3d_block0); vtkSmartPointer<vtkPolyDataMapper> outlineMapper = vtkSmartPointer<vtkPolyDataMapper>::New(); diff --git a/Widgets/Testing/Cxx/TestLogoWidget.cxx b/Widgets/Testing/Cxx/TestLogoWidget.cxx index a53f856d69e..54b9fd4b3a5 100644 --- a/Widgets/Testing/Cxx/TestLogoWidget.cxx +++ b/Widgets/Testing/Cxx/TestLogoWidget.cxx @@ -64,7 +64,7 @@ int TestLogoWidget( int argc, char *argv[] ) vtkSmartPointer<vtkSphereSource>::New(); vtkSmartPointer<vtkPolyDataMapper> mapper = vtkSmartPointer<vtkPolyDataMapper>::New(); - mapper->SetInput(ss->GetOutput()); + mapper->SetInputConnection(ss->GetOutputPort()); vtkSmartPointer<vtkActor> sph = vtkSmartPointer<vtkActor>::New(); sph->SetMapper(mapper); @@ -73,7 +73,7 @@ int TestLogoWidget( int argc, char *argv[] ) vtkSmartPointer<vtkCylinderSource>::New(); vtkSmartPointer<vtkPolyDataMapper> csMapper = vtkSmartPointer<vtkPolyDataMapper>::New(); - csMapper->SetInput(cs->GetOutput()); + csMapper->SetInputConnection(cs->GetOutputPort()); vtkSmartPointer<vtkActor> cyl = vtkSmartPointer<vtkActor>::New(); cyl->SetMapper(csMapper); @@ -83,7 +83,7 @@ int TestLogoWidget( int argc, char *argv[] ) vtkSmartPointer<vtkConeSource>::New(); vtkSmartPointer<vtkPolyDataMapper> coneMapper = vtkSmartPointer<vtkPolyDataMapper>::New(); - coneMapper->SetInput(coneSource->GetOutput()); + coneMapper->SetInputConnection(coneSource->GetOutputPort()); vtkSmartPointer<vtkActor> cone = vtkSmartPointer<vtkActor>::New(); cone->SetMapper(coneMapper); diff --git a/Widgets/Testing/Cxx/TestLogoWidgetAlphaBlending.cxx b/Widgets/Testing/Cxx/TestLogoWidgetAlphaBlending.cxx index 3cacd9cf2e8..44c458c935e 100644 --- a/Widgets/Testing/Cxx/TestLogoWidgetAlphaBlending.cxx +++ b/Widgets/Testing/Cxx/TestLogoWidgetAlphaBlending.cxx @@ -84,7 +84,7 @@ int TestLogoWidgetAlphaBlending( int argc, char *argv[] ) vtkSmartPointer<vtkSphereSource>::New(); vtkSmartPointer<vtkPolyDataMapper> mapper = vtkSmartPointer<vtkPolyDataMapper>::New(); - mapper->SetInput(ss->GetOutput()); + mapper->SetInputConnection(ss->GetOutputPort()); vtkSmartPointer<vtkActor> sph = vtkSmartPointer<vtkActor>::New(); @@ -100,7 +100,7 @@ int TestLogoWidgetAlphaBlending( int argc, char *argv[] ) vtkSmartPointer<vtkCylinderSource>::New(); vtkSmartPointer<vtkPolyDataMapper> csMapper = vtkSmartPointer<vtkPolyDataMapper>::New(); - csMapper->SetInput(cs->GetOutput()); + csMapper->SetInputConnection(cs->GetOutputPort()); vtkSmartPointer<vtkActor> cyl = vtkSmartPointer<vtkActor>::New(); @@ -111,7 +111,7 @@ int TestLogoWidgetAlphaBlending( int argc, char *argv[] ) vtkSmartPointer<vtkConeSource>::New(); vtkSmartPointer<vtkPolyDataMapper> coneMapper = vtkSmartPointer<vtkPolyDataMapper>::New(); - coneMapper->SetInput(coneSource->GetOutput()); + coneMapper->SetInputConnection(coneSource->GetOutputPort()); vtkSmartPointer<vtkActor> cone = vtkSmartPointer<vtkActor>::New(); diff --git a/Widgets/Testing/Cxx/TestLogoWidgetDepthPeeling.cxx b/Widgets/Testing/Cxx/TestLogoWidgetDepthPeeling.cxx index 0ed38822a03..45b76d3f207 100644 --- a/Widgets/Testing/Cxx/TestLogoWidgetDepthPeeling.cxx +++ b/Widgets/Testing/Cxx/TestLogoWidgetDepthPeeling.cxx @@ -83,7 +83,7 @@ int TestLogoWidgetDepthPeeling( int argc, char *argv[] ) vtkSmartPointer<vtkSphereSource>::New(); vtkSmartPointer<vtkPolyDataMapper> mapper = vtkSmartPointer<vtkPolyDataMapper>::New(); - mapper->SetInput(ss->GetOutput()); + mapper->SetInputConnection(ss->GetOutputPort()); vtkSmartPointer<vtkActor> sph = vtkSmartPointer<vtkActor>::New(); sph->SetMapper(mapper); @@ -98,7 +98,7 @@ int TestLogoWidgetDepthPeeling( int argc, char *argv[] ) vtkSmartPointer<vtkCylinderSource>::New(); vtkSmartPointer<vtkPolyDataMapper> csMapper = vtkSmartPointer<vtkPolyDataMapper>::New(); - csMapper->SetInput(cs->GetOutput()); + csMapper->SetInputConnection(cs->GetOutputPort()); vtkSmartPointer<vtkActor> cyl = vtkSmartPointer<vtkActor>::New(); cyl->SetMapper(csMapper); @@ -108,7 +108,7 @@ int TestLogoWidgetDepthPeeling( int argc, char *argv[] ) vtkSmartPointer<vtkConeSource>::New(); vtkSmartPointer<vtkPolyDataMapper> coneMapper = vtkSmartPointer<vtkPolyDataMapper>::New(); - coneMapper->SetInput(coneSource->GetOutput()); + coneMapper->SetInputConnection(coneSource->GetOutputPort()); vtkSmartPointer<vtkActor> cone = vtkSmartPointer<vtkActor>::New(); cone->SetMapper(coneMapper); diff --git a/Widgets/Testing/Cxx/TestOrientationMarkerWidget.cxx b/Widgets/Testing/Cxx/TestOrientationMarkerWidget.cxx index 499fa2b4e96..79af51aafbe 100644 --- a/Widgets/Testing/Cxx/TestOrientationMarkerWidget.cxx +++ b/Widgets/Testing/Cxx/TestOrientationMarkerWidget.cxx @@ -339,7 +339,7 @@ int TestOrientationMarkerWidget( int, char *[] ) vtkSmartPointer<vtkTubeFilter> tube = vtkSmartPointer<vtkTubeFilter>::New(); - tube->SetInput( wiggle ); + tube->SetInputData( wiggle ); tube->SetGenerateTCoordsToOff(); tube->CappingOff(); tube->SetVaryRadiusToVaryRadiusOff(); @@ -388,7 +388,7 @@ int TestOrientationMarkerWidget( int, char *[] ) vtkPolyData* poly = vtkPolyData::SafeDownCast(node->GetMapper()->GetInput()); if ( poly ) { - transformFilter->SetInput( poly ); + transformFilter->SetInputData( poly ); transform->Identity(); transform->SetMatrix( node->GetMatrix() ); transform->Scale( 2.0, 2.0, 2.0 ); @@ -397,7 +397,7 @@ int TestOrientationMarkerWidget( int, char *[] ) vtkSmartPointer<vtkPolyData> newpoly = vtkSmartPointer<vtkPolyData>::New(); newpoly->DeepCopy( transformFilter->GetOutput() ); - append->AddInput( newpoly ); + append->AddInputData( newpoly ); } } } diff --git a/Widgets/Testing/Cxx/TestOrientedGlyphContour.cxx b/Widgets/Testing/Cxx/TestOrientedGlyphContour.cxx index a7f2585b155..fce3f25c68b 100644 --- a/Widgets/Testing/Cxx/TestOrientedGlyphContour.cxx +++ b/Widgets/Testing/Cxx/TestOrientedGlyphContour.cxx @@ -28,6 +28,7 @@ #include "vtkCommand.h" #include "vtkInteractorEventRecorder.h" #include "vtkImageActor.h" +#include "vtkImageMapper3D.h" #include "vtkVolume16Reader.h" #include "vtkImageShiftScale.h" #include "vtkTestUtilities.h" @@ -70,7 +71,7 @@ int TestOrientedGlyphContour( int argc, char *argv[] ) vtkSmartPointer<vtkImageActor> imageActor = vtkSmartPointer<vtkImageActor>::New(); - imageActor->SetInput(shifter->GetOutput()); + imageActor->GetMapper()->SetInputConnection(shifter->GetOutputPort()); imageActor->VisibilityOn(); imageActor->SetDisplayExtent(0, 63, 0, 63, 46, 46); imageActor->InterpolateOn(); diff --git a/Widgets/Testing/Cxx/TestOrthoPlanes.cxx b/Widgets/Testing/Cxx/TestOrthoPlanes.cxx index ffcecfcdbca..354944c04c8 100644 --- a/Widgets/Testing/Cxx/TestOrthoPlanes.cxx +++ b/Widgets/Testing/Cxx/TestOrthoPlanes.cxx @@ -19,6 +19,7 @@ #include "vtkCellPicker.h" #include "vtkCommand.h" #include "vtkImageActor.h" +#include "vtkImageMapper3D.h" #include "vtkImageMapToColors.h" #include "vtkImageOrthoPlanes.h" #include "vtkImagePlaneWidget.h" @@ -498,13 +499,13 @@ int TestOrthoPlanes( int argc, char *argv[] ) colorMap->PassAlphaToOutputOff(); colorMap->SetActiveComponent(0); colorMap->SetOutputFormatToLuminance(); - colorMap->SetInput(planeWidgetZ->GetResliceOutput()); + colorMap->SetInputData(planeWidgetZ->GetResliceOutput()); colorMap->SetLookupTable(planeWidgetX->GetLookupTable()); vtkSmartPointer<vtkImageActor> imageActor = vtkSmartPointer<vtkImageActor>::New(); imageActor->PickableOff(); - imageActor->SetInput(colorMap->GetOutput()); + imageActor->GetMapper()->SetInputConnection(colorMap->GetOutputPort()); // Add the actors // diff --git a/Widgets/Testing/Cxx/TestParallelopipedWidget.cxx b/Widgets/Testing/Cxx/TestParallelopipedWidget.cxx index 4ef7964d847..49f88d5172a 100644 --- a/Widgets/Testing/Cxx/TestParallelopipedWidget.cxx +++ b/Widgets/Testing/Cxx/TestParallelopipedWidget.cxx @@ -56,15 +56,15 @@ int TestParallelopipedWidget(int vtkNotUsed(argc), char *vtkNotUsed(argv)[]) vtkSmartPointer<vtkGlyph3D> glyph = vtkSmartPointer<vtkGlyph3D>::New(); glyph->SetInputConnection(sphere->GetOutputPort()); - glyph->SetSource(cone->GetOutput()); + glyph->SetSourceConnection(cone->GetOutputPort()); glyph->SetVectorModeToUseNormal(); glyph->SetScaleModeToScaleByVector(); glyph->SetScaleFactor(0.25); vtkSmartPointer<vtkAppendPolyData> append = vtkSmartPointer<vtkAppendPolyData>::New(); - append->AddInput(glyph->GetOutput()); - append->AddInput(sphere->GetOutput()); + append->AddInputConnection(glyph->GetOutputPort()); + append->AddInputConnection(sphere->GetOutputPort()); append->Update(); vtkSmartPointer<vtkCubeSource> cube = @@ -99,14 +99,14 @@ int TestParallelopipedWidget(int vtkNotUsed(argc), char *vtkNotUsed(argv)[]) vtkSmartPointer<vtkTransformPolyDataFilter> transformFilter = vtkSmartPointer<vtkTransformPolyDataFilter>::New(); transformFilter->SetTransform(transform); - transformFilter->SetInput(cube->GetOutput()); + transformFilter->SetInputConnection(cube->GetOutputPort()); transformFilter->Update(); vtkSmartPointer<vtkPoints> parallelopipedPoints = vtkSmartPointer<vtkPoints>::New(); parallelopipedPoints->DeepCopy(transformFilter->GetOutput()->GetPoints()); - transformFilter->SetInput(append->GetOutput()); + transformFilter->SetInputConnection(append->GetOutputPort()); transformFilter->Update(); vtkSmartPointer<vtkPolyDataMapper> maceMapper = diff --git a/Widgets/Testing/Cxx/TestPlaneWidget.cxx b/Widgets/Testing/Cxx/TestPlaneWidget.cxx index 7b984d19d04..c1ba3c39b96 100644 --- a/Widgets/Testing/Cxx/TestPlaneWidget.cxx +++ b/Widgets/Testing/Cxx/TestPlaneWidget.cxx @@ -432,12 +432,12 @@ int TestPlaneWidget( int argc, char *argv[] ) vtkSmartPointer<vtkProbeFilter> probe = vtkSmartPointer<vtkProbeFilter>::New(); - probe->SetInput(plane); - probe->SetSource(pl3d_block0); + probe->SetInputData(plane); + probe->SetSourceData(pl3d_block0); vtkSmartPointer<vtkPolyDataMapper> probeMapper = vtkSmartPointer<vtkPolyDataMapper>::New(); - probeMapper->SetInput(probe->GetPolyDataOutput()); + probeMapper->SetInputConnection(probe->GetOutputPort()); double tmp[2]; pl3d_block0->GetScalarRange(tmp); probeMapper->SetScalarRange(tmp[0], tmp[1]); @@ -450,7 +450,7 @@ int TestPlaneWidget( int argc, char *argv[] ) // An outline is shown for context. vtkSmartPointer<vtkStructuredGridOutlineFilter> outline = vtkSmartPointer<vtkStructuredGridOutlineFilter>::New(); - outline->SetInput(pl3d_block0); + outline->SetInputData(pl3d_block0); vtkSmartPointer<vtkPolyDataMapper> outlineMapper = vtkSmartPointer<vtkPolyDataMapper>::New(); diff --git a/Widgets/Testing/Cxx/TestPlaybackWidget.cxx b/Widgets/Testing/Cxx/TestPlaybackWidget.cxx index c11eef3f424..127e59e632e 100644 --- a/Widgets/Testing/Cxx/TestPlaybackWidget.cxx +++ b/Widgets/Testing/Cxx/TestPlaybackWidget.cxx @@ -62,7 +62,7 @@ int TestPlaybackWidget(int vtkNotUsed(argc), char *vtkNotUsed(argv)[]) vtkSmartPointer<vtkSphereSource>::New(); vtkSmartPointer<vtkPolyDataMapper> mapper = vtkSmartPointer<vtkPolyDataMapper>::New(); - mapper->SetInput(ss->GetOutput()); + mapper->SetInputConnection(ss->GetOutputPort()); vtkSmartPointer<vtkActor> actor = vtkSmartPointer<vtkActor>::New(); actor->SetMapper(mapper); diff --git a/Widgets/Testing/Cxx/TestPointWidget.cxx b/Widgets/Testing/Cxx/TestPointWidget.cxx index 0e59b98b2b2..c1f1c6106f4 100644 --- a/Widgets/Testing/Cxx/TestPointWidget.cxx +++ b/Widgets/Testing/Cxx/TestPointWidget.cxx @@ -565,8 +565,8 @@ int TestPointWidget( int argc, char *argv[] ) vtkSmartPointer<vtkProbeFilter> probe = vtkSmartPointer<vtkProbeFilter>::New(); - probe->SetInput(point); - probe->SetSource(pl3d_block0); + probe->SetInputData(point); + probe->SetSourceData(pl3d_block0); // create glyph vtkSmartPointer<vtkConeSource> cone = @@ -576,7 +576,7 @@ int TestPointWidget( int argc, char *argv[] ) vtkSmartPointer<vtkGlyph3D> glyph = vtkSmartPointer<vtkGlyph3D>::New(); glyph->SetInputConnection(probe->GetOutputPort()); - glyph->SetSource(cone->GetOutput()); + glyph->SetSourceConnection(cone->GetOutputPort()); glyph->SetVectorModeToUseVector(); glyph->SetScaleModeToDataScalingOff(); glyph->SetScaleFactor(pl3d_block0->GetLength() * 0.1); @@ -593,7 +593,7 @@ int TestPointWidget( int argc, char *argv[] ) // An outline is shown for context. vtkSmartPointer<vtkStructuredGridOutlineFilter> outline = vtkSmartPointer<vtkStructuredGridOutlineFilter>::New(); - outline->SetInput(pl3d_block0); + outline->SetInputData(pl3d_block0); vtkSmartPointer<vtkPolyDataMapper> outlineMapper = vtkSmartPointer<vtkPolyDataMapper>::New(); diff --git a/Widgets/Testing/Cxx/TestPolyPlane.cxx b/Widgets/Testing/Cxx/TestPolyPlane.cxx index e469b1594d9..c53ac380f43 100644 --- a/Widgets/Testing/Cxx/TestPolyPlane.cxx +++ b/Widgets/Testing/Cxx/TestPolyPlane.cxx @@ -111,7 +111,7 @@ int TestPolyPlane( int argc, char *argv[] ) vtkSmartPointer<vtkImageResample> resample = vtkSmartPointer<vtkImageResample>::New(); - resample->SetInput(demReader->GetOutput()); + resample->SetInputConnection(demReader->GetOutputPort()); resample->SetDimensionality(2); resample->SetAxisMagnificationFactor(0,0.25); resample->SetAxisMagnificationFactor(1,0.25); @@ -120,20 +120,20 @@ int TestPolyPlane( int argc, char *argv[] ) vtkSmartPointer<vtkImageDataGeometryFilter> surface = vtkSmartPointer<vtkImageDataGeometryFilter>::New(); - surface->SetInput(resample->GetOutput()); + surface->SetInputConnection(resample->GetOutputPort()); // Convert to triangle mesh vtkSmartPointer<vtkTriangleFilter> triangleFilter = vtkSmartPointer<vtkTriangleFilter>::New(); - triangleFilter->SetInput( surface->GetOutput() ); + triangleFilter->SetInputConnection( surface->GetOutputPort() ); triangleFilter->Update(); // Warp vtkSmartPointer<vtkWarpScalar> warp = vtkSmartPointer<vtkWarpScalar>::New(); - warp->SetInput(triangleFilter->GetOutput()); + warp->SetInputConnection(triangleFilter->GetOutputPort()); warp->SetScaleFactor(1); warp->UseNormalOn(); warp->SetNormal(0, 0, 1); @@ -173,7 +173,7 @@ int TestPolyPlane( int argc, char *argv[] ) vtkSmartPointer<vtkPolyDataMapper> demMapper = vtkSmartPointer<vtkPolyDataMapper>::New(); - demMapper->SetInput(warp->GetPolyDataOutput()); + demMapper->SetInputConnection(warp->GetOutputPort()); demMapper->SetScalarRange(lo, hi); demMapper->SetLookupTable(lut); @@ -211,7 +211,7 @@ int TestPolyPlane( int argc, char *argv[] ) vtkSmartPointer<vtkCutter> cutter = vtkSmartPointer<vtkCutter>::New(); - cutter->SetInput(warp->GetPolyDataOutput()); + cutter->SetInputConnection(warp->GetOutputPort()); // Callback to update the polyplane when the contour is updated @@ -283,14 +283,14 @@ int TestPolyPlane( int argc, char *argv[] ) cb->Execute(contourWidget,0,NULL); vtkXMLPolyDataWriter *pWriter = vtkXMLPolyDataWriter::New(); - pWriter->SetInput(cutter->GetOutput()); + pWriter->SetInputConnection(cutter->GetOutputPort()); cutter->Update(); pWriter->SetFileName("CutPolyPlane.vtp"); pWriter->Write(); - pWriter->SetInput(warp->GetPolyDataOutput()); + pWriter->SetInputConnection(warp->GetOutputPort()); pWriter->SetFileName("Dataset.vtp"); pWriter->Write(); - pWriter->SetInput(rep->GetContourRepresentationAsPolyData()); + pWriter->SetInputData(rep->GetContourRepresentationAsPolyData()); pWriter->SetFileName("Contour.vtp"); pWriter->Write(); pWriter->Delete(); diff --git a/Widgets/Testing/Cxx/TestPolygonalHandleRepresentations.cxx b/Widgets/Testing/Cxx/TestPolygonalHandleRepresentations.cxx index b083c86918d..168484a19ce 100644 --- a/Widgets/Testing/Cxx/TestPolygonalHandleRepresentations.cxx +++ b/Widgets/Testing/Cxx/TestPolygonalHandleRepresentations.cxx @@ -173,7 +173,7 @@ int TestPolygonalHandleRepresentations(int argc, char*argv[]) vtkSmartPointer<vtkImageResample> resample = vtkSmartPointer<vtkImageResample>::New(); - resample->SetInput(demReader->GetOutput()); + resample->SetInputConnection(demReader->GetOutputPort()); resample->SetDimensionality(2); resample->SetAxisMagnificationFactor(0,1); resample->SetAxisMagnificationFactor(1,1); @@ -181,17 +181,17 @@ int TestPolygonalHandleRepresentations(int argc, char*argv[]) // Extract geometry vtkSmartPointer<vtkImageDataGeometryFilter> surface = vtkSmartPointer<vtkImageDataGeometryFilter>::New(); - surface->SetInput(resample->GetOutput()); + surface->SetInputConnection(resample->GetOutputPort()); // The Dijkistra interpolator will not accept cells that aren't triangles vtkSmartPointer<vtkTriangleFilter> triangleFilter = vtkSmartPointer<vtkTriangleFilter>::New(); - triangleFilter->SetInput( surface->GetOutput() ); + triangleFilter->SetInputConnection( surface->GetOutputPort() ); triangleFilter->Update(); vtkSmartPointer<vtkWarpScalar> warp = vtkSmartPointer<vtkWarpScalar>::New(); - warp->SetInput(triangleFilter->GetOutput()); + warp->SetInputConnection(triangleFilter->GetOutputPort()); warp->SetScaleFactor(1); warp->UseNormalOn(); warp->SetNormal(0, 0, 1); @@ -211,7 +211,7 @@ int TestPolygonalHandleRepresentations(int argc, char*argv[]) vtkSmartPointer<vtkPolyDataNormals> normals = vtkSmartPointer<vtkPolyDataNormals>::New(); - normals->SetInput(warp->GetPolyDataOutput()); + normals->SetInputConnection(warp->GetOutputPort()); normals->SetFeatureAngle(60); normals->SplittingOff(); @@ -223,7 +223,7 @@ int TestPolygonalHandleRepresentations(int argc, char*argv[]) vtkSmartPointer<vtkPolyDataMapper> demMapper = vtkSmartPointer<vtkPolyDataMapper>::New(); - demMapper->SetInput(pd); + demMapper->SetInputConnection(normals->GetOutputPort()); demMapper->SetScalarRange(lo, hi); demMapper->SetLookupTable(lut); diff --git a/Widgets/Testing/Cxx/TestPolygonalRepresentationHandleWidget.cxx b/Widgets/Testing/Cxx/TestPolygonalRepresentationHandleWidget.cxx index f8cf8393a62..e459feea4a6 100644 --- a/Widgets/Testing/Cxx/TestPolygonalRepresentationHandleWidget.cxx +++ b/Widgets/Testing/Cxx/TestPolygonalRepresentationHandleWidget.cxx @@ -68,7 +68,7 @@ int TestPolygonalRepresentationHandleWidget(int argc, char*argv[]) vtkSmartPointer<vtkImageResample> resample = vtkSmartPointer<vtkImageResample>::New(); - resample->SetInput(demReader->GetOutput()); + resample->SetInputConnection(demReader->GetOutputPort()); resample->SetDimensionality(2); resample->SetAxisMagnificationFactor(0,1); resample->SetAxisMagnificationFactor(1,1); @@ -76,17 +76,17 @@ int TestPolygonalRepresentationHandleWidget(int argc, char*argv[]) // Extract geometry vtkSmartPointer<vtkImageDataGeometryFilter> surface = vtkSmartPointer<vtkImageDataGeometryFilter>::New(); - surface->SetInput(resample->GetOutput()); + surface->SetInputConnection(resample->GetOutputPort()); // The Dijkistra interpolator will not accept cells that aren't triangles vtkSmartPointer<vtkTriangleFilter> triangleFilter = vtkSmartPointer<vtkTriangleFilter>::New(); - triangleFilter->SetInput( surface->GetOutput() ); + triangleFilter->SetInputConnection( surface->GetOutputPort() ); triangleFilter->Update(); vtkSmartPointer<vtkWarpScalar> warp = vtkSmartPointer<vtkWarpScalar>::New(); - warp->SetInput(triangleFilter->GetOutput()); + warp->SetInputConnection(triangleFilter->GetOutputPort()); warp->SetScaleFactor(1); warp->UseNormalOn(); warp->SetNormal(0, 0, 1); @@ -118,7 +118,7 @@ int TestPolygonalRepresentationHandleWidget(int argc, char*argv[]) if (distanceOffsetSpecified) { - normals->SetInput(warp->GetPolyDataOutput()); + normals->SetInputConnection(warp->GetOutputPort()); normals->SetFeatureAngle(60); normals->SplittingOff(); @@ -132,7 +132,7 @@ int TestPolygonalRepresentationHandleWidget(int argc, char*argv[]) vtkSmartPointer<vtkPolyDataMapper> demMapper = vtkSmartPointer<vtkPolyDataMapper>::New(); - demMapper->SetInput(pd); + demMapper->SetInputData(pd); demMapper->SetScalarRange(lo, hi); demMapper->SetLookupTable(lut); diff --git a/Widgets/Testing/Cxx/TestProgrammaticPlacement.cxx b/Widgets/Testing/Cxx/TestProgrammaticPlacement.cxx index d269e8d51b6..5464b6dceb0 100644 --- a/Widgets/Testing/Cxx/TestProgrammaticPlacement.cxx +++ b/Widgets/Testing/Cxx/TestProgrammaticPlacement.cxx @@ -64,7 +64,7 @@ int TestProgrammaticPlacement( int argc, char *argv[] ) // VTK_CREATE(vtkSphereSource, ss); VTK_CREATE(vtkPolyDataMapper, mapper); - mapper->SetInput(ss->GetOutput()); + mapper->SetInputConnection(ss->GetOutputPort()); VTK_CREATE(vtkActor, actor); actor->SetMapper(mapper); diff --git a/Widgets/Testing/Cxx/TestRectilinearWipeWidget.cxx b/Widgets/Testing/Cxx/TestRectilinearWipeWidget.cxx index 7aaf53affef..24d23da95ec 100644 --- a/Widgets/Testing/Cxx/TestRectilinearWipeWidget.cxx +++ b/Widgets/Testing/Cxx/TestRectilinearWipeWidget.cxx @@ -24,6 +24,7 @@ #include "vtkImageCanvasSource2D.h" #include "vtkImageRectilinearWipe.h" #include "vtkImageActor.h" +#include "vtkImageMapper3D.h" #include "vtkImageData.h" #include "vtkRenderer.h" #include "vtkRenderWindow.h" @@ -476,7 +477,7 @@ int TestRectilinearWipeWidget( int argc, char *argv[] ) vtkSmartPointer<vtkImageWrapPad> pad1 = vtkSmartPointer<vtkImageWrapPad>::New(); - pad1->SetInput(image1->GetOutput()); + pad1->SetInputConnection(image1->GetOutputPort()); pad1->SetOutputWholeExtent(0,511,0,511,0,0); vtkSmartPointer<vtkImageCanvasSource2D> image2 = @@ -489,19 +490,19 @@ int TestRectilinearWipeWidget( int argc, char *argv[] ) vtkSmartPointer<vtkImageWrapPad> pad2 = vtkSmartPointer<vtkImageWrapPad>::New(); - pad2->SetInput(image2->GetOutput()); + pad2->SetInputConnection(image2->GetOutputPort()); pad2->SetOutputWholeExtent(0,511,0,511,0,0); vtkSmartPointer<vtkImageRectilinearWipe> wipe = vtkSmartPointer<vtkImageRectilinearWipe>::New(); - wipe->SetInput(0,pad1->GetOutput()); - wipe->SetInput(1,pad2->GetOutput()); + wipe->SetInputConnection(0,pad1->GetOutputPort()); + wipe->SetInputConnection(1,pad2->GetOutputPort()); wipe->SetPosition(100,256); wipe->SetWipe(wipeMode); vtkSmartPointer<vtkImageActor> wipeActor = vtkSmartPointer<vtkImageActor>::New(); - wipeActor->SetInput(wipe->GetOutput()); + wipeActor->GetMapper()->SetInputConnection(wipe->GetOutputPort()); // VTK widgets consist of two parts: the widget part that handles // event processing; and the widget representation that defines how diff --git a/Widgets/Testing/Cxx/TestScalarBarWidget.cxx b/Widgets/Testing/Cxx/TestScalarBarWidget.cxx index 92165055d10..6f998af75e2 100644 --- a/Widgets/Testing/Cxx/TestScalarBarWidget.cxx +++ b/Widgets/Testing/Cxx/TestScalarBarWidget.cxx @@ -391,7 +391,7 @@ int TestScalarBarWidget( int argc, char *argv[] ) // An outline is shown for context. vtkSmartPointer<vtkStructuredGridGeometryFilter> outline = vtkSmartPointer<vtkStructuredGridGeometryFilter>::New(); - outline->SetInput(pl3d_block0); + outline->SetInputData(pl3d_block0); outline->SetExtent(0,100,0,100,9,9); vtkSmartPointer<vtkPolyDataMapper> outlineMapper = diff --git a/Widgets/Testing/Cxx/TestSeedWidget.cxx b/Widgets/Testing/Cxx/TestSeedWidget.cxx index fa12a6a90c0..fb9a9679ea4 100644 --- a/Widgets/Testing/Cxx/TestSeedWidget.cxx +++ b/Widgets/Testing/Cxx/TestSeedWidget.cxx @@ -486,7 +486,7 @@ int TestSeedWidget(int vtkNotUsed(argc), char *vtkNotUsed(argv)[]) vtkSmartPointer<vtkSphereSource>::New(); vtkSmartPointer<vtkPolyDataMapper> mapper = vtkSmartPointer<vtkPolyDataMapper>::New(); - mapper->SetInput(ss->GetOutput()); + mapper->SetInputConnection(ss->GetOutputPort()); vtkSmartPointer<vtkActor> actor = vtkSmartPointer<vtkActor>::New(); actor->SetMapper(mapper); diff --git a/Widgets/Testing/Cxx/TestSeedWidget2.cxx b/Widgets/Testing/Cxx/TestSeedWidget2.cxx index 995e6c9cf51..9e5f3e2fec4 100644 --- a/Widgets/Testing/Cxx/TestSeedWidget2.cxx +++ b/Widgets/Testing/Cxx/TestSeedWidget2.cxx @@ -37,6 +37,7 @@ #include "vtkVolume16Reader.h" #include "vtkImageMapToColors.h" #include "vtkImageActor.h" +#include "vtkImageMapper3D.h" #include "vtkLookupTable.h" #include "vtkTestUtilities.h" @@ -100,7 +101,7 @@ int TestSeedWidget2( int argc, char *argv[] ) saggitalColors->SetLookupTable(bwLut); vtkSmartPointer<vtkImageActor> saggital = vtkSmartPointer<vtkImageActor>::New(); - saggital->SetInput(saggitalColors->GetOutput()); + saggital->GetMapper()->SetInputConnection(saggitalColors->GetOutputPort()); saggital->SetDisplayExtent(32,32, 0,63, 0,92); // Create the widget and its representation diff --git a/Widgets/Testing/Cxx/TestSeedWidgetNonUniformRepresentations.cxx b/Widgets/Testing/Cxx/TestSeedWidgetNonUniformRepresentations.cxx index 926c1f02430..7fb33fbf252 100644 --- a/Widgets/Testing/Cxx/TestSeedWidgetNonUniformRepresentations.cxx +++ b/Widgets/Testing/Cxx/TestSeedWidgetNonUniformRepresentations.cxx @@ -82,7 +82,7 @@ int TestSeedWidgetNonUniformRepresentations(int vtkNotUsed(argc), char *vtkNotUs renWin->AddRenderer(ren); iren->SetRenderWindow(renWin); - mapper->SetInput(ss->GetOutput()); + mapper->SetInputConnection(ss->GetOutputPort()); actor->SetMapper(mapper); ren->AddActor(actor); ren->SetBackground(0.1, 0.2, 0.4); diff --git a/Widgets/Testing/Cxx/TestSliderWidget.cxx b/Widgets/Testing/Cxx/TestSliderWidget.cxx index 711504ebc2e..669f7b297a5 100644 --- a/Widgets/Testing/Cxx/TestSliderWidget.cxx +++ b/Widgets/Testing/Cxx/TestSliderWidget.cxx @@ -526,8 +526,8 @@ int TestSliderWidget(int vtkNotUsed(argc), char *vtkNotUsed(argv)[]) vtkSmartPointer<vtkConeSource>::New(); vtkSmartPointer<vtkGlyph3D> glyph = vtkSmartPointer<vtkGlyph3D>::New(); - glyph->SetInput(sphereSource->GetOutput()); - glyph->SetSource(cone->GetOutput()); + glyph->SetInputConnection(sphereSource->GetOutputPort()); + glyph->SetSourceConnection(cone->GetOutputPort()); glyph->SetVectorModeToUseNormal(); glyph->SetScaleModeToScaleByVector(); glyph->SetScaleFactor(0.25); @@ -536,12 +536,12 @@ int TestSliderWidget(int vtkNotUsed(argc), char *vtkNotUsed(argv)[]) // This just makes things simpler to manage. vtkSmartPointer<vtkAppendPolyData> apd = vtkSmartPointer<vtkAppendPolyData>::New(); - apd->AddInput(glyph->GetOutput()); - apd->AddInput(sphereSource->GetOutput()); + apd->AddInputConnection(glyph->GetOutputPort()); + apd->AddInputConnection(sphereSource->GetOutputPort()); vtkSmartPointer<vtkPolyDataMapper> maceMapper = vtkSmartPointer<vtkPolyDataMapper>::New(); - maceMapper->SetInput(apd->GetOutput()); + maceMapper->SetInputConnection(apd->GetOutputPort()); vtkSmartPointer<vtkLODActor> maceActor = vtkSmartPointer<vtkLODActor>::New(); diff --git a/Widgets/Testing/Cxx/TestSliderWidget2D.cxx b/Widgets/Testing/Cxx/TestSliderWidget2D.cxx index 29895354f35..52df86bee53 100644 --- a/Widgets/Testing/Cxx/TestSliderWidget2D.cxx +++ b/Widgets/Testing/Cxx/TestSliderWidget2D.cxx @@ -526,8 +526,8 @@ int TestSliderWidget2D(int vtkNotUsed(argc), char *vtkNotUsed(argv)[]) vtkSmartPointer<vtkConeSource>::New(); vtkSmartPointer<vtkGlyph3D> glyph = vtkSmartPointer<vtkGlyph3D>::New(); - glyph->SetInput(sphereSource->GetOutput()); - glyph->SetSource(cone->GetOutput()); + glyph->SetInputConnection(sphereSource->GetOutputPort()); + glyph->SetSourceConnection(cone->GetOutputPort()); glyph->SetVectorModeToUseNormal(); glyph->SetScaleModeToScaleByVector(); glyph->SetScaleFactor(0.25); @@ -536,12 +536,12 @@ int TestSliderWidget2D(int vtkNotUsed(argc), char *vtkNotUsed(argv)[]) // This just makes things simpler to manage. vtkSmartPointer<vtkAppendPolyData> apd = vtkSmartPointer<vtkAppendPolyData>::New(); - apd->AddInput(glyph->GetOutput()); - apd->AddInput(sphereSource->GetOutput()); + apd->AddInputConnection(glyph->GetOutputPort()); + apd->AddInputConnection(sphereSource->GetOutputPort()); vtkSmartPointer<vtkPolyDataMapper> maceMapper = vtkSmartPointer<vtkPolyDataMapper>::New(); - maceMapper->SetInput(apd->GetOutput()); + maceMapper->SetInputConnection(apd->GetOutputPort()); vtkSmartPointer<vtkLODActor> maceActor = vtkSmartPointer<vtkLODActor>::New(); diff --git a/Widgets/Testing/Cxx/TestSphereHandleWidget.cxx b/Widgets/Testing/Cxx/TestSphereHandleWidget.cxx index f7495864a5c..21485d78037 100644 --- a/Widgets/Testing/Cxx/TestSphereHandleWidget.cxx +++ b/Widgets/Testing/Cxx/TestSphereHandleWidget.cxx @@ -43,6 +43,8 @@ #include "vtkTestUtilities.h" #include "vtkTesting.h" +#include "vtkDataSetWriter.h" + char TestSphereHandleWidgetEventLog[] = "# StreamVersion 1\n" "MouseMoveEvent 181 152 0 0 0 0 0\n" @@ -253,7 +255,7 @@ int TestSphereHandleWidget(int argc, char*argv[]) vtkSmartPointer<vtkImageResample> resample = vtkSmartPointer<vtkImageResample>::New(); - resample->SetInput(demReader->GetOutput()); + resample->SetInputConnection(demReader->GetOutputPort()); resample->SetDimensionality(2); resample->SetAxisMagnificationFactor(0,1); resample->SetAxisMagnificationFactor(1,1); @@ -261,22 +263,30 @@ int TestSphereHandleWidget(int argc, char*argv[]) // Extract geometry vtkSmartPointer<vtkImageDataGeometryFilter> surface = vtkSmartPointer<vtkImageDataGeometryFilter>::New(); - surface->SetInput(resample->GetOutput()); + surface->SetInputConnection(resample->GetOutputPort()); // The Dijkistra interpolator will not accept cells that aren't triangles vtkSmartPointer<vtkTriangleFilter> triangleFilter = vtkSmartPointer<vtkTriangleFilter>::New(); - triangleFilter->SetInput( surface->GetOutput() ); + triangleFilter->SetInputConnection( surface->GetOutputPort() ); triangleFilter->Update(); vtkSmartPointer<vtkWarpScalar> warp = vtkSmartPointer<vtkWarpScalar>::New(); - warp->SetInput(triangleFilter->GetOutput()); + warp->SetInputConnection(triangleFilter->GetOutputPort()); warp->SetScaleFactor(1); warp->UseNormalOn(); warp->SetNormal(0, 0, 1); warp->Update(); + // cout << warp->GetOutput()->GetNumberOfCells() << endl; + + // vtkSmartPointer<vtkDataSetWriter> writer = + // vtkSmartPointer<vtkDataSetWriter>::New(); + // writer->SetInputConnection(resample->GetOutputPort()); + // writer->SetFileName("foo.vtk"); + // writer->Write(); + // Define a LUT mapping for the height field double lo = demReader->GetOutput()->GetScalarRange()[0]; @@ -293,7 +303,7 @@ int TestSphereHandleWidget(int argc, char*argv[]) vtkSmartPointer<vtkPolyDataMapper> demMapper = vtkSmartPointer<vtkPolyDataMapper>::New(); - demMapper->SetInput(warp->GetPolyDataOutput()); + demMapper->SetInputConnection(warp->GetOutputPort()); demMapper->SetScalarRange(lo, hi); demMapper->SetLookupTable(lut); @@ -326,7 +336,7 @@ int TestSphereHandleWidget(int argc, char*argv[]) vtkSmartPointer<vtkHandleWidget> widget = vtkSmartPointer<vtkHandleWidget>::New(); - widget->SetInteractor(iren); + //widget->SetInteractor(iren); vtkSmartPointer<vtkSphereHandleRepresentation> rep = vtkSmartPointer<vtkSphereHandleRepresentation>::New(); widget->SetRepresentation( rep ); @@ -346,7 +356,7 @@ int TestSphereHandleWidget(int argc, char*argv[]) renWin->Render(); iren->Initialize(); - widget->EnabledOn(); + //widget->EnabledOn(); renWin->Render(); ren1->ResetCamera(); ren1->ResetCameraClippingRange(); diff --git a/Widgets/Testing/Cxx/TestSplineWidget.cxx b/Widgets/Testing/Cxx/TestSplineWidget.cxx index feb78d563a6..a6bb8056175 100644 --- a/Widgets/Testing/Cxx/TestSplineWidget.cxx +++ b/Widgets/Testing/Cxx/TestSplineWidget.cxx @@ -266,8 +266,8 @@ int TestSplineWidget( int argc, char *argv[] ) vtkSmartPointer<vtkProbeFilter> probe = vtkSmartPointer<vtkProbeFilter>::New(); - probe->SetInput(poly); - probe->SetSource(v16->GetOutput()); + probe->SetInputData(poly); + probe->SetSourceConnection(v16->GetOutputPort()); vtkSmartPointer<vtkIPWCallback> ipwcb = vtkSmartPointer<vtkIPWCallback>::New(); diff --git a/Widgets/Testing/Cxx/TestSurfaceConstrainedHandleWidget.cxx b/Widgets/Testing/Cxx/TestSurfaceConstrainedHandleWidget.cxx index 3b19250e64c..010832044e4 100644 --- a/Widgets/Testing/Cxx/TestSurfaceConstrainedHandleWidget.cxx +++ b/Widgets/Testing/Cxx/TestSurfaceConstrainedHandleWidget.cxx @@ -66,7 +66,7 @@ int TestSurfaceConstrainedHandleWidget(int argc, char*argv[]) vtkSmartPointer<vtkImageResample> resample = vtkSmartPointer<vtkImageResample>::New(); - resample->SetInput(demReader->GetOutput()); + resample->SetInputConnection(demReader->GetOutputPort()); resample->SetDimensionality(2); resample->SetAxisMagnificationFactor(0,1.0); resample->SetAxisMagnificationFactor(1,1.0); @@ -74,17 +74,17 @@ int TestSurfaceConstrainedHandleWidget(int argc, char*argv[]) // Extract geometry vtkSmartPointer<vtkImageDataGeometryFilter> surface = vtkSmartPointer<vtkImageDataGeometryFilter>::New(); - surface->SetInput(resample->GetOutput()); + surface->SetInputConnection(resample->GetOutputPort()); // The Dijkistra interpolator will not accept cells that aren't triangles vtkSmartPointer<vtkTriangleFilter> triangleFilter = vtkSmartPointer<vtkTriangleFilter>::New(); - triangleFilter->SetInput( surface->GetOutput() ); + triangleFilter->SetInputConnection( surface->GetOutputPort() ); triangleFilter->Update(); vtkSmartPointer<vtkWarpScalar> warp = vtkSmartPointer<vtkWarpScalar>::New(); - warp->SetInput(triangleFilter->GetOutput()); + warp->SetInputConnection(triangleFilter->GetOutputPort()); warp->SetScaleFactor(1); warp->UseNormalOn(); warp->SetNormal(0, 0, 1); @@ -116,7 +116,7 @@ int TestSurfaceConstrainedHandleWidget(int argc, char*argv[]) if (distanceOffsetSpecified) { - normals->SetInput(warp->GetPolyDataOutput()); + normals->SetInputConnection(warp->GetOutputPort()); normals->SetFeatureAngle(60); normals->SplittingOff(); @@ -130,7 +130,7 @@ int TestSurfaceConstrainedHandleWidget(int argc, char*argv[]) vtkSmartPointer<vtkPolyDataMapper> demMapper = vtkSmartPointer<vtkPolyDataMapper>::New(); - demMapper->SetInput(pd); + demMapper->SetInputData(pd); demMapper->SetScalarRange(lo, hi); demMapper->SetLookupTable(lut); diff --git a/Widgets/Testing/Cxx/TestTextWidget.cxx b/Widgets/Testing/Cxx/TestTextWidget.cxx index 823887557a2..8e2338e5bfa 100644 --- a/Widgets/Testing/Cxx/TestTextWidget.cxx +++ b/Widgets/Testing/Cxx/TestTextWidget.cxx @@ -53,7 +53,7 @@ int TestTextWidget(int vtkNotUsed(argc), char *vtkNotUsed(argv)[]) vtkSmartPointer<vtkSphereSource>::New(); vtkSmartPointer<vtkPolyDataMapper> mapper = vtkSmartPointer<vtkPolyDataMapper>::New(); - mapper->SetInput(ss->GetOutput()); + mapper->SetInputConnection(ss->GetOutputPort()); vtkSmartPointer<vtkActor> actor = vtkSmartPointer<vtkActor>::New(); actor->SetMapper(mapper); diff --git a/Widgets/vtkAbstractPolygonalHandleRepresentation3D.cxx b/Widgets/vtkAbstractPolygonalHandleRepresentation3D.cxx index a11d0133d33..ff28475def2 100644 --- a/Widgets/vtkAbstractPolygonalHandleRepresentation3D.cxx +++ b/Widgets/vtkAbstractPolygonalHandleRepresentation3D.cxx @@ -61,7 +61,8 @@ vtkAbstractPolygonalHandleRepresentation3D this->Mapper = vtkPolyDataMapper::New(); this->Mapper->ScalarVisibilityOff(); - this->Mapper->SetInput(this->HandleTransformFilter->GetOutput()); + this->Mapper->SetInputConnection( + this->HandleTransformFilter->GetOutputPort()); // Set up the initial properties this->CreateDefaultProperties(); @@ -89,7 +90,8 @@ vtkAbstractPolygonalHandleRepresentation3D this->LabelTextInput = vtkVectorText::New(); this->LabelTextInput->SetText( "0" ); this->LabelTextMapper = vtkPolyDataMapper::New(); - this->LabelTextMapper->SetInput( this->LabelTextInput->GetOutput() ); + this->LabelTextMapper->SetInputConnection( + this->LabelTextInput->GetOutputPort()); this->LabelTextActor = vtkFollower::New(); this->LabelTextActor->SetMapper(this->LabelTextMapper); this->LabelTextActor->GetProperty()->SetColor( 1.0, 0.1, 0.0 ); @@ -115,7 +117,7 @@ vtkAbstractPolygonalHandleRepresentation3D //---------------------------------------------------------------------- void vtkAbstractPolygonalHandleRepresentation3D::SetHandle( vtkPolyData * pd ) { - this->HandleTransformFilter->SetInput( pd ); + this->HandleTransformFilter->SetInputData( pd ); } //---------------------------------------------------------------------- @@ -616,8 +618,8 @@ void vtkAbstractPolygonalHandleRepresentation3D::ShallowCopy(vtkProp *prop) this->Actor->SetProperty(this->Property); // copy the handle shape - this->HandleTransformFilter->SetInput( - rep->HandleTransformFilter->GetInput()); + this->HandleTransformFilter->SetInputConnection( + rep->HandleTransformFilter->GetInputConnection(0, 0)); this->LabelVisibility = rep->LabelVisibility; this->SetLabelText( rep->GetLabelText() ); @@ -639,7 +641,7 @@ void vtkAbstractPolygonalHandleRepresentation3D::DeepCopy(vtkProp *prop) // copy the handle shape vtkPolyData *pd = vtkPolyData::New(); pd->DeepCopy( rep->HandleTransformFilter->GetInput() ); - this->HandleTransformFilter->SetInput(pd); + this->HandleTransformFilter->SetInputData(pd); pd->Delete(); this->LabelVisibility = rep->LabelVisibility; diff --git a/Widgets/vtkAffineRepresentation2D.cxx b/Widgets/vtkAffineRepresentation2D.cxx index 4a4ee7bd35d..525abe352ec 100644 --- a/Widgets/vtkAffineRepresentation2D.cxx +++ b/Widgets/vtkAffineRepresentation2D.cxx @@ -92,7 +92,7 @@ vtkAffineRepresentation2D::vtkAffineRepresentation2D() this->Box->SetPoints(this->BoxPoints); this->Box->SetLines(this->BoxCellArray); this->BoxMapper = vtkPolyDataMapper2D::New(); - this->BoxMapper->SetInput(this->Box); + this->BoxMapper->SetInputData(this->Box); this->BoxActor = vtkActor2D::New(); this->BoxActor->SetMapper(this->BoxMapper); this->BoxActor->SetProperty(this->Property); @@ -111,7 +111,7 @@ vtkAffineRepresentation2D::vtkAffineRepresentation2D() this->HBox->SetPoints(this->HBoxPoints); this->HBox->SetLines(this->HBoxCellArray); this->HBoxMapper = vtkPolyDataMapper2D::New(); - this->HBoxMapper->SetInput(this->HBox); + this->HBoxMapper->SetInputData(this->HBox); this->HBoxActor = vtkActor2D::New(); this->HBoxActor->SetMapper(this->HBoxMapper); this->HBoxActor->VisibilityOff(); @@ -126,7 +126,7 @@ vtkAffineRepresentation2D::vtkAffineRepresentation2D() this->Circle->SetPoints(this->CirclePoints); this->Circle->SetLines(this->CircleCellArray); this->CircleMapper = vtkPolyDataMapper2D::New(); - this->CircleMapper->SetInput(this->Circle); + this->CircleMapper->SetInputData(this->Circle); this->CircleActor = vtkActor2D::New(); this->CircleActor->SetMapper(this->CircleMapper); this->CircleActor->SetProperty(this->Property); @@ -138,7 +138,7 @@ vtkAffineRepresentation2D::vtkAffineRepresentation2D() this->HCircle->SetPoints(this->HCirclePoints); this->HCircle->SetLines(this->HCircleCellArray); this->HCircleMapper = vtkPolyDataMapper2D::New(); - this->HCircleMapper->SetInput(this->HCircle); + this->HCircleMapper->SetInputData(this->HCircle); this->HCircleActor = vtkActor2D::New(); this->HCircleActor->SetMapper(this->HCircleMapper); this->HCircleActor->VisibilityOff(); diff --git a/Widgets/vtkAngleRepresentation3D.cxx b/Widgets/vtkAngleRepresentation3D.cxx index bd30e9f85e4..ffddc869cc5 100644 --- a/Widgets/vtkAngleRepresentation3D.cxx +++ b/Widgets/vtkAngleRepresentation3D.cxx @@ -45,7 +45,8 @@ vtkAngleRepresentation3D::vtkAngleRepresentation3D() this->Line1Source = vtkLineSource::New(); this->Line1Source->SetResolution(5); this->Line1Mapper = vtkPolyDataMapper::New(); - this->Line1Mapper->SetInput(this->Line1Source->GetOutput()); + this->Line1Mapper->SetInputConnection( + this->Line1Source->GetOutputPort()); this->Ray1 = vtkActor::New(); this->Ray1->SetMapper(this->Line1Mapper); this->Ray1->GetProperty()->SetColor( 1.0, 0.0, 0.0 ); @@ -54,7 +55,8 @@ vtkAngleRepresentation3D::vtkAngleRepresentation3D() this->Line2Source = vtkLineSource::New(); this->Line2Source->SetResolution(5); this->Line2Mapper = vtkPolyDataMapper::New(); - this->Line2Mapper->SetInput(this->Line2Source->GetOutput()); + this->Line2Mapper->SetInputConnection( + this->Line2Source->GetOutputPort()); this->Ray2 = vtkActor::New(); this->Ray2->SetMapper(this->Line2Mapper); this->Ray2->GetProperty()->SetColor( 1.0, 0.0, 0.0 ); @@ -63,7 +65,8 @@ vtkAngleRepresentation3D::vtkAngleRepresentation3D() this->ArcSource = vtkArcSource::New(); this->ArcSource->SetResolution(30); this->ArcMapper = vtkPolyDataMapper::New(); - this->ArcMapper->SetInput(this->ArcSource->GetOutput()); + this->ArcMapper->SetInputConnection( + this->ArcSource->GetOutputPort()); this->Arc = vtkActor::New(); this->Arc->SetMapper(this->ArcMapper); this->Arc->GetProperty()->SetColor( 1.0, 0.1, 0.0 ); @@ -71,7 +74,8 @@ vtkAngleRepresentation3D::vtkAngleRepresentation3D() this->TextInput = vtkVectorText::New(); this->TextInput->SetText( "0" ); this->TextMapper = vtkPolyDataMapper::New(); - this->TextMapper->SetInput( this->TextInput->GetOutput() ); + this->TextMapper->SetInputConnection( + this->TextInput->GetOutputPort()); this->TextActor = vtkFollower::New(); this->TextActor->SetMapper(this->TextMapper); this->TextActor->GetProperty()->SetColor( 1.0, 0.1, 0.0 ); diff --git a/Widgets/vtkAxesTransformRepresentation.cxx b/Widgets/vtkAxesTransformRepresentation.cxx index f4cee60b80f..d0427deee3a 100644 --- a/Widgets/vtkAxesTransformRepresentation.cxx +++ b/Widgets/vtkAxesTransformRepresentation.cxx @@ -61,7 +61,7 @@ vtkAxesTransformRepresentation::vtkAxesTransformRepresentation() line->InsertCellPoint(1); this->LinePolyData->SetLines(line); this->LineMapper = vtkPolyDataMapper::New(); - this->LineMapper->SetInput(this->LinePolyData); + this->LineMapper->SetInputData(this->LinePolyData); this->LineActor = vtkActor::New(); this->LineActor->SetMapper(this->LineMapper); @@ -90,7 +90,7 @@ vtkAxesTransformRepresentation::vtkAxesTransformRepresentation() this->GlyphXForm->SetTransform(xform); xform->RotateZ(90); this->Glyph3D = vtkGlyph3D::New(); - this->Glyph3D->SetInput(this->GlyphPolyData); + this->Glyph3D->SetInputData(this->GlyphPolyData); this->Glyph3D->SetSourceConnection(this->GlyphXForm->GetOutputPort()); this->Glyph3D->SetScaleModeToDataScalingOff(); this->GlyphMapper = vtkPolyDataMapper::New(); diff --git a/Widgets/vtkBalloonRepresentation.cxx b/Widgets/vtkBalloonRepresentation.cxx index 424b563da93..154f7e42041 100644 --- a/Widgets/vtkBalloonRepresentation.cxx +++ b/Widgets/vtkBalloonRepresentation.cxx @@ -83,7 +83,7 @@ vtkBalloonRepresentation::vtkBalloonRepresentation() this->TexturePolyData->GetPointData()->SetTCoords(tc); tc->Delete(); this->TextureMapper = vtkPolyDataMapper2D::New(); - this->TextureMapper->SetInput(this->TexturePolyData); + this->TextureMapper->SetInputData(this->TexturePolyData); this->TextureActor = vtkActor2D::New(); this->TextureActor->SetMapper(this->TextureMapper); this->ImageProperty = vtkProperty2D::New(); @@ -119,7 +119,7 @@ vtkBalloonRepresentation::vtkBalloonRepresentation() this->FramePolyData->SetPoints(this->FramePoints); this->FramePolyData->SetPolys(this->FramePolygon); this->FrameMapper = vtkPolyDataMapper2D::New(); - this->FrameMapper->SetInput(this->FramePolyData); + this->FrameMapper->SetInputData(this->FramePolyData); this->FrameActor = vtkActor2D::New(); this->FrameActor->SetMapper(this->FrameMapper); this->FrameProperty = vtkProperty2D::New(); @@ -368,7 +368,7 @@ void vtkBalloonRepresentation::BuildRepresentation() // Place the texture if ( this->ImageVisible ) { - this->Texture->SetInput(this->BalloonImage); + this->Texture->SetInputData(this->BalloonImage); this->TexturePoints->SetPoint(0, e[0]+io[0],e[1]+io[1],0.0); this->TexturePoints->SetPoint(1, e[0]+io[0]+imageSize[0],e[1]+io[1],0.0); this->TexturePoints->SetPoint(2, e[0]+io[0]+imageSize[0],e[1]+io[1]+imageSize[1],0.0); diff --git a/Widgets/vtkBiDimensionalRepresentation2D.cxx b/Widgets/vtkBiDimensionalRepresentation2D.cxx index 8a49cb9c369..56b11fa6189 100644 --- a/Widgets/vtkBiDimensionalRepresentation2D.cxx +++ b/Widgets/vtkBiDimensionalRepresentation2D.cxx @@ -54,7 +54,7 @@ vtkBiDimensionalRepresentation2D::vtkBiDimensionalRepresentation2D() : vtkBiDime this->LinePolyData->SetPoints(this->LinePoints); this->LinePolyData->SetLines(this->LineCells); this->LineMapper = vtkPolyDataMapper2D::New(); - this->LineMapper->SetInput(this->LinePolyData); + this->LineMapper->SetInputData(this->LinePolyData); this->LineProperty = vtkProperty2D::New(); this->LineActor = vtkActor2D::New(); this->LineActor->SetProperty(this->LineProperty); diff --git a/Widgets/vtkBorderRepresentation.cxx b/Widgets/vtkBorderRepresentation.cxx index 0eda541aff8..9197c9c87e3 100644 --- a/Widgets/vtkBorderRepresentation.cxx +++ b/Widgets/vtkBorderRepresentation.cxx @@ -74,10 +74,11 @@ vtkBorderRepresentation::vtkBorderRepresentation() this->BWTransform = vtkTransform::New(); this->BWTransformFilter = vtkTransformPolyDataFilter::New(); this->BWTransformFilter->SetTransform(this->BWTransform); - this->BWTransformFilter->SetInput(this->BWPolyData); + this->BWTransformFilter->SetInputData(this->BWPolyData); this->BWMapper = vtkPolyDataMapper2D::New(); - this->BWMapper->SetInput(this->BWTransformFilter->GetOutput()); + this->BWMapper->SetInputConnection( + this->BWTransformFilter->GetOutputPort()); this->BWActor = vtkActor2D::New(); this->BWActor->SetMapper(this->BWMapper); diff --git a/Widgets/vtkBoxRepresentation.cxx b/Widgets/vtkBoxRepresentation.cxx index 3b217721b6e..c19aac6eaa9 100644 --- a/Widgets/vtkBoxRepresentation.cxx +++ b/Widgets/vtkBoxRepresentation.cxx @@ -60,7 +60,7 @@ vtkBoxRepresentation::vtkBoxRepresentation() // Construct the poly data representing the hex this->HexPolyData = vtkPolyData::New(); this->HexMapper = vtkPolyDataMapper::New(); - this->HexMapper->SetInput(HexPolyData); + this->HexMapper->SetInputData(HexPolyData); this->HexActor = vtkActor::New(); this->HexActor->SetMapper(this->HexMapper); this->HexActor->SetProperty(this->OutlineProperty); @@ -100,7 +100,7 @@ vtkBoxRepresentation::vtkBoxRepresentation() this->HexFacePolyData->SetPoints(this->Points); this->HexFacePolyData->SetPolys(cells); this->HexFaceMapper = vtkPolyDataMapper::New(); - this->HexFaceMapper->SetInput(HexFacePolyData); + this->HexFaceMapper->SetInputData(HexFacePolyData); this->HexFace = vtkActor::New(); this->HexFace->SetMapper(this->HexFaceMapper); this->HexFace->SetProperty(this->FaceProperty); @@ -110,7 +110,7 @@ vtkBoxRepresentation::vtkBoxRepresentation() this->OutlinePolyData = vtkPolyData::New(); this->OutlinePolyData->SetPoints(this->Points); this->OutlineMapper = vtkPolyDataMapper::New(); - this->OutlineMapper->SetInput(this->OutlinePolyData); + this->OutlineMapper->SetInputData(this->OutlinePolyData); this->HexOutline = vtkActor::New(); this->HexOutline->SetMapper(this->OutlineMapper); this->HexOutline->SetProperty(this->OutlineProperty); @@ -132,7 +132,8 @@ vtkBoxRepresentation::vtkBoxRepresentation() this->HandleGeometry[i]->SetThetaResolution(16); this->HandleGeometry[i]->SetPhiResolution(8); this->HandleMapper[i] = vtkPolyDataMapper::New(); - this->HandleMapper[i]->SetInput(this->HandleGeometry[i]->GetOutput()); + this->HandleMapper[i]->SetInputConnection( + this->HandleGeometry[i]->GetOutputPort()); this->Handle[i] = vtkActor::New(); this->Handle[i]->SetMapper(this->HandleMapper[i]); } diff --git a/Widgets/vtkBoxWidget.cxx b/Widgets/vtkBoxWidget.cxx index 882d5293288..0419065f4ac 100644 --- a/Widgets/vtkBoxWidget.cxx +++ b/Widgets/vtkBoxWidget.cxx @@ -57,7 +57,7 @@ vtkBoxWidget::vtkBoxWidget() // Construct the poly data representing the hex this->HexPolyData = vtkPolyData::New(); this->HexMapper = vtkPolyDataMapper::New(); - this->HexMapper->SetInput(HexPolyData); + this->HexMapper->SetInputData(HexPolyData); this->HexActor = vtkActor::New(); this->HexActor->SetMapper(this->HexMapper); @@ -95,7 +95,7 @@ vtkBoxWidget::vtkBoxWidget() this->HexFacePolyData->SetPoints(this->Points); this->HexFacePolyData->SetPolys(cells); this->HexFaceMapper = vtkPolyDataMapper::New(); - this->HexFaceMapper->SetInput(HexFacePolyData); + this->HexFaceMapper->SetInputData(HexFacePolyData); this->HexFace = vtkActor::New(); this->HexFace->SetMapper(this->HexFaceMapper); cells->Delete(); @@ -104,7 +104,7 @@ vtkBoxWidget::vtkBoxWidget() this->OutlinePolyData = vtkPolyData::New(); this->OutlinePolyData->SetPoints(this->Points); this->OutlineMapper = vtkPolyDataMapper::New(); - this->OutlineMapper->SetInput(this->OutlinePolyData); + this->OutlineMapper->SetInputData(this->OutlinePolyData); this->HexOutline = vtkActor::New(); this->HexOutline->SetMapper(this->OutlineMapper); cells = vtkCellArray::New(); @@ -128,7 +128,8 @@ vtkBoxWidget::vtkBoxWidget() this->HandleGeometry[i]->SetThetaResolution(16); this->HandleGeometry[i]->SetPhiResolution(8); this->HandleMapper[i] = vtkPolyDataMapper::New(); - this->HandleMapper[i]->SetInput(this->HandleGeometry[i]->GetOutput()); + this->HandleMapper[i]->SetInputConnection( + this->HandleGeometry[i]->GetOutputPort()); this->Handle[i] = vtkActor::New(); this->Handle[i]->SetMapper(this->HandleMapper[i]); } diff --git a/Widgets/vtkCameraRepresentation.cxx b/Widgets/vtkCameraRepresentation.cxx index e4384494bef..1557e1bb6ab 100644 --- a/Widgets/vtkCameraRepresentation.cxx +++ b/Widgets/vtkCameraRepresentation.cxx @@ -114,10 +114,11 @@ vtkCameraRepresentation::vtkCameraRepresentation() this->TransformFilter = vtkTransformPolyDataFilter::New(); this->TransformFilter->SetTransform(this->BWTransform); - this->TransformFilter->SetInput(this->PolyData); + this->TransformFilter->SetInputData(this->PolyData); this->Mapper = vtkPolyDataMapper2D::New(); - this->Mapper->SetInput(this->TransformFilter->GetOutput()); + this->Mapper->SetInputConnection( + this->TransformFilter->GetOutputPort()); this->Property = vtkProperty2D::New(); this->Actor = vtkActor2D::New(); this->Actor->SetMapper(this->Mapper); diff --git a/Widgets/vtkCenteredSliderRepresentation.cxx b/Widgets/vtkCenteredSliderRepresentation.cxx index 9ccc0997c6c..1545e241527 100644 --- a/Widgets/vtkCenteredSliderRepresentation.cxx +++ b/Widgets/vtkCenteredSliderRepresentation.cxx @@ -74,11 +74,12 @@ vtkCenteredSliderRepresentation::vtkCenteredSliderRepresentation() this->BuildTube(); this->TubeXForm = vtkTransformPolyDataFilter::New(); - this->TubeXForm->SetInput(this->Tube); + this->TubeXForm->SetInputData(this->Tube); this->TubeXForm->SetTransform(this->XForm); this->TubeMapper = vtkPolyDataMapper2D::New(); - this->TubeMapper->SetInput(this->TubeXForm->GetOutput()); + this->TubeMapper->SetInputConnection( + this->TubeXForm->GetOutputPort()); this->TubeProperty = vtkProperty2D::New(); this->TubeProperty->SetOpacity(0.6); @@ -102,11 +103,12 @@ vtkCenteredSliderRepresentation::vtkCenteredSliderRepresentation() this->Slider->SetPolys(this->SliderCells); this->SliderXForm = vtkTransformPolyDataFilter::New(); - this->SliderXForm->SetInput(this->Slider); + this->SliderXForm->SetInputData(this->Slider); this->SliderXForm->SetTransform(XForm); this->SliderMapper = vtkPolyDataMapper2D::New(); - this->SliderMapper->SetInput(this->SliderXForm->GetOutput()); + this->SliderMapper->SetInputConnection( + this->SliderXForm->GetOutputPort()); this->SliderProperty = vtkProperty2D::New(); this->SliderProperty->SetColor(1,1,1); diff --git a/Widgets/vtkConstrainedPointHandleRepresentation.cxx b/Widgets/vtkConstrainedPointHandleRepresentation.cxx index d5c6de927ae..8e7e391abe3 100644 --- a/Widgets/vtkConstrainedPointHandleRepresentation.cxx +++ b/Widgets/vtkConstrainedPointHandleRepresentation.cxx @@ -78,7 +78,7 @@ vtkConstrainedPointHandleRepresentation::vtkConstrainedPointHandleRepresentation normals->Delete(); this->Glypher = vtkGlyph3D::New(); - this->Glypher->SetInput(this->FocalData); + this->Glypher->SetInputData(this->FocalData); this->Glypher->SetVectorModeToUseNormal(); this->Glypher->OrientOn(); this->Glypher->ScalingOn(); @@ -119,7 +119,8 @@ vtkConstrainedPointHandleRepresentation::vtkConstrainedPointHandleRepresentation t->Delete(); this->Mapper = vtkPolyDataMapper::New(); - this->Mapper->SetInput(this->Glypher->GetOutput()); + this->Mapper->SetInputConnection( + this->Glypher->GetOutputPort()); this->Mapper->SetResolveCoincidentTopologyToPolygonOffset(); this->Mapper->ScalarVisibilityOff(); @@ -199,7 +200,7 @@ void vtkConstrainedPointHandleRepresentation::SetCursorShape(vtkPolyData *shape) if ( this->CursorShape ) { this->CursorShape->Register(this); - this->Glypher->SetSource(this->CursorShape); + this->Glypher->SetSourceData(this->CursorShape); } this->Modified(); } @@ -376,7 +377,7 @@ int vtkConstrainedPointHandleRepresentation::ComputeInteractionState( if ( vtkMath::Distance2BetweenPoints(xyz,pos) <= tol2 ) { this->InteractionState = vtkHandleRepresentation::Nearby; - this->Glypher->SetSource(this->ActiveCursorShape); + this->Glypher->SetSourceData(this->ActiveCursorShape); this->Actor->SetProperty( this->ActiveProperty ); if ( !this->ActiveCursorShape ) { @@ -386,7 +387,7 @@ int vtkConstrainedPointHandleRepresentation::ComputeInteractionState( else { this->InteractionState = vtkHandleRepresentation::Outside; - this->Glypher->SetSource(this->CursorShape); + this->Glypher->SetSourceData(this->CursorShape); this->Actor->SetProperty( this->Property ); if ( !this->CursorShape ) { diff --git a/Widgets/vtkDijkstraImageContourLineInterpolator.cxx b/Widgets/vtkDijkstraImageContourLineInterpolator.cxx index de7ab341f26..5e42bd7731d 100644 --- a/Widgets/vtkDijkstraImageContourLineInterpolator.cxx +++ b/Widgets/vtkDijkstraImageContourLineInterpolator.cxx @@ -56,7 +56,7 @@ void vtkDijkstraImageContourLineInterpolator::SetCostImage( vtkImageData *arg ) this->CostImage = arg; if ( this->CostImage ) { - this->DijkstraImageGeodesicPath->SetInput( this->CostImage ); + this->DijkstraImageGeodesicPath->SetInputData( this->CostImage ); } } @@ -82,7 +82,7 @@ int vtkDijkstraImageContourLineInterpolator::InterpolateLine( { return 1; } - this->DijkstraImageGeodesicPath->SetInput( this->CostImage ); + this->DijkstraImageGeodesicPath->SetInputData( this->CostImage ); } double p1[3], p2[3]; diff --git a/Widgets/vtkDistanceRepresentation3D.cxx b/Widgets/vtkDistanceRepresentation3D.cxx index bab83900b25..f9f8eb876bb 100644 --- a/Widgets/vtkDistanceRepresentation3D.cxx +++ b/Widgets/vtkDistanceRepresentation3D.cxx @@ -60,7 +60,7 @@ vtkDistanceRepresentation3D::vtkDistanceRepresentation3D() line->InsertCellPoint(1); this->LinePolyData->SetLines(line); this->LineMapper = vtkPolyDataMapper::New(); - this->LineMapper->SetInput(this->LinePolyData); + this->LineMapper->SetInputData(this->LinePolyData); this->LineActor = vtkActor::New(); this->LineActor->SetMapper(this->LineMapper); @@ -89,7 +89,7 @@ vtkDistanceRepresentation3D::vtkDistanceRepresentation3D() this->GlyphXForm->SetTransform(xform); xform->RotateZ(90); this->Glyph3D = vtkGlyph3D::New(); - this->Glyph3D->SetInput(this->GlyphPolyData); + this->Glyph3D->SetInputData(this->GlyphPolyData); this->Glyph3D->SetSourceConnection(this->GlyphXForm->GetOutputPort()); this->Glyph3D->SetScaleModeToDataScalingOff(); this->GlyphMapper = vtkPolyDataMapper::New(); diff --git a/Widgets/vtkEllipsoidTensorProbeRepresentation.cxx b/Widgets/vtkEllipsoidTensorProbeRepresentation.cxx index 2308b3bac6f..6c7d23bec04 100644 --- a/Widgets/vtkEllipsoidTensorProbeRepresentation.cxx +++ b/Widgets/vtkEllipsoidTensorProbeRepresentation.cxx @@ -67,18 +67,20 @@ vtkEllipsoidTensorProbeRepresentation points->Delete(); this->TensorGlypher = vtkTensorGlyph::New(); - this->TensorGlypher->SetInput(this->TensorSource); - this->TensorGlypher->SetSource(sphere->GetOutput()); + this->TensorGlypher->SetInputData(this->TensorSource); + this->TensorGlypher->SetSourceConnection(sphere->GetOutputPort()); this->TensorGlypher->SetScaleFactor(10); this->TensorGlypher->ClampScalingOn(); sphere->Delete(); this->PolyDataNormals = vtkPolyDataNormals::New(); this->PolyDataNormals->AutoOrientNormalsOn(); - this->PolyDataNormals->SetInput(this->TensorGlypher->GetOutput()); + this->PolyDataNormals->SetInputConnection( + this->TensorGlypher->GetOutputPort()); this->EllipsoidMapper = vtkPolyDataMapper::New(); - this->EllipsoidMapper->SetInput(this->PolyDataNormals->GetOutput()); + this->EllipsoidMapper->SetInputConnection( + this->PolyDataNormals->GetOutputPort()); this->EllipsoidActor = vtkActor::New(); this->EllipsoidActor->SetMapper(this->EllipsoidMapper); diff --git a/Widgets/vtkImagePlaneWidget.cxx b/Widgets/vtkImagePlaneWidget.cxx index 149f01c486a..c50172fbc05 100644 --- a/Widgets/vtkImagePlaneWidget.cxx +++ b/Widgets/vtkImagePlaneWidget.cxx @@ -1507,7 +1507,7 @@ void vtkImagePlaneWidget::SetInput(vtkDataSet* input) // If NULL is passed, remove any reference that Reslice had // on the old ImageData // - this->Reslice->SetInput(NULL); + this->Reslice->SetInputData(NULL); return; } @@ -1534,14 +1534,14 @@ void vtkImagePlaneWidget::SetInput(vtkDataSet* input) this->SetWindowLevel(this->OriginalWindow,this->OriginalLevel); - this->Reslice->SetInput(this->ImageData); + this->Reslice->SetInputData(this->ImageData); int interpolate = this->ResliceInterpolate; this->ResliceInterpolate = -1; // Force change this->SetResliceInterpolate(interpolate); - this->ColorMap->SetInput(this->Reslice->GetOutput()); + this->ColorMap->SetInputConnection(this->Reslice->GetOutputPort()); - this->Texture->SetInput(this->ColorMap->GetOutput()); + this->Texture->SetInputConnection(this->ColorMap->GetOutputPort()); this->Texture->SetInterpolate(this->TextureInterpolate); this->SetPlaneOrientation(this->PlaneOrientation); @@ -2726,7 +2726,7 @@ void vtkImagePlaneWidget::GeneratePlaneOutline() cells->Delete(); vtkPolyDataMapper* planeOutlineMapper = vtkPolyDataMapper::New(); - planeOutlineMapper->SetInput( this->PlaneOutlinePolyData ); + planeOutlineMapper->SetInputData( this->PlaneOutlinePolyData ); planeOutlineMapper->SetResolveCoincidentTopologyToPolygonOffset(); this->PlaneOutlineActor->SetMapper(planeOutlineMapper); this->PlaneOutlineActor->PickableOff(); @@ -2745,8 +2745,8 @@ void vtkImagePlaneWidget::GenerateTexturePlane() this->ColorMap->PassAlphaToOutputOn(); vtkPolyDataMapper* texturePlaneMapper = vtkPolyDataMapper::New(); - texturePlaneMapper->SetInput( - vtkPolyData::SafeDownCast(this->PlaneSource->GetOutput())); + texturePlaneMapper->SetInputConnection( + this->PlaneSource->GetOutputPort()); this->Texture->SetQualityTo32Bit(); this->Texture->MapColorScalarsThroughLookupTableOff(); @@ -2790,7 +2790,7 @@ void vtkImagePlaneWidget::GenerateMargins() cells->Delete(); vtkPolyDataMapper* marginMapper = vtkPolyDataMapper::New(); - marginMapper->SetInput(this->MarginPolyData); + marginMapper->SetInputData(this->MarginPolyData); marginMapper->SetResolveCoincidentTopologyToPolygonOffset(); this->MarginActor->SetMapper(marginMapper); this->MarginActor->PickableOff(); @@ -2825,7 +2825,7 @@ void vtkImagePlaneWidget::GenerateCursor() cells->Delete(); vtkPolyDataMapper* cursorMapper = vtkPolyDataMapper::New(); - cursorMapper->SetInput(this->CursorPolyData); + cursorMapper->SetInputData(this->CursorPolyData); cursorMapper->SetResolveCoincidentTopologyToPolygonOffset(); this->CursorActor->SetMapper(cursorMapper); this->CursorActor->PickableOff(); diff --git a/Widgets/vtkImageTracerWidget.cxx b/Widgets/vtkImageTracerWidget.cxx index b13881b507c..32f5d1d3d0b 100644 --- a/Widgets/vtkImageTracerWidget.cxx +++ b/Widgets/vtkImageTracerWidget.cxx @@ -84,7 +84,8 @@ vtkImageTracerWidget::vtkImageTracerWidget() this->Transform = vtkTransform::New(); this->TransformFilter->SetTransform(this->Transform); this->Transform->Identity(); - this->TransformFilter->SetInput(this->HandleGenerator->GetOutput()); + this->TransformFilter->SetInputConnection( + this->HandleGenerator->GetOutputPort()); this->TransformFilter->Update(); this->TemporaryHandlePoints = vtkFloatArray::New(); @@ -98,7 +99,7 @@ vtkImageTracerWidget::vtkImageTracerWidget() vtkPolyDataMapper* lineMapper = vtkPolyDataMapper::New(); this->LineData = vtkPolyData::New(); - lineMapper->SetInput(this->LineData); + lineMapper->SetInputData(this->LineData); lineMapper->SetResolveCoincidentTopologyToPolygonOffset(); lineMapper->ScalarVisibilityOff(); this->LineActor->SetMapper(lineMapper); @@ -1185,7 +1186,7 @@ void vtkImageTracerWidget::AllocateHandles(const int& nhandles) { this->HandleGeometry[i] = vtkPolyData::New(); vtkPolyDataMapper* handleMapper = vtkPolyDataMapper::New(); - handleMapper->SetInput(this->HandleGeometry[i]); + handleMapper->SetInputData(this->HandleGeometry[i]); this->Handle[i] = vtkActor::New(); this->Handle[i]->SetMapper(handleMapper); handleMapper->Delete(); diff --git a/Widgets/vtkImplicitPlaneRepresentation.cxx b/Widgets/vtkImplicitPlaneRepresentation.cxx index 0286a484fd6..916fe1c3a56 100644 --- a/Widgets/vtkImplicitPlaneRepresentation.cxx +++ b/Widgets/vtkImplicitPlaneRepresentation.cxx @@ -61,9 +61,10 @@ vtkImplicitPlaneRepresentation::vtkImplicitPlaneRepresentation() this->Box = vtkImageData::New(); this->Box->SetDimensions(2,2,2); this->Outline = vtkOutlineFilter::New(); - this->Outline->SetInput(this->Box); + this->Outline->SetInputData(this->Box); this->OutlineMapper = vtkPolyDataMapper::New(); - this->OutlineMapper->SetInput(this->Outline->GetOutput()); + this->OutlineMapper->SetInputConnection( + this->Outline->GetOutputPort()); this->OutlineActor = vtkActor::New(); this->OutlineActor->SetMapper(this->OutlineMapper); this->OutlineTranslation = 1; @@ -71,21 +72,25 @@ vtkImplicitPlaneRepresentation::vtkImplicitPlaneRepresentation() this->OutsideBounds = 1; this->Cutter = vtkCutter::New(); - this->Cutter->SetInput(this->Box); + this->Cutter->SetInputData(this->Box); this->Cutter->SetCutFunction(this->Plane); this->CutMapper = vtkPolyDataMapper::New(); - this->CutMapper->SetInput(this->Cutter->GetOutput()); + this->CutMapper->SetInputConnection( + this->Cutter->GetOutputPort()); this->CutActor = vtkActor::New(); this->CutActor->SetMapper(this->CutMapper); this->DrawPlane = 1; this->Edges = vtkFeatureEdges::New(); - this->Edges->SetInput(this->Cutter->GetOutput()); + this->Edges->SetInputConnection( + this->Cutter->GetOutputPort()); this->EdgesTuber = vtkTubeFilter::New(); - this->EdgesTuber->SetInput(this->Edges->GetOutput()); + this->EdgesTuber->SetInputConnection( + this->Edges->GetOutputPort()); this->EdgesTuber->SetNumberOfSides(12); this->EdgesMapper = vtkPolyDataMapper::New(); - this->EdgesMapper->SetInput(this->EdgesTuber->GetOutput()); + this->EdgesMapper->SetInputConnection( + this->EdgesTuber->GetOutputPort()); this->EdgesActor = vtkActor::New(); this->EdgesActor->SetMapper(this->EdgesMapper); this->Tubing = 1; //control whether tubing is on @@ -94,7 +99,8 @@ vtkImplicitPlaneRepresentation::vtkImplicitPlaneRepresentation() this->LineSource = vtkLineSource::New(); this->LineSource->SetResolution(1); this->LineMapper = vtkPolyDataMapper::New(); - this->LineMapper->SetInput(this->LineSource->GetOutput()); + this->LineMapper->SetInputConnection( + this->LineSource->GetOutputPort()); this->LineActor = vtkActor::New(); this->LineActor->SetMapper(this->LineMapper); @@ -102,7 +108,8 @@ vtkImplicitPlaneRepresentation::vtkImplicitPlaneRepresentation() this->ConeSource->SetResolution(12); this->ConeSource->SetAngle(25.0); this->ConeMapper = vtkPolyDataMapper::New(); - this->ConeMapper->SetInput(this->ConeSource->GetOutput()); + this->ConeMapper->SetInputConnection( + this->ConeSource->GetOutputPort()); this->ConeActor = vtkActor::New(); this->ConeActor->SetMapper(this->ConeMapper); @@ -110,7 +117,8 @@ vtkImplicitPlaneRepresentation::vtkImplicitPlaneRepresentation() this->LineSource2 = vtkLineSource::New(); this->LineSource2->SetResolution(1); this->LineMapper2 = vtkPolyDataMapper::New(); - this->LineMapper2->SetInput(this->LineSource2->GetOutput()); + this->LineMapper2->SetInputConnection( + this->LineSource2->GetOutputPort()); this->LineActor2 = vtkActor::New(); this->LineActor2->SetMapper(this->LineMapper2); @@ -118,7 +126,8 @@ vtkImplicitPlaneRepresentation::vtkImplicitPlaneRepresentation() this->ConeSource2->SetResolution(12); this->ConeSource2->SetAngle(25.0); this->ConeMapper2 = vtkPolyDataMapper::New(); - this->ConeMapper2->SetInput(this->ConeSource2->GetOutput()); + this->ConeMapper2->SetInputConnection( + this->ConeSource2->GetOutputPort()); this->ConeActor2 = vtkActor::New(); this->ConeActor2->SetMapper(this->ConeMapper2); @@ -127,7 +136,8 @@ vtkImplicitPlaneRepresentation::vtkImplicitPlaneRepresentation() this->Sphere->SetThetaResolution(16); this->Sphere->SetPhiResolution(8); this->SphereMapper = vtkPolyDataMapper::New(); - this->SphereMapper->SetInput(this->Sphere->GetOutput()); + this->SphereMapper->SetInputConnection( + this->Sphere->GetOutputPort()); this->SphereActor = vtkActor::New(); this->SphereActor->SetMapper(this->SphereMapper); @@ -1182,11 +1192,13 @@ void vtkImplicitPlaneRepresentation::BuildRepresentation() // Control the look of the edges if ( this->Tubing ) { - this->EdgesMapper->SetInput(this->EdgesTuber->GetOutput()); + this->EdgesMapper->SetInputConnection( + this->EdgesTuber->GetOutputPort()); } else { - this->EdgesMapper->SetInput(this->Edges->GetOutput()); + this->EdgesMapper->SetInputConnection( + this->Edges->GetOutputPort()); } this->SizeHandles(); diff --git a/Widgets/vtkImplicitPlaneWidget.cxx b/Widgets/vtkImplicitPlaneWidget.cxx index 351e44e9a7b..53398b0f5a4 100644 --- a/Widgets/vtkImplicitPlaneWidget.cxx +++ b/Widgets/vtkImplicitPlaneWidget.cxx @@ -60,9 +60,10 @@ vtkImplicitPlaneWidget::vtkImplicitPlaneWidget() : vtkPolyDataSourceWidget() this->Box = vtkImageData::New(); this->Box->SetDimensions(2,2,2); this->Outline = vtkOutlineFilter::New(); - this->Outline->SetInput(this->Box); + this->Outline->SetInputData(this->Box); this->OutlineMapper = vtkPolyDataMapper::New(); - this->OutlineMapper->SetInput(this->Outline->GetOutput()); + this->OutlineMapper->SetInputConnection( + this->Outline->GetOutputPort()); this->OutlineActor = vtkActor::New(); this->OutlineActor->SetMapper(this->OutlineMapper); this->OutlineTranslation = 1; @@ -70,21 +71,25 @@ vtkImplicitPlaneWidget::vtkImplicitPlaneWidget() : vtkPolyDataSourceWidget() this->OutsideBounds = 1; this->Cutter = vtkCutter::New(); - this->Cutter->SetInput(this->Box); + this->Cutter->SetInputData(this->Box); this->Cutter->SetCutFunction(this->Plane); this->CutMapper = vtkPolyDataMapper::New(); - this->CutMapper->SetInput(this->Cutter->GetOutput()); + this->CutMapper->SetInputConnection( + this->Cutter->GetOutputPort()); this->CutActor = vtkActor::New(); this->CutActor->SetMapper(this->CutMapper); this->DrawPlane = 1; this->Edges = vtkFeatureEdges::New(); - this->Edges->SetInput(this->Cutter->GetOutput()); + this->Edges->SetInputConnection( + this->Cutter->GetOutputPort()); this->EdgesTuber = vtkTubeFilter::New(); - this->EdgesTuber->SetInput(this->Edges->GetOutput()); + this->EdgesTuber->SetInputConnection( + this->Edges->GetOutputPort()); this->EdgesTuber->SetNumberOfSides(12); this->EdgesMapper = vtkPolyDataMapper::New(); - this->EdgesMapper->SetInput(this->EdgesTuber->GetOutput()); + this->EdgesMapper->SetInputConnection( + this->EdgesTuber->GetOutputPort()); this->EdgesActor = vtkActor::New(); this->EdgesActor->SetMapper(this->EdgesMapper); this->Tubing = 1; //control whether tubing is on @@ -93,7 +98,8 @@ vtkImplicitPlaneWidget::vtkImplicitPlaneWidget() : vtkPolyDataSourceWidget() this->LineSource = vtkLineSource::New(); this->LineSource->SetResolution(1); this->LineMapper = vtkPolyDataMapper::New(); - this->LineMapper->SetInput(this->LineSource->GetOutput()); + this->LineMapper->SetInputConnection( + this->LineSource->GetOutputPort()); this->LineActor = vtkActor::New(); this->LineActor->SetMapper(this->LineMapper); @@ -101,7 +107,8 @@ vtkImplicitPlaneWidget::vtkImplicitPlaneWidget() : vtkPolyDataSourceWidget() this->ConeSource->SetResolution(12); this->ConeSource->SetAngle(25.0); this->ConeMapper = vtkPolyDataMapper::New(); - this->ConeMapper->SetInput(this->ConeSource->GetOutput()); + this->ConeMapper->SetInputConnection( + this->ConeSource->GetOutputPort()); this->ConeActor = vtkActor::New(); this->ConeActor->SetMapper(this->ConeMapper); @@ -109,7 +116,8 @@ vtkImplicitPlaneWidget::vtkImplicitPlaneWidget() : vtkPolyDataSourceWidget() this->LineSource2 = vtkLineSource::New(); this->LineSource2->SetResolution(1); this->LineMapper2 = vtkPolyDataMapper::New(); - this->LineMapper2->SetInput(this->LineSource2->GetOutput()); + this->LineMapper2->SetInputConnection( + this->LineSource2->GetOutputPort()); this->LineActor2 = vtkActor::New(); this->LineActor2->SetMapper(this->LineMapper2); @@ -117,7 +125,8 @@ vtkImplicitPlaneWidget::vtkImplicitPlaneWidget() : vtkPolyDataSourceWidget() this->ConeSource2->SetResolution(12); this->ConeSource2->SetAngle(25.0); this->ConeMapper2 = vtkPolyDataMapper::New(); - this->ConeMapper2->SetInput(this->ConeSource2->GetOutput()); + this->ConeMapper2->SetInputConnection( + this->ConeSource2->GetOutputPort()); this->ConeActor2 = vtkActor::New(); this->ConeActor2->SetMapper(this->ConeMapper2); @@ -126,7 +135,8 @@ vtkImplicitPlaneWidget::vtkImplicitPlaneWidget() : vtkPolyDataSourceWidget() this->Sphere->SetThetaResolution(16); this->Sphere->SetPhiResolution(8); this->SphereMapper = vtkPolyDataMapper::New(); - this->SphereMapper->SetInput(this->Sphere->GetOutput()); + this->SphereMapper->SetInputConnection( + this->Sphere->GetOutputPort()); this->SphereActor = vtkActor::New(); this->SphereActor->SetMapper(this->SphereMapper); this->OriginTranslation = 1; @@ -1277,11 +1287,13 @@ void vtkImplicitPlaneWidget::UpdateRepresentation() // Control the look of the edges if ( this->Tubing ) { - this->EdgesMapper->SetInput(this->EdgesTuber->GetOutput()); + this->EdgesMapper->SetInputConnection( + this->EdgesTuber->GetOutputPort()); } else { - this->EdgesMapper->SetInput(this->Edges->GetOutput()); + this->EdgesMapper->SetInputConnection( + this->Edges->GetOutputPort()); } } diff --git a/Widgets/vtkLineRepresentation.cxx b/Widgets/vtkLineRepresentation.cxx index 8dd5e8fd5f3..1e61ec110f8 100644 --- a/Widgets/vtkLineRepresentation.cxx +++ b/Widgets/vtkLineRepresentation.cxx @@ -65,7 +65,8 @@ vtkLineRepresentation::vtkLineRepresentation() this->LineSource = vtkLineSource::New(); this->LineSource->SetResolution(5); this->LineMapper = vtkPolyDataMapper::New(); - this->LineMapper->SetInput(this->LineSource->GetOutput()); + this->LineMapper->SetInputConnection( + this->LineSource->GetOutputPort()); this->LineActor = vtkActor::New(); this->LineActor->SetMapper(this->LineMapper); @@ -79,7 +80,8 @@ vtkLineRepresentation::vtkLineRepresentation() this->HandleGeometry[i]->SetThetaResolution(16); this->HandleGeometry[i]->SetPhiResolution(8); this->HandleMapper[i] = vtkPolyDataMapper::New(); - this->HandleMapper[i]->SetInput(this->HandleGeometry[i]->GetOutput()); + this->HandleMapper[i]->SetInputConnection( + this->HandleGeometry[i]->GetOutputPort()); this->Handle[i] = vtkActor::New(); this->Handle[i]->SetMapper(this->HandleMapper[i]); } @@ -113,7 +115,8 @@ vtkLineRepresentation::vtkLineRepresentation() this->TextInput = vtkVectorText::New(); this->TextInput->SetText( "0" ); this->TextMapper = vtkPolyDataMapper::New(); - this->TextMapper->SetInput( this->TextInput->GetOutput() ); + this->TextMapper->SetInputConnection( + this->TextInput->GetOutputPort()); this->TextActor = vtkFollower::New(); this->TextActor->SetMapper(this->TextMapper); this->TextActor->GetProperty()->SetColor( 1.0, 0.1, 0.0 ); diff --git a/Widgets/vtkLineWidget.cxx b/Widgets/vtkLineWidget.cxx index 72dffb3ba88..936eca5e8dd 100644 --- a/Widgets/vtkLineWidget.cxx +++ b/Widgets/vtkLineWidget.cxx @@ -112,7 +112,8 @@ vtkLineWidget::vtkLineWidget() this->LineSource = vtkLineSource::New(); this->LineSource->SetResolution(5); this->LineMapper = vtkPolyDataMapper::New(); - this->LineMapper->SetInput(this->LineSource->GetOutput()); + this->LineMapper->SetInputConnection( + this->LineSource->GetOutputPort()); this->LineActor = vtkActor::New(); this->LineActor->SetMapper(this->LineMapper); @@ -126,7 +127,8 @@ vtkLineWidget::vtkLineWidget() this->HandleGeometry[i]->SetThetaResolution(16); this->HandleGeometry[i]->SetPhiResolution(8); this->HandleMapper[i] = vtkPolyDataMapper::New(); - this->HandleMapper[i]->SetInput(this->HandleGeometry[i]->GetOutput()); + this->HandleMapper[i]->SetInputConnection( + this->HandleGeometry[i]->GetOutputPort()); this->Handle[i] = vtkActor::New(); this->Handle[i]->SetMapper(this->HandleMapper[i]); } diff --git a/Widgets/vtkLogoRepresentation.cxx b/Widgets/vtkLogoRepresentation.cxx index de658da6b45..59b1c14b6e8 100644 --- a/Widgets/vtkLogoRepresentation.cxx +++ b/Widgets/vtkLogoRepresentation.cxx @@ -68,7 +68,7 @@ vtkLogoRepresentation::vtkLogoRepresentation() this->TexturePolyData->GetPointData()->SetTCoords(tc); tc->Delete(); this->TextureMapper = vtkPolyDataMapper2D::New(); - this->TextureMapper->SetInput(this->TexturePolyData); + this->TextureMapper->SetInputData(this->TexturePolyData); this->TextureActor = vtkActor2D::New(); this->TextureActor->SetMapper(this->TextureMapper); this->ImageProperty->SetOpacity(0.25); @@ -166,7 +166,7 @@ void vtkLogoRepresentation::BuildRepresentation() this->AdjustImageSize(o,borderSize,imageSize); // Update the points - this->Texture->SetInput(this->Image); + this->Texture->SetInputData(this->Image); this->TexturePoints->SetPoint(0, o[0],o[1],0.0); this->TexturePoints->SetPoint(1, o[0]+imageSize[0],o[1],0.0); this->TexturePoints->SetPoint(2, o[0]+imageSize[0],o[1]+imageSize[1],0.0); diff --git a/Widgets/vtkOrientationMarkerWidget.cxx b/Widgets/vtkOrientationMarkerWidget.cxx index 1721ca59baa..1c0f9b57aea 100644 --- a/Widgets/vtkOrientationMarkerWidget.cxx +++ b/Widgets/vtkOrientationMarkerWidget.cxx @@ -92,7 +92,7 @@ vtkOrientationMarkerWidget::vtkOrientationMarkerWidget() tcoord->SetCoordinateSystemToDisplay(); vtkPolyDataMapper2D *mapper = vtkPolyDataMapper2D::New(); - mapper->SetInput( this->Outline ); + mapper->SetInputData(this->Outline); mapper->SetTransformCoordinate( tcoord ); this->OutlineActor = vtkActor2D::New(); diff --git a/Widgets/vtkOrientedGlyphContourRepresentation.cxx b/Widgets/vtkOrientedGlyphContourRepresentation.cxx index 12ead1ca771..aaf0a60d18a 100644 --- a/Widgets/vtkOrientedGlyphContourRepresentation.cxx +++ b/Widgets/vtkOrientedGlyphContourRepresentation.cxx @@ -94,7 +94,7 @@ vtkOrientedGlyphContourRepresentation::vtkOrientedGlyphContourRepresentation() activeNormals->Delete(); this->Glypher = vtkGlyph3D::New(); - this->Glypher->SetInput(this->FocalData); + this->Glypher->SetInputData(this->FocalData); this->Glypher->SetVectorModeToUseNormal(); this->Glypher->OrientOn(); this->Glypher->ScalingOn(); @@ -102,7 +102,7 @@ vtkOrientedGlyphContourRepresentation::vtkOrientedGlyphContourRepresentation() this->Glypher->SetScaleFactor(1.0); this->ActiveGlypher = vtkGlyph3D::New(); - this->ActiveGlypher->SetInput(this->ActiveFocalData); + this->ActiveGlypher->SetInputData(this->ActiveFocalData); this->ActiveGlypher->SetVectorModeToUseNormal(); this->ActiveGlypher->OrientOn(); this->ActiveGlypher->ScalingOn(); @@ -128,13 +128,13 @@ vtkOrientedGlyphContourRepresentation::vtkOrientedGlyphContourRepresentation() vtkCleanPolyData* clean = vtkCleanPolyData::New(); clean->PointMergingOn(); clean->CreateDefaultLocator(); - clean->SetInputConnection(0,cylinder->GetOutputPort(0)); + clean->SetInputConnection(cylinder->GetOutputPort()); vtkTransform *t = vtkTransform::New(); t->RotateZ(90.0); vtkTransformPolyDataFilter *tpd = vtkTransformPolyDataFilter::New(); - tpd->SetInputConnection( 0, clean->GetOutputPort(0) ); + tpd->SetInputConnection(clean->GetOutputPort()); tpd->SetTransform( t ); clean->Delete(); cylinder->Delete(); @@ -144,17 +144,18 @@ vtkOrientedGlyphContourRepresentation::vtkOrientedGlyphContourRepresentation() tpd->Delete(); t->Delete(); - this->Glypher->SetSource(this->CursorShape); - this->ActiveGlypher->SetSource(this->ActiveCursorShape); + this->Glypher->SetSourceData(this->CursorShape); + this->ActiveGlypher->SetSourceData(this->ActiveCursorShape); this->Mapper = vtkPolyDataMapper::New(); - this->Mapper->SetInput(this->Glypher->GetOutput()); + this->Mapper->SetInputConnection(this->Glypher->GetOutputPort()); this->Mapper->SetResolveCoincidentTopologyToPolygonOffset(); this->Mapper->ScalarVisibilityOff(); this->Mapper->ImmediateModeRenderingOn(); this->ActiveMapper = vtkPolyDataMapper::New(); - this->ActiveMapper->SetInput(this->ActiveGlypher->GetOutput()); + this->ActiveMapper->SetInputConnection( + this->ActiveGlypher->GetOutputPort()); this->ActiveMapper->SetResolveCoincidentTopologyToPolygonOffset(); this->ActiveMapper->ScalarVisibilityOff(); this->ActiveMapper->ImmediateModeRenderingOn(); @@ -172,7 +173,7 @@ vtkOrientedGlyphContourRepresentation::vtkOrientedGlyphContourRepresentation() this->Lines = vtkPolyData::New(); this->LinesMapper = vtkPolyDataMapper::New(); - this->LinesMapper->SetInput( this->Lines ); + this->LinesMapper->SetInputData(this->Lines); this->LinesActor = vtkActor::New(); this->LinesActor->SetMapper( this->LinesMapper ); @@ -262,7 +263,7 @@ void vtkOrientedGlyphContourRepresentation::SetCursorShape(vtkPolyData *shape) } if ( this->CursorShape ) { - this->Glypher->SetSource(this->CursorShape); + this->Glypher->SetSourceData(this->CursorShape); } this->Modified(); } @@ -290,7 +291,7 @@ void vtkOrientedGlyphContourRepresentation::SetActiveCursorShape(vtkPolyData *sh } if ( this->ActiveCursorShape ) { - this->ActiveGlypher->SetSource(this->ActiveCursorShape); + this->ActiveGlypher->SetSourceData(this->ActiveCursorShape); } this->Modified(); } @@ -995,17 +996,17 @@ void vtkOrientedGlyphContourRepresentation::CreateSelectedNodesRepresentation() normals->Delete(); this->SelectedNodesGlypher = vtkGlyph3D::New(); - this->SelectedNodesGlypher->SetInput(this->SelectedNodesData); + this->SelectedNodesGlypher->SetInputData(this->SelectedNodesData); this->SelectedNodesGlypher->SetVectorModeToUseNormal(); this->SelectedNodesGlypher->OrientOn(); this->SelectedNodesGlypher->ScalingOn(); this->SelectedNodesGlypher->SetScaleModeToDataScalingOff(); this->SelectedNodesGlypher->SetScaleFactor(1.0); - this->SelectedNodesGlypher->SetSource(this->SelectedNodesCursorShape); + this->SelectedNodesGlypher->SetSourceData(this->SelectedNodesCursorShape); this->SelectedNodesMapper = vtkPolyDataMapper::New(); - this->SelectedNodesMapper->SetInput(this->SelectedNodesGlypher->GetOutput()); + this->SelectedNodesMapper->SetInputData(this->SelectedNodesGlypher->GetOutput()); this->SelectedNodesMapper->SetResolveCoincidentTopologyToPolygonOffset(); this->SelectedNodesMapper->ScalarVisibilityOff(); this->SelectedNodesMapper->ImmediateModeRenderingOn(); diff --git a/Widgets/vtkOrientedGlyphFocalPlaneContourRepresentation.cxx b/Widgets/vtkOrientedGlyphFocalPlaneContourRepresentation.cxx index c145ef650b9..a80ab3aa37e 100644 --- a/Widgets/vtkOrientedGlyphFocalPlaneContourRepresentation.cxx +++ b/Widgets/vtkOrientedGlyphFocalPlaneContourRepresentation.cxx @@ -92,7 +92,7 @@ vtkOrientedGlyphFocalPlaneContourRepresentation::vtkOrientedGlyphFocalPlaneConto activeNormals->Delete(); this->Glypher = vtkGlyph2D::New(); - this->Glypher->SetInput(this->FocalData); + this->Glypher->SetInputData(this->FocalData); this->Glypher->SetVectorModeToUseNormal(); this->Glypher->OrientOn(); this->Glypher->ScalingOn(); @@ -100,7 +100,7 @@ vtkOrientedGlyphFocalPlaneContourRepresentation::vtkOrientedGlyphFocalPlaneConto this->Glypher->SetScaleFactor(1.0); this->ActiveGlypher = vtkGlyph2D::New(); - this->ActiveGlypher->SetInput(this->ActiveFocalData); + this->ActiveGlypher->SetInputData(this->ActiveFocalData); this->ActiveGlypher->SetVectorModeToUseNormal(); this->ActiveGlypher->OrientOn(); this->ActiveGlypher->ScalingOn(); @@ -126,13 +126,13 @@ vtkOrientedGlyphFocalPlaneContourRepresentation::vtkOrientedGlyphFocalPlaneConto vtkCleanPolyData* clean = vtkCleanPolyData::New(); clean->PointMergingOn(); clean->CreateDefaultLocator(); - clean->SetInputConnection(0,cylinder->GetOutputPort(0)); + clean->SetInputConnection(cylinder->GetOutputPort()); vtkTransform *t = vtkTransform::New(); t->RotateZ(90.0); vtkTransformPolyDataFilter *tpd = vtkTransformPolyDataFilter::New(); - tpd->SetInputConnection( 0, clean->GetOutputPort(0) ); + tpd->SetInputConnection(clean->GetOutputPort()); tpd->SetTransform( t ); clean->Delete(); cylinder->Delete(); @@ -142,17 +142,17 @@ vtkOrientedGlyphFocalPlaneContourRepresentation::vtkOrientedGlyphFocalPlaneConto tpd->Delete(); t->Delete(); - this->Glypher->SetSource(this->CursorShape); - this->ActiveGlypher->SetSource(this->ActiveCursorShape); + this->Glypher->SetSourceData(this->CursorShape); + this->ActiveGlypher->SetSourceData(this->ActiveCursorShape); this->Mapper = vtkPolyDataMapper2D::New(); - this->Mapper->SetInput(this->Glypher->GetOutput()); + this->Mapper->SetInputConnection(this->Glypher->GetOutputPort()); //this->Mapper->SetResolveCoincidentTopologyToPolygonOffset(); this->Mapper->ScalarVisibilityOff(); //this->Mapper->ImmediateModeRenderingOn(); this->ActiveMapper = vtkPolyDataMapper2D::New(); - this->ActiveMapper->SetInput(this->ActiveGlypher->GetOutput()); + this->ActiveMapper->SetInputConnection(this->ActiveGlypher->GetOutputPort()); //this->ActiveMapper->SetResolveCoincidentTopologyToPolygonOffset(); this->ActiveMapper->ScalarVisibilityOff(); //this->ActiveMapper->ImmediateModeRenderingOn(); @@ -170,7 +170,7 @@ vtkOrientedGlyphFocalPlaneContourRepresentation::vtkOrientedGlyphFocalPlaneConto this->Lines = vtkPolyData::New(); this->LinesMapper = vtkPolyDataMapper2D::New(); - this->LinesMapper->SetInput( this->Lines ); + this->LinesMapper->SetInputData(this->Lines); this->LinesActor = vtkActor2D::New(); this->LinesActor->SetMapper( this->LinesMapper ); @@ -231,7 +231,7 @@ void vtkOrientedGlyphFocalPlaneContourRepresentation::SetCursorShape(vtkPolyData } if ( this->CursorShape ) { - this->Glypher->SetSource(this->CursorShape); + this->Glypher->SetSourceData(this->CursorShape); } this->Modified(); } @@ -259,7 +259,7 @@ void vtkOrientedGlyphFocalPlaneContourRepresentation::SetActiveCursorShape(vtkPo } if ( this->ActiveCursorShape ) { - this->ActiveGlypher->SetSource(this->ActiveCursorShape); + this->ActiveGlypher->SetSourceData(this->ActiveCursorShape); } this->Modified(); } diff --git a/Widgets/vtkParallelopipedRepresentation.cxx b/Widgets/vtkParallelopipedRepresentation.cxx index fa309bca034..9cb21f38876 100644 --- a/Widgets/vtkParallelopipedRepresentation.cxx +++ b/Widgets/vtkParallelopipedRepresentation.cxx @@ -319,7 +319,7 @@ vtkParallelopipedRepresentation::vtkParallelopipedRepresentation() this->HexPolyData = vtkPolyData::New(); this->HexMapper = vtkPolyDataMapper::New(); this->HexActor = vtkActor::New(); - this->HexMapper->SetInput(HexPolyData); + this->HexMapper->SetInputData(HexPolyData); this->HexActor->SetMapper(this->HexMapper); // 16 points from the parallelopiped and the chair (also modelled as a @@ -344,7 +344,7 @@ vtkParallelopipedRepresentation::vtkParallelopipedRepresentation() this->HexFaceActor = vtkActor::New(); this->HexFacePolyData->SetPoints(this->Points); this->HexFacePolyData->SetPolys(cells); - this->HexFaceMapper->SetInput(HexFacePolyData); + this->HexFaceMapper->SetInputData(HexFacePolyData); this->HexFaceActor->SetMapper(this->HexFaceMapper); cells->Delete(); diff --git a/Widgets/vtkPlaneWidget.cxx b/Widgets/vtkPlaneWidget.cxx index 3e79f3b6835..785dce126e8 100644 --- a/Widgets/vtkPlaneWidget.cxx +++ b/Widgets/vtkPlaneWidget.cxx @@ -72,7 +72,8 @@ vtkPlaneWidget::vtkPlaneWidget() : vtkPolyDataSourceWidget() this->PlaneOutline->SetPolys(outline); outline->Delete(); this->PlaneMapper = vtkPolyDataMapper::New(); - this->PlaneMapper->SetInput(this->PlaneSource->GetOutput()); + this->PlaneMapper->SetInputConnection( + this->PlaneSource->GetOutputPort()); this->PlaneActor = vtkActor::New(); this->PlaneActor->SetMapper(this->PlaneMapper); @@ -86,7 +87,8 @@ vtkPlaneWidget::vtkPlaneWidget() : vtkPolyDataSourceWidget() this->HandleGeometry[i]->SetThetaResolution(16); this->HandleGeometry[i]->SetPhiResolution(8); this->HandleMapper[i] = vtkPolyDataMapper::New(); - this->HandleMapper[i]->SetInput(this->HandleGeometry[i]->GetOutput()); + this->HandleMapper[i]->SetInputConnection( + this->HandleGeometry[i]->GetOutputPort()); this->Handle[i] = vtkActor::New(); this->Handle[i]->SetMapper(this->HandleMapper[i]); } @@ -95,7 +97,8 @@ vtkPlaneWidget::vtkPlaneWidget() : vtkPolyDataSourceWidget() this->LineSource = vtkLineSource::New(); this->LineSource->SetResolution(1); this->LineMapper = vtkPolyDataMapper::New(); - this->LineMapper->SetInput(this->LineSource->GetOutput()); + this->LineMapper->SetInputConnection( + this->LineSource->GetOutputPort()); this->LineActor = vtkActor::New(); this->LineActor->SetMapper(this->LineMapper); @@ -103,7 +106,8 @@ vtkPlaneWidget::vtkPlaneWidget() : vtkPolyDataSourceWidget() this->ConeSource->SetResolution(12); this->ConeSource->SetAngle(25.0); this->ConeMapper = vtkPolyDataMapper::New(); - this->ConeMapper->SetInput(this->ConeSource->GetOutput()); + this->ConeMapper->SetInputConnection( + this->ConeSource->GetOutputPort()); this->ConeActor = vtkActor::New(); this->ConeActor->SetMapper(this->ConeMapper); @@ -111,7 +115,8 @@ vtkPlaneWidget::vtkPlaneWidget() : vtkPolyDataSourceWidget() this->LineSource2 = vtkLineSource::New(); this->LineSource2->SetResolution(1); this->LineMapper2 = vtkPolyDataMapper::New(); - this->LineMapper2->SetInput(this->LineSource2->GetOutput()); + this->LineMapper2->SetInputConnection( + this->LineSource2->GetOutputPort()); this->LineActor2 = vtkActor::New(); this->LineActor2->SetMapper(this->LineMapper2); @@ -119,7 +124,8 @@ vtkPlaneWidget::vtkPlaneWidget() : vtkPolyDataSourceWidget() this->ConeSource2->SetResolution(12); this->ConeSource2->SetAngle(25.0); this->ConeMapper2 = vtkPolyDataMapper::New(); - this->ConeMapper2->SetInput(this->ConeSource2->GetOutput()); + this->ConeMapper2->SetInputConnection( + this->ConeSource2->GetOutputPort()); this->ConeActor2 = vtkActor::New(); this->ConeActor2->SetMapper(this->ConeMapper2); @@ -1394,21 +1400,21 @@ void vtkPlaneWidget::SelectRepresentation() { this->CurrentRenderer->RemoveActor(this->PlaneActor); this->CurrentRenderer->AddActor(this->PlaneActor); - this->PlaneMapper->SetInput( this->PlaneOutline ); + this->PlaneMapper->SetInputData( this->PlaneOutline ); this->PlaneActor->GetProperty()->SetRepresentationToWireframe(); } else if ( this->Representation == VTK_PLANE_SURFACE ) { this->CurrentRenderer->RemoveActor(this->PlaneActor); this->CurrentRenderer->AddActor(this->PlaneActor); - this->PlaneMapper->SetInput( this->PlaneSource->GetOutput() ); + this->PlaneMapper->SetInputConnection( this->PlaneSource->GetOutputPort() ); this->PlaneActor->GetProperty()->SetRepresentationToSurface(); } else //( this->Representation == VTK_PLANE_WIREFRAME ) { this->CurrentRenderer->RemoveActor(this->PlaneActor); this->CurrentRenderer->AddActor(this->PlaneActor); - this->PlaneMapper->SetInput( this->PlaneSource->GetOutput() ); + this->PlaneMapper->SetInputConnection( this->PlaneSource->GetOutputPort() ); this->PlaneActor->GetProperty()->SetRepresentationToWireframe(); } } diff --git a/Widgets/vtkPlaybackRepresentation.cxx b/Widgets/vtkPlaybackRepresentation.cxx index 10a300f6de3..c2de851fbae 100644 --- a/Widgets/vtkPlaybackRepresentation.cxx +++ b/Widgets/vtkPlaybackRepresentation.cxx @@ -162,10 +162,11 @@ vtkPlaybackRepresentation::vtkPlaybackRepresentation() this->TransformFilter = vtkTransformPolyDataFilter::New(); this->TransformFilter->SetTransform(this->BWTransform); - this->TransformFilter->SetInput(this->PolyData); + this->TransformFilter->SetInputData(this->PolyData); this->Mapper = vtkPolyDataMapper2D::New(); - this->Mapper->SetInput(this->TransformFilter->GetOutput()); + this->Mapper->SetInputConnection( + this->TransformFilter->GetOutputPort()); this->Property = vtkProperty2D::New(); this->Actor = vtkActor2D::New(); this->Actor->SetMapper(this->Mapper); diff --git a/Widgets/vtkPointHandleRepresentation2D.cxx b/Widgets/vtkPointHandleRepresentation2D.cxx index 67d94975950..9b370dc9e7a 100644 --- a/Widgets/vtkPointHandleRepresentation2D.cxx +++ b/Widgets/vtkPointHandleRepresentation2D.cxx @@ -63,15 +63,16 @@ vtkPointHandleRepresentation2D::vtkPointHandleRepresentation2D() cursor2D->Delete(); this->Glypher = vtkGlyph2D::New(); - this->Glypher->SetInput(this->FocalData); - this->Glypher->SetSource(this->CursorShape); + this->Glypher->SetInputData(this->FocalData); + this->Glypher->SetSourceData(this->CursorShape); this->Glypher->SetVectorModeToVectorRotationOff(); this->Glypher->ScalingOn(); this->Glypher->SetScaleModeToDataScalingOff(); this->Glypher->SetScaleFactor(1.0); this->Mapper = vtkPolyDataMapper2D::New(); - this->Mapper->SetInput(this->Glypher->GetOutput()); + this->Mapper->SetInputConnection( + this->Glypher->GetOutputPort()); // Set up the initial properties this->CreateDefaultProperties(); @@ -114,7 +115,7 @@ void vtkPointHandleRepresentation2D::SetCursorShape(vtkPolyData *shape) { this->CursorShape->Register(this); } - this->Glypher->SetSource(this->CursorShape); + this->Glypher->SetSourceData(this->CursorShape); this->Modified(); } } diff --git a/Widgets/vtkPointHandleRepresentation3D.cxx b/Widgets/vtkPointHandleRepresentation3D.cxx index 595529ebc77..c798e6a753e 100644 --- a/Widgets/vtkPointHandleRepresentation3D.cxx +++ b/Widgets/vtkPointHandleRepresentation3D.cxx @@ -48,7 +48,8 @@ vtkPointHandleRepresentation3D::vtkPointHandleRepresentation3D() this->Cursor3D->TranslationModeOn(); this->Mapper = vtkPolyDataMapper::New(); - this->Mapper->SetInput(this->Cursor3D->GetOutput()); + this->Mapper->SetInputConnection( + this->Cursor3D->GetOutputPort()); // Set up the initial properties this->CreateDefaultProperties(); diff --git a/Widgets/vtkPointWidget.cxx b/Widgets/vtkPointWidget.cxx index 2c3c330e0d5..1a1847d4b79 100644 --- a/Widgets/vtkPointWidget.cxx +++ b/Widgets/vtkPointWidget.cxx @@ -38,7 +38,8 @@ vtkPointWidget::vtkPointWidget() // Represent the line this->Cursor3D = vtkCursor3D::New(); this->Mapper = vtkPolyDataMapper::New(); - this->Mapper->SetInput(this->Cursor3D->GetOutput()); + this->Mapper->SetInputConnection( + this->Cursor3D->GetOutputPort()); this->Actor = vtkActor::New(); this->Actor->SetMapper(this->Mapper); diff --git a/Widgets/vtkPolygonalSurfaceContourLineInterpolator.cxx b/Widgets/vtkPolygonalSurfaceContourLineInterpolator.cxx index 71e16f695f3..526ba43923e 100644 --- a/Widgets/vtkPolygonalSurfaceContourLineInterpolator.cxx +++ b/Widgets/vtkPolygonalSurfaceContourLineInterpolator.cxx @@ -119,7 +119,7 @@ int vtkPolygonalSurfaceContourLineInterpolator::InterpolateLine( if (this->LastInterpolatedVertexIds[0] != beginVertId || this->LastInterpolatedVertexIds[1] != endVertId) { - this->DijkstraGraphGeodesicPath->SetInput( nodeBegin->PolyData ); + this->DijkstraGraphGeodesicPath->SetInputData( nodeBegin->PolyData ); this->DijkstraGraphGeodesicPath->SetStartVertex( endVertId ); this->DijkstraGraphGeodesicPath->SetEndVertex( beginVertId ); this->DijkstraGraphGeodesicPath->Update(); diff --git a/Widgets/vtkRectilinearWipeRepresentation.cxx b/Widgets/vtkRectilinearWipeRepresentation.cxx index 7c4ef161154..167ee1b094f 100644 --- a/Widgets/vtkRectilinearWipeRepresentation.cxx +++ b/Widgets/vtkRectilinearWipeRepresentation.cxx @@ -65,7 +65,7 @@ vtkRectilinearWipeRepresentation::vtkRectilinearWipeRepresentation() coordinate->SetCoordinateSystemToWorld(); this->WipeMapper = vtkPolyDataMapper2D::New(); - this->WipeMapper->SetInput(this->Wipe); + this->WipeMapper->SetInputData(this->Wipe); this->WipeMapper->SetTransformCoordinate(coordinate); coordinate->Delete(); diff --git a/Widgets/vtkSliderRepresentation2D.cxx b/Widgets/vtkSliderRepresentation2D.cxx index 99efad13594..75fc85e1434 100644 --- a/Widgets/vtkSliderRepresentation2D.cxx +++ b/Widgets/vtkSliderRepresentation2D.cxx @@ -76,11 +76,12 @@ vtkSliderRepresentation2D::vtkSliderRepresentation2D() this->Slider->SetPolys(this->SliderCells); this->SliderXForm = vtkTransformPolyDataFilter::New(); - this->SliderXForm->SetInput(this->Slider); + this->SliderXForm->SetInputData(this->Slider); this->SliderXForm->SetTransform(XForm); this->SliderMapper = vtkPolyDataMapper2D::New(); - this->SliderMapper->SetInput(this->SliderXForm->GetOutput()); + this->SliderMapper->SetInputConnection( + this->SliderXForm->GetOutputPort()); this->SliderProperty = vtkProperty2D::New(); this->SliderProperty->SetColor(1,1,1); @@ -102,11 +103,12 @@ vtkSliderRepresentation2D::vtkSliderRepresentation2D() this->Tube->SetPolys(this->TubeCells); this->TubeXForm = vtkTransformPolyDataFilter::New(); - this->TubeXForm->SetInput(this->Tube); + this->TubeXForm->SetInputData(this->Tube); this->TubeXForm->SetTransform(XForm); this->TubeMapper = vtkPolyDataMapper2D::New(); - this->TubeMapper->SetInput(this->TubeXForm->GetOutput()); + this->TubeMapper->SetInputConnection( + this->TubeXForm->GetOutputPort()); this->TubeProperty = vtkProperty2D::New(); this->TubeProperty->SetColor(1,1,1); @@ -136,11 +138,12 @@ vtkSliderRepresentation2D::vtkSliderRepresentation2D() this->Cap->SetPolys(this->CapCells); this->CapXForm = vtkTransformPolyDataFilter::New(); - this->CapXForm->SetInput(this->Cap); + this->CapXForm->SetInputData(this->Cap); this->CapXForm->SetTransform(XForm); this->CapMapper = vtkPolyDataMapper2D::New(); - this->CapMapper->SetInput(this->CapXForm->GetOutput()); + this->CapMapper->SetInputConnection( + this->CapXForm->GetOutputPort()); this->CapProperty = vtkProperty2D::New(); this->CapProperty->SetColor(1,1,1); diff --git a/Widgets/vtkSliderRepresentation3D.cxx b/Widgets/vtkSliderRepresentation3D.cxx index 09ff014da8d..0f7147bfee2 100644 --- a/Widgets/vtkSliderRepresentation3D.cxx +++ b/Widgets/vtkSliderRepresentation3D.cxx @@ -62,13 +62,15 @@ vtkSliderRepresentation3D::vtkSliderRepresentation3D() vtkTransform *xform = vtkTransform::New(); xform->RotateZ(90.0); this->Cylinder = vtkTransformPolyDataFilter::New(); //align the axis along the x-axis - this->Cylinder->SetInput(this->CylinderSource->GetOutput()); + this->Cylinder->SetInputConnection( + this->CylinderSource->GetOutputPort()); this->Cylinder->SetTransform(xform); xform->Delete(); // The tube (the slider moves along the tube) this->TubeMapper = vtkPolyDataMapper::New(); - this->TubeMapper->SetInput(this->CylinderSource->GetOutput()); + this->TubeMapper->SetInputConnection( + this->CylinderSource->GetOutputPort()); this->TubeProperty = vtkProperty::New(); this->TubeProperty->SetColor(1,1,1); @@ -85,7 +87,8 @@ vtkSliderRepresentation3D::vtkSliderRepresentation3D() this->SliderSource->SetRadius(0.5); this->SliderMapper = vtkPolyDataMapper::New(); - this->SliderMapper->SetInput(this->SliderSource->GetOutput()); + this->SliderMapper->SetInputConnection( + this->SliderSource->GetOutputPort()); this->SliderProperty = vtkProperty::New(); this->SliderProperty->SetColor(0.2000, 0.6300, 0.7900); //peacock @@ -117,7 +120,8 @@ vtkSliderRepresentation3D::vtkSliderRepresentation3D() // The left cap this->LeftCapMapper = vtkPolyDataMapper::New(); - this->LeftCapMapper->SetInput(this->Cylinder->GetOutput()); + this->LeftCapMapper->SetInputConnection( + this->Cylinder->GetOutputPort()); this->CapProperty = vtkProperty::New(); this->CapProperty->SetColor(1,1,1); @@ -133,7 +137,8 @@ vtkSliderRepresentation3D::vtkSliderRepresentation3D() // The right cap this->RightCapMapper = vtkPolyDataMapper::New(); - this->RightCapMapper->SetInput(this->Cylinder->GetOutput()); + this->RightCapMapper->SetInputConnection( + this->Cylinder->GetOutputPort()); this->RightCapActor = vtkActor::New(); this->RightCapActor->SetMapper(this->RightCapMapper); @@ -153,7 +158,8 @@ vtkSliderRepresentation3D::vtkSliderRepresentation3D() this->LabelText = vtkVectorText::New(); this->LabelText->SetText(""); this->LabelMapper = vtkPolyDataMapper::New(); - this->LabelMapper->SetInput(this->LabelText->GetOutput()); + this->LabelMapper->SetInputConnection( + this->LabelText->GetOutputPort()); this->LabelActor = vtkActor::New(); this->LabelActor->SetMapper(this->LabelMapper); this->LabelActor->PickableOff(); @@ -162,7 +168,8 @@ vtkSliderRepresentation3D::vtkSliderRepresentation3D() this->TitleText->SetText(""); this->TitleHeight = 0.15; this->TitleMapper = vtkPolyDataMapper::New(); - this->TitleMapper->SetInput(this->TitleText->GetOutput()); + this->TitleMapper->SetInputConnection( + this->TitleText->GetOutputPort()); this->TitleActor = vtkActor::New(); this->TitleActor->SetMapper(this->TitleMapper); this->TitleActor->PickableOff(); @@ -459,11 +466,11 @@ void vtkSliderRepresentation3D::BuildRepresentation() // Update the canonical shape of the widget if ( this->SliderShape == vtkSliderRepresentation3D::SphereShape ) { - this->SliderMapper->SetInput(this->SliderSource->GetOutput()); + this->SliderMapper->SetInputConnection(this->SliderSource->GetOutputPort()); } else { - this->SliderMapper->SetInput(this->Cylinder->GetOutput()); + this->SliderMapper->SetInputConnection(this->Cylinder->GetOutputPort()); } this->TubeActor->SetScale(this->TubeWidth, 1.0-(2.0*this->EndCapLength), this->TubeWidth); diff --git a/Widgets/vtkSphereHandleRepresentation.cxx b/Widgets/vtkSphereHandleRepresentation.cxx index b00f0e46634..76844a9fe4f 100644 --- a/Widgets/vtkSphereHandleRepresentation.cxx +++ b/Widgets/vtkSphereHandleRepresentation.cxx @@ -42,7 +42,7 @@ vtkSphereHandleRepresentation::vtkSphereHandleRepresentation() this->Sphere->SetPhiResolution(8); this->Mapper = vtkPolyDataMapper::New(); - this->Mapper->SetInput(this->Sphere->GetOutput()); + this->Mapper->SetInputConnection(this->Sphere->GetOutputPort()); // Set up the initial properties this->CreateDefaultProperties(); diff --git a/Widgets/vtkSphereRepresentation.cxx b/Widgets/vtkSphereRepresentation.cxx index 7858bdc2cf9..72be37523ba 100644 --- a/Widgets/vtkSphereRepresentation.cxx +++ b/Widgets/vtkSphereRepresentation.cxx @@ -70,7 +70,8 @@ vtkSphereRepresentation::vtkSphereRepresentation() this->SphereSource->SetPhiResolution(8); this->SphereSource->LatLongTessellationOn(); this->SphereMapper = vtkPolyDataMapper::New(); - this->SphereMapper->SetInput(this->SphereSource->GetOutput()); + this->SphereMapper->SetInputConnection( + this->SphereSource->GetOutputPort()); this->SphereActor = vtkActor::New(); this->SphereActor->SetMapper(this->SphereMapper); @@ -83,7 +84,8 @@ vtkSphereRepresentation::vtkSphereRepresentation() this->HandleSource->SetThetaResolution(16); this->HandleSource->SetPhiResolution(8); this->HandleMapper = vtkPolyDataMapper::New(); - this->HandleMapper->SetInput(this->HandleSource->GetOutput()); + this->HandleMapper->SetInputConnection( + this->HandleSource->GetOutputPort()); this->HandleActor = vtkActor::New(); this->HandleActor->SetMapper(this->HandleMapper); diff --git a/Widgets/vtkSphereWidget.cxx b/Widgets/vtkSphereWidget.cxx index 479e5e61866..1c2ad03f823 100644 --- a/Widgets/vtkSphereWidget.cxx +++ b/Widgets/vtkSphereWidget.cxx @@ -47,7 +47,8 @@ vtkSphereWidget::vtkSphereWidget() this->SphereSource->SetPhiResolution(8); this->SphereSource->LatLongTessellationOn(); this->SphereMapper = vtkPolyDataMapper::New(); - this->SphereMapper->SetInput(this->SphereSource->GetOutput()); + this->SphereMapper->SetInputConnection( + this->SphereSource->GetOutputPort()); this->SphereActor = vtkActor::New(); this->SphereActor->SetMapper(this->SphereMapper); @@ -64,7 +65,8 @@ vtkSphereWidget::vtkSphereWidget() this->HandleSource->SetThetaResolution(16); this->HandleSource->SetPhiResolution(8); this->HandleMapper = vtkPolyDataMapper::New(); - this->HandleMapper->SetInput(this->HandleSource->GetOutput()); + this->HandleMapper->SetInputConnection( + this->HandleSource->GetOutputPort()); this->HandleActor = vtkActor::New(); this->HandleActor->SetMapper(this->HandleMapper); diff --git a/Widgets/vtkSplineRepresentation.cxx b/Widgets/vtkSplineRepresentation.cxx index e3adee3f6cc..6ccca5502f9 100644 --- a/Widgets/vtkSplineRepresentation.cxx +++ b/Widgets/vtkSplineRepresentation.cxx @@ -78,7 +78,8 @@ vtkSplineRepresentation::vtkSplineRepresentation() this->HandleGeometry[i]->SetThetaResolution(16); this->HandleGeometry[i]->SetPhiResolution(8); vtkPolyDataMapper* handleMapper = vtkPolyDataMapper::New(); - handleMapper->SetInput(this->HandleGeometry[i]->GetOutput()); + handleMapper->SetInputConnection( + this->HandleGeometry[i]->GetOutputPort()); this->Handle[i] = vtkActor::New(); this->Handle[i]->SetMapper(handleMapper); handleMapper->Delete(); @@ -109,7 +110,8 @@ vtkSplineRepresentation::vtkSplineRepresentation() this->ParametricFunctionSource->Update(); vtkPolyDataMapper* lineMapper = vtkPolyDataMapper::New(); - lineMapper->SetInput( this->ParametricFunctionSource->GetOutput() ) ; + lineMapper->SetInputConnection( + this->ParametricFunctionSource->GetOutputPort()) ; lineMapper->ImmediateModeRenderingOn(); lineMapper->SetResolveCoincidentTopologyToPolygonOffset(); @@ -675,7 +677,8 @@ void vtkSplineRepresentation::SetNumberOfHandles(int npts) this->HandleGeometry[i]->SetThetaResolution(16); this->HandleGeometry[i]->SetPhiResolution(8); vtkPolyDataMapper* handleMapper = vtkPolyDataMapper::New(); - handleMapper->SetInput(this->HandleGeometry[i]->GetOutput()); + handleMapper->SetInputConnection( + this->HandleGeometry[i]->GetOutputPort()); this->Handle[i] = vtkActor::New(); this->Handle[i]->SetMapper(handleMapper); handleMapper->Delete(); diff --git a/Widgets/vtkSplineWidget.cxx b/Widgets/vtkSplineWidget.cxx index ec855854a04..04070a1cba7 100644 --- a/Widgets/vtkSplineWidget.cxx +++ b/Widgets/vtkSplineWidget.cxx @@ -83,7 +83,8 @@ vtkSplineWidget::vtkSplineWidget() this->HandleGeometry[i]->SetThetaResolution(16); this->HandleGeometry[i]->SetPhiResolution(8); vtkPolyDataMapper* handleMapper = vtkPolyDataMapper::New(); - handleMapper->SetInput(this->HandleGeometry[i]->GetOutput()); + handleMapper->SetInputConnection( + this->HandleGeometry[i]->GetOutputPort()); this->Handle[i] = vtkActor::New(); this->Handle[i]->SetMapper(handleMapper); handleMapper->Delete(); @@ -114,7 +115,8 @@ vtkSplineWidget::vtkSplineWidget() this->ParametricFunctionSource->Update(); vtkPolyDataMapper* lineMapper = vtkPolyDataMapper::New(); - lineMapper->SetInput( this->ParametricFunctionSource->GetOutput() ) ; + lineMapper->SetInputConnection( + this->ParametricFunctionSource->GetOutputPort()); lineMapper->ImmediateModeRenderingOn(); lineMapper->SetResolveCoincidentTopologyToPolygonOffset(); @@ -1202,7 +1204,8 @@ void vtkSplineWidget::SetNumberOfHandles(int npts) this->HandleGeometry[i]->SetThetaResolution(16); this->HandleGeometry[i]->SetPhiResolution(8); vtkPolyDataMapper* handleMapper = vtkPolyDataMapper::New(); - handleMapper->SetInput(this->HandleGeometry[i]->GetOutput()); + handleMapper->SetInputConnection( + this->HandleGeometry[i]->GetOutputPort()); this->Handle[i] = vtkActor::New(); this->Handle[i]->SetMapper(handleMapper); handleMapper->Delete(); diff --git a/Widgets/vtkTensorProbeRepresentation.cxx b/Widgets/vtkTensorProbeRepresentation.cxx index f075c635ab3..fe70c15c4ed 100644 --- a/Widgets/vtkTensorProbeRepresentation.cxx +++ b/Widgets/vtkTensorProbeRepresentation.cxx @@ -55,21 +55,21 @@ vtkTensorProbeRepresentation::~vtkTensorProbeRepresentation() //---------------------------------------------------------------------- void vtkTensorProbeRepresentation::SetTrajectory( vtkPolyData * args ) { - if (this->Trajectory != args) - { - vtkPolyData * tempSGMacroVar = this->Trajectory; - this->Trajectory = args; - if (this->Trajectory != NULL) - { - this->Trajectory->Register(this); - } - if (tempSGMacroVar != NULL) - { - tempSGMacroVar->UnRegister(this); - } - this->TrajectoryMapper->SetInput( this->Trajectory ); + if (this->Trajectory != args) + { + vtkPolyData * tempSGMacroVar = this->Trajectory; + this->Trajectory = args; + if (this->Trajectory != NULL) + { + this->Trajectory->Register(this); + } + if (tempSGMacroVar != NULL) + { + tempSGMacroVar->UnRegister(this); + } + this->TrajectoryMapper->SetInputData( this->Trajectory ); this->Modified(); - } + } } //---------------------------------------------------------------------- diff --git a/Widgets/vtkTerrainContourLineInterpolator.cxx b/Widgets/vtkTerrainContourLineInterpolator.cxx index 961065a5e1c..fe29cca47a5 100644 --- a/Widgets/vtkTerrainContourLineInterpolator.cxx +++ b/Widgets/vtkTerrainContourLineInterpolator.cxx @@ -51,7 +51,7 @@ void vtkTerrainContourLineInterpolator::SetImageData(vtkImageData *image) if (this->ImageData != NULL) { this->ImageData->Register(this); - this->Projector->SetSource(this->ImageData); + this->Projector->SetSourceData(this->ImageData); } if (temp != NULL) { @@ -89,7 +89,7 @@ int vtkTerrainContourLineInterpolator::InterpolateLine( vtkRenderer *, lines->Delete(); pts->Delete(); - this->Projector->SetInput(terrainPath); + this->Projector->SetInputData(terrainPath); this->Projector->Update(); terrainPath->Delete(); diff --git a/Widgets/vtkTexturedButtonRepresentation.cxx b/Widgets/vtkTexturedButtonRepresentation.cxx index 4cd8e5b880e..d8ffa7a53a6 100644 --- a/Widgets/vtkTexturedButtonRepresentation.cxx +++ b/Widgets/vtkTexturedButtonRepresentation.cxx @@ -107,7 +107,7 @@ vtkTexturedButtonRepresentation::~vtkTexturedButtonRepresentation() void vtkTexturedButtonRepresentation:: SetButtonGeometry(vtkPolyData *pd) { - this->Mapper->SetInput(pd); + this->Mapper->SetInputData(pd); } @@ -341,11 +341,11 @@ void vtkTexturedButtonRepresentation::BuildRepresentation() vtkTextureArrayIterator iter = this->TextureArray->find(this->State); if ( iter != this->TextureArray->end() ) { - this->Texture->SetInput((*iter).second); + this->Texture->SetInputData((*iter).second); } else { - this->Texture->SetInput(NULL); + this->Texture->SetInputData(NULL); } this->BuildTime.Modified(); -- GitLab