diff --git a/Charts/Testing/Cxx/TestHistogram2D.cxx b/Charts/Testing/Cxx/TestHistogram2D.cxx index a341c996513df6f49d941a5196dd93ae57a35d12..a4b538ede96356d1a89a59691ea643aaa338e1ef 100644 --- a/Charts/Testing/Cxx/TestHistogram2D.cxx +++ b/Charts/Testing/Cxx/TestHistogram2D.cxx @@ -38,9 +38,7 @@ int TestHistogram2D(int, char * []) vtkNew<vtkImageData> data; data->SetExtent(0, size-1, 0, size-1, 0, 0); - data->SetNumberOfScalarComponents(1); - data->SetScalarTypeToDouble(); - data->AllocateScalars(); + data->AllocateScalars(VTK_DOUBLE, 1); data->SetOrigin(100.0, 0.0, 0.0); data->SetSpacing(2.0, 1.0, 1.0); diff --git a/Charts/vtkColorLegend.cxx b/Charts/vtkColorLegend.cxx index 3f19a5346504c0e975a70013cf4bc9ce3a48f4b9..9026543f4b8b227b8c64208c12c0fc9db1a07778 100644 --- a/Charts/vtkColorLegend.cxx +++ b/Charts/vtkColorLegend.cxx @@ -170,9 +170,7 @@ void vtkColorLegend::ComputeTexture() this->ImageData->SetExtent(0, 0, 0, dimension-1, 0, 0); - this->ImageData->SetNumberOfScalarComponents(3); - this->ImageData->SetScalarTypeToUnsignedChar(); - this->ImageData->AllocateScalars(); + this->ImageData->AllocateScalars(VTK_UNSIGNED_CHAR, 3); for (int i = 0; i < dimension; ++i) { diff --git a/Charts/vtkColorTransferFunctionItem.cxx b/Charts/vtkColorTransferFunctionItem.cxx index 3235d7dfbc82b02502cd0239420f787de5c20dad..284d11a1bbf3cb448472ce66dacdc52ee88790da 100644 --- a/Charts/vtkColorTransferFunctionItem.cxx +++ b/Charts/vtkColorTransferFunctionItem.cxx @@ -106,9 +106,7 @@ void vtkColorTransferFunctionItem::ComputeTexture() this->Texture->SetExtent(0, dimension-1, 0, 0, 0, 0); - this->Texture->SetNumberOfScalarComponents(4); - this->Texture->SetScalarTypeToUnsignedChar(); - this->Texture->AllocateScalars(); + this->Texture->AllocateScalars(VTK_UNSIGNED_CHAR, 4); for (int i = 0; i < dimension; ++i) { diff --git a/Charts/vtkLookupTableItem.cxx b/Charts/vtkLookupTableItem.cxx index f391a6653b038da2b2493df3e4f086f93504ce2b..a54dbe9a0c603755f2a62bb702b96f8de3da05e6 100644 --- a/Charts/vtkLookupTableItem.cxx +++ b/Charts/vtkLookupTableItem.cxx @@ -96,9 +96,7 @@ void vtkLookupTableItem::ComputeTexture() this->Texture->SetExtent(0, dimension - 1, 0,0, 0,0); - this->Texture->SetNumberOfScalarComponents(4); - this->Texture->SetScalarTypeToUnsignedChar(); - this->Texture->AllocateScalars(); + this->Texture->AllocateScalars(VTK_UNSIGNED_CHAR, 4); // TODO: Support log scale ? double bounds[4]; this->GetBounds(bounds); diff --git a/Charts/vtkPiecewiseFunctionItem.cxx b/Charts/vtkPiecewiseFunctionItem.cxx index d66c91e9bf836c4feb2e8499e0359b6af1ede649..0961ea560b4a8de2622c1168c9e67bddd117acb5 100644 --- a/Charts/vtkPiecewiseFunctionItem.cxx +++ b/Charts/vtkPiecewiseFunctionItem.cxx @@ -108,9 +108,7 @@ void vtkPiecewiseFunctionItem::ComputeTexture() this->Texture->SetExtent(0, dimension-1, 0, 0, 0, 0); - this->Texture->SetNumberOfScalarComponents(4); - this->Texture->SetScalarTypeToUnsignedChar(); - this->Texture->AllocateScalars(); + this->Texture->AllocateScalars(VTK_UNSIGNED_CHAR, 4); this->PiecewiseFunction->GetTable(bounds[0], bounds[1], dimension, values); unsigned char* ptr = diff --git a/Charts/vtkPlotHistogram2D.cxx b/Charts/vtkPlotHistogram2D.cxx index 6edd8955feaf4856a170a5b6ad352bddd655055f..61c6d12d0e3be4b5fa3014c37ee0548bc2978b5f 100644 --- a/Charts/vtkPlotHistogram2D.cxx +++ b/Charts/vtkPlotHistogram2D.cxx @@ -126,9 +126,7 @@ void vtkPlotHistogram2D::GenerateHistogram() this->Output = vtkSmartPointer<vtkImageData>::New(); } this->Output->SetExtent(this->Input->GetExtent()); - this->Output->SetNumberOfScalarComponents(4); - this->Output->SetScalarTypeToUnsignedChar(); - this->Output->AllocateScalars(); + this->Output->AllocateScalars(VTK_UNSIGNED_CHAR, 4); int dimension = this->Input->GetDimensions()[0] * this->Input->GetDimensions()[1]; double *input = reinterpret_cast<double *>(this->Input->GetScalarPointer()); diff --git a/Charts/vtkPlotPoints.cxx b/Charts/vtkPlotPoints.cxx index 8cf14470fe7c19ef1653408f03d6bd4965aa026a..a37f863d3832767997fce3ff73ea50416f0ae886 100644 --- a/Charts/vtkPlotPoints.cxx +++ b/Charts/vtkPlotPoints.cxx @@ -228,8 +228,6 @@ void vtkPlotPoints::GeneraterMarker(int width, bool highlight) if (!this->Marker) { this->Marker = vtkImageData::New(); - this->Marker->SetScalarTypeToUnsignedChar(); - this->Marker->SetNumberOfScalarComponents(4); } else { @@ -247,8 +245,6 @@ void vtkPlotPoints::GeneraterMarker(int width, bool highlight) if (!this->HighlightMarker) { this->HighlightMarker = vtkImageData::New(); - this->HighlightMarker->SetScalarTypeToUnsignedChar(); - this->HighlightMarker->SetNumberOfScalarComponents(4); data = this->HighlightMarker; } else @@ -264,7 +260,7 @@ void vtkPlotPoints::GeneraterMarker(int width, bool highlight) } data->SetExtent(0, width-1, 0, width-1, 0, 0); - data->AllocateScalars(); + data->AllocateScalars(VTK_UNSIGNED_CHAR, 4); unsigned char* image = static_cast<unsigned char*>(data->GetScalarPointer()); diff --git a/Filtering/Testing/Cxx/TestPointLocators.cxx b/Filtering/Testing/Cxx/TestPointLocators.cxx index 6a0a948b778b3b609e72a8620f370690b2ecb171..d5562878758428ca76d2587b0ea727a2b3be2924 100644 --- a/Filtering/Testing/Cxx/TestPointLocators.cxx +++ b/Filtering/Testing/Cxx/TestPointLocators.cxx @@ -122,7 +122,6 @@ int ComparePointLocators(vtkAbstractPointLocator* locator1, vtkAbstractPointLoca } } sgrid->SetPoints(points); - sgrid->Update(); points->Delete(); locator1->SetDataSet(sgrid); diff --git a/Filtering/vtkAlgorithm.cxx b/Filtering/vtkAlgorithm.cxx index 44ecf3d5d80d6770cc3040b12b09bd7766d6b318..232925c1829341e927fa0376305d3415d428a06c 100644 --- a/Filtering/vtkAlgorithm.cxx +++ b/Filtering/vtkAlgorithm.cxx @@ -1338,6 +1338,17 @@ void vtkAlgorithm::Update() this->GetExecutive()->Update(); } +//---------------------------------------------------------------------------- +void vtkAlgorithm::PropagateUpdateExtent() +{ + vtkStreamingDemandDrivenPipeline* sddp = + vtkStreamingDemandDrivenPipeline::SafeDownCast(this->GetExecutive()); + if (sddp) + { + sddp->PropagateUpdateExtent(-1); + } +} + //---------------------------------------------------------------------------- void vtkAlgorithm::UpdateInformation() { @@ -1532,3 +1543,53 @@ double vtkAlgorithm::ComputePriority() return sddp->ComputePriority(0); } +//------------------------------------------------------------- +int vtkAlgorithm::SetUpdateExtentToWholeExtent( + int port, int connection) +{ + if (this->GetInputInformation(port, connection)) + { + return + vtkStreamingDemandDrivenPipeline::SetUpdateExtentToWholeExtent( + this->GetInputInformation(port, connection)); + } + else + { + return 0; + } +} + +//------------------------------------------------------------- +int vtkAlgorithm::SetUpdateExtentToWholeExtent() +{ + return this->SetUpdateExtentToWholeExtent(0, 0); +} + +//------------------------------------------------------------- +void vtkAlgorithm::SetUpdateExtent(int port, int connection, + int piece, + int numPieces, + int ghostLevel) +{ + if (this->GetInputInformation(port, connection)) + { + vtkStreamingDemandDrivenPipeline::SetUpdateExtent( + this->GetInputInformation(port, connection), + piece, + numPieces, + ghostLevel); + } +} + +//------------------------------------------------------------- +void vtkAlgorithm::SetUpdateExtent(int port, + int connection, + int extent[6]) +{ + if (this->GetInputInformation(port, connection)) + { + vtkStreamingDemandDrivenPipeline::SetUpdateExtent( + this->GetInputInformation(port, connection), + extent); + } +} diff --git a/Filtering/vtkAlgorithm.h b/Filtering/vtkAlgorithm.h index 1930fba4115fef726898707b3f4a23fcd38a36c3..7f27392bf019a934819850886c849a70f1079b7e 100644 --- a/Filtering/vtkAlgorithm.h +++ b/Filtering/vtkAlgorithm.h @@ -371,9 +371,13 @@ public: virtual void Update(); // Description: - // Backward compatibility method to invoke UpdateInformation on executive. + // Bring the algorithm's information up-to-date. virtual void UpdateInformation(); + // Description:: + // Propagate meta-data upstream. + virtual void PropagateUpdateExtent(); + // Description: // Bring this algorithm's outputs up-to-date. virtual void UpdateWholeExtent(); @@ -427,6 +431,47 @@ public: static vtkInformationIntegerKey* PRESERVES_ATTRIBUTES(); static vtkInformationIntegerKey* PRESERVES_RANGES(); + // Description: + // If the whole input extent is required to generate the requested output + // extent, this method can be called to set the input update extent to the + // whole input extent. This method assumes that the whole extent is known + // (that UpdateInformation has been called). + // This function has no effect is input connection is not established. + int SetUpdateExtentToWholeExtent(int port, int connection); + + // Description: + // Convenience function equivalent to SetUpdateExtentToWholeExtent(0, 0) + // This function has no effect is input connection is not established. + int SetUpdateExtentToWholeExtent(); + + // Description: + // Set the update extent in terms of piece and ghost levels. + // This function has no effect is input connection is not established. + void SetUpdateExtent(int port, int connection, + int piece,int numPieces, int ghostLevel); + + // Description: + // Convenience function equivalent to SetUpdateExtent(0, 0, piece, + // numPieces, ghostLevel) + // This function has no effect is input connection is not established. + void SetUpdateExtent(int piece,int numPieces, int ghostLevel) + { + this->SetUpdateExtent(0, 0, piece, numPieces, ghostLevel); + } + + // Description: + // Set the update extent for data objects that use 3D extents + // This function has no effect is input connection is not established. + void SetUpdateExtent(int port, int connection, int extent[6]); + + // Description: + // Convenience function equivalent to SetUpdateExtent(0, 0, extent) + // This function has no effect is input connection is not established. + void SetUpdateExtent(int extent[6]) + { + this->SetUpdateExtent(0, 0, extent); + } + protected: vtkAlgorithm(); ~vtkAlgorithm(); diff --git a/Filtering/vtkDataObject.cxx b/Filtering/vtkDataObject.cxx index d6ca27da2b524d87c405538316149e61315db5d4..065c0b86a887ef152c3210d79f5833a889a06a20 100644 --- a/Filtering/vtkDataObject.cxx +++ b/Filtering/vtkDataObject.cxx @@ -752,7 +752,7 @@ void vtkDataObject::InternalDataObjectCopy(vtkDataObject *src) //---------------------------------------------------------------------------- // This should be a pure virutal method. -void vtkDataObject::Crop() +void vtkDataObject::Crop(const int* updateExtent) { } diff --git a/Filtering/vtkDataObject.h b/Filtering/vtkDataObject.h index 3956c2c7e76d2bf788801a75c0ff980058f4ea17..0a3c498bb015f5e7e9abca123a5dfe8c90ff0e70 100644 --- a/Filtering/vtkDataObject.h +++ b/Filtering/vtkDataObject.h @@ -249,7 +249,7 @@ public: // Description: // This method crops the data object (if necesary) so that the extent // matches the update extent. - virtual void Crop(); + virtual void Crop(const int* updateExtent); //BTX // Description: diff --git a/Filtering/vtkStreamingDemandDrivenPipeline.cxx b/Filtering/vtkStreamingDemandDrivenPipeline.cxx index 4d8b4f428f546da90807df5d7bb0840980b1f52a..d96306df89e2c3318d52544014df5969d15726b1 100644 --- a/Filtering/vtkStreamingDemandDrivenPipeline.cxx +++ b/Filtering/vtkStreamingDemandDrivenPipeline.cxx @@ -78,9 +78,9 @@ vtkInformationKeyMacro(vtkStreamingDemandDrivenPipeline, PREVIOUS_FAST_PATH_ID_T class vtkStreamingDemandDrivenPipelineToDataObjectFriendship { public: - static void Crop(vtkDataObject* obj) + static void Crop(vtkDataObject* obj, const int* extent) { - obj->Crop(); + obj->Crop(extent); } }; @@ -270,7 +270,8 @@ int vtkStreamingDemandDrivenPipeline if(info->Has(EXACT_EXTENT()) && info->Get(EXACT_EXTENT())) { vtkDataObject* data = info->Get(vtkDataObject::DATA_OBJECT()); - vtkStreamingDemandDrivenPipelineToDataObjectFriendship::Crop(data); + vtkStreamingDemandDrivenPipelineToDataObjectFriendship::Crop( + data, info->Get(UPDATE_EXTENT())); } // Clear combined update extent, since the update cycle has completed if (info->Has(COMBINED_UPDATE_EXTENT())) diff --git a/Geovis/vtkGeoAlignedImageSource.cxx b/Geovis/vtkGeoAlignedImageSource.cxx index f0532d6b0f51ef04de255141338383546bc9eebf..ab80ce2be9f3a7237e743ffa1f6f3db140fa7b4d 100644 --- a/Geovis/vtkGeoAlignedImageSource.cxx +++ b/Geovis/vtkGeoAlignedImageSource.cxx @@ -371,8 +371,7 @@ void vtkGeoAlignedImageSource::CropImageForNode(vtkGeoImageNode* node, vtkImageD vtkSmartPointer<vtkImageData> cropped = vtkSmartPointer<vtkImageData>::New(); cropped->ShallowCopy(image); - cropped->SetUpdateExtent(ext); - cropped->Crop(); + cropped->Crop(ext); // Now set the longitude and latitude range based on the actual image size. double lonRange[2]; diff --git a/Geovis/vtkGeoImageNode.cxx b/Geovis/vtkGeoImageNode.cxx index 9829e3418e211fd4ad46e31ec9ffbc7a543f6665..e64bc10269aa6867d67bdeff40a7765a78174a8c 100644 --- a/Geovis/vtkGeoImageNode.cxx +++ b/Geovis/vtkGeoImageNode.cxx @@ -160,8 +160,7 @@ void vtkGeoImageNode::CropImageForTile( this->Image = vtkSmartPointer<vtkImageData>::New(); } this->Image->ShallowCopy(image); - this->Image->SetUpdateExtent(ext); - this->Image->Crop(); + this->Image->Crop(ext); // Now set the longitude and latitude range based on the actual image size. this->LongitudeRange[0] = origin[0] + ext[0]*spacing[0]; diff --git a/Graphics/Testing/Cxx/BoxClipTetrahedra.cxx b/Graphics/Testing/Cxx/BoxClipTetrahedra.cxx index 41d731820faa3b640a43ea4814d33214e4325f7d..d5015119931db6ecba15ea176bd7777c87294d25 100644 --- a/Graphics/Testing/Cxx/BoxClipTetrahedra.cxx +++ b/Graphics/Testing/Cxx/BoxClipTetrahedra.cxx @@ -118,8 +118,6 @@ public: static void CheckWinding(vtkUnstructuredGrid *data) { - data->Update(); - vtkPoints *points = data->GetPoints(); vtkCellArray *cells = data->GetCells(); diff --git a/Graphics/Testing/Cxx/BoxClipTriangulate.cxx b/Graphics/Testing/Cxx/BoxClipTriangulate.cxx index d1b246ceb5847409fbe508fec9cfc91b4940227b..ef014b6e067a23fad1f5f5dd78f10ee409c47e49 100644 --- a/Graphics/Testing/Cxx/BoxClipTriangulate.cxx +++ b/Graphics/Testing/Cxx/BoxClipTriangulate.cxx @@ -124,9 +124,10 @@ class BoxClipTriangulateFailed { }; //----------------------------------------------------------------------------- -static void CheckWinding(vtkUnstructuredGrid *data) +static void CheckWinding(vtkBoxClipDataSet* alg) { - data->Update(); + alg->Update(); + vtkUnstructuredGrid* data = alg->GetOutput(); vtkPoints *points = data->GetPoints(); @@ -307,7 +308,7 @@ static void Check3DPrimitive(int type, vtkIdType numcells, iren->Start(); #endif - CheckWinding(output); + CheckWinding(clipper); VTK_CREATE(vtkDataSetSurfaceFilter, surface); surface->SetInput(output); diff --git a/Graphics/Testing/Cxx/TestBareScalarsToColors.cxx b/Graphics/Testing/Cxx/TestBareScalarsToColors.cxx index 6cf75c61640bb81e3efb7e44e64f57e7e3907b84..1d5568a913c255e5927cd9f9672fe831012a811c 100644 --- a/Graphics/Testing/Cxx/TestBareScalarsToColors.cxx +++ b/Graphics/Testing/Cxx/TestBareScalarsToColors.cxx @@ -151,7 +151,6 @@ int TestBareScalarsToColors(int argc, char *argv[]) vtkNew<vtkImageData> image; image->SetDimensions(80, 80, 1); - image->SetScalarTypeToUnsignedChar(); vtkUnsignedCharArray *colors = table2->MapScalars(outputs[i], VTK_COLOR_MODE_DEFAULT, outputc); image->GetPointData()->SetScalars(colors); diff --git a/Graphics/Testing/Cxx/TestExtraction.cxx b/Graphics/Testing/Cxx/TestExtraction.cxx index d7c74395a9e69d748ff23a65ce40a28a1ffbae2d..bf4f46025d7ca5f243254942654b5d0a404ef4fb 100644 --- a/Graphics/Testing/Cxx/TestExtraction.cxx +++ b/Graphics/Testing/Cxx/TestExtraction.cxx @@ -156,7 +156,6 @@ 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->SetWholeExtent(0,XCELLS+1,0,YCELLS+1,0,ZCELLS+1); sampleData->AllocateScalars(); vtkIdTypeArray *pia = vtkIdTypeArray::New(); diff --git a/Graphics/Testing/Cxx/TestMapVectorsAsRGBColors.cxx b/Graphics/Testing/Cxx/TestMapVectorsAsRGBColors.cxx index 83ec4f0864871cc78672bcd10730ec61a6181f23..c5dbf5b710904ea8161ffcf59a66172cbd9dd11d 100644 --- a/Graphics/Testing/Cxx/TestMapVectorsAsRGBColors.cxx +++ b/Graphics/Testing/Cxx/TestMapVectorsAsRGBColors.cxx @@ -135,7 +135,6 @@ int TestMapVectorsAsRGBColors(int argc, char *argv[]) vtkSmartPointer<vtkImageData> image = vtkSmartPointer<vtkImageData>::New(); image->SetDimensions(80, 80, 1); - image->SetScalarTypeToUnsignedChar(); vtkUnsignedCharArray *colors = table2->MapScalars(outputs[i], VTK_COLOR_MODE_DEFAULT, outputc); image->GetPointData()->SetScalars(colors); diff --git a/Graphics/Testing/Cxx/TestQuadraturePoints.cxx b/Graphics/Testing/Cxx/TestQuadraturePoints.cxx index 84924a144fac1c13372e1fa5b9e557a66c88fa66..a23f74cec6ab3e98665a2c6b83c05ef8d00baeee 100644 --- a/Graphics/Testing/Cxx/TestQuadraturePoints.cxx +++ b/Graphics/Testing/Cxx/TestQuadraturePoints.cxx @@ -81,13 +81,13 @@ int TestQuadraturePoints(int argc,char *argv[]) if (xusgr->CanReadFile(inputFileName.c_str())) { input=xusgr->GetOutput(); - input->Update(); + xusgr->Update(); } else if (lusgr->IsFileValid("unstructured_grid")) { lusgr->SetFileName(inputFileName.c_str()); input=lusgr->GetOutput(); - input->Update(); + lusgr->Update(); } if (input==0) { @@ -129,7 +129,7 @@ int TestQuadraturePoints(int argc,char *argv[]) xusgr->SetFileName(tempFile.c_str()); input=xusgr->GetOutput();*/ input = vtkUnstructuredGrid::SafeDownCast(fieldInterp->GetOutput()); - input->Update(); + fieldInterp->Update(); input->GetPointData()->SetActiveVectors(warpName.c_str()); input->GetPointData()->SetActiveScalars(threshName.c_str()); // Demonstrate warp by vector. @@ -155,7 +155,7 @@ int TestQuadraturePoints(int argc,char *argv[]) pointGen->SetInputArrayToProcess(0, 0, 0, vtkDataObject::FIELD_ASSOCIATION_CELLS, "QuadratureOffset"); pointGen->SetInputConnection(thresholder->GetOutputPort()); vtkPolyData *output=vtkPolyData::SafeDownCast(pointGen->GetOutput()); - output->Update(); + pointGen->Update(); const char* activeScalars = "pressure"; output->GetPointData()->SetActiveScalars(activeScalars); diff --git a/Hybrid/Testing/Cxx/TestImageStencilData.cxx b/Hybrid/Testing/Cxx/TestImageStencilData.cxx index 78ebcd9e938c6d1e7444c6487a9cdca56cd2b9a5..12a020154c0d5da177d3c899da96d88f9f410755 100644 --- a/Hybrid/Testing/Cxx/TestImageStencilData.cxx +++ b/Hybrid/Testing/Cxx/TestImageStencilData.cxx @@ -29,6 +29,7 @@ #include "vtkMatrixToLinearTransform.h" #include "vtkTransformPolyDataFilter.h" #include "vtkMatrix4x4.h" +#include "vtkTrivialProducer.h" #include "vtkTesting.h" @@ -82,8 +83,7 @@ CreateBoxStencilData(double d1, double d2 ) image->SetOrigin( 0.0, 0.0, 0.0 ); image->SetExtent(static_cast<int>(d1)-2,static_cast<int>(d2)+2, static_cast<int>(d1)-2,static_cast<int>(d2)+2, 0, 0 ); - image->SetScalarTypeToUnsignedChar(); - image->AllocateScalars(); + image->AllocateScalars(VTK_UNSIGNED_CHAR, 1); vtkImageStencil *stencil = vtkImageStencil::New(); stencil->SetInput( image ); @@ -112,9 +112,7 @@ static void GetStencilDataAsImageData( extent[5] = extent[4]; // Otherwise we cannot write it out as a PNG! int extent1[6] = {0,50,0,50,0,0}; image->SetExtent(extent1); - image->SetScalarTypeToUnsignedChar(); - image->SetNumberOfScalarComponents(3); - image->AllocateScalars(); + image->AllocateScalars(VTK_UNSIGNED_CHAR, 3); // Fill image with zeroes for (int y=extent1[2]; y <= extent1[3]; y++) @@ -205,7 +203,10 @@ int TestImageStencilData( int argc, char * argv [] ) return EXIT_FAILURE; } - int retval = testing->RegressionTest( image, 10 ); + vtkSmartPointer< vtkTrivialProducer > producer = + vtkSmartPointer< vtkTrivialProducer >::New(); + producer->SetOutput(image); + int retval = testing->RegressionTest( producer, 10 ); testing->Delete(); image->Delete(); diff --git a/Hybrid/vtkAxesActor.cxx b/Hybrid/vtkAxesActor.cxx index 5502205a0f1d5b6fd19027c9f2a4ed14482bde63..6c21d2eaa3b90257dab2c5cc0414569b2d9e39af 100644 --- a/Hybrid/vtkAxesActor.cxx +++ b/Hybrid/vtkAxesActor.cxx @@ -607,10 +607,10 @@ void vtkAxesActor::UpdateProps() SetInputConnection( this->UserDefinedTip->GetProducerPort() ); } - (vtkPolyDataMapper::SafeDownCast(this->XAxisTip->GetMapper()))-> - GetInput()->Update(); - (vtkPolyDataMapper::SafeDownCast(this->XAxisShaft->GetMapper()))-> - GetInput()->Update(); + vtkPolyDataMapper::SafeDownCast(this->XAxisTip->GetMapper())-> + GetInputAlgorithm()->Update(); + vtkPolyDataMapper::SafeDownCast(this->XAxisShaft->GetMapper())-> + GetInputAlgorithm()->Update(); if ( this->GetUserTransform() ) { diff --git a/Hybrid/vtkBarChartActor.cxx b/Hybrid/vtkBarChartActor.cxx index 811931852e96eb76c0526295e01796fea7db18a8..9b5d5f751f3cbed1a91c184fb047978d30d5281a 100644 --- a/Hybrid/vtkBarChartActor.cxx +++ b/Hybrid/vtkBarChartActor.cxx @@ -332,8 +332,6 @@ int vtkBarChartActor::BuildPlot(vtkViewport *viewport) } // Check modified time to see whether we have to rebuild. - this->Input->Update(); - if (positionsHaveChanged || this->GetMTime() > this->BuildTime || this->Input->GetMTime() > this->BuildTime || diff --git a/Hybrid/vtkCaptionActor2D.cxx b/Hybrid/vtkCaptionActor2D.cxx index d5439f47de2842b5f9e6410d5440f5742c813d7f..f08d0b20dc14607802349c883c13be073461d8b7 100644 --- a/Hybrid/vtkCaptionActor2D.cxx +++ b/Hybrid/vtkCaptionActor2D.cxx @@ -396,7 +396,6 @@ int vtkCaptionActor2D::RenderOpaqueGeometry(vtkViewport *viewport) if ( this->LeaderGlyph ) { // compute the scale - this->LeaderGlyph->Update(); double length = this->LeaderGlyph->GetLength(); int *sze = viewport->GetSize(); int numPixels = static_cast<int> (this->LeaderGlyphSize * @@ -433,7 +432,6 @@ int vtkCaptionActor2D::RenderOpaqueGeometry(vtkViewport *viewport) { this->LeaderMapper2D->SetInput(this->LeaderPolyData); this->LeaderMapper3D->SetInput(this->LeaderPolyData); - this->LeaderPolyData->Update(); } // assign properties diff --git a/Hybrid/vtkCubeAxesActor2D.cxx b/Hybrid/vtkCubeAxesActor2D.cxx index fb6e6b4da724b37d67791338331246588f9fa7ca..1fae2a615050285ffbf34f99b4ed6bcbfc0e3881 100644 --- a/Hybrid/vtkCubeAxesActor2D.cxx +++ b/Hybrid/vtkCubeAxesActor2D.cxx @@ -684,7 +684,6 @@ void vtkCubeAxesActor2D::GetBounds(double bounds[6]) if ( this->Input ) { - this->Input->Update(); this->Input->GetBounds(bounds); for (i=0; i< 6; i++) { diff --git a/Hybrid/vtkGridTransform.cxx b/Hybrid/vtkGridTransform.cxx index d1f5666b27513bc7241eae5c413639bdc1b65516..023ccdbeeff88c6657d78bf4e344ef701054f75f 100644 --- a/Hybrid/vtkGridTransform.cxx +++ b/Hybrid/vtkGridTransform.cxx @@ -802,10 +802,12 @@ unsigned long vtkGridTransform::GetMTime() result = vtkWarpTransform::GetMTime(); if (this->DisplacementGrid) { + /* this->DisplacementGrid->UpdateInformation(); mtime = this->DisplacementGrid->GetPipelineMTime(); result = ( mtime > result ? mtime : result ); + */ mtime = this->DisplacementGrid->GetMTime(); result = ( mtime > result ? mtime : result ); @@ -1227,7 +1229,7 @@ void vtkGridTransform::InternalUpdate() return; } - grid->UpdateInformation(); + //grid->UpdateInformation(); if (grid->GetNumberOfScalarComponents() != 3) { @@ -1245,8 +1247,8 @@ void vtkGridTransform::InternalUpdate() return; } - grid->SetUpdateExtent(grid->GetWholeExtent()); - grid->Update(); + //grid->SetUpdateExtent(grid->GetWholeExtent()); + //grid->Update(); this->GridPointer = grid->GetScalarPointer(); this->GridScalarType = grid->GetScalarType(); diff --git a/Hybrid/vtkImageDataLIC2D.cxx b/Hybrid/vtkImageDataLIC2D.cxx index f8118ec3be5fb0668bcb8b9cc1f61df5580e44af..777eb0d4481dc1062d1e8a7ff824cbcde6877eef 100644 --- a/Hybrid/vtkImageDataLIC2D.cxx +++ b/Hybrid/vtkImageDataLIC2D.cxx @@ -585,8 +585,7 @@ int vtkImageDataLIC2D::RequestData( // hence we allocate the output using the GPU extent and then crop it. output->SetExtent(gpuExtent); - output->SetNumberOfScalarComponents(3); - output->AllocateScalars(); + output->AllocateScalars(VTK_FLOAT, 3); outputBus->SetCPUExtent(gpuExtent); outputBus->SetGPUExtent(gpuExtent); outputBus->SetTexture(internal->GetLIC()); @@ -599,7 +598,7 @@ int vtkImageDataLIC2D::RequestData( noiseBus->Delete(); // Ensures that the output extent is exactly same as what was asked for. - output->Crop(); + output->Crop(outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT())); return 1; } diff --git a/Hybrid/vtkImplicitModeller.cxx b/Hybrid/vtkImplicitModeller.cxx index 1ef0a3fabee271a6c66e5b364afd970d60efbebc..c14a77fbf92e3f5b354fbca3fd357af722f98027 100644 --- a/Hybrid/vtkImplicitModeller.cxx +++ b/Hybrid/vtkImplicitModeller.cxx @@ -177,7 +177,9 @@ void vtkImplicitModeller::StartAppend(int internal) // it has been called. this->UpdateInformation(); } - this->GetOutput()->SetUpdateExtent(this->GetOutput()->GetWholeExtent()); + vtkStreamingDemandDrivenPipeline::SetUpdateExtent( + this->GetOutputInformation(0), + vtkStreamingDemandDrivenPipeline::GetWholeExtent(this->GetOutputInformation(0))); vtkDebugMacro(<< "Initializing data"); this->AllocateOutputData(this->GetOutput()); diff --git a/Hybrid/vtkLegendBoxActor.cxx b/Hybrid/vtkLegendBoxActor.cxx index ebf345b833f6e1e3e155904131b3558d6bc3d668..18c714aa67dc70613ecd21798ab2bbf78602a55a 100644 --- a/Hybrid/vtkLegendBoxActor.cxx +++ b/Hybrid/vtkLegendBoxActor.cxx @@ -688,7 +688,7 @@ int vtkLegendBoxActor::RenderOpaqueGeometry(vtkViewport *viewport) if ( this->Symbol[i] ) //if there is a symbol { symbolExists = true; - this->Symbol[i]->Update(); + //this->Symbol[i]->Update(); bounds = this->Symbol[i]->GetBounds(); if ( (bounds[3]-bounds[2]) == 0.0 ) { diff --git a/Hybrid/vtkMNITransformReader.cxx b/Hybrid/vtkMNITransformReader.cxx index dfcbfec1757e4781b934501e02e2781743a5d389..15b594f29f8f62083efba3cf77d9a9eff55fcc40 100644 --- a/Hybrid/vtkMNITransformReader.cxx +++ b/Hybrid/vtkMNITransformReader.cxx @@ -758,7 +758,7 @@ int vtkMNITransformReader::ReadGridTransform( } // Read the minc file now, rather than later - reader->GetOutput()->Update(); + reader->Update(); // Create the transform vtkGridTransform *transform = vtkGridTransform::New(); diff --git a/Hybrid/vtkPieChartActor.cxx b/Hybrid/vtkPieChartActor.cxx index 5456e8932695d115c717fac3c557b3f336830396..678066122d4a44146dde44c72d9db1f6d6de7827 100644 --- a/Hybrid/vtkPieChartActor.cxx +++ b/Hybrid/vtkPieChartActor.cxx @@ -327,7 +327,7 @@ int vtkPieChartActor::BuildPlot(vtkViewport *viewport) } // Check modified time to see whether we have to rebuild. - this->Input->Update(); + //this->Input->Update(); if (positionsHaveChanged || this->GetMTime() > this->BuildTime || diff --git a/Hybrid/vtkRIBExporter.cxx b/Hybrid/vtkRIBExporter.cxx index 43d8f0d9f79c1c6b1e1747198b1e2f4497dfb0d6..29203c2000c74561e5b66699df9d0c3e8f645cb1 100644 --- a/Hybrid/vtkRIBExporter.cxx +++ b/Hybrid/vtkRIBExporter.cxx @@ -1225,7 +1225,7 @@ void vtkRIBExporter::WriteTexture (vtkTexture *aTexture) vtkErrorMacro(<< "texture has no input!\n"); return; } - aTexture->GetInput()->Update(); + aTexture->Update(); size = aTexture->GetInput()->GetDimensions(); scalars = aTexture->GetInput()->GetPointData()->GetScalars(); @@ -1296,11 +1296,8 @@ void vtkRIBExporter::WriteTexture (vtkTexture *aTexture) vtkStructuredPoints *anImage = vtkStructuredPoints::New(); anImage->SetDimensions (xsize, ysize, 1); - anImage->SetUpdateExtent(0,xsize-1,0,ysize-1, 0, 0); - anImage->SetScalarType(mappedScalars->GetDataType()); anImage->GetPointData()->SetScalars (mappedScalars); int bpp = mappedScalars->GetNumberOfComponents(); - anImage->SetNumberOfScalarComponents (bpp); // renderman and bmrt seem to require r,g,b and alpha in all their // texture maps. So if our tmap doesn't have the right components diff --git a/Hybrid/vtkRenderLargeImage.cxx b/Hybrid/vtkRenderLargeImage.cxx index 2e88ac0881ef299310551a5d234257de6014ae18..3d0d9b89e33d670e0078355e03c3b8394480444a 100644 --- a/Hybrid/vtkRenderLargeImage.cxx +++ b/Hybrid/vtkRenderLargeImage.cxx @@ -201,7 +201,8 @@ void vtkRenderLargeImage::RequestData( } // Get the requested extents. - this->GetOutput()->GetUpdateExtent(inExtent); + outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT(), + inExtent); // get and transform the increments data->GetIncrements(inIncr); diff --git a/Hybrid/vtkSpiderPlotActor.cxx b/Hybrid/vtkSpiderPlotActor.cxx index 7ed093cbbd7fa8da9b689a192d621b8d4f32d145..43e254c05c277fc93e67c8d9948ac2d3e82b87f4 100644 --- a/Hybrid/vtkSpiderPlotActor.cxx +++ b/Hybrid/vtkSpiderPlotActor.cxx @@ -342,7 +342,7 @@ int vtkSpiderPlotActor::BuildPlot(vtkViewport *viewport) } // Check modified time to see whether we have to rebuild. - this->Input->Update(); + //this->Input->Update(); if (positionsHaveChanged || this->GetMTime() > this->BuildTime || diff --git a/Hybrid/vtkStructuredGridLIC2D.cxx b/Hybrid/vtkStructuredGridLIC2D.cxx index f52591edba3c35ae3b39da258fd007e6d3b1c3c9..09082d25e3f038c2e9efa9ee561f7f9fbb205522 100644 --- a/Hybrid/vtkStructuredGridLIC2D.cxx +++ b/Hybrid/vtkStructuredGridLIC2D.cxx @@ -325,8 +325,7 @@ void vtkStructuredGridLIC2D::AllocateOutputData(vtkDataObject *output, vtkWarningMacro( "Not enough output ports." ); return; } - out2->SetNumberOfScalarComponents(3); - out2->AllocateScalars(); + out2->AllocateScalars(VTK_FLOAT, 3); } } } diff --git a/Hybrid/vtkX3DExporter.cxx b/Hybrid/vtkX3DExporter.cxx index 5f7040b2d85d1a682915db8c8b51a0314a3dbae7..41bfd3a74b05c92ae098636493cf25602174e0c0 100644 --- a/Hybrid/vtkX3DExporter.cxx +++ b/Hybrid/vtkX3DExporter.cxx @@ -739,7 +739,7 @@ void vtkX3DExporter::WriteATexture(vtkActor *anActor, vtkErrorMacro(<< "texture has no input!\n"); return; } - aTexture->GetInput()->Update(); + aTexture->Update(); size = aTexture->GetInput()->GetDimensions(); scalars = aTexture->GetInput()->GetPointData()->GetScalars(); diff --git a/Hybrid/vtkXYPlotActor.cxx b/Hybrid/vtkXYPlotActor.cxx index 242d4107f9546858e2eed5256bff466dea3b4a9d..14b2ded2dfa02385ac44d0a42afc7476e2a5494f 100644 --- a/Hybrid/vtkXYPlotActor.cxx +++ b/Hybrid/vtkXYPlotActor.cxx @@ -573,7 +573,7 @@ int vtkXYPlotActor::RenderOpaqueGeometry(vtkViewport *viewport) for (mtime=0, this->InputList->InitTraversal(dsit); (ds = this->InputList->GetNextDataSet(dsit)); ) { - ds->Update(); + //ds->Update(); dsMtime = ds->GetMTime(); if ( dsMtime > mtime ) { @@ -588,7 +588,7 @@ int vtkXYPlotActor::RenderOpaqueGeometry(vtkViewport *viewport) for (mtime=0, this->DataObjectInputList->InitTraversal(doit); (dobj = this->DataObjectInputList->GetNextDataObject(doit)); ) { - dobj->Update(); + //dobj->Update(); dsMtime = dobj->GetMTime(); if ( dsMtime > mtime ) { @@ -2262,7 +2262,7 @@ void vtkXYPlotActor::GenerateClipPlanes(int *pos, int *pos2) double vtkXYPlotActor::ComputeGlyphScale(int i, int *pos, int *pos2) { vtkPolyData *pd=this->LegendActor->GetEntrySymbol(i); - pd->Update(); + //pd->Update(); double length=pd->GetLength(); double sf = this->GlyphSize * sqrt((double)(pos[0]-pos2[0])*(pos[0]-pos2[0]) + (pos[1]-pos2[1])*(pos[1]-pos2[1])) / length; diff --git a/IO/Testing/Cxx/TestMetaIO.cxx b/IO/Testing/Cxx/TestMetaIO.cxx index 6c8faed65a7e07c2976a00d31cf4744db021111c..69db122da38bc0f12070a934a3680697de737b73 100644 --- a/IO/Testing/Cxx/TestMetaIO.cxx +++ b/IO/Testing/Cxx/TestMetaIO.cxx @@ -62,7 +62,7 @@ int TestMetaIO(int argc, char *argv[]) readerNew->Update(); double error = 0; - int * ext = readerStd->GetOutput()->GetWholeExtent(); + int * ext = readerStd->GetOutput()->GetExtent(); for(int z=ext[4]; z<=ext[5]; z+=2) { for(int y=ext[2]; y<=ext[3]; y++) diff --git a/Imaging/Testing/Cxx/FastSplatter.cxx b/Imaging/Testing/Cxx/FastSplatter.cxx index ddd52f6b96505a005b94d77cd9f5c7667e6016d0..4f9dc0ff926fd9a53b6e9af909748f66d96bdec7 100644 --- a/Imaging/Testing/Cxx/FastSplatter.cxx +++ b/Imaging/Testing/Cxx/FastSplatter.cxx @@ -35,10 +35,8 @@ int FastSplatter(int argc, char *argv[]) // hand. VTK_CREATE(vtkImageData, SplatImage); - SplatImage->SetScalarTypeToFloat(); - SplatImage->SetNumberOfScalarComponents(1); SplatImage->SetDimensions(SPLAT_IMAGE_SIZE, SPLAT_IMAGE_SIZE, 1); - SplatImage->AllocateScalars(); + SplatImage->AllocateScalars(VTK_FLOAT, 1); for (int i = 0; i < SPLAT_IMAGE_SIZE; ++i) { diff --git a/Infovis/vtkAttributeClustering2DLayoutStrategy.cxx b/Infovis/vtkAttributeClustering2DLayoutStrategy.cxx index 05a60b5d9e03414d6acb97dfafe6fc9d09b7bfba..2f221e7239d2f2a129133b6693f1fe2cd502d499 100644 --- a/Infovis/vtkAttributeClustering2DLayoutStrategy.cxx +++ b/Infovis/vtkAttributeClustering2DLayoutStrategy.cxx @@ -146,10 +146,8 @@ void vtkAttributeClustering2DLayoutStrategy::SetVertexAttribute(const char* att) // Helper functions void vtkAttributeClustering2DLayoutStrategy::GenerateCircularSplat(vtkImageData *splat, int x, int y) { - splat->SetScalarTypeToFloat(); - splat->SetNumberOfScalarComponents(1); splat->SetDimensions(x, y, 1); - splat->AllocateScalars(); + splat->AllocateScalars(VTK_FLOAT, 1); const int *dimensions = splat->GetDimensions(); @@ -182,10 +180,8 @@ void vtkAttributeClustering2DLayoutStrategy::GenerateCircularSplat(vtkImageData void vtkAttributeClustering2DLayoutStrategy::GenerateGaussianSplat(vtkImageData *splat, int x, int y) { - splat->SetScalarTypeToFloat(); - splat->SetNumberOfScalarComponents(1); splat->SetDimensions(x, y, 1); - splat->AllocateScalars(); + splat->AllocateScalars(VTK_FLOAT, 1); const int *dimensions = splat->GetDimensions(); diff --git a/Infovis/vtkClustering2DLayoutStrategy.cxx b/Infovis/vtkClustering2DLayoutStrategy.cxx index 648ed0de225996661c06a2008cd0b30039a790d1..606645cbe2d7444b6e1b349dabd8d8ed8ba2b02e 100644 --- a/Infovis/vtkClustering2DLayoutStrategy.cxx +++ b/Infovis/vtkClustering2DLayoutStrategy.cxx @@ -94,10 +94,8 @@ vtkClustering2DLayoutStrategy::~vtkClustering2DLayoutStrategy() // Helper functions void vtkClustering2DLayoutStrategy::GenerateCircularSplat(vtkImageData *splat, int x, int y) { - splat->SetScalarTypeToFloat(); - splat->SetNumberOfScalarComponents(1); splat->SetDimensions(x, y, 1); - splat->AllocateScalars(); + splat->AllocateScalars(VTK_FLOAT, 1); const int *dimensions = splat->GetDimensions(); @@ -130,10 +128,8 @@ void vtkClustering2DLayoutStrategy::GenerateCircularSplat(vtkImageData *splat, i void vtkClustering2DLayoutStrategy::GenerateGaussianSplat(vtkImageData *splat, int x, int y) { - splat->SetScalarTypeToFloat(); - splat->SetNumberOfScalarComponents(1); splat->SetDimensions(x, y, 1); - splat->AllocateScalars(); + splat->AllocateScalars(VTK_FLOAT, 1); const int *dimensions = splat->GetDimensions(); diff --git a/Infovis/vtkCommunity2DLayoutStrategy.cxx b/Infovis/vtkCommunity2DLayoutStrategy.cxx index a1902c37bfc220b0ddb5832389b6231f1e8b572b..7af6272dff5145a39d2fbf4d655ea1b88b46a43a 100644 --- a/Infovis/vtkCommunity2DLayoutStrategy.cxx +++ b/Infovis/vtkCommunity2DLayoutStrategy.cxx @@ -100,10 +100,8 @@ vtkCommunity2DLayoutStrategy::~vtkCommunity2DLayoutStrategy() // Helper functions void vtkCommunity2DLayoutStrategy::GenerateCircularSplat(vtkImageData *splat, int x, int y) { - splat->SetScalarTypeToFloat(); - splat->SetNumberOfScalarComponents(1); splat->SetDimensions(x, y, 1); - splat->AllocateScalars(); + splat->AllocateScalars(VTK_FLOAT, 1); const int *dimensions = splat->GetDimensions(); @@ -136,10 +134,8 @@ void vtkCommunity2DLayoutStrategy::GenerateCircularSplat(vtkImageData *splat, in void vtkCommunity2DLayoutStrategy::GenerateGaussianSplat(vtkImageData *splat, int x, int y) { - splat->SetScalarTypeToFloat(); - splat->SetNumberOfScalarComponents(1); splat->SetDimensions(x, y, 1); - splat->AllocateScalars(); + splat->AllocateScalars(VTK_FLOAT, 1); const int *dimensions = splat->GetDimensions(); diff --git a/Infovis/vtkConstrained2DLayoutStrategy.cxx b/Infovis/vtkConstrained2DLayoutStrategy.cxx index 61eda11351cb92591b5ac04b7a6638b375bf8d67..791b924acf2ecedd33ead8a4fe3b511e3d54e542 100644 --- a/Infovis/vtkConstrained2DLayoutStrategy.cxx +++ b/Infovis/vtkConstrained2DLayoutStrategy.cxx @@ -96,10 +96,8 @@ vtkConstrained2DLayoutStrategy::~vtkConstrained2DLayoutStrategy() // Helper functions void vtkConstrained2DLayoutStrategy::GenerateCircularSplat(vtkImageData *splat, int x, int y) { - splat->SetScalarTypeToFloat(); - splat->SetNumberOfScalarComponents(1); splat->SetDimensions(x, y, 1); - splat->AllocateScalars(); + splat->AllocateScalars(VTK_FLOAT, 1); const int *dimensions = splat->GetDimensions(); @@ -132,10 +130,8 @@ void vtkConstrained2DLayoutStrategy::GenerateCircularSplat(vtkImageData *splat, void vtkConstrained2DLayoutStrategy::GenerateGaussianSplat(vtkImageData *splat, int x, int y) { - splat->SetScalarTypeToFloat(); - splat->SetNumberOfScalarComponents(1); splat->SetDimensions(x, y, 1); - splat->AllocateScalars(); + splat->AllocateScalars(VTK_FLOAT, 1); const int *dimensions = splat->GetDimensions(); diff --git a/Infovis/vtkExtractHistogram2D.cxx b/Infovis/vtkExtractHistogram2D.cxx index 5c4291a561ea12e5a1f87faf98854fd42a6a90db..19ae8348157d8f7ba17632b850ee5c814217b4dc 100644 --- a/Infovis/vtkExtractHistogram2D.cxx +++ b/Infovis/vtkExtractHistogram2D.cxx @@ -154,17 +154,10 @@ void vtkExtractHistogram2D::Learn(vtkTable *vtkNotUsed(inData), // vtkImageData is already smart about allocating arrays, so we'll just // let it take care of that for us. outImage->Initialize(); - outImage->SetScalarType(this->ScalarType); outImage->SetExtent(0,this->NumberOfBins[0]-1,0,this->NumberOfBins[1]-1,0,0); outImage->SetSpacing(binWidth[0],binWidth[1],0.0); - // allocate only if necessary - if (!outImage->GetPointData() || - !outImage->GetPointData()->GetScalars() || - outImage->GetPointData()->GetScalars()->GetNumberOfTuples() != this->NumberOfBins[0]*this->NumberOfBins[1]) - { - outImage->AllocateScalars(); - } + outImage->AllocateScalars(this->ScalarType, 1); outImage->GetPointData()->GetScalars()->FillComponent(0,0); outImage->GetPointData()->GetScalars()->SetName("histogram"); diff --git a/Infovis/vtkFast2DLayoutStrategy.cxx b/Infovis/vtkFast2DLayoutStrategy.cxx index 4f4f4f0ab8a5877f7eed97ff914ebbc99cb3138d..6eb358f48483bc54368032d2c14d1009555299a4 100644 --- a/Infovis/vtkFast2DLayoutStrategy.cxx +++ b/Infovis/vtkFast2DLayoutStrategy.cxx @@ -97,10 +97,8 @@ vtkFast2DLayoutStrategy::~vtkFast2DLayoutStrategy() // Helper functions void vtkFast2DLayoutStrategy::GenerateCircularSplat(vtkImageData *splat, int x, int y) { - splat->SetScalarTypeToFloat(); - splat->SetNumberOfScalarComponents(1); splat->SetDimensions(x, y, 1); - splat->AllocateScalars(); + splat->AllocateScalars(VTK_FLOAT, 1); const int *dimensions = splat->GetDimensions(); @@ -133,10 +131,8 @@ void vtkFast2DLayoutStrategy::GenerateCircularSplat(vtkImageData *splat, int x, void vtkFast2DLayoutStrategy::GenerateGaussianSplat(vtkImageData *splat, int x, int y) { - splat->SetScalarTypeToFloat(); - splat->SetNumberOfScalarComponents(1); splat->SetDimensions(x, y, 1); - splat->AllocateScalars(); + splat->AllocateScalars(VTK_FLOAT, 1); const int *dimensions = splat->GetDimensions(); diff --git a/Infovis/vtkSCurveSpline.cxx b/Infovis/vtkSCurveSpline.cxx index 3533307ec1617ddd22b077be914817a20a8e405d..20831bbb8e9c15fcad4502c10e0bb006035813d0 100644 --- a/Infovis/vtkSCurveSpline.cxx +++ b/Infovis/vtkSCurveSpline.cxx @@ -110,7 +110,7 @@ void vtkSCurveSpline::Compute () int i; // Make sure the function is up to date. - this->PiecewiseFunction->Update(); + //this->PiecewiseFunction->Update(); // get the size of the independent variables size = this->PiecewiseFunction->GetSize (); diff --git a/Parallel/Testing/Cxx/TestDistributedDataCompositeZPass.cxx b/Parallel/Testing/Cxx/TestDistributedDataCompositeZPass.cxx index 6ab04d6be4a5bd940ada5081fbe051b63c978957..ef903b0f1110474e64de718330c0c645fbaa6d07 100644 --- a/Parallel/Testing/Cxx/TestDistributedDataCompositeZPass.cxx +++ b/Parallel/Testing/Cxx/TestDistributedDataCompositeZPass.cxx @@ -394,8 +394,7 @@ void MyProcess::Execute() luminanceToRGB->AddInputConnection(0,converter->GetOutputPort()); luminanceToRGB->Update(); - vtkImageData *testImage=luminanceToRGB->GetOutput(); - retVal=testing->RegressionTest(testImage,thresh); + retVal=testing->RegressionTest(luminanceToRGB,thresh); luminanceToRGB->Delete(); converter->Delete(); diff --git a/Parallel/Testing/Cxx/TestPCompositeZPass.cxx b/Parallel/Testing/Cxx/TestPCompositeZPass.cxx index 402699620da68e72cd0d5eeea8dca5c6c9401c4f..1cc0ec61f903b5ff18f0aadc684c758d201f507c 100644 --- a/Parallel/Testing/Cxx/TestPCompositeZPass.cxx +++ b/Parallel/Testing/Cxx/TestPCompositeZPass.cxx @@ -395,8 +395,7 @@ void MyProcess::Execute() luminanceToRGB->AddInputConnection(0,converter->GetOutputPort()); luminanceToRGB->Update(); - vtkImageData *testImage=luminanceToRGB->GetOutput(); - retVal=testing->RegressionTest(testImage,thresh); + retVal=testing->RegressionTest(luminanceToRGB,thresh); luminanceToRGB->Delete(); converter->Delete(); diff --git a/Parallel/Testing/Cxx/TransmitImageData.cxx b/Parallel/Testing/Cxx/TransmitImageData.cxx index 8df91a5c4d8abc3cec490d3bbebf96e03835d109..212e4d27da4dc59a9ee37d57769766d85895f6a6 100644 --- a/Parallel/Testing/Cxx/TransmitImageData.cxx +++ b/Parallel/Testing/Cxx/TransmitImageData.cxx @@ -155,7 +155,8 @@ void MyProcess::Execute() cf->SetInput(pass->GetOutput()); cf->SetNumberOfContours(1); cf->SetValue(0,10.0); - (cf->GetInput())->RequestExactExtentOn(); + // I am not sure why this is needed. + //(cf->GetInput())->RequestExactExtentOn(); cf->ComputeNormalsOff(); vtkElevationFilter *elev = vtkElevationFilter::New(); elev->SetInput(cf->GetOutput()); diff --git a/Parallel/Testing/Cxx/TransmitImageDataRenderPass.cxx b/Parallel/Testing/Cxx/TransmitImageDataRenderPass.cxx index 761ae6679f85270d955fb2f4130bdd95d9937a1a..d946eb9eb1d7852858d6b2f7030021f43e5be5fa 100644 --- a/Parallel/Testing/Cxx/TransmitImageDataRenderPass.cxx +++ b/Parallel/Testing/Cxx/TransmitImageDataRenderPass.cxx @@ -165,7 +165,8 @@ void MyProcess::Execute() cf->SetInput(pass->GetOutput()); cf->SetNumberOfContours(1); cf->SetValue(0,10.0); - (cf->GetInput())->RequestExactExtentOn(); + // I am not sure that this is needed. + //(cf->GetInput())->RequestExactExtentOn(); cf->ComputeNormalsOff(); vtkElevationFilter *elev = vtkElevationFilter::New(); elev->SetInput(cf->GetOutput()); diff --git a/Parallel/Testing/Cxx/TransmitRectilinearGrid.cxx b/Parallel/Testing/Cxx/TransmitRectilinearGrid.cxx index f7aa2b24908e90767ac8f5f2036d2bf575987e43..2c7da9b39461e727e0369c76870cee55a07902c1 100644 --- a/Parallel/Testing/Cxx/TransmitRectilinearGrid.cxx +++ b/Parallel/Testing/Cxx/TransmitRectilinearGrid.cxx @@ -144,7 +144,8 @@ void MyProcess::Execute() cf->SetInput(pass->GetOutput()); cf->SetNumberOfContours(1); cf->SetValue(0,0.1); - (cf->GetInput())->RequestExactExtentOn(); + // I don't think this is needed + //(cf->GetInput())->RequestExactExtentOn(); cf->ComputeNormalsOff(); vtkElevationFilter *elev = vtkElevationFilter::New(); elev->SetInput(cf->GetOutput()); diff --git a/Parallel/Testing/Cxx/TransmitStructuredGrid.cxx b/Parallel/Testing/Cxx/TransmitStructuredGrid.cxx index dd4f94dada1be112343cd030252588f18f20ab4e..a3466f53447d1373743f4e37feabc97e23af4d9c 100644 --- a/Parallel/Testing/Cxx/TransmitStructuredGrid.cxx +++ b/Parallel/Testing/Cxx/TransmitStructuredGrid.cxx @@ -143,7 +143,8 @@ void MyProcess::Execute() cf->SetInput(pass->GetOutput()); cf->SetNumberOfContours(1); cf->SetValue(0,0.7); - (cf->GetInput())->RequestExactExtentOn(); + // I don't think that this is needed + // (cf->GetInput())->RequestExactExtentOn(); cf->ComputeNormalsOff(); vtkElevationFilter *elev = vtkElevationFilter::New(); elev->SetInput(cf->GetOutput()); diff --git a/Parallel/vtkDistributedDataFilter.cxx b/Parallel/vtkDistributedDataFilter.cxx index f3bfc96047a14566a2b18cc9c2c839d2b026d8df..46db51363773c40b295e75acdd739a4e7a206976 100644 --- a/Parallel/vtkDistributedDataFilter.cxx +++ b/Parallel/vtkDistributedDataFilter.cxx @@ -2766,7 +2766,7 @@ vtkUnstructuredGrid *vtkDistributedDataFilter::UnMarshallDataSet(char *buf, int mystring->Delete(); vtkDataSet *output = reader->GetOutput(); - output->Update(); + reader->Update(); vtkUnstructuredGrid *newGrid = vtkUnstructuredGrid::New(); diff --git a/Parallel/vtkEnSightWriter.cxx b/Parallel/vtkEnSightWriter.cxx index 35ef22dbcaa945c6080682e4756eb5e73037951e..eb3c082d6779b960b8014213ee1c6d7d6e38ea63 100644 --- a/Parallel/vtkEnSightWriter.cxx +++ b/Parallel/vtkEnSightWriter.cxx @@ -50,6 +50,7 @@ #include "vtkPointData.h" #include "vtkPoints.h" #include "vtkShortArray.h" +#include "vtkStreamingDemandDrivenPipeline.h" #include "vtkUnsignedCharArray.h" #include "vtkUnsignedIntArray.h" #include "vtkUnsignedLongArray.h" @@ -215,13 +216,15 @@ void vtkEnSightWriter::WriteData() #endif vtkUnstructuredGrid *input=this->GetInput(); + vtkInformation* inInfo = this->GetInputInformation(); - if (this->GhostLevel > input->GetUpdateGhostLevel()) + if (this->GhostLevel > + vtkStreamingDemandDrivenPipeline::GetUpdateGhostLevel(inInfo)) { // re-execute pipeline if necessary to obtain ghost cells - input->SetUpdateGhostLevel(this->GhostLevel); - input->Update(); + vtkStreamingDemandDrivenPipeline::SetUpdateGhostLevel(inInfo, this->GhostLevel); + this->GetInputAlgorithm()->Update(); } int deletemmd = 0; diff --git a/Parallel/vtkExtractCTHPart.cxx b/Parallel/vtkExtractCTHPart.cxx index 9481ffcddacbbb96add8c74446c0b7b271b873ac..1ba4a0d895b17b66747f715f5f4cfbbad19c9a0e 100644 --- a/Parallel/vtkExtractCTHPart.cxx +++ b/Parallel/vtkExtractCTHPart.cxx @@ -90,8 +90,10 @@ vtkExtractCTHPart::vtkExtractCTHPart() this->Clip2=0; this->PolyData=0; + this->PolyDataProducer=0; this->SurfacePolyData=0; this->RPolyData=0; + this->RPolyDataProducer = 0; this->RData=0; this->RContour=0; @@ -913,7 +915,7 @@ void vtkExtractCTHPart::ExecutePartOnUniformGrid( return; } - this->PolyData->Update(); + this->PolyDataProducer->Update(); if (reportProgress) { this->UpdateProgress(minProgress+delProgress); @@ -967,10 +969,12 @@ void vtkExtractCTHPart::CreateInternalPipeline() this->Clip2->SetValue(this->VolumeFractionSurfaceValueInternal); this->Append2->AddInput(this->Clip2->GetOutput()); this->PolyData = this->Append2->GetOutput(); + this->PolyDataProducer = this->Append2; } else { this->PolyData = this->Contour->GetOutput(); + this->PolyDataProducer = this->Contour; } // Rectilinear grid case pipeline @@ -1001,10 +1005,12 @@ void vtkExtractCTHPart::CreateInternalPipeline() this->RClip2->SetValue(this->VolumeFractionSurfaceValueInternal); this->RAppend2->AddInput(this->RClip2->GetOutput()); this->RPolyData = this->RAppend2->GetOutput(); + this->RPolyDataProducer = this->RAppend2; } else { this->RPolyData = this->RContour->GetOutput(); + this->RPolyDataProducer = this->RContour; } } @@ -1206,7 +1212,7 @@ void vtkExtractCTHPart::ExecutePartOnRectilinearGrid( return; } - this->RPolyData->Update(); + this->RPolyDataProducer->Update(); if (reportProgress) { diff --git a/Parallel/vtkExtractCTHPart.h b/Parallel/vtkExtractCTHPart.h index 0fe919968992a10f50ec14d26c516a2b90409693..bff73148cdb8fb88ac763f10b5bbb5e1575f1102 100644 --- a/Parallel/vtkExtractCTHPart.h +++ b/Parallel/vtkExtractCTHPart.h @@ -224,7 +224,9 @@ protected: vtkClipPolyData *Clip2; vtkPolyData *PolyData; + vtkAlgorithm *PolyDataProducer; vtkPolyData *RPolyData; + vtkAlgorithm *RPolyDataProducer; vtkPolyData *SurfacePolyData; vtkRectilinearGrid *RData; diff --git a/Parallel/vtkPChacoReader.cxx b/Parallel/vtkPChacoReader.cxx index bb75f71a6bf571291ce004ce006c1cee3bdeabd1..47c165e1de61250fee2bb8de36baec270489a099 100644 --- a/Parallel/vtkPChacoReader.cxx +++ b/Parallel/vtkPChacoReader.cxx @@ -559,7 +559,7 @@ vtkUnstructuredGrid *vtkPChacoReader::UnMarshallDataSet(char *buf, int size) mystring->Delete(); vtkDataSet *output = reader->GetOutput(); - output->Update(); + reader->Update(); vtkUnstructuredGrid *newGrid = vtkUnstructuredGrid::New(); diff --git a/Parallel/vtkPDataSetReader.cxx b/Parallel/vtkPDataSetReader.cxx index 1a0510259d8d8634c958c2f4efbf9d8a8b656f19..baabb0e09c73c3dbaa8070501dbc790493557edd 100644 --- a/Parallel/vtkPDataSetReader.cxx +++ b/Parallel/vtkPDataSetReader.cxx @@ -923,10 +923,11 @@ int vtkPDataSetReader::RequestData(vtkInformation* request, // Do not copy the ExtentTranslator (hack) // reader should probably set the extent translator // not paraview. - vtkExtentTranslator *tmp = output->GetExtentTranslator(); + vtkExtentTranslator *tmp = + vtkStreamingDemandDrivenPipeline::GetExtentTranslator(info); tmp->Register(this); output->CopyStructure(data); - output->SetExtentTranslator(tmp); + vtkStreamingDemandDrivenPipeline::SetExtentTranslator(info, tmp); tmp->UnRegister(tmp); output->GetFieldData()->PassData(data->GetFieldData()); output->GetCellData()->PassData(data->GetCellData()); @@ -972,8 +973,9 @@ int vtkPDataSetReader::PolyDataExecute(vtkInformation*, int startPiece, endPiece; int idx; - updatePiece = output->GetUpdatePiece(); - updateNumberOfPieces = output->GetUpdateNumberOfPieces(); + updatePiece = vtkStreamingDemandDrivenPipeline::GetUpdatePiece(info); + updateNumberOfPieces = + vtkStreamingDemandDrivenPipeline::GetUpdateNumberOfPieces(info); // Only the first N pieces have anything in them. if (updateNumberOfPieces > this->NumberOfPieces) @@ -1045,8 +1047,9 @@ int vtkPDataSetReader::UnstructuredGridExecute( int startPiece, endPiece; int idx; - updatePiece = output->GetUpdatePiece(); - updateNumberOfPieces = output->GetUpdateNumberOfPieces(); + updatePiece = vtkStreamingDemandDrivenPipeline::GetUpdatePiece(info); + updateNumberOfPieces = + vtkStreamingDemandDrivenPipeline::GetUpdateNumberOfPieces(info); // Only the first N pieces have anything in them. if (updateNumberOfPieces > this->NumberOfPieces) @@ -1115,7 +1118,7 @@ int vtkPDataSetReader::ImageDataExecute( int i, j; // Allocate the data object. - output->GetUpdateExtent(uExt); + vtkStreamingDemandDrivenPipeline::GetUpdateExtent(info, uExt); output->SetExtent(uExt); output->AllocateScalars(); @@ -1216,7 +1219,7 @@ int vtkPDataSetReader::StructuredGridExecute( { pieceMask[i] = 0; } - output->GetUpdateExtent(uExt); + vtkStreamingDemandDrivenPipeline::GetUpdateExtent(info, uExt); this->CoverExtent(uExt, pieceMask); // Now read the pieces. diff --git a/Parallel/vtkPDataSetWriter.cxx b/Parallel/vtkPDataSetWriter.cxx index efab80f8031dd9d6ed43c1387d8d7ebd8ba64558..b2343aa0a5ea113f46033fa1d9ac4510748d395c 100644 --- a/Parallel/vtkPDataSetWriter.cxx +++ b/Parallel/vtkPDataSetWriter.cxx @@ -19,6 +19,7 @@ #include "vtkImageData.h" #include "vtkStructuredGrid.h" #include "vtkRectilinearGrid.h" +#include "vtkStreamingDemandDrivenPipeline.h" #include "vtkErrorCode.h" vtkStandardNewMacro(vtkPDataSetWriter); @@ -69,6 +70,7 @@ int vtkPDataSetWriter::Write() ostream *fptr; vtkDataSet *input = this->GetInput(); + vtkAlgorithm *inputAlg = this->GetInputAlgorithm(); if (this->FileName == NULL) { @@ -159,8 +161,8 @@ int vtkPDataSetWriter::Write() this->SetErrorCode(vtkErrorCode::OutOfDiskSpaceError); return 0; } - - input->UpdateInformation(); + + inputAlg->UpdateInformation(); switch (input->GetDataObjectType()) { case VTK_POLY_DATA: @@ -243,16 +245,15 @@ int vtkPDataSetWriter::Write() { sprintf(fileName, this->FilePattern, fileRoot, i); writer->SetFileName(fileName); - input->SetUpdateExtent(i, this->NumberOfPieces, this->GhostLevel); - input->Update(); + inputAlg->SetUpdateExtent(i, this->NumberOfPieces, this->GhostLevel); + inputAlg->Update(); copy = input->NewInstance(); copy->ShallowCopy(input); // I am putting this in here because shallow copy does not copy the // UpdateExtentInitializedFlag, and I do not want to touch ShallowCopy // in ParaViews release. - copy->SetUpdateExtent(0,1,0); - copy->SetUpdateExtent(input->GetUpdateExtent()); - copy->Crop(); + copy->Crop(vtkStreamingDemandDrivenPipeline::GetUpdateExtent( + this->GetInputInformation())); writer->SetInput(vtkDataSet::SafeDownCast(copy)); writer->Write(); copy->Delete(); @@ -316,7 +317,8 @@ int vtkPDataSetWriter::WriteImageMetaData(vtkImageData *input, pf = input->GetSpacing(); *fptr << " spacing=\"" << pf[0] << " " << pf[1] << " " << pf[2] << "\"" << endl; - pi = input->GetWholeExtent(); + pi = vtkStreamingDemandDrivenPipeline::GetWholeExtent( + this->GetInputInformation()); *fptr << " wholeExtent=\"" << pi[0] << " " << pi[1] << " " << pi[2] << " " << pi[3] << " " << pi[4] << " " << pi[5] << "\"" << endl; @@ -327,8 +329,10 @@ int vtkPDataSetWriter::WriteImageMetaData(vtkImageData *input, for (i = 0; i < this->NumberOfPieces; ++i) { - input->SetUpdateExtent(i, this->NumberOfPieces, this->GhostLevel); - pi = input->GetUpdateExtent(); + this->GetInputAlgorithm()->SetUpdateExtent( + i, this->NumberOfPieces, this->GhostLevel); + pi = vtkStreamingDemandDrivenPipeline::GetUpdateExtent( + this->GetInputInformation()); sprintf(str, this->FilePattern, root, i); *fptr << " <Piece fileName=\"" << str << "\"" << endl << " extent=\"" << pi[0] << " " << pi[1] << " " << pi[2] << " " @@ -353,7 +357,8 @@ int vtkPDataSetWriter::WriteRectilinearGridMetaData(vtkRectilinearGrid *input, // We should indicate the type of data that is being saved. *fptr << " dataType=\"" << input->GetClassName() << "\"" << endl; - pi = input->GetWholeExtent(); + pi = vtkStreamingDemandDrivenPipeline::GetWholeExtent( + this->GetInputInformation()); *fptr << " wholeExtent=\"" << pi[0] << " " << pi[1] << " " << pi[2] << " " << pi[3] << " " << pi[4] << " " << pi[5] << "\"" << endl; @@ -363,8 +368,10 @@ int vtkPDataSetWriter::WriteRectilinearGridMetaData(vtkRectilinearGrid *input, *fptr << " numberOfPieces=\"" << this->NumberOfPieces << "\" >" << endl; for (i = 0; i < this->NumberOfPieces; ++i) { - input->SetUpdateExtent(i, this->NumberOfPieces, this->GhostLevel); - pi = input->GetUpdateExtent(); + this->GetInputAlgorithm()->SetUpdateExtent( + i, this->NumberOfPieces, this->GhostLevel); + pi = vtkStreamingDemandDrivenPipeline::GetUpdateExtent( + this->GetInputInformation()); sprintf(str, this->FilePattern, root, i); *fptr << " <Piece fileName=\"" << str << "\"" << endl << " extent=\"" << pi[0] << " " << pi[1] << " " << pi[2] << " " @@ -390,7 +397,8 @@ int vtkPDataSetWriter::WriteStructuredGridMetaData(vtkStructuredGrid *input, // We should indicate the type of data that is being saved. *fptr << " dataType=\"" << input->GetClassName() << "\"" << endl; - pi = input->GetWholeExtent(); + pi = vtkStreamingDemandDrivenPipeline::GetWholeExtent( + this->GetInputInformation()); *fptr << " wholeExtent=\"" << pi[0] << " " << pi[1] << " " << pi[2] << " " << pi[3] << " " << pi[4] << " " << pi[5] << "\"" << endl; @@ -400,8 +408,9 @@ int vtkPDataSetWriter::WriteStructuredGridMetaData(vtkStructuredGrid *input, *fptr << " numberOfPieces=\"" << this->NumberOfPieces << "\" >" << endl; for (i = 0; i < this->NumberOfPieces; ++i) { - input->SetUpdateExtent(i, this->NumberOfPieces, this->GhostLevel); - pi = input->GetUpdateExtent(); + this->GetInputAlgorithm()->SetUpdateExtent(i, this->NumberOfPieces, this->GhostLevel); + pi = vtkStreamingDemandDrivenPipeline::GetUpdateExtent( + this->GetInputInformation()); sprintf(str, this->FilePattern, root, i); *fptr << " <Piece fileName=\"" << str << "\"" << endl << " extent=\"" << pi[0] << " " << pi[1] << " " << pi[2] << " " diff --git a/Parallel/vtkPImageWriter.cxx b/Parallel/vtkPImageWriter.cxx index 3c3a9da2ff612522234031fdacb84fd2efe135f0..0491f3baa06a454607d8d61460b8ebba7dcf2831 100644 --- a/Parallel/vtkPImageWriter.cxx +++ b/Parallel/vtkPImageWriter.cxx @@ -74,7 +74,8 @@ void vtkPImageWriter::PrintSelf(ostream& os, vtkIndent indent) //---------------------------------------------------------------------------- // Breaks region into pieces with correct dimensionality. void vtkPImageWriter::RecursiveWrite(int axis, vtkImageData *cache, - ofstream *file) + vtkInformation* inInfo, + ofstream *file) { int min, max, mid; vtkImageData *data; @@ -118,7 +119,7 @@ void vtkPImageWriter::RecursiveWrite(int axis, vtkImageData *cache, } // Subclasses can write a header with this method call. - this->WriteFileHeader(file, cache); + this->WriteFileHeader(file, cache, inInfo->Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT())); ++this->FileNumber; } @@ -154,18 +155,19 @@ void vtkPImageWriter::RecursiveWrite(int axis, vtkImageData *cache, // if so the just get the data and write it out if ( inputMemorySize < this->MemoryLimit ) { - ext = cache->GetUpdateExtent(); + ext = inInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT()); vtkDebugMacro("Getting input extent: " << ext[0] << ", " << ext[1] << ", " << ext[2] << ", " << ext[3] << ", " << ext[4] << ", " << ext[5] << endl); - cache->Update(); + this->GetInputAlgorithm()->Update(); data = cache; - this->RecursiveWrite(axis,cache,data,file); + this->RecursiveWrite(axis,cache,data,inInfo,file); vtkPIWCloseFile; return; } // if the current request did not fit into memory // the we will split the current axis - this->GetInput()->GetAxisUpdateExtent(axis, min, max); + int* updateExtent = vtkStreamingDemandDrivenPipeline::GetUpdateExtent(inInfo); + this->GetInput()->GetAxisUpdateExtent(axis, min, max, updateExtent); vtkDebugMacro("Axes: " << axis << "(" << min << ", " << max << "), UpdateMemory: " << inputMemorySize @@ -175,7 +177,7 @@ void vtkPImageWriter::RecursiveWrite(int axis, vtkImageData *cache, { if (axis > 0) { - this->RecursiveWrite(axis - 1,cache, file); + this->RecursiveWrite(axis - 1,cache, inInfo, file); } else { @@ -187,30 +189,37 @@ void vtkPImageWriter::RecursiveWrite(int axis, vtkImageData *cache, mid = (min + max) / 2; + int axisUpdateExtent[6]; + // if it is the y axis then flip by default if (axis == 1 && !this->FileLowerLeft) { // first half - cache->SetAxisUpdateExtent(axis, mid+1, max); - this->RecursiveWrite(axis,cache,file); + cache->SetAxisUpdateExtent(axis, mid+1, max, updateExtent, axisUpdateExtent); + vtkStreamingDemandDrivenPipeline::SetUpdateExtent(inInfo, axisUpdateExtent); + this->RecursiveWrite(axis,cache,inInfo,file); // second half - cache->SetAxisUpdateExtent(axis, min, mid); - this->RecursiveWrite(axis,cache,file); + cache->SetAxisUpdateExtent(axis, min, mid, updateExtent, axisUpdateExtent); + vtkStreamingDemandDrivenPipeline::SetUpdateExtent(inInfo, axisUpdateExtent); + this->RecursiveWrite(axis,cache,inInfo,file); } else { // first half - cache->SetAxisUpdateExtent(axis, min, mid); - this->RecursiveWrite(axis,cache,file); + cache->SetAxisUpdateExtent(axis, min, mid, updateExtent, axisUpdateExtent); + vtkStreamingDemandDrivenPipeline::SetUpdateExtent(inInfo, axisUpdateExtent); + this->RecursiveWrite(axis,cache,inInfo,file); // second half - cache->SetAxisUpdateExtent(axis, mid+1, max); - this->RecursiveWrite(axis,cache,file); + cache->SetAxisUpdateExtent(axis, mid+1, max, updateExtent, axisUpdateExtent); + vtkStreamingDemandDrivenPipeline::SetUpdateExtent(inInfo, axisUpdateExtent); + this->RecursiveWrite(axis,cache,inInfo,file); } // restore original extent - cache->SetAxisUpdateExtent(axis, min, max); + cache->SetAxisUpdateExtent(axis, min, max, updateExtent, axisUpdateExtent); + vtkStreamingDemandDrivenPipeline::SetUpdateExtent(inInfo, axisUpdateExtent); // if we opened the file here, then we need to close it up vtkPIWCloseFile; diff --git a/Parallel/vtkPImageWriter.h b/Parallel/vtkPImageWriter.h index a8df05387404da685abe3badb597b10f5307571c..358af71cc54b6891cbabe60c39f4e837b70ac1ce 100644 --- a/Parallel/vtkPImageWriter.h +++ b/Parallel/vtkPImageWriter.h @@ -45,10 +45,10 @@ protected: unsigned long MemoryLimit; - virtual void RecursiveWrite(int dim, vtkImageData *region, ofstream *file); + virtual void RecursiveWrite(int dim, vtkImageData *region, vtkInformation* inInfo, ofstream *file); virtual void RecursiveWrite(int dim, vtkImageData *cache, - vtkImageData *data, ofstream *file) - {this->vtkImageWriter::RecursiveWrite(dim,cache,data,file);}; + vtkImageData *data, vtkInformation* inInfo, ofstream *file) + {this->vtkImageWriter::RecursiveWrite(dim,cache,data,inInfo,file);}; vtkPipelineSize *SizeEstimator; private: diff --git a/Parallel/vtkPKdTree.cxx b/Parallel/vtkPKdTree.cxx index a411196d25a3ae0a7c64681f6f428caaf2159d16..fc2a0b8fd951a69c2cef33746059624e88f90006 100644 --- a/Parallel/vtkPKdTree.cxx +++ b/Parallel/vtkPKdTree.cxx @@ -413,12 +413,6 @@ void vtkPKdTree::BuildLocator() this->FreeSearchStructure(); this->ReleaseTables(); - // Make sure input is up to date. - for (int i = 0; i < this->GetNumberOfDataSets(); i++) - { - this->GetDataSet(i)->Update(); - } - this->AllCheckParameters(); // global operation to ensure same parameters double volBounds[6]; diff --git a/Parallel/vtkPNrrdReader.cxx b/Parallel/vtkPNrrdReader.cxx index 9a58b3ed1243b102ab3803ed724410ac58490a44..7f69b7ee61aed721aa0fb6f43a2b1820459c6d82 100644 --- a/Parallel/vtkPNrrdReader.cxx +++ b/Parallel/vtkPNrrdReader.cxx @@ -362,8 +362,6 @@ int vtkPNrrdReader::ReadHeader(vtkCharArray *headerBuffer) { this->DataScalarType = NrrdType2VTKType(description); if (this->DataScalarType == VTK_VOID) return 0; - // The superclass does this, but I'm not sure it's necessary. - this->GetOutput()->SetScalarType(this->DataScalarType); } else if (field == "encoding") { diff --git a/Parallel/vtkPipelineSize.cxx b/Parallel/vtkPipelineSize.cxx index 4496e130cecd83e31ef6367d602ce7983f3da894..7c038671491acc7c9d9b24b9c495b1d0b07a0e14 100644 --- a/Parallel/vtkPipelineSize.cxx +++ b/Parallel/vtkPipelineSize.cxx @@ -354,8 +354,9 @@ unsigned long vtkPipelineSize::GetNumberOfSubPieces(unsigned long memoryLimit, do { oldSize = size; - input->SetUpdateExtent(piece*subDivisions, numPieces*subDivisions); - input->PropagateUpdateExtent(); + vtkStreamingDemandDrivenPipeline::SetUpdateExtent( + mapper->GetInputInformation(), piece*subDivisions, numPieces*subDivisions, 0); + mapper->GetInputAlgorithm()->PropagateUpdateExtent(); size = this->GetEstimatedSize(mapper,0,0); // watch for the first time through if (!oldSize) diff --git a/Parallel/vtkSynchronizedRenderers.cxx b/Parallel/vtkSynchronizedRenderers.cxx index 25c004e7f965b6e433dc75cae65484ec9b611e45..b15c08846a497944f803e4173568e8bbb6c94439 100644 --- a/Parallel/vtkSynchronizedRenderers.cxx +++ b/Parallel/vtkSynchronizedRenderers.cxx @@ -523,11 +523,9 @@ void vtkSynchronizedRenderers::vtkRawImage::SaveAsPNG(const char* filename) } vtkImageData* img = vtkImageData::New(); - img->SetScalarTypeToUnsignedChar(); - img->SetNumberOfScalarComponents( - this->Data->GetNumberOfComponents()); img->SetDimensions(this->Size[0], this->Size[1], 1); - img->AllocateScalars(); + img->AllocateScalars(VTK_UNSIGNED_CHAR, + this->Data->GetNumberOfComponents()); memcpy(img->GetScalarPointer(), this->GetRawPtr()->GetVoidPointer(0), sizeof(unsigned char)*this->Size[0]*this->Size[1]* diff --git a/Parallel/vtkTransmitImageDataPiece.cxx b/Parallel/vtkTransmitImageDataPiece.cxx index 9fef4d9fc4c8247ecf38be4438b91920ee192b7a..f7e0c30897565d54e8b04dc223d5659d8b0a49df 100644 --- a/Parallel/vtkTransmitImageDataPiece.cxx +++ b/Parallel/vtkTransmitImageDataPiece.cxx @@ -193,7 +193,16 @@ int vtkTransmitImageDataPiece::RequestData( int ghostLevel = outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_GHOST_LEVELS()); if (ghostLevel > 0 && this->CreateGhostCells) { - output->GenerateGhostLevelArray(); + int updatePiece = outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_PIECE_NUMBER()); + int updateNumPieces = outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_PIECES()); + vtkInformation *inInfo = inputVector[0]->GetInformationObject(0); + int* wholeExt = inInfo->Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT()); + vtkExtentTranslator* et = vtkStreamingDemandDrivenPipeline::GetExtentTranslator(inInfo); + output->GenerateGhostLevelArray(updatePiece, + updateNumPieces, + ghostLevel, + wholeExt, + et); } return 1; @@ -201,8 +210,8 @@ int vtkTransmitImageDataPiece::RequestData( //---------------------------------------------------------------------------- void vtkTransmitImageDataPiece::RootExecute(vtkImageData *input, - vtkImageData *output, - vtkInformation *outInfo) + vtkImageData *output, + vtkInformation *outInfo) { vtkImageData *tmp = vtkImageData::New(); vtkImageClip *extract = vtkImageClip::New(); @@ -219,7 +228,6 @@ void vtkTransmitImageDataPiece::RootExecute(vtkImageData *input, // First, set up the pipeline and handle local request. tmp->ShallowCopy(input); - tmp->SetReleaseDataFlag(0); extract->SetInput(tmp); extractExecutive->UpdateDataObject(); diff --git a/Parallel/vtkTransmitPolyDataPiece.cxx b/Parallel/vtkTransmitPolyDataPiece.cxx index 3b88e9e5ce2cb21ba9227ab554a30aae917b681f..91845dde5d060bc20defecc2d0bf895f1eddef1d 100644 --- a/Parallel/vtkTransmitPolyDataPiece.cxx +++ b/Parallel/vtkTransmitPolyDataPiece.cxx @@ -156,7 +156,6 @@ void vtkTransmitPolyDataPiece::RootExecute(vtkPolyData *input, // First, set up the pipeline and handle local request. tmp->ShallowCopy(input); - tmp->SetReleaseDataFlag(0); extract->SetCreateGhostCells(this->CreateGhostCells); extract->SetInput(tmp); diff --git a/Parallel/vtkTransmitRectilinearGridPiece.cxx b/Parallel/vtkTransmitRectilinearGridPiece.cxx index 85fda636f4437dd9f767aa62e6383d0c5669dabc..89609b13e896769dbf0c4dce9927bd07931dfcf0 100644 --- a/Parallel/vtkTransmitRectilinearGridPiece.cxx +++ b/Parallel/vtkTransmitRectilinearGridPiece.cxx @@ -167,10 +167,18 @@ int vtkTransmitRectilinearGridPiece::RequestData( } int ghostLevel = outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_GHOST_LEVELS()); - if (ghostLevel > 0 && this->CreateGhostCells) { - output->GenerateGhostLevelArray(); + int updatePiece = outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_PIECE_NUMBER()); + int updateNumPieces = outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_PIECES()); + vtkInformation *inInfo = inputVector[0]->GetInformationObject(0); + int* wholeExt = inInfo->Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT()); + vtkExtentTranslator* et = vtkStreamingDemandDrivenPipeline::GetExtentTranslator(inInfo); + output->GenerateGhostLevelArray(updatePiece, + updateNumPieces, + ghostLevel, + wholeExt, + et); } return 1; @@ -194,7 +202,6 @@ void vtkTransmitRectilinearGridPiece::RootExecute(vtkRectilinearGrid *input, // First, set up the pipeline and handle local request. tmp->ShallowCopy(input); - tmp->SetReleaseDataFlag(0); extract->SetInput(tmp); extractExecutive->UpdateDataObject(); diff --git a/Parallel/vtkTransmitStructuredGridPiece.cxx b/Parallel/vtkTransmitStructuredGridPiece.cxx index 89ac1253efa30d471da388268f05dabddb3d28a2..a078de0c22685f68f6a59f4663a17c416458d151 100644 --- a/Parallel/vtkTransmitStructuredGridPiece.cxx +++ b/Parallel/vtkTransmitStructuredGridPiece.cxx @@ -179,10 +179,18 @@ int vtkTransmitStructuredGridPiece::RequestData( } int ghostLevel = outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_GHOST_LEVELS()); - if (ghostLevel > 0 && this->CreateGhostCells) { - output->GenerateGhostLevelArray(); + int updatePiece = outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_PIECE_NUMBER()); + int updateNumPieces = outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_PIECES()); + vtkInformation *inInfo = inputVector[0]->GetInformationObject(0); + int* wholeExt = inInfo->Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT()); + vtkExtentTranslator* et = vtkStreamingDemandDrivenPipeline::GetExtentTranslator(inInfo); + output->GenerateGhostLevelArray(updatePiece, + updateNumPieces, + ghostLevel, + wholeExt, + et); } return 1; @@ -206,7 +214,6 @@ void vtkTransmitStructuredGridPiece::RootExecute(vtkStructuredGrid *input, // First, set up the pipeline and handle local request. tmp->ShallowCopy(input); - tmp->SetReleaseDataFlag(0); extract->SetInput(tmp); extractExecutive->UpdateDataObject(); diff --git a/Parallel/vtkTransmitUnstructuredGridPiece.cxx b/Parallel/vtkTransmitUnstructuredGridPiece.cxx index 2958241a008098c444bd4fed33537c014e556699..d5237e61b88f88e2748ee8b6f908f0bbd0c59334 100644 --- a/Parallel/vtkTransmitUnstructuredGridPiece.cxx +++ b/Parallel/vtkTransmitUnstructuredGridPiece.cxx @@ -169,7 +169,6 @@ void vtkTransmitUnstructuredGridPiece::RootExecute(vtkUnstructuredGrid *input, // First, set up the pipeline and handle local request. tmp->ShallowCopy(input); - tmp->SetReleaseDataFlag(0); extract->SetCreateGhostCells(this->CreateGhostCells); extract->SetInput(tmp); extractExecutive->UpdateDataObject(); diff --git a/Parallel/vtkVPICReader.cxx b/Parallel/vtkVPICReader.cxx index ef6b8e095cc3c40dcd66f9ecca34536f9b2a4b75..44085fb93efb8a6fc40c7384e0792945695786cf 100644 --- a/Parallel/vtkVPICReader.cxx +++ b/Parallel/vtkVPICReader.cxx @@ -265,7 +265,6 @@ int vtkVPICReader::RequestInformation( this->vpicData->getGridSize(this->Dimension); this->vpicData->getWholeExtent(this->WholeExtent); output->SetDimensions(this->Dimension); - output->SetWholeExtent(this->WholeExtent); outInfo->Set(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(), this->WholeExtent, 6); diff --git a/Parallel/vtkWindBladeReader.cxx b/Parallel/vtkWindBladeReader.cxx index 232fadaed404d7684d22b71462e79040590e6732..9a2ed2e7321ffd9361d61ff8c0db655eee31df58 100644 --- a/Parallel/vtkWindBladeReader.cxx +++ b/Parallel/vtkWindBladeReader.cxx @@ -248,17 +248,16 @@ int vtkWindBladeReader::RequestInformation( this->GExtent[3] = this->GDimension[1] - 1; this->GExtent[5] = this->GDimension[2] - 1; - field->SetWholeExtent(this->WholeExtent); field->SetDimensions(this->Dimension); fieldInfo->Set(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(), this->WholeExtent, 6); - ground->SetWholeExtent(this->GExtent); ground->SetDimensions(this->GDimension); groundInfo->Set(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(), this->GExtent, 6); - blade->SetWholeExtent(this->WholeExtent); + bladeInfo->Set(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(), + this->WholeExtent, 6); // Create the rectilinear coordinate spacing for entire problem CreateCoordinates(); diff --git a/Rendering/vtkFreeTypeTools.cxx b/Rendering/vtkFreeTypeTools.cxx index 74436931f61ed467ca31c4b02b2d3794b73a123e..f4bb9fcdeb0866857198a0dee8f7752f02b30438 100644 --- a/Rendering/vtkFreeTypeTools.cxx +++ b/Rendering/vtkFreeTypeTools.cxx @@ -979,8 +979,7 @@ void vtkFreeTypeTools::PrepareImageData(vtkImageData *data, // If the RGBA image data is too small, resize it to the next power of 2 // WARNING: at this point, since this image is going to be a texture // we should limit its size or query the hardware - data->SetScalarTypeToUnsignedChar(); - data->SetNumberOfScalarComponents(4); + data->SetSpacing(1.0, 1.0, 1.0); // If the current image data is too small to render the text, @@ -988,7 +987,9 @@ void vtkFreeTypeTools::PrepareImageData(vtkImageData *data, int img_dims[3], new_img_dims[3]; data->GetDimensions(img_dims); - if (img_dims[0] < text_size[0] || img_dims[1] < text_size[1] || + if (data->GetScalarType() != VTK_UNSIGNED_CHAR || + data->GetNumberOfScalarComponents() != 4 || + img_dims[0] < text_size[0] || img_dims[1] < text_size[1] || text_size[0] * 2 < img_dims[0] || text_size[1] * 2 < img_dims[0]) { // Scale to the next highest power of 2 if required. @@ -1007,15 +1008,14 @@ void vtkFreeTypeTools::PrepareImageData(vtkImageData *data, new_img_dims[1] = text_size[1]+1; } new_img_dims[2] = 1; - if (new_img_dims[0] != img_dims[0] || + if (data->GetScalarType() != VTK_UNSIGNED_CHAR || + data->GetNumberOfScalarComponents() != 4 || + new_img_dims[0] != img_dims[0] || new_img_dims[1] != img_dims[1] || new_img_dims[2] != img_dims[2]) { data->SetDimensions(new_img_dims); - data->AllocateScalars(); - data->UpdateInformation(); - data->SetUpdateExtent(data->GetWholeExtent()); - data->PropagateUpdateExtent(); + data->AllocateScalars(VTK_UNSIGNED_CHAR, 4); data->SetOrigin(text_size[0] + 1, text_size[1] + 1, 0.0); data->SetSpacing(text_size[0] / double(new_img_dims[0] - 1), text_size[1] / double(new_img_dims[1] - 1), diff --git a/Rendering/vtkOpenGLGlyph3DMapper.cxx b/Rendering/vtkOpenGLGlyph3DMapper.cxx index 7215f0d029187d5acbf066c1b46adb16ff3ab8dc..a9d2bb78f27b6e46e2d02764af54e7f6a87b4143 100644 --- a/Rendering/vtkOpenGLGlyph3DMapper.cxx +++ b/Rendering/vtkOpenGLGlyph3DMapper.cxx @@ -225,7 +225,6 @@ void vtkOpenGLGlyph3DMapper::Render(vtkRenderer *ren, vtkActor *actor) defaultPointIds[1] = 1; defaultSource->SetPoints(defaultPoints); defaultSource->InsertNextCell(VTK_LINE, 2, defaultPointIds); - defaultSource->SetUpdateExtent(0, 1, 0); this->SetSource(defaultSource); defaultSource->Delete(); defaultSource = NULL; diff --git a/Rendering/vtkOpenGLPolyDataMapper.cxx b/Rendering/vtkOpenGLPolyDataMapper.cxx index 5a1c00306dcd44e1f2cdc7fdc6c4a7dc8d5fdaf5..0cc10496e94f5e239f23f618353bacfc0bef7b66 100644 --- a/Rendering/vtkOpenGLPolyDataMapper.cxx +++ b/Rendering/vtkOpenGLPolyDataMapper.cxx @@ -123,7 +123,7 @@ void vtkOpenGLPolyDataMapper::RenderPiece(vtkRenderer *ren, vtkActor *act) this->InvokeEvent(vtkCommand::StartEvent,NULL); if (!this->Static) { - input->Update(); + this->GetInputAlgorithm()->Update(); } this->InvokeEvent(vtkCommand::EndEvent,NULL); diff --git a/Rendering/vtkOpenGLPolyDataMapper2D.cxx b/Rendering/vtkOpenGLPolyDataMapper2D.cxx index 07ed254fc70fe9f870dd923df380dddce317833c..dd41748660dfd7f38bd9683071b4737b0072aa63 100644 --- a/Rendering/vtkOpenGLPolyDataMapper2D.cxx +++ b/Rendering/vtkOpenGLPolyDataMapper2D.cxx @@ -71,7 +71,7 @@ void vtkOpenGLPolyDataMapper2D::RenderOverlay(vtkViewport* viewport, } else { - input->Update(); + this->GetInputAlgorithm()->Update(); numPts = input->GetNumberOfPoints(); } diff --git a/Rendering/vtkTesting.cxx b/Rendering/vtkTesting.cxx index 20977232fd262b4afe51a7693b6df68ef9d1dbdd..73bcc6e51031b4d1adc08df220b90c69e4df78e5 100644 --- a/Rendering/vtkTesting.cxx +++ b/Rendering/vtkTesting.cxx @@ -36,6 +36,7 @@ #include "vtkFloatArray.h" #include "vtkStreamingDemandDrivenPipeline.h" #include "vtkInformation.h" +#include "vtkAlgorithm.h" #include "vtkSmartPointer.h" #define VTK_CREATE(type, name) \ @@ -327,9 +328,9 @@ int vtkTesting::LookForFile(const char* newFileName) } } //----------------------------------------------------------------------------- -int vtkTesting::RegressionTest(vtkImageData* image, double thresh) +int vtkTesting::RegressionTest(vtkAlgorithm* imageSource, double thresh) { - int result = this->RegressionTest(image, thresh, cout); + int result = this->RegressionTest(imageSource, thresh, cout); cout << "<DartMeasurement name=\"WallTime\" type=\"numeric/double\">"; cout << vtkTimerLog::GetUniversalTime() - this->StartWallTime; @@ -386,11 +387,14 @@ int vtkTesting::RegressionTest(double thresh, ostream &os) rt_w2if->ReadFrontBufferOn(); } - int res = this->RegressionTest(rt_w2if->GetOutput(), thresh, os); + rt_w2if->Update(); + int res = this->RegressionTest(rt_w2if, thresh, os); return res; } //----------------------------------------------------------------------------- -int vtkTesting::RegressionTest(vtkImageData* image, double thresh, ostream& os) +int vtkTesting::RegressionTest(vtkAlgorithm* imageSource, + double thresh, + ostream& os) { // do a get to compute the real value this->GetValidImageFileName(); @@ -415,7 +419,7 @@ int vtkTesting::RegressionTest(vtkImageData* image, double thresh, ostream& os) vtkstd::string vImage = tmpDir + "/" + validName; VTK_CREATE(vtkPNGWriter, rt_pngw); rt_pngw->SetFileName(vImage.c_str()); - rt_pngw->SetInput(image); + rt_pngw->SetInputConnection(imageSource->GetOutputPort()); rt_pngw->Write(); os << "<DartMeasurement name=\"ImageNotFound\" type=\"text/string\">" << this->ValidImageFileName << "</DartMeasurement>" << endl; @@ -425,13 +429,13 @@ int vtkTesting::RegressionTest(vtkImageData* image, double thresh, ostream& os) VTK_CREATE(vtkPNGReader, rt_png); rt_png->SetFileName(this->ValidImageFileName); rt_png->Update(); - // image->Update(); + imageSource->Update(); VTK_CREATE(vtkImageDifference, rt_id); VTK_CREATE(vtkImageClip, ic1); ic1->SetClipData(1); - ic1->SetInput(image); + ic1->SetInputConnection(imageSource->GetOutputPort()); VTK_CREATE(vtkImageClip, ic2); ic2->SetClipData(1); @@ -655,7 +659,7 @@ int vtkTesting::RegressionTest(vtkImageData* image, double thresh, ostream& os) // write out the image that was generated vtkstd::string vImage = tmpDir + "/" + validName; rt_pngw->SetFileName(vImage.c_str()); - rt_pngw->SetInput(image); + rt_pngw->SetInputConnection(imageSource->GetOutputPort()); rt_pngw->Write(); os << "<DartMeasurementFile name=\"TestImage\" type=\"image/png\">"; diff --git a/Rendering/vtkTesting.h b/Rendering/vtkTesting.h index bd3627166e2935fa2c8b452aa426a545920871c8..82be7a9e1b27359a815b9dd972053dd4b3d717a0 100644 --- a/Rendering/vtkTesting.h +++ b/Rendering/vtkTesting.h @@ -63,6 +63,7 @@ #include <vtkstd/vector> // STL Header used for argv #include <vtkstd/string> // STL Header used for argv +class vtkAlgorithm; class vtkRenderWindow; class vtkImageData; class vtkDataArray; @@ -140,8 +141,8 @@ public: // Description: // Compare the image with the valid image. - virtual int RegressionTest(vtkImageData* image, double thresh); - virtual int RegressionTest(vtkImageData* image, double thresh, ostream& os); + virtual int RegressionTest(vtkAlgorithm* imageSource, double thresh); + virtual int RegressionTest(vtkAlgorithm* imageSource, double thresh, ostream& os); // Description: // Compute the average L2 norm between all point data data arrays diff --git a/Rendering/vtkTkRenderWidget.cxx b/Rendering/vtkTkRenderWidget.cxx index 54b8cc81424126ba1ec7933d695122e867dc7ee0..1882b55ae9d80677d84b03ab568d191d783b15be 100644 --- a/Rendering/vtkTkRenderWidget.cxx +++ b/Rendering/vtkTkRenderWidget.cxx @@ -253,8 +253,7 @@ extern "C" { int extent[6]; // Pass the check? int valid = 1; - image->Update(); - image->GetWholeExtent ( extent ); + image->GetExtent ( extent ); // Setup the photo data block, this info will be used later to // handle the vtk data types and window/level // For reference: diff --git a/Rendering/vtkVRMLExporter.cxx b/Rendering/vtkVRMLExporter.cxx index 1795454945426ebeefa8587f07fc89f189d45892..07789802c8a682db00fb88316274ac1c0f2b6d79 100644 --- a/Rendering/vtkVRMLExporter.cxx +++ b/Rendering/vtkVRMLExporter.cxx @@ -568,7 +568,7 @@ void vtkVRMLExporter::WriteShapeBegin( vtkActor* actor, FILE *fileP, vtkErrorMacro(<< "texture has no input!\n"); return; } - aTexture->GetInput()->Update(); + aTexture->GetInputAlgorithm()->Update(); size = aTexture->GetInput()->GetDimensions(); scalars = aTexture->GetInput()->GetPointData()->GetScalars(); diff --git a/Rendering/vtkVolume.cxx b/Rendering/vtkVolume.cxx index 4ed8f50513bb7c114517db8dea9784793fe7db85..cbb1d685765deb6148d0ca30e39712083bac39dd 100644 --- a/Rendering/vtkVolume.cxx +++ b/Rendering/vtkVolume.cxx @@ -468,7 +468,7 @@ unsigned long int vtkVolume::GetRedrawMTime() mTime = ( time > mTime ? time : mTime ); if (this->GetMapper()->GetDataSetInput() != NULL) { - this->GetMapper()->GetDataSetInput()->Update(); + this->GetMapper()->GetInputAlgorithm()->Update(); time = this->Mapper->GetDataSetInput()->GetMTime(); mTime = ( time > mTime ? time : mTime ); } diff --git a/Views/vtkRenderedGraphRepresentation.cxx b/Views/vtkRenderedGraphRepresentation.cxx index 07177a006647c288f9752b1134e500dbbf4d3a41..dd8b9d3a4493643cfc6a63ae5d79f0aec9e52fb2 100644 --- a/Views/vtkRenderedGraphRepresentation.cxx +++ b/Views/vtkRenderedGraphRepresentation.cxx @@ -1042,7 +1042,7 @@ void vtkRenderedGraphRepresentation::PrepareForRendering(vtkRenderView* view) this->VertexIconGlyph->SetDisplaySize(view->GetDisplaySize()); this->VertexIconGlyph->SetUseIconSize(false); this->VertexIconActor->GetTexture()->MapColorScalarsThroughLookupTableOff(); - this->VertexIconActor->GetTexture()->GetInput()->Update(); + this->VertexIconActor->GetTexture()->GetInputAlgorithm()->Update(); int* dim = this->VertexIconActor->GetTexture()->GetInput()->GetDimensions(); this->VertexIconGlyph->SetIconSheetSize(dim); } diff --git a/VolumeRendering/Testing/Cxx/TestGPURayCastCompositeBinaryMask.cxx b/VolumeRendering/Testing/Cxx/TestGPURayCastCompositeBinaryMask.cxx index 93c1b5422c308edd7349df92056fef031a20b6f7..016555bca6178e925163499e6af1779dca164449 100644 --- a/VolumeRendering/Testing/Cxx/TestGPURayCastCompositeBinaryMask.cxx +++ b/VolumeRendering/Testing/Cxx/TestGPURayCastCompositeBinaryMask.cxx @@ -124,9 +124,8 @@ int TestGPURayCastCompositeBinaryMask(int argc, char *argv[]) = vtkSmartPointer< vtkImageData >::New(); mask->SetExtent(input->GetExtent()); mask->SetSpacing(input->GetSpacing()); - mask->SetScalarTypeToUnsignedChar(); mask->SetOrigin(input->GetOrigin()); - mask->AllocateScalars(); + mask->AllocateScalars(VTK_UNSIGNED_CHAR, 1); // Create a simple mask that's split along the X axis unsigned char *ptr = static_cast< unsigned char * >(mask->GetScalarPointer()); diff --git a/VolumeRendering/Testing/Cxx/TestGPURayCastMIPBinaryMask.cxx b/VolumeRendering/Testing/Cxx/TestGPURayCastMIPBinaryMask.cxx index f991acfdf384e35299d40381e1d38766f29ca766..bed6a84b67a3a40a133ad578e9f382b444cfc332 100644 --- a/VolumeRendering/Testing/Cxx/TestGPURayCastMIPBinaryMask.cxx +++ b/VolumeRendering/Testing/Cxx/TestGPURayCastMIPBinaryMask.cxx @@ -116,9 +116,8 @@ int TestGPURayCastMIPBinaryMask(int argc, char *argv[]) = vtkSmartPointer< vtkImageData >::New(); mask->SetExtent(input->GetExtent()); mask->SetSpacing(input->GetSpacing()); - mask->SetScalarTypeToUnsignedChar(); mask->SetOrigin(input->GetOrigin()); - mask->AllocateScalars(); + mask->AllocateScalars(VTK_UNSIGNED_CHAR, 1); // Create a simple mask that's split along the X axis unsigned char *ptr = static_cast< unsigned char * >(mask->GetScalarPointer()); diff --git a/VolumeRendering/vtkEncodedGradientEstimator.cxx b/VolumeRendering/vtkEncodedGradientEstimator.cxx index 17d09c9c5db0cdb36d55a5ca605940ca92024c85..5293cf2c15d1cd242fff0e0a7b63f4e9cacfc632 100644 --- a/VolumeRendering/vtkEncodedGradientEstimator.cxx +++ b/VolumeRendering/vtkEncodedGradientEstimator.cxx @@ -186,9 +186,6 @@ void vtkEncodedGradientEstimator::Update( ) this->Input->GetMTime() > this->BuildTime || !this->EncodedNormals ) { - this->Input->UpdateInformation(); - this->Input->SetUpdateExtentToWholeExtent(); - this->Input->Update(); startSeconds = vtkTimerLog::GetUniversalTime(); startCPUSeconds = vtkTimerLog::GetCPUTime(); diff --git a/VolumeRendering/vtkFixedPointVolumeRayCastMapper.cxx b/VolumeRendering/vtkFixedPointVolumeRayCastMapper.cxx index 596b35d30aab2e50f573944b9edb7429d1f7fd6f..6e8f577dc8a521e7b30f87b0c746f8fd60aa0427 100644 --- a/VolumeRendering/vtkFixedPointVolumeRayCastMapper.cxx +++ b/VolumeRendering/vtkFixedPointVolumeRayCastMapper.cxx @@ -41,6 +41,7 @@ #include "vtkTransform.h" #include "vtkVolumeProperty.h" #include "vtkRayCastImageDisplayHelper.h" +#include "vtkStreamingDemandDrivenPipeline.h" #include "vtkFixedPointRayCastImage.h" #include "vtkVolumeRayCastSpaceLeapingImageFilter.h" @@ -1213,9 +1214,11 @@ void vtkFixedPointVolumeRayCastMapper::PerVolumeInitialization( vtkRenderer *ren } else { - input->UpdateInformation(); - input->SetUpdateExtentToWholeExtent(); - input->Update(); + vtkAlgorithm* inAlg = this->GetInputAlgorithm(); + inAlg->UpdateInformation(); + vtkStreamingDemandDrivenPipeline::SetUpdateExtentToWholeExtent( + this->GetInputInformation()); + inAlg->Update(); } int usingCellColors; diff --git a/VolumeRendering/vtkGPUVolumeRayCastMapper.cxx b/VolumeRendering/vtkGPUVolumeRayCastMapper.cxx index b36152828e61bb23e07ebff53bbd798748c1d958..c89401254c5d457bc319f4d5d86765dbb0ff8ee3 100644 --- a/VolumeRendering/vtkGPUVolumeRayCastMapper.cxx +++ b/VolumeRendering/vtkGPUVolumeRayCastMapper.cxx @@ -256,7 +256,7 @@ int vtkGPUVolumeRayCastMapper::ValidateRender(vtkRenderer *ren, if(goodSoFar) { - input->Update(); + this->GetInputAlgorithm()->Update(); } // If we have a timestamp change or data change then create a new clone. @@ -312,11 +312,6 @@ int vtkGPUVolumeRayCastMapper::ValidateRender(vtkRenderer *ren, vtkDataArray *scalars = NULL; if ( goodSoFar ) { - // Here is where we update the input - this->TransformedInput->UpdateInformation(); - this->TransformedInput->SetUpdateExtentToWholeExtent(); - this->TransformedInput->Update(); - // Now make sure we can find scalars scalars=this->GetScalars(this->TransformedInput,this->ScalarMode, this->ArrayAccessMode, @@ -451,9 +446,7 @@ void vtkGPUVolumeRayCastMapper::CreateCanonicalView( vtkImageData *bigImage = vtkImageData::New(); bigImage->SetDimensions(size[0], size[1], 1); - bigImage->SetScalarTypeToUnsignedChar(); - bigImage->SetNumberOfScalarComponents(3); - bigImage->AllocateScalars(); + bigImage->AllocateScalars(VTK_UNSIGNED_CHAR, 3); this->CanonicalViewImageData = bigImage; diff --git a/VolumeRendering/vtkUnstructuredGridVolumeRayCastMapper.cxx b/VolumeRendering/vtkUnstructuredGridVolumeRayCastMapper.cxx index cf2947e593dfa2f0922524ba661e1bf2bed47c80..2eddea265a1b4a02037dea0e097b428c916b3fed 100644 --- a/VolumeRendering/vtkUnstructuredGridVolumeRayCastMapper.cxx +++ b/VolumeRendering/vtkUnstructuredGridVolumeRayCastMapper.cxx @@ -212,9 +212,9 @@ void vtkUnstructuredGridVolumeRayCastMapper::Render( vtkRenderer *ren, vtkVolume return; } - this->GetInput()->UpdateInformation(); - this->GetInput()->SetUpdateExtentToWholeExtent(); - this->GetInput()->Update(); + this->GetInputAlgorithm()->UpdateInformation(); + this->GetInputAlgorithm()->SetUpdateExtentToWholeExtent(); + this->GetInputAlgorithm()->Update(); // Check to make sure we have an appropriate integrator. if (this->RayIntegrator) diff --git a/VolumeRendering/vtkUnstructuredGridVolumeZSweepMapper.cxx b/VolumeRendering/vtkUnstructuredGridVolumeZSweepMapper.cxx index eb5bb22377317970b0d66ead1128c3426f07b9be..65e3be41d78af1706f2395488657b73b7489dc2b 100644 --- a/VolumeRendering/vtkUnstructuredGridVolumeZSweepMapper.cxx +++ b/VolumeRendering/vtkUnstructuredGridVolumeZSweepMapper.cxx @@ -2665,9 +2665,9 @@ void vtkUnstructuredGridVolumeZSweepMapper::Render(vtkRenderer *ren, return; } - this->GetInput()->UpdateInformation(); - this->GetInput()->SetUpdateExtentToWholeExtent(); - this->GetInput()->Update(); + this->GetInputAlgorithm()->UpdateInformation(); + this->GetInputAlgorithm()->SetUpdateExtentToWholeExtent(); + this->GetInputAlgorithm()->Update(); // Check to make sure we have an appropriate integrator. if (this->RayIntegrator) @@ -4152,13 +4152,13 @@ void vtkUnstructuredGridVolumeZSweepMapper::RasterizeLine(vtkVertexEntry *v0, ++y; done=y>v1->GetScreenY(); } - // values, invw, zview + //values, invw, zview break; case VTK_LINE_DIAGONAL: ++y; x+=xSign; done=y>v1->GetScreenY(); - // values, invw, zview + //values, invw, zview break; case VTK_LINE_BRESENHAM: if(xIncrement) diff --git a/VolumeRendering/vtkVolumeOutlineSource.cxx b/VolumeRendering/vtkVolumeOutlineSource.cxx index 3eeda4a26751c536e6a9ceee33c773a430e21ac5..25199ebaaf5d2e89e2536760369f076ba9266dd8 100644 --- a/VolumeRendering/vtkVolumeOutlineSource.cxx +++ b/VolumeRendering/vtkVolumeOutlineSource.cxx @@ -15,6 +15,7 @@ #include "vtkVolumeOutlineSource.h" #include "vtkDataSet.h" +#include "vtkDemandDrivenPipeline.h" #include "vtkInformation.h" #include "vtkInformationVector.h" #include "vtkObjectFactory.h" @@ -23,6 +24,7 @@ #include "vtkPoints.h" #include "vtkCellArray.h" #include "vtkCellData.h" +#include "vtkStreamingDemandDrivenPipeline.h" #include "vtkUnsignedCharArray.h" #include "vtkVolumeMapper.h" #include "vtkMath.h" @@ -151,7 +153,9 @@ int vtkVolumeOutlineSource::ComputePipelineMTime( { mTime = mapperMTime; } - vtkImageData *input = this->VolumeMapper->GetInput(); + vtkDemandDrivenPipeline *input = + vtkDemandDrivenPipeline::SafeDownCast( + this->VolumeMapper->GetInputExecutive()); if (input) { // Need to do this because we are not formally connected @@ -189,9 +193,9 @@ int vtkVolumeOutlineSource::RequestInformation( this->CroppingRegionFlags = this->VolumeMapper->GetCroppingRegionFlags(); this->VolumeMapper->GetCroppingRegionPlanes(this->CroppingRegionPlanes); - vtkImageData *data = this->VolumeMapper->GetInput(); + vtkInformation *mapInfo = this->VolumeMapper->GetInputInformation(); - if (!data) + if (!mapInfo) { vtkWarningMacro("The VolumeMapper does not have an input set."); return 1; @@ -208,9 +212,10 @@ int vtkVolumeOutlineSource::RequestInformation( double origin[3]; int extent[6]; - data->GetSpacing(spacing); - data->GetOrigin(origin); - data->GetWholeExtent(extent); + mapInfo->Get(vtkDataObject::SPACING(), spacing); + mapInfo->Get(vtkDataObject::ORIGIN(), origin); + mapInfo->Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(), + extent); for (int i = 0; i < 3; i++) { diff --git a/VolumeRendering/vtkVolumeRayCastMapper.cxx b/VolumeRendering/vtkVolumeRayCastMapper.cxx index 6afc89e9498f15bdef45740ebd455254734239b0..153320a43779273ed4a0d7be57e690aec5136386 100644 --- a/VolumeRendering/vtkVolumeRayCastMapper.cxx +++ b/VolumeRendering/vtkVolumeRayCastMapper.cxx @@ -34,6 +34,7 @@ #include "vtkVolumeProperty.h" #include "vtkVolumeRayCastFunction.h" #include "vtkRayCastImageDisplayHelper.h" +#include "vtkStreamingDemandDrivenPipeline.h" #include <math.h> @@ -312,9 +313,10 @@ void vtkVolumeRayCastMapper::Render( vtkRenderer *ren, vtkVolume *vol ) } else { - this->GetInput()->UpdateInformation(); - this->GetInput()->SetUpdateExtentToWholeExtent(); - this->GetInput()->Update(); + this->GetInputAlgorithm()->UpdateInformation(); + vtkStreamingDemandDrivenPipeline::SetUpdateExtentToWholeExtent( + this->GetInputInformation()); + this->GetInputAlgorithm()->Update(); } diff --git a/VolumeRendering/vtkVolumeTextureMapper.cxx b/VolumeRendering/vtkVolumeTextureMapper.cxx index 00635a22d73b802da8951266d0a85c8e2e0c5c8c..e7d01c8c6031d0ab66cf4f448e61e738be71fa9f 100644 --- a/VolumeRendering/vtkVolumeTextureMapper.cxx +++ b/VolumeRendering/vtkVolumeTextureMapper.cxx @@ -21,6 +21,7 @@ #include "vtkImageData.h" #include "vtkPointData.h" #include "vtkRenderer.h" +#include "vtkStreamingDemandDrivenPipeline.h" #include "vtkVolume.h" #include "vtkVolumeProperty.h" @@ -92,9 +93,9 @@ void vtkVolumeTextureMapper::Update() { if ( this->GetInput() ) { - this->GetInput()->UpdateInformation(); - this->GetInput()->SetUpdateExtentToWholeExtent(); - this->GetInput()->Update(); + this->GetInputAlgorithm()->UpdateInformation(); + this->GetInputAlgorithm()->SetUpdateExtentToWholeExtent(); + this->GetInputAlgorithm()->Update(); } } diff --git a/VolumeRendering/vtkVolumeTextureMapper3D.cxx b/VolumeRendering/vtkVolumeTextureMapper3D.cxx index 00de75dcc6ec32a37c9dcacc13bc838378fab3d5..a722a940ea24d9d0a272530c86c20d4eceeb3602 100644 --- a/VolumeRendering/vtkVolumeTextureMapper3D.cxx +++ b/VolumeRendering/vtkVolumeTextureMapper3D.cxx @@ -1015,7 +1015,7 @@ int vtkVolumeTextureMapper3D::UpdateVolumes(vtkVolume *vtkNotUsed(vol)) // Get the image data vtkImageData *input = this->GetInput(); - input->Update(); + this->GetInputAlgorithm()->Update(); // Has the volume changed in some way? if ( this->SavedTextureInput != input || @@ -1200,7 +1200,7 @@ int vtkVolumeTextureMapper3D::UpdateColorLookup( vtkVolume *vol ) // Get the image data vtkImageData *input = this->GetInput(); - input->Update(); + this->GetInputAlgorithm()->Update(); // Has the volume changed in some way? if ( this->SavedParametersInput != input || diff --git a/Widgets/vtk3DWidget.cxx b/Widgets/vtk3DWidget.cxx index 462a2edb76d263d2145d4dcbcf6688879665f3fd..acfcc2332fafa5c58363cdcc06b86cd75265fb67 100644 --- a/Widgets/vtk3DWidget.cxx +++ b/Widgets/vtk3DWidget.cxx @@ -66,7 +66,7 @@ void vtk3DWidget::PlaceWidget() } else if ( this->Input ) { - this->Input->Update(); + //this->Input->Update(); this->Input->GetBounds(bounds); } else diff --git a/Widgets/vtkBalloonRepresentation.cxx b/Widgets/vtkBalloonRepresentation.cxx index 8bec51243296dc3dee88f062485a8571510d7467..424b563da931843180b7693105de917f17657977 100644 --- a/Widgets/vtkBalloonRepresentation.cxx +++ b/Widgets/vtkBalloonRepresentation.cxx @@ -241,7 +241,7 @@ void vtkBalloonRepresentation::BuildRepresentation() // Determine the size of the image if ( this->BalloonImage ) { - this->BalloonImage->Update(); + //this->BalloonImage->Update(); if ( this->BalloonImage->GetDataDimension() == 2 ) { int dims[3]; diff --git a/Widgets/vtkCheckerboardRepresentation.cxx b/Widgets/vtkCheckerboardRepresentation.cxx index 7d455550dffbe88cda6aec1f13dd4457b06a1a77..6bec5d8ef50b9326a8dd6ee87485560046af1b1e 100644 --- a/Widgets/vtkCheckerboardRepresentation.cxx +++ b/Widgets/vtkCheckerboardRepresentation.cxx @@ -15,6 +15,7 @@ #include "vtkCheckerboardRepresentation.h" #include "vtkSliderRepresentation3D.h" #include "vtkImageCheckerboard.h" +#include "vtkImageMapper3D.h" #include "vtkImageActor.h" #include "vtkImageData.h" #include "vtkCommand.h" @@ -184,7 +185,7 @@ void vtkCheckerboardRepresentation::BuildRepresentation() double bounds[6]; vtkImageData *image = this->ImageActor->GetInput(); - image->Update(); + this->ImageActor->GetMapper()->GetInputAlgorithm()->Update(); image->GetBounds(bounds); if ( image->GetDataDimension() != 2 ) { diff --git a/Widgets/vtkImageOrthoPlanes.cxx b/Widgets/vtkImageOrthoPlanes.cxx index f675c93e1067c97bfe7b971703a3529158758907..e9791abdeb8b2d642b3376f3716771807b42fd0e 100644 --- a/Widgets/vtkImageOrthoPlanes.cxx +++ b/Widgets/vtkImageOrthoPlanes.cxx @@ -21,6 +21,10 @@ #include "vtkCallbackCommand.h" #include "vtkImageData.h" #include "vtkTransform.h" +#include "vtkAlgorithm.h" +#include "vtkImageReslice.h" +#include "vtkInformation.h" +#include "vtkStreamingDemandDrivenPipeline.h" #include <math.h> @@ -764,20 +768,23 @@ void vtkImageOrthoPlanes::ResetPlanes() //----------------------------------------------------------------------- void vtkImageOrthoPlanes::GetBounds(double bounds[6]) { - vtkImageData *input = - vtkImageData::SafeDownCast(this->Planes[0]->GetInput()); + vtkAlgorithm* input = + this->Planes[0]->GetReslice()->GetInputAlgorithm(); + if (!input) { return; } + input->UpdateInformation(); + vtkInformation* info = input->GetOutputInformation(0); int extent[6]; + info->Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(), extent); double origin[3]; + info->Get(vtkDataObject::ORIGIN(), origin); double spacing[3]; - input->UpdateInformation(); - input->GetWholeExtent(extent); - input->GetOrigin(origin); - input->GetSpacing(spacing); + info->Get(vtkDataObject::SPACING(), spacing); + for (int i = 0; i < 3; i++) { bounds[2*i] = origin[i] + spacing[i]*extent[2*i]; diff --git a/Widgets/vtkImagePlaneWidget.cxx b/Widgets/vtkImagePlaneWidget.cxx index ab31535defff1039ed3a9e09d5a4957195bef0d6..149f01c486aef6ec0e3d38bb3909999bdccfc910 100644 --- a/Widgets/vtkImagePlaneWidget.cxx +++ b/Widgets/vtkImagePlaneWidget.cxx @@ -39,6 +39,8 @@ #include "vtkTextProperty.h" #include "vtkTexture.h" #include "vtkTransform.h" +#include "vtkStreamingDemandDrivenPipeline.h" +#include "vtkInformation.h" vtkStandardNewMacro(vtkImagePlaneWidget); @@ -1432,13 +1434,15 @@ void vtkImagePlaneWidget::SetPlaneOrientation(int i) return; } - this->ImageData->UpdateInformation(); + vtkAlgorithm* inpAlg = this->Reslice->GetInputAlgorithm(); + inpAlg->UpdateInformation(); + vtkInformation* outInfo = inpAlg->GetOutputInformation(0); int extent[6]; - this->ImageData->GetWholeExtent(extent); + outInfo->Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(), extent); double origin[3]; - this->ImageData->GetOrigin(origin); + outInfo->Get(vtkDataObject::ORIGIN(), origin); double spacing[3]; - this->ImageData->GetSpacing(spacing); + outInfo->Get(vtkDataObject::SPACING(), spacing); // Prevent obscuring voxels by offsetting the plane geometry // @@ -1554,13 +1558,15 @@ void vtkImagePlaneWidget::UpdatePlane() // Calculate appropriate pixel spacing for the reslicing // - this->ImageData->UpdateInformation(); + vtkAlgorithm* inpAlg = this->Reslice->GetInputAlgorithm(); + inpAlg->UpdateInformation(); + vtkInformation* outInfo = inpAlg->GetOutputInformation(0); double spacing[3]; - this->ImageData->GetSpacing(spacing); + outInfo->Get(vtkDataObject::SPACING(), spacing); double origin[3]; - this->ImageData->GetOrigin(origin); + outInfo->Get(vtkDataObject::ORIGIN(), origin); int extent[6]; - this->ImageData->GetWholeExtent(extent); + outInfo->Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(), extent); int i; @@ -1930,11 +1936,13 @@ void vtkImagePlaneWidget::SetSliceIndex(int index) { return; } - this->ImageData->UpdateInformation(); + vtkAlgorithm* inpAlg = this->Reslice->GetInputAlgorithm(); + inpAlg->UpdateInformation(); + vtkInformation* outInfo = inpAlg->GetOutputInformation(0); double origin[3]; - this->ImageData->GetOrigin(origin); + outInfo->Get(vtkDataObject::ORIGIN(), origin); double spacing[3]; - this->ImageData->GetSpacing(spacing); + outInfo->Get(vtkDataObject::SPACING(), spacing); double planeOrigin[3]; this->PlaneSource->GetOrigin(planeOrigin); double pt1[3]; @@ -1986,11 +1994,13 @@ int vtkImagePlaneWidget::GetSliceIndex() { return 0; } - this->ImageData->UpdateInformation(); + vtkAlgorithm* inpAlg = this->Reslice->GetInputAlgorithm(); + inpAlg->UpdateInformation(); + vtkInformation* outInfo = inpAlg->GetOutputInformation(0); double origin[3]; - this->ImageData->GetOrigin(origin); + outInfo->Get(vtkDataObject::ORIGIN(), origin); double spacing[3]; - this->ImageData->GetSpacing(spacing); + outInfo->Get(vtkDataObject::SPACING(), spacing); double planeOrigin[3]; this->PlaneSource->GetOrigin(planeOrigin); @@ -2083,7 +2093,7 @@ void vtkImagePlaneWidget::UpdateCursor(int X, int Y ) // up to date already, this call doesn't cost very much. If we don't make // this call and the data is not up to date, the GetScalar... call will // cause a segfault. - this->ImageData->Update(); + this->Reslice->GetInputAlgorithm()->Update(); vtkAssemblyPath *path; this->PlanePicker->Pick(X,Y,0.0,this->CurrentRenderer); diff --git a/Widgets/vtkLogoRepresentation.cxx b/Widgets/vtkLogoRepresentation.cxx index 5e13460d2b58fb356a2bcb9a740ebd78841e4cb3..de658da6b459b7ef8d51d6f87d022eff38b2f999 100644 --- a/Widgets/vtkLogoRepresentation.cxx +++ b/Widgets/vtkLogoRepresentation.cxx @@ -144,7 +144,7 @@ void vtkLogoRepresentation::BuildRepresentation() double imageSize[2], borderSize[2], o[2]; imageSize[0] = 0.0; imageSize[1] = 0.0; - this->Image->Update(); + //this->Image->Update(); if ( this->Image->GetDataDimension() == 2 ) { int dims[3]; diff --git a/Widgets/vtkPolyDataSourceWidget.cxx b/Widgets/vtkPolyDataSourceWidget.cxx index 6ed21c221b5c693ff12a884bfae84f33d007ac1a..16f41a694cbf0c51d37d57b5f70a4e5659167e36 100644 --- a/Widgets/vtkPolyDataSourceWidget.cxx +++ b/Widgets/vtkPolyDataSourceWidget.cxx @@ -36,7 +36,7 @@ void vtkPolyDataSourceWidget::PlaceWidget() } else if ( this->Input ) { - this->Input->Update(); + //this->Input->Update(); this->Input->GetBounds(bounds); } else