diff --git a/Common/DataModel/vtkDataObject.cxx b/Common/DataModel/vtkDataObject.cxx index 4d7b8366e698c5f561695c362be59b849ff58d85..d5c68e63fd2915c270e320fd73e424ba7a31489f 100644 --- a/Common/DataModel/vtkDataObject.cxx +++ b/Common/DataModel/vtkDataObject.cxx @@ -56,6 +56,7 @@ vtkInformationKeyMacro(vtkDataObject, FIELD_NUMBER_OF_TUPLES, Integer); vtkInformationKeyRestrictedMacro(vtkDataObject, FIELD_RANGE, DoubleVector, 2); vtkInformationKeyRestrictedMacro(vtkDataObject, PIECE_EXTENT, IntegerVector, 6); vtkInformationKeyMacro(vtkDataObject, FIELD_OPERATION, Integer); +vtkInformationKeyRestrictedMacro(vtkDataObject, ALL_PIECES_EXTENT, IntegerVector, 6); vtkInformationKeyRestrictedMacro(vtkDataObject, DATA_EXTENT, IntegerPointer, 6); vtkInformationKeyRestrictedMacro(vtkDataObject, ORIGIN, DoubleVector, 3); vtkInformationKeyRestrictedMacro(vtkDataObject, SPACING, DoubleVector, 3); @@ -162,6 +163,7 @@ void vtkDataObject::Initialize() if (this->Information) { // Make sure the information is cleared. + this->Information->Remove(ALL_PIECES_EXTENT()); this->Information->Remove(DATA_PIECE_NUMBER()); this->Information->Remove(DATA_NUMBER_OF_PIECES()); this->Information->Remove(DATA_NUMBER_OF_GHOST_LEVELS()); diff --git a/Common/DataModel/vtkDataObject.h b/Common/DataModel/vtkDataObject.h index 9fdd90ff432106b68d1930e023b681ac1057bc4c..481ca27d66cc6945f031fdd69ae5d8dd9b1daa65 100644 --- a/Common/DataModel/vtkDataObject.h +++ b/Common/DataModel/vtkDataObject.h @@ -298,6 +298,7 @@ public: static vtkInformationDataObjectKey* DATA_OBJECT(); static vtkInformationIntegerKey* DATA_EXTENT_TYPE(); static vtkInformationIntegerPointerKey* DATA_EXTENT(); + static vtkInformationIntegerVectorKey* ALL_PIECES_EXTENT(); static vtkInformationIntegerKey* DATA_PIECE_NUMBER(); static vtkInformationIntegerKey* DATA_NUMBER_OF_PIECES(); static vtkInformationIntegerKey* DATA_NUMBER_OF_GHOST_LEVELS(); diff --git a/Common/DataModel/vtkDataSet.cxx b/Common/DataModel/vtkDataSet.cxx index caa7cccb87b662e3c131a16c15340d781ee71d8a..3e6edb2c6d6ee3261a46a56055e58c452462ba82 100644 --- a/Common/DataModel/vtkDataSet.cxx +++ b/Common/DataModel/vtkDataSet.cxx @@ -461,11 +461,7 @@ int vtkDataSet::CheckAttributes() } //---------------------------------------------------------------------------- -void vtkDataSet::GenerateGhostLevelArray(int update_piece, - int update_num_pieces, - int vtkNotUsed(update_ghost_level), - int* whole_extent, - vtkExtentTranslator* translator) +void vtkDataSet::GenerateGhostLevelArray(int zeroExt[6]) { // Make sure this is a structured data set. if(this->GetExtentType() != VTK_3D_EXTENT) @@ -477,10 +473,12 @@ void vtkDataSet::GenerateGhostLevelArray(int update_piece, if(!this->PointData->GetArray("vtkGhostLevels")) { // Create ghost levels for cells and points. vtkUnsignedCharArray *levels; - int zeroExt[6], extent[6]; + int extent[6]; int i, j, k, di, dj, dk, dist; this->Information->Get(vtkDataObject::DATA_EXTENT(), extent); + + /* // Get the extent with ghost level 0. translator->SetWholeExtent(whole_extent); translator->SetPiece(update_piece); @@ -488,6 +486,7 @@ void vtkDataSet::GenerateGhostLevelArray(int update_piece, translator->SetGhostLevel(0); translator->PieceToExtent(); translator->GetExtent(zeroExt); + */ // ---- POINTS ---- // Allocate the appropriate number levels (number of points). @@ -504,7 +503,7 @@ void vtkDataSet::GenerateGhostLevelArray(int update_piece, { dk = zeroExt[4] - k; } - if (k >= zeroExt[5] && k < whole_extent[5]) + if (k >= zeroExt[5]) { // Special case for last tile. dk = k - zeroExt[5] + 1; } @@ -515,7 +514,7 @@ void vtkDataSet::GenerateGhostLevelArray(int update_piece, { dj = zeroExt[2] - j; } - if (j >= zeroExt[3] && j < whole_extent[3]) + if (j >= zeroExt[3]) { // Special case for last tile. dj = j - zeroExt[3] + 1; } @@ -526,7 +525,7 @@ void vtkDataSet::GenerateGhostLevelArray(int update_piece, { di = zeroExt[0] - i; } - if (i >= zeroExt[1] && i < whole_extent[1]) + if (i >= zeroExt[1]) { // Special case for last tile. di = i - zeroExt[1] + 1; } diff --git a/Common/DataModel/vtkDataSet.h b/Common/DataModel/vtkDataSet.h index f226a3e3dc65d77ef3532965dde15867cdaf621c..9a0aed1e772d7c95516a964b5ad15cb4f0792705 100644 --- a/Common/DataModel/vtkDataSet.h +++ b/Common/DataModel/vtkDataSet.h @@ -332,12 +332,9 @@ public: // Description: // Normally called by pipeline executives or algoritgms only. This method - // computes the ghost arrays for a given dataset. - virtual void GenerateGhostLevelArray(int update_piece, - int update_num_pieces, - int update_ghost_level, - int* whole_extent, - vtkExtentTranslator* translator); + // computes the ghost arrays for a given dataset. The zeroExt argument + // specifies the extent of the region which ghost level = 0. + virtual void GenerateGhostLevelArray(int zeroExt[6]); //BTX // Description: diff --git a/Common/DataModel/vtkExtentTranslator.h b/Common/DataModel/vtkExtentTranslator.h index 177eab39bbf5e5a0f3e8020db4fb119e10fd759a..3f519eb7d000375e72f85fe7809cf0702a8cbe10 100644 --- a/Common/DataModel/vtkExtentTranslator.h +++ b/Common/DataModel/vtkExtentTranslator.h @@ -76,9 +76,9 @@ public: {this->SplitMode = vtkExtentTranslator::BLOCK_MODE;} void SetSplitModeToXSlab() {this->SplitMode = vtkExtentTranslator::X_SLAB_MODE;} - void SetSplitModeToYSlab() + void SetSplitModeToYSlab() {this->SplitMode = vtkExtentTranslator::Y_SLAB_MODE;} - void SetSplitModeToZSlab() + void SetSplitModeToZSlab() {this->SplitMode = vtkExtentTranslator::Z_SLAB_MODE;} vtkGetMacro(SplitMode,int); @@ -90,16 +90,15 @@ public: // use this to tell the translator which dimensions to split. void SetSplitPath(int len, int *splitpath); -//BTX // Don't change the numbers here - they are used in the code // to indicate array indices. - enum Modes { + enum Modes + { X_SLAB_MODE=0, Y_SLAB_MODE=1, Z_SLAB_MODE=2, BLOCK_MODE= 3 }; -//ETX protected: vtkExtentTranslator(); diff --git a/Common/ExecutionModel/vtkAlgorithm.cxx b/Common/ExecutionModel/vtkAlgorithm.cxx index e929d04e0bdec64c43c5b2d7f96e107c0e5c8bc9..aa8b6335d0854af7c0fbd179eecccf9fa3f7c329 100644 --- a/Common/ExecutionModel/vtkAlgorithm.cxx +++ b/Common/ExecutionModel/vtkAlgorithm.cxx @@ -57,6 +57,7 @@ vtkInformationKeyMacro(vtkAlgorithm, PORT_REQUIREMENTS_FILLED, Integer); vtkInformationKeyMacro(vtkAlgorithm, INPUT_PORT, Integer); vtkInformationKeyMacro(vtkAlgorithm, INPUT_CONNECTION, Integer); vtkInformationKeyMacro(vtkAlgorithm, INPUT_ARRAYS_TO_PROCESS, InformationVector); +vtkInformationKeyMacro(vtkAlgorithm, CAN_PRODUCE_SUB_EXTENT, Integer); vtkExecutive* vtkAlgorithm::DefaultExecutivePrototype = 0; diff --git a/Common/ExecutionModel/vtkAlgorithm.h b/Common/ExecutionModel/vtkAlgorithm.h index 735226855c42d073bbd2721741ddec3ed714607d..67f1e5d85d13aa054d399142660282277c548954 100644 --- a/Common/ExecutionModel/vtkAlgorithm.h +++ b/Common/ExecutionModel/vtkAlgorithm.h @@ -218,6 +218,13 @@ public: static vtkInformationIntegerKey* INPUT_PORT(); static vtkInformationIntegerKey* INPUT_CONNECTION(); + // Description: + // This key tells the executive that a particular output port + // is capable of producing an arbitrary subextent of the whole + // extent. Many image sources and readers fall into this category + // but some such as the legacy structured data readers cannot + // support this feature. + static vtkInformationIntegerKey* CAN_PRODUCE_SUB_EXTENT(); // Description: // Set the input data arrays that this algorithm will diff --git a/Common/ExecutionModel/vtkCastToConcrete.cxx b/Common/ExecutionModel/vtkCastToConcrete.cxx index 6e31494cac2db25dfa7dc65189db2f19f15d687c..4c91e8d5283f4636b3702de233cb1c5052e13545 100644 --- a/Common/ExecutionModel/vtkCastToConcrete.cxx +++ b/Common/ExecutionModel/vtkCastToConcrete.cxx @@ -60,10 +60,7 @@ int vtkCastToConcrete::RequestInformation( outInfo->Set(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(), inInfo->Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT()), 6); - outInfo->Set(vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), - inInfo->Get(vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES())); - outInfo->Set(vtkStreamingDemandDrivenPipeline::EXTENT_TRANSLATOR(), - inInfo->Get(vtkStreamingDemandDrivenPipeline::EXTENT_TRANSLATOR())); + return 1; } diff --git a/Common/ExecutionModel/vtkCompositeDataPipeline.cxx b/Common/ExecutionModel/vtkCompositeDataPipeline.cxx index d3a946a73595e4a2756ee5d53bba41bc00459cef..f28c526af5b77d55b3289f100cf1e017ac6a0d17 100644 --- a/Common/ExecutionModel/vtkCompositeDataPipeline.cxx +++ b/Common/ExecutionModel/vtkCompositeDataPipeline.cxx @@ -35,6 +35,7 @@ PURPOSE. See the above copyright notice for more information. #include "vtkRectilinearGrid.h" #include "vtkSmartPointer.h" #include "vtkStructuredGrid.h" +#include "vtkTrivialProducer.h" #include "vtkUniformGrid.h" vtkStandardNewMacro(vtkCompositeDataPipeline); @@ -373,7 +374,7 @@ void vtkCompositeDataPipeline::ExecuteSimpleAlgorithm( r->Set(vtkExecutive::ALGORITHM_AFTER_FORWARD(), 1); - // Store the information (whole_extent and maximum_number_of_pieces) + // Store the information (whole_extent) // before looping. Otherwise, executeinformation will cause // changes (because we pretend that the max. number of pieces is // one to process the whole block) @@ -395,9 +396,7 @@ void vtkCompositeDataPipeline::ExecuteSimpleAlgorithm( // ExecuteDataStart() should NOT Initialize() the composite output. this->InLocalLoop = 0; // Restore the extent information and force it to be - // copied to the output. Composite sources should set - // MAXIMUM_NUMBER_OF_PIECES to -1 anyway (and handle - // piece requests properly). + // copied to the output. this->PopInformation(inInfo); r->Set(REQUEST_INFORMATION()); this->CopyDefaultInformation(r, vtkExecutive::RequestDownstream, @@ -445,8 +444,7 @@ vtkDataObject* vtkCompositeDataPipeline::ExecuteSimpleAlgorithmForBlock( inInfo->Remove(vtkDataObject::DATA_OBJECT()); inInfo->Set(vtkDataObject::DATA_OBJECT(), dobj); - // Process the whole dataset - this->CopyFromDataToInformation(dobj, inInfo); + vtkTrivialProducer::FillOutputDataInformation(dobj, inInfo); } request->Set(REQUEST_DATA_OBJECT()); @@ -457,13 +455,6 @@ vtkDataObject* vtkCompositeDataPipeline::ExecuteSimpleAlgorithmForBlock( request->Set(REQUEST_INFORMATION()); - // Berk TODO: Replace with a trivial producer - // // Make sure that pipeline informations is in sync with the data - // if (dobj) - // { - // dobj->CopyInformationToPipeline(request, 0, inInfo, 1); - // } - this->Superclass::ExecuteInformation(request, inInfoVec, outInfoVec); request->Remove(REQUEST_INFORMATION()); @@ -555,24 +546,30 @@ int vtkCompositeDataPipeline::NeedToExecuteData( inInfoVec,outInfoVec); } - // Does the superclass want to execute? - if(this->vtkDemandDrivenPipeline::NeedToExecuteData( - outputPort,inInfoVec,outInfoVec)) - { - return 1; - } - // We need to check the requested update extent. Get the output // port information and data information. We do not need to check // existence of values because it has already been verified by // VerifyOutputInformation. vtkInformation* outInfo = outInfoVec->GetInformationObject(outputPort); vtkDataObject* dataObject = outInfo->Get(vtkDataObject::DATA_OBJECT()); + + // If the output is not a composite dataset, let the superclass handle + // NeedToExecuteData if (!vtkCompositeDataSet::SafeDownCast(dataObject)) { return this->Superclass::NeedToExecuteData(outputPort, inInfoVec,outInfoVec); } + + // First do the basic checks. + if(this->vtkDemandDrivenPipeline::NeedToExecuteData( + outputPort,inInfoVec,outInfoVec)) + { + return 1; + } + + // Now handle composite stuff. + vtkInformation* dataInfo = dataObject->GetInformation(); // Check the unstructured extent. If we do not have the requested @@ -874,42 +871,11 @@ void vtkCompositeDataPipeline::ResetPipelineInformation(int port, info->Remove(LOAD_REQUESTED_BLOCKS()); } -//---------------------------------------------------------------------------- -void vtkCompositeDataPipeline::CopyFromDataToInformation( - vtkDataObject* dobj, vtkInformation* inInfo) -{ - if (dobj->IsA("vtkImageData")) - { - inInfo->Set( - WHOLE_EXTENT(), static_cast<vtkImageData*>(dobj)->GetExtent(), 6); - } - else if (dobj->IsA("vtkStructuredGrid")) - { - inInfo->Set( - WHOLE_EXTENT(), static_cast<vtkStructuredGrid*>(dobj)->GetExtent(), 6); - } - else if (dobj->IsA("vtkRectilinearGrid")) - { - inInfo->Set( - WHOLE_EXTENT(), static_cast<vtkRectilinearGrid*>(dobj)->GetExtent(), 6); - } - else if (dobj->IsA("vtkUniformGrid")) - { - inInfo->Set( - WHOLE_EXTENT(), static_cast<vtkUniformGrid*>(dobj)->GetExtent(), 6); - } - else - { - inInfo->Set(MAXIMUM_NUMBER_OF_PIECES(), 1); - } -} - //---------------------------------------------------------------------------- void vtkCompositeDataPipeline::PushInformation(vtkInformation* inInfo) { vtkDebugMacro(<< "PushInformation " << inInfo); this->InformationCache->CopyEntry(inInfo, WHOLE_EXTENT()); - this->InformationCache->CopyEntry(inInfo, MAXIMUM_NUMBER_OF_PIECES()); } //---------------------------------------------------------------------------- @@ -917,7 +883,6 @@ void vtkCompositeDataPipeline::PopInformation(vtkInformation* inInfo) { vtkDebugMacro(<< "PopInformation " << inInfo); inInfo->CopyEntry(this->InformationCache, WHOLE_EXTENT()); - inInfo->CopyEntry(this->InformationCache, MAXIMUM_NUMBER_OF_PIECES()); } //---------------------------------------------------------------------------- @@ -1036,8 +1001,6 @@ vtkCompositeDataSet* vtkCompositeDataPipeline::CreateOutputCompositeDataSet( // Set the input to be vtkUniformGrid. inInfo->Remove(vtkDataObject::DATA_OBJECT()); inInfo->Set(vtkDataObject::DATA_OBJECT(), tempInput); - // Process the whole dataset - this->CopyFromDataToInformation(tempInput, inInfo); // The request is forwarded upstream through the pipeline. request->Set(vtkExecutive::FORWARD_DIRECTION(), vtkExecutive::RequestUpstream); // Algorithms process this request after it is forwarded. diff --git a/Common/ExecutionModel/vtkCompositeDataPipeline.h b/Common/ExecutionModel/vtkCompositeDataPipeline.h index ffd64fb6dcfba3882f10919d4208b2c0de49aff6..a469ce86c68fa64648bebd478765e7c1ffa40077 100644 --- a/Common/ExecutionModel/vtkCompositeDataPipeline.h +++ b/Common/ExecutionModel/vtkCompositeDataPipeline.h @@ -118,8 +118,6 @@ protected: vtkInformationVector** inInfoVec, vtkInformationVector* outInfoVec); - virtual void CopyFromDataToInformation( - vtkDataObject* dobj, vtkInformation* inInfo); virtual void PushInformation(vtkInformation*); virtual void PopInformation (vtkInformation*); diff --git a/Common/ExecutionModel/vtkCompositeDataSetAlgorithm.cxx b/Common/ExecutionModel/vtkCompositeDataSetAlgorithm.cxx index e1747156de31fc7a8c60a7a8ec3e6afdbb32c257..54d72b1d9f913e537565d6f473e3acf30212bf3f 100644 --- a/Common/ExecutionModel/vtkCompositeDataSetAlgorithm.cxx +++ b/Common/ExecutionModel/vtkCompositeDataSetAlgorithm.cxx @@ -92,29 +92,6 @@ int vtkCompositeDataSetAlgorithm::ProcessRequest( // execute information if(request->Has(vtkDemandDrivenPipeline::REQUEST_INFORMATION())) { - if(request->Has(vtkStreamingDemandDrivenPipeline::FROM_OUTPUT_PORT())) - { - int outputPort = request->Get( - vtkStreamingDemandDrivenPipeline::FROM_OUTPUT_PORT()); - vtkInformation* info = outputVector->GetInformationObject(outputPort); - if (info) - { - info->Set( - vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), -1); - } - } - else - { - for (int outIdx=0; outIdx < this->GetNumberOfOutputPorts(); outIdx++) - { - vtkInformation* info = outputVector->GetInformationObject(outIdx); - if (info) - { - info->Set( - vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), -1); - } - } - } return this->RequestInformation(request, inputVector, outputVector); } diff --git a/Common/ExecutionModel/vtkHierarchicalBoxDataSetAlgorithm.cxx b/Common/ExecutionModel/vtkHierarchicalBoxDataSetAlgorithm.cxx index 05acc3ab321b96546b72352395376948a8456948..f4a43a34817f2e90182389acb55a1df448d1cb3d 100644 --- a/Common/ExecutionModel/vtkHierarchicalBoxDataSetAlgorithm.cxx +++ b/Common/ExecutionModel/vtkHierarchicalBoxDataSetAlgorithm.cxx @@ -93,29 +93,6 @@ int vtkHierarchicalBoxDataSetAlgorithm::ProcessRequest( // execute information if(request->Has(vtkDemandDrivenPipeline::REQUEST_INFORMATION())) { - if(request->Has(vtkStreamingDemandDrivenPipeline::FROM_OUTPUT_PORT())) - { - int outputPort = request->Get( - vtkStreamingDemandDrivenPipeline::FROM_OUTPUT_PORT()); - vtkInformation* info = outputVector->GetInformationObject(outputPort); - if (info) - { - info->Set( - vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), -1); - } - } - else - { - for (int outIdx=0; outIdx < this->GetNumberOfOutputPorts(); outIdx++) - { - vtkInformation* info = outputVector->GetInformationObject(outIdx); - if (info) - { - info->Set( - vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), -1); - } - } - } return this->RequestInformation(request, inputVector, outputVector); } diff --git a/Common/ExecutionModel/vtkMultiBlockDataSetAlgorithm.cxx b/Common/ExecutionModel/vtkMultiBlockDataSetAlgorithm.cxx index ea212b186d6e5bd7ea79074b86208ca071d86858..47eb96d5fecf8a42118e13bd08bdea5a56b0a834 100644 --- a/Common/ExecutionModel/vtkMultiBlockDataSetAlgorithm.cxx +++ b/Common/ExecutionModel/vtkMultiBlockDataSetAlgorithm.cxx @@ -92,29 +92,6 @@ int vtkMultiBlockDataSetAlgorithm::ProcessRequest( // execute information if(request->Has(vtkDemandDrivenPipeline::REQUEST_INFORMATION())) { - if(request->Has(vtkStreamingDemandDrivenPipeline::FROM_OUTPUT_PORT())) - { - int outputPort = request->Get( - vtkStreamingDemandDrivenPipeline::FROM_OUTPUT_PORT()); - vtkInformation* info = outputVector->GetInformationObject(outputPort); - if (info) - { - info->Set( - vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), -1); - } - } - else - { - for (int outIdx=0; outIdx < this->GetNumberOfOutputPorts(); outIdx++) - { - vtkInformation* info = outputVector->GetInformationObject(outIdx); - if (info) - { - info->Set( - vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), -1); - } - } - } return this->RequestInformation(request, inputVector, outputVector); } diff --git a/Common/ExecutionModel/vtkMultiTimeStepAlgorithm.cxx b/Common/ExecutionModel/vtkMultiTimeStepAlgorithm.cxx index 37c2f8ef56a33a1ea8c13391fd808742a2773662..d3a098083b8e48005b36112875cd5579eb08ce52 100644 --- a/Common/ExecutionModel/vtkMultiTimeStepAlgorithm.cxx +++ b/Common/ExecutionModel/vtkMultiTimeStepAlgorithm.cxx @@ -201,16 +201,6 @@ int vtkMultiTimeStepAlgorithm::ProcessRequest( // execute information if(request->Has(vtkDemandDrivenPipeline::REQUEST_INFORMATION())) { - if(request->Has(vtkStreamingDemandDrivenPipeline::FROM_OUTPUT_PORT())) - { - int outputPort = request->Get( - vtkStreamingDemandDrivenPipeline::FROM_OUTPUT_PORT()); - vtkInformation* info = outputVector->GetInformationObject(outputPort); - if (info) - { - info->Set(vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), -1); - } - } // Upstream changed, clear the cache. this->Cache.clear(); return this->RequestInformation(request, inputVector, outputVector); diff --git a/Common/ExecutionModel/vtkStreamingDemandDrivenPipeline.cxx b/Common/ExecutionModel/vtkStreamingDemandDrivenPipeline.cxx index e79112ee9b36d4291b974d32d7ddb33d0c3ab3a2..9a8ee174dc71556e6f9712966d6217ed1b4f57e2 100644 --- a/Common/ExecutionModel/vtkStreamingDemandDrivenPipeline.cxx +++ b/Common/ExecutionModel/vtkStreamingDemandDrivenPipeline.cxx @@ -43,19 +43,15 @@ vtkInformationKeyMacro(vtkStreamingDemandDrivenPipeline, EXACT_EXTENT, Integer); vtkInformationKeyMacro(vtkStreamingDemandDrivenPipeline, REQUEST_UPDATE_EXTENT, Request); vtkInformationKeyMacro(vtkStreamingDemandDrivenPipeline, REQUEST_UPDATE_TIME, Request); vtkInformationKeyMacro(vtkStreamingDemandDrivenPipeline, REQUEST_TIME_DEPENDENT_INFORMATION, Request); -vtkInformationKeyMacro(vtkStreamingDemandDrivenPipeline, MAXIMUM_NUMBER_OF_PIECES, Integer); vtkInformationKeyMacro(vtkStreamingDemandDrivenPipeline, UPDATE_EXTENT_INITIALIZED, Integer); vtkInformationKeyMacro(vtkStreamingDemandDrivenPipeline, UPDATE_PIECE_NUMBER, Integer); vtkInformationKeyMacro(vtkStreamingDemandDrivenPipeline, UPDATE_NUMBER_OF_PIECES, Integer); vtkInformationKeyMacro(vtkStreamingDemandDrivenPipeline, UPDATE_NUMBER_OF_GHOST_LEVELS, Integer); -vtkInformationKeyMacro(vtkStreamingDemandDrivenPipeline, UPDATE_EXTENT_TRANSLATED, Integer); +vtkInformationKeyMacro(vtkStreamingDemandDrivenPipeline, CAN_HANDLE_PIECE_REQUEST, Integer); vtkInformationKeyRestrictedMacro(vtkStreamingDemandDrivenPipeline, WHOLE_EXTENT, IntegerVector, 6); vtkInformationKeyRestrictedMacro(vtkStreamingDemandDrivenPipeline, UPDATE_EXTENT, IntegerVector, 6); vtkInformationKeyRestrictedMacro(vtkStreamingDemandDrivenPipeline, COMBINED_UPDATE_EXTENT, IntegerVector, 6); vtkInformationKeyMacro(vtkStreamingDemandDrivenPipeline, UNRESTRICTED_UPDATE_EXTENT, Integer); -vtkInformationKeyRestrictedMacro(vtkStreamingDemandDrivenPipeline, - EXTENT_TRANSLATOR, ObjectBase, - "vtkExtentTranslator"); vtkInformationKeyRestrictedMacro(vtkStreamingDemandDrivenPipeline, WHOLE_BOUNDING_BOX, DoubleVector, 6); vtkInformationKeyMacro(vtkStreamingDemandDrivenPipeline, TIME_STEPS, DoubleVector); vtkInformationKeyMacro(vtkStreamingDemandDrivenPipeline, UPDATE_TIME_STEP, Double); @@ -425,15 +421,8 @@ vtkStreamingDemandDrivenPipeline { return 0; } - // Set default maximum request. - if(data->GetExtentType() == VTK_PIECES_EXTENT) - { - if(!info->Has(MAXIMUM_NUMBER_OF_PIECES())) - { - info->Set(MAXIMUM_NUMBER_OF_PIECES(), -1); - } - } - else if(data->GetExtentType() == VTK_3D_EXTENT) + + if(data->GetExtentType() == VTK_3D_EXTENT) { if(!info->Has(WHOLE_EXTENT())) { @@ -487,8 +476,6 @@ vtkStreamingDemandDrivenPipeline vtkInformation* outInfo = outInfoVec->GetInformationObject(i); outInfo->CopyEntry(inInfo, WHOLE_BOUNDING_BOX()); outInfo->CopyEntry(inInfo, WHOLE_EXTENT()); - outInfo->CopyEntry(inInfo, MAXIMUM_NUMBER_OF_PIECES()); - outInfo->CopyEntry(inInfo, EXTENT_TRANSLATOR()); outInfo->CopyEntry(inInfo, TIME_STEPS()); outInfo->CopyEntry(inInfo, TIME_RANGE()); outInfo->CopyEntry(inInfo, vtkDataObject::ORIGIN()); @@ -512,58 +499,10 @@ vtkStreamingDemandDrivenPipeline } } } - - // Setup default information for the outputs. - for(int i=0; i < outInfoVec->GetNumberOfInformationObjects(); ++i) - { - vtkInformation* outInfo = outInfoVec->GetInformationObject(i); - - // The data object will exist because UpdateDataObject has already - // succeeded. Except when this method is called by a subclass - // that does not provide this key in certain cases. - vtkDataObject* dataObject = outInfo->Get(vtkDataObject::DATA_OBJECT()); - if (!dataObject) - { - continue; - } - vtkInformation* dataInfo = dataObject->GetInformation(); - if(dataInfo->Get(vtkDataObject::DATA_EXTENT_TYPE()) == - VTK_PIECES_EXTENT) - { - if (!outInfo->Has(MAXIMUM_NUMBER_OF_PIECES())) - { - if (this->GetNumberOfInputPorts() > 0) - { - // must have structured input; MAXIMUM_NUMBER_OF_PIECES will - // not be copied above (CopyEntry does nothing since key not set - // in inInfo); set to -1 - outInfo->Set(MAXIMUM_NUMBER_OF_PIECES(), -1); - } - else - { - // Since most unstructured filters in VTK generate all their - // data once, set the default maximum number of pieces to 1. - outInfo->Set(MAXIMUM_NUMBER_OF_PIECES(), 1); - } - } - } - else if(dataInfo->Get(vtkDataObject::DATA_EXTENT_TYPE()) == VTK_3D_EXTENT) - { - if(!outInfo->Has(EXTENT_TRANSLATOR()) || - !outInfo->Get(EXTENT_TRANSLATOR())) - { - // Create a default extent translator. - vtkExtentTranslator* translator = vtkExtentTranslator::New(); - outInfo->Set(EXTENT_TRANSLATOR(), translator); - translator->Delete(); - } - } - } } if(request->Has(REQUEST_UPDATE_TIME())) { - //Copy requested resolution back // Get the output port from which to copy the extent. int outputPort = -1; if(request->Has(FROM_OUTPUT_PORT())) @@ -601,7 +540,6 @@ vtkStreamingDemandDrivenPipeline } if(request->Has(REQUEST_UPDATE_EXTENT())) { - //Copy requested resolution back // Get the output port from which to copy the extent. int outputPort = -1; if(request->Has(FROM_OUTPUT_PORT())) @@ -609,6 +547,29 @@ vtkStreamingDemandDrivenPipeline outputPort = request->Get(FROM_OUTPUT_PORT()); } + // Initialize input extent to whole extent if it is not + // already initialized. + // This may be overwritten by the default code below as + // well as what that an algorith may do. + for(int i=0; i < this->Algorithm->GetNumberOfInputPorts(); ++i) + { + // Loop over all connections on this input port. + int numInConnections = inInfoVec[i]->GetNumberOfInformationObjects(); + for (int j=0; j<numInConnections; j++) + { + vtkInformation* inInfo = inInfoVec[i]->GetInformationObject(j); + if(inInfo->Has(WHOLE_EXTENT())) + { + int extent[6] = {0, -1, 0, -1, 0, -1}; + inInfo->Get(WHOLE_EXTENT(), extent); + this->SetUpdateExtent(inInfo, extent); + } + vtkStreamingDemandDrivenPipeline::SetUpdatePiece(inInfo, 0); + vtkStreamingDemandDrivenPipeline::SetUpdateNumberOfPieces(inInfo, 1); + vtkStreamingDemandDrivenPipeline::SetUpdateGhostLevel(inInfo, 0); + } + } + // Setup default information for the inputs. if(outInfoVec->GetNumberOfInformationObjects() > 0) { @@ -617,7 +578,6 @@ vtkStreamingDemandDrivenPipeline // there is output information with a data object. vtkInformation* outInfo = outInfoVec->GetInformationObject((outputPort >= 0)? outputPort : 0); - vtkDataObject* outData = outInfo->Get(vtkDataObject::DATA_OBJECT()); // Loop over all input ports. for(int i=0; i < this->Algorithm->GetNumberOfInputPorts(); ++i) @@ -654,56 +614,17 @@ vtkStreamingDemandDrivenPipeline continue; } - // Consider all combinations of extent types. - if(inData->GetExtentType() == VTK_PIECES_EXTENT) + + if (outInfo->Has(UPDATE_EXTENT())) { - if(outData->GetExtentType() == VTK_PIECES_EXTENT) - { - if (outInfo->Get(UPDATE_PIECE_NUMBER()) < 0) - { - return; - } - inInfo->CopyEntry(outInfo, UPDATE_PIECE_NUMBER()); - inInfo->CopyEntry(outInfo, UPDATE_NUMBER_OF_PIECES()); - inInfo->CopyEntry(outInfo, UPDATE_NUMBER_OF_GHOST_LEVELS()); - inInfo->CopyEntry(outInfo, UPDATE_EXTENT_INITIALIZED()); - } - else if(outData->GetExtentType() == VTK_3D_EXTENT) - { - // The conversion from structrued requests to - // unstrcutured requests is always to request the whole - // extent. - this->SetUpdateExtentToWholeExtent(inInfo); - } + inInfo->CopyEntry(outInfo, UPDATE_EXTENT()); } - else if(inData->GetExtentType() == VTK_3D_EXTENT) - { - if (outInfo->Get(UPDATE_PIECE_NUMBER()) >= 0) - { - // Although only the extent is used when processing - // structured datasets, this is still passed to let - // algorithms know what the actual request was. - inInfo->CopyEntry(outInfo, UPDATE_PIECE_NUMBER()); - inInfo->CopyEntry(outInfo, UPDATE_NUMBER_OF_PIECES()); - inInfo->CopyEntry(outInfo, UPDATE_NUMBER_OF_GHOST_LEVELS()); - } - if(outData->GetExtentType() == VTK_PIECES_EXTENT) - { - int piece = outInfo->Get(UPDATE_PIECE_NUMBER()); - int numPieces = outInfo->Get(UPDATE_NUMBER_OF_PIECES()); - int ghostLevel = outInfo->Get(UPDATE_NUMBER_OF_GHOST_LEVELS()); - if (piece >= 0) - { - this->SetUpdateExtent(inInfo, piece, numPieces, ghostLevel); - } - } - else if(outData->GetExtentType() == VTK_3D_EXTENT) - { - inInfo->CopyEntry(outInfo, UPDATE_EXTENT()); - inInfo->CopyEntry(outInfo, UPDATE_EXTENT_INITIALIZED()); - } - } + inInfo->CopyEntry(outInfo, UPDATE_PIECE_NUMBER()); + inInfo->CopyEntry(outInfo, UPDATE_NUMBER_OF_PIECES()); + inInfo->CopyEntry(outInfo, UPDATE_NUMBER_OF_GHOST_LEVELS()); + + inInfo->CopyEntry(outInfo, UPDATE_EXTENT_INITIALIZED()); } } } @@ -717,19 +638,18 @@ vtkStreamingDemandDrivenPipeline { this->Superclass::ResetPipelineInformation(port, info); info->Remove(WHOLE_EXTENT()); - info->Remove(MAXIMUM_NUMBER_OF_PIECES()); - info->Remove(EXTENT_TRANSLATOR()); info->Remove(EXACT_EXTENT()); info->Remove(UPDATE_EXTENT_INITIALIZED()); info->Remove(UPDATE_EXTENT()); info->Remove(UPDATE_PIECE_NUMBER()); info->Remove(UPDATE_NUMBER_OF_PIECES()); info->Remove(UPDATE_NUMBER_OF_GHOST_LEVELS()); - info->Remove(UPDATE_EXTENT_TRANSLATED()); info->Remove(TIME_STEPS()); info->Remove(TIME_RANGE()); info->Remove(UPDATE_TIME_STEP()); info->Remove(PREVIOUS_UPDATE_TIME_STEP()); + info->Remove(CAN_HANDLE_PIECE_REQUEST()); + info->Remove(vtkAlgorithm::CAN_PRODUCE_SUB_EXTENT()); } //---------------------------------------------------------------------------- @@ -874,14 +794,6 @@ int vtkStreamingDemandDrivenPipeline // For an unstructured extent, make sure the update request // exists. We do not need to check if it is valid because // out-of-range requests produce empty data. - if(!outInfo->Has(MAXIMUM_NUMBER_OF_PIECES())) - { - vtkErrorMacro("No maximum number of pieces has been set in the " - "information for output port " << outputPort - << " on algorithm " << this->Algorithm->GetClassName() - << "(" << this->Algorithm << ")."); - return 0; - } if(!outInfo->Has(UPDATE_PIECE_NUMBER())) { vtkErrorMacro("No update piece number has been set in the " @@ -980,6 +892,46 @@ vtkStreamingDemandDrivenPipeline request->Remove(CONTINUE_EXECUTING()); this->Superclass::ExecuteDataStart(request,inInfoVec,outInfoVec); } + + int numInfo = outInfoVec->GetNumberOfInformationObjects(); + for(int i=0; i < numInfo ; ++i) + { + vtkInformation* outInfo = outInfoVec->GetInformationObject(i); + int numPieces = outInfo->Get(UPDATE_NUMBER_OF_PIECES()); + if (numPieces > 1) + { + int* uExt = outInfo->Get( + vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT()); + if (uExt) + { + // Store the total requested extent in ALL_PIECES_EXTENT. + // This can be different than DATA_EXTENT if the algorithm + // produces multiple pieces. + // NOTE: we store this in outInfo because data info gets + // wiped during execute. We move this to data info in + // ExecuteDataEnd. + outInfo->Set(vtkDataObject::ALL_PIECES_EXTENT(), uExt, 6); + } + + // If the algorithm is capable of producing sub-extents, use + // an extent translator to break update extent request into + // pieces. + if (outInfo->Has(vtkAlgorithm::CAN_PRODUCE_SUB_EXTENT())) + { + int piece = outInfo->Get(UPDATE_PIECE_NUMBER()); + int ghost = outInfo->Get(UPDATE_NUMBER_OF_GHOST_LEVELS()); + + vtkExtentTranslator* et = vtkExtentTranslator::New(); + int execExt[6]; + et->PieceToExtentThreadSafe(piece, numPieces, ghost, + uExt, execExt, + vtkExtentTranslator::BLOCK_MODE, 0); + et->Delete(); + outInfo->Set(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT(), + execExt, 6); + } + } + } } //---------------------------------------------------------------------------- @@ -989,6 +941,52 @@ vtkStreamingDemandDrivenPipeline vtkInformationVector** inInfoVec, vtkInformationVector* outInfoVec) { + int numInfo = outInfoVec->GetNumberOfInformationObjects(); + for(int i=0; i < numInfo ; ++i) + { + vtkInformation* outInfo = outInfoVec->GetInformationObject(i); + int numPieces = outInfo->Get(UPDATE_NUMBER_OF_PIECES()); + if (numPieces > 1) + { + vtkDataObject* dobj = outInfo->Get(vtkDataObject::DATA_OBJECT()); + + // See ExecuteDataStart for an explanation of this key and + // why we move it from outInfo to data info. + if (outInfo->Has(vtkDataObject::ALL_PIECES_EXTENT())) + { + dobj->GetInformation()->Set(vtkDataObject::ALL_PIECES_EXTENT(), + outInfo->Get(vtkDataObject::ALL_PIECES_EXTENT()), + 6); + outInfo->Remove(vtkDataObject::ALL_PIECES_EXTENT()); + } + + if (outInfo->Has(vtkAlgorithm::CAN_PRODUCE_SUB_EXTENT())) + { + int ghost = outInfo->Get(UPDATE_NUMBER_OF_GHOST_LEVELS()); + if (ghost > 0) + { + vtkDataSet* data = vtkDataSet::SafeDownCast(dobj); + if (data) + { + int* uExt = data->GetInformation()->Get( + vtkDataObject::ALL_PIECES_EXTENT()); + + int piece = outInfo->Get(UPDATE_PIECE_NUMBER()); + + vtkExtentTranslator* et = vtkExtentTranslator::New(); + int zeroExt[6]; + et->PieceToExtentThreadSafe(piece, numPieces, 0, + uExt, zeroExt, + vtkExtentTranslator::BLOCK_MODE, 0); + et->Delete(); + + data->GenerateGhostLevelArray(zeroExt); + } + } + } + } + } + // Preserve the execution continuation flag in the request across // iterations of the algorithm. Perform start operations only if // not in an execute continuation. @@ -1057,25 +1055,6 @@ vtkStreamingDemandDrivenPipeline // Compute ghost level arrays for generated outputs. if(data && !outInfo->Get(DATA_NOT_GENERATED())) { - if(vtkDataSet* ds = vtkDataSet::SafeDownCast(data)) - { - // Generate ghost level arrays automatically only if the extent - // was set through translation. Otherwise, 1. there is no need - // for a ghost array 2. it may be wrong - if (outInfo->Has(UPDATE_EXTENT_TRANSLATED())) - { - if (outInfo->Get(UPDATE_NUMBER_OF_GHOST_LEVELS()) > 0) - { - ds->GenerateGhostLevelArray( - outInfo->Get(UPDATE_PIECE_NUMBER()), - outInfo->Get(UPDATE_NUMBER_OF_PIECES()), - outInfo->Get(UPDATE_NUMBER_OF_GHOST_LEVELS()), - outInfo->Get(WHOLE_EXTENT()), - vtkExtentTranslator::SafeDownCast(outInfo->Get(EXTENT_TRANSLATOR()))); - } - } - } - // Copy the update piece information from the update port to // the data piece information of all output ports UNLESS the // algorithm already specified it. @@ -1158,6 +1137,26 @@ int vtkStreamingDemandDrivenPipeline inInfoVec,outInfoVec); } + vtkInformation* outInfo = outInfoVec->GetInformationObject(outputPort); + int updateNumberOfPieces = outInfo->Get(UPDATE_NUMBER_OF_PIECES()); + int updatePiece = outInfo->Get(UPDATE_PIECE_NUMBER()); + + if (updateNumberOfPieces > 1 && updatePiece > 0) + { + // This is a source. + if (this->Algorithm->GetNumberOfInputPorts() == 0) + { + // And cannot handle piece request (i.e. not parallel) + // and is not a structured source that can produce sub-extents. + if (!outInfo->Get(CAN_HANDLE_PIECE_REQUEST()) && + !outInfo->Get(vtkAlgorithm::CAN_PRODUCE_SUB_EXTENT())) + { + // Then don't execute it. + return 0; + } + } + } + // Does the superclass want to execute? if(this->Superclass::NeedToExecuteData(outputPort,inInfoVec,outInfoVec)) { @@ -1168,44 +1167,58 @@ int vtkStreamingDemandDrivenPipeline // port information and data information. We do not need to check // existence of values because it has already been verified by // VerifyOutputInformation. - vtkInformation* outInfo = outInfoVec->GetInformationObject(outputPort); vtkDataObject* dataObject = outInfo->Get(vtkDataObject::DATA_OBJECT()); vtkInformation* dataInfo = dataObject->GetInformation(); - if(dataInfo->Get(vtkDataObject::DATA_EXTENT_TYPE()) == VTK_PIECES_EXTENT) + // Check the unstructured extent. If we do not have the requested + // piece, we need to execute. + int dataNumberOfPieces = dataInfo->Get(vtkDataObject::DATA_NUMBER_OF_PIECES()); + if(dataNumberOfPieces != updateNumberOfPieces) + { + return 1; + } + int dataGhostLevel = dataInfo->Get(vtkDataObject::DATA_NUMBER_OF_GHOST_LEVELS()); + int updateGhostLevel = outInfo->Get(UPDATE_NUMBER_OF_GHOST_LEVELS()); + if(updateNumberOfPieces > 1 && dataGhostLevel < updateGhostLevel) + { + return 1; + } + if (dataNumberOfPieces != 1) { - // Check the unstructured extent. If we do not have the requested - // piece, we need to execute. - int updateNumberOfPieces = outInfo->Get(UPDATE_NUMBER_OF_PIECES()); - int dataNumberOfPieces = dataInfo->Get(vtkDataObject::DATA_NUMBER_OF_PIECES()); - if(dataNumberOfPieces != updateNumberOfPieces) + int dataPiece = dataInfo->Get(vtkDataObject::DATA_PIECE_NUMBER()); + if (dataPiece != updatePiece) { return 1; } - int dataGhostLevel = dataInfo->Get(vtkDataObject::DATA_NUMBER_OF_GHOST_LEVELS()); - int updateGhostLevel = outInfo->Get(UPDATE_NUMBER_OF_GHOST_LEVELS()); - if(dataGhostLevel < updateGhostLevel) + } + + if (outInfo->Has(UPDATE_EXTENT()) + && + dataInfo->Has(vtkDataObject::DATA_EXTENT_TYPE()) && + dataInfo->Get(vtkDataObject::DATA_EXTENT_TYPE()) == VTK_3D_EXTENT + ) + { + if (!dataInfo->Has(vtkDataObject::DATA_EXTENT()) && + !dataInfo->Has(vtkDataObject::ALL_PIECES_EXTENT())) { return 1; } - if (dataNumberOfPieces != 1) - { - int dataPiece = dataInfo->Get(vtkDataObject::DATA_PIECE_NUMBER()); - int updatePiece = outInfo->Get(UPDATE_PIECE_NUMBER()); - if (dataPiece != updatePiece) - { - return 1; - } - } - } - else if(dataInfo->Get(vtkDataObject::DATA_EXTENT_TYPE()) == VTK_3D_EXTENT) - { + // Check the structured extent. If the update extent is outside // of the extent and not empty, we need to execute. - int dataExtent[6]; int updateExtent[6]; outInfo->Get(UPDATE_EXTENT(), updateExtent); - dataInfo->Get(vtkDataObject::DATA_EXTENT(), dataExtent); + + int dataExtent[6]; + if (dataInfo->Has(vtkDataObject::ALL_PIECES_EXTENT())) + { + dataInfo->Get(vtkDataObject::ALL_PIECES_EXTENT(), dataExtent); + } + else + { + dataInfo->Get(vtkDataObject::DATA_EXTENT(), dataExtent); + } + // if the ue is out side the de if((updateExtent[0] < dataExtent[0] || updateExtent[1] > dataExtent[1] || @@ -1295,53 +1308,6 @@ int vtkStreamingDemandDrivenPipeline::NeedToExecuteBasedOnTime( return 0; } -//---------------------------------------------------------------------------- -int vtkStreamingDemandDrivenPipeline -::SetMaximumNumberOfPieces(int port, int n) -{ - return this->SetMaximumNumberOfPieces(this->GetOutputInformation(port), n); -} - -//---------------------------------------------------------------------------- -int vtkStreamingDemandDrivenPipeline -::SetMaximumNumberOfPieces(vtkInformation *info, int n) -{ - if(!info) - { - vtkGenericWarningMacro("SetMaximumNumberOfPieces on invalid output"); - return 0; - } - if(vtkStreamingDemandDrivenPipeline::GetMaximumNumberOfPieces(info) != n) - { - info->Set(MAXIMUM_NUMBER_OF_PIECES(), n); - return 1; - } - return 0; -} - -//---------------------------------------------------------------------------- -int vtkStreamingDemandDrivenPipeline -::GetMaximumNumberOfPieces(int port) -{ - return this->GetMaximumNumberOfPieces(this->GetOutputInformation(port)); -} - -//---------------------------------------------------------------------------- -int vtkStreamingDemandDrivenPipeline -::GetMaximumNumberOfPieces(vtkInformation *info) -{ - if(!info) - { - vtkGenericWarningMacro("GetMaximumNumberOfPieces on invalid output"); - return 0; - } - if(!info->Has(MAXIMUM_NUMBER_OF_PIECES())) - { - info->Set(MAXIMUM_NUMBER_OF_PIECES(), -1); - } - return info->Get(MAXIMUM_NUMBER_OF_PIECES()); -} - //---------------------------------------------------------------------------- int vtkStreamingDemandDrivenPipeline ::SetWholeExtent(vtkInformation *info, int extent[6]) @@ -1417,16 +1383,14 @@ int vtkStreamingDemandDrivenPipeline int modified = 0; if(vtkDataObject* data = info->Get(vtkDataObject::DATA_OBJECT())) { - if(data->GetExtentType() == VTK_PIECES_EXTENT) - { - modified |= - vtkStreamingDemandDrivenPipeline::SetUpdatePiece(info, 0); - modified |= - vtkStreamingDemandDrivenPipeline::SetUpdateNumberOfPieces(info, 1); - modified |= - vtkStreamingDemandDrivenPipeline::SetUpdateGhostLevel(info, 0); - } - else if(data->GetExtentType() == VTK_3D_EXTENT) + modified |= + vtkStreamingDemandDrivenPipeline::SetUpdatePiece(info, 0); + modified |= + vtkStreamingDemandDrivenPipeline::SetUpdateNumberOfPieces(info, 1); + modified |= + vtkStreamingDemandDrivenPipeline::SetUpdateGhostLevel(info, 0); + + if(data->GetExtentType() == VTK_3D_EXTENT) { int extent[6] = {0,-1,0,-1,0,-1}; info->Get(WHOLE_EXTENT(), extent); @@ -1512,31 +1476,7 @@ int vtkStreamingDemandDrivenPipeline info, numPieces); modified |= vtkStreamingDemandDrivenPipeline::SetUpdateGhostLevel( info, ghostLevel); - if(vtkDataObject* data = info->Get(vtkDataObject::DATA_OBJECT())) - { - if(data->GetExtentType() == VTK_3D_EXTENT) - { - if(vtkExtentTranslator* translator = - vtkStreamingDemandDrivenPipeline::GetExtentTranslator(info)) - { - int wholeExtent[6]; - vtkStreamingDemandDrivenPipeline::GetWholeExtent(info, wholeExtent); - translator->SetWholeExtent(wholeExtent); - translator->SetPiece(piece); - translator->SetNumberOfPieces(numPieces); - translator->SetGhostLevel(ghostLevel); - translator->PieceToExtent(); - modified |= - vtkStreamingDemandDrivenPipeline::SetUpdateExtent( - info, translator->GetExtent()); - info->Set(UPDATE_EXTENT_TRANSLATED(), 1); - } - else - { - vtkGenericWarningMacro("Cannot translate unstructured extent to structured."); - } - } - } + return modified; } @@ -1746,62 +1686,6 @@ int vtkStreamingDemandDrivenPipeline::GetRequestExactExtent(int port) return info->Get(EXACT_EXTENT()); } -//---------------------------------------------------------------------------- -int -vtkStreamingDemandDrivenPipeline -::SetExtentTranslator(int port, vtkExtentTranslator* translator) -{ - return this->SetExtentTranslator( - this->GetOutputInformation(port), translator); -} - -//---------------------------------------------------------------------------- -int -vtkStreamingDemandDrivenPipeline -::SetExtentTranslator(vtkInformation *info, vtkExtentTranslator* translator) -{ - if(!info) - { - vtkGenericWarningMacro("Attempt to set translator for invalid output"); - return 0; - } - vtkExtentTranslator* oldTranslator = - vtkExtentTranslator::SafeDownCast(info->Get(EXTENT_TRANSLATOR())); - if(translator != oldTranslator) - { - info->Set(EXTENT_TRANSLATOR(), translator); - return 1; - } - return 0; -} - -//---------------------------------------------------------------------------- -vtkExtentTranslator* -vtkStreamingDemandDrivenPipeline::GetExtentTranslator(int port) -{ - return this->GetExtentTranslator(this->GetOutputInformation(port)); -} - -//---------------------------------------------------------------------------- -vtkExtentTranslator* -vtkStreamingDemandDrivenPipeline::GetExtentTranslator(vtkInformation *info) -{ - if(!info) - { - vtkGenericWarningMacro("Attempt to get translator for invalid output"); - return 0; - } - vtkExtentTranslator* translator = - vtkExtentTranslator::SafeDownCast(info->Get(EXTENT_TRANSLATOR())); - if(!translator) - { - translator = vtkExtentTranslator::New(); - info->Set(EXTENT_TRANSLATOR(), translator); - translator->Delete(); - } - return translator; -} - //---------------------------------------------------------------------------- int vtkStreamingDemandDrivenPipeline::SetWholeBoundingBox(int port, double extent[6]) diff --git a/Common/ExecutionModel/vtkStreamingDemandDrivenPipeline.h b/Common/ExecutionModel/vtkStreamingDemandDrivenPipeline.h index 9d5532ffd8e5b0a8f7160a5f4caf07732269de04..a901a03eab1a21e10a22bc24e5983512aa3c0e5b 100644 --- a/Common/ExecutionModel/vtkStreamingDemandDrivenPipeline.h +++ b/Common/ExecutionModel/vtkStreamingDemandDrivenPipeline.h @@ -29,7 +29,6 @@ #define VTK_UPDATE_EXTENT_COMBINE 1 #define VTK_UPDATE_EXTENT_REPLACE 2 -class vtkExtentTranslator; class vtkInformationDoubleKey; class vtkInformationDoubleVectorKey; class vtkInformationIdTypeKey; @@ -73,18 +72,6 @@ public: int PropagateTime(int outputPort); int UpdateTimeDependentInformation(int outputPort); - - // Description: - // Set/Get the maximum number of pieces that can be requested from - // the given port. The maximum number of pieces is meta data for - // unstructured data sets. It gets set by the source during the - // update information call. A value of -1 indicates that there is - // no maximum. - int SetMaximumNumberOfPieces(int port, int n); - static int SetMaximumNumberOfPieces(vtkInformation *, int n); - int GetMaximumNumberOfPieces(int port); - static int GetMaximumNumberOfPieces(vtkInformation *); - // Description: // Set/Get the whole extent of an output port. The whole extent is // meta data for structured data sets. It gets set by the algorithm @@ -139,14 +126,6 @@ public: int SetRequestExactExtent(int port, int flag); int GetRequestExactExtent(int port); - // Description: - // Get/Set the object that will translate pieces into structured - // extents for an output port. - int SetExtentTranslator(int port, vtkExtentTranslator* translator); - static int SetExtentTranslator(vtkInformation *, vtkExtentTranslator* translator); - vtkExtentTranslator* GetExtentTranslator(int port); - static vtkExtentTranslator* GetExtentTranslator(vtkInformation *info); - // Description: // Set/Get the whole bounding box of an output port data object. // The whole whole bounding box is meta data for data sets. It gets @@ -170,10 +149,6 @@ public: // to keep executing it. static vtkInformationIntegerKey* CONTINUE_EXECUTING(); - // Description: - // Key to store an extent translator in pipeline information. - static vtkInformationObjectBaseKey* EXTENT_TRANSLATOR(); - // Description: // Keys to store an update request in pipeline information. static vtkInformationIntegerKey* UPDATE_EXTENT_INITIALIZED(); @@ -182,16 +157,23 @@ public: static vtkInformationIntegerKey* UPDATE_NUMBER_OF_PIECES(); static vtkInformationIntegerKey* UPDATE_NUMBER_OF_GHOST_LEVELS(); + // Description: + // Key that tells the pipeline that a particular algorithm + // can or cannot handle piece request. If a filter cannot handle + // piece requests and is asked for a piece, the executive will + // flag an error. If a structured data source cannot handle piece + // requests but can produce sub-extents (CAN_PRODUCE_SUB_EXTENT), + // the executive will use an extent translator to split the extent + // into pieces. Otherwise, if a source cannot handle piece requests, + // the executive will ask for the whole data for piece 0 and not + // execute the source for other pieces. + static vtkInformationIntegerKey* CAN_HANDLE_PIECE_REQUEST(); + // Description: // Key for combining the update extents requested by all consumers, // so that the final extent that is produced satisfies all consumers. static vtkInformationIntegerVectorKey* COMBINED_UPDATE_EXTENT(); - // Description: - // This is set if the extent was set through extent translation. - // GenerateGhostLevelArray() is called only when this is set. - static vtkInformationIntegerKey* UPDATE_EXTENT_TRANSLATED(); - // Description: // Key to store the whole extent provided in pipeline information. static vtkInformationIntegerVectorKey* WHOLE_EXTENT(); @@ -202,11 +184,6 @@ public: // any requested size. static vtkInformationIntegerKey* UNRESTRICTED_UPDATE_EXTENT(); - // Description: - // Key to store the maximum number of pieces provided in pipeline - // information. - static vtkInformationIntegerKey* MAXIMUM_NUMBER_OF_PIECES(); - // Description: // Key to store the bounding box of the entire data set in pipeline // information. @@ -234,7 +211,7 @@ public: // Description: // Whether there are time dependent meta information - // if there is, the pipe will perform two extra passes + // if there is, the pipeline will perform two extra passes // to gather the time dependent information static vtkInformationIntegerKey* TIME_DEPENDENT_INFORMATION(); diff --git a/Common/ExecutionModel/vtkTrivialProducer.cxx b/Common/ExecutionModel/vtkTrivialProducer.cxx index d41ee65b6a6d6faff21c563f369ec375722672e5..c1472aba23d753f26b242b80392510c25603fe03 100644 --- a/Common/ExecutionModel/vtkTrivialProducer.cxx +++ b/Common/ExecutionModel/vtkTrivialProducer.cxx @@ -41,6 +41,8 @@ vtkTrivialProducer::vtkTrivialProducer() this->SetNumberOfInputPorts(0); this->SetNumberOfOutputPorts(1); this->Output = 0; + this->WholeExtent[0] = this->WholeExtent[2] = this->WholeExtent[4] = 0; + this->WholeExtent[1] = this->WholeExtent[3] = this->WholeExtent[5] = -1; } //---------------------------------------------------------------------------- @@ -109,6 +111,38 @@ int vtkTrivialProducer::FillOutputPortInformation(int, vtkInformation* info) return 1; } +//---------------------------------------------------------------------------- +void vtkTrivialProducer::FillOutputDataInformation(vtkDataObject* output, + vtkInformation* outInfo) +{ + vtkInformation* dataInfo = output->GetInformation(); + if(dataInfo->Get(vtkDataObject::DATA_EXTENT_TYPE()) == VTK_3D_EXTENT) + { + int extent[6]; + dataInfo->Get(vtkDataObject::DATA_EXTENT(), extent); + outInfo->Set(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(), + extent, 6); + } + + if (output->IsA("vtkImageData")) + { + vtkImageData* img = static_cast<vtkImageData*>(output); + + double spacing[3]; + img->GetSpacing(spacing); + outInfo->Set(vtkDataObject::SPACING(), spacing[0], spacing[1], spacing[2]); + + double origin[3]; + img->GetOrigin(origin); + outInfo->Set(vtkDataObject::ORIGIN(), origin[0], origin[1], origin[2]); + + vtkDataObject::SetPointDataActiveScalarInfo(outInfo, + img->GetScalarType(), + img->GetNumberOfScalarComponents()); + + } +} + //---------------------------------------------------------------------------- int vtkTrivialProducer::ProcessRequest(vtkInformation* request, @@ -119,41 +153,27 @@ vtkTrivialProducer::ProcessRequest(vtkInformation* request, this->Output) { vtkInformation* outputInfo = outputVector->GetInformationObject(0); - vtkInformation* dataInfo = this->Output->GetInformation(); - if(dataInfo->Get(vtkDataObject::DATA_EXTENT_TYPE()) == VTK_PIECES_EXTENT) - { - // There is no real source to change the output data, so we can - // produce exactly one piece. - outputInfo->Set(vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), -1); - } - else if(dataInfo->Get(vtkDataObject::DATA_EXTENT_TYPE()) == VTK_3D_EXTENT) + + vtkTrivialProducer::FillOutputDataInformation(this->Output, outputInfo); + + // Overwrite the whole extent if WholeExtent is set. This is needed + // for distributed structured data. + if (this->WholeExtent[0] <= this->WholeExtent[1] && + this->WholeExtent[2] <= this->WholeExtent[3] && + this->WholeExtent[4] <= this->WholeExtent[5]) { - // The whole extent is just the extent because the output has no - // real source to change its data. - int extent[6]; - dataInfo->Get(vtkDataObject::DATA_EXTENT(), extent); outputInfo->Set(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(), - extent, 6); + this->WholeExtent, 6); } - if (this->Output->IsA("vtkImageData")) - { - vtkImageData* img = static_cast<vtkImageData*>(this->Output); - - double spacing[3]; - img->GetSpacing(spacing); - outputInfo->Set(vtkDataObject::SPACING(), spacing[0], spacing[1], spacing[2]); - - double origin[3]; - img->GetOrigin(origin); - outputInfo->Set(vtkDataObject::ORIGIN(), origin[0], origin[1], origin[2]); - - vtkDataObject::SetPointDataActiveScalarInfo(outputInfo, - img->GetScalarType(), - img->GetNumberOfScalarComponents()); - - } + // We assume that whoever sets up the trivial producer handles + // partitioned data properly. For structured data, this means setting + // up WHOLE_EXTENT as above. For unstructured data, nothing special is + // required + outputInfo->Set( + vtkStreamingDemandDrivenPipeline::CAN_HANDLE_PIECE_REQUEST(), 1); } + #if VTK_TRIVIAL_PRODUCER_CHECK_UPDATE_EXTENT if(request->Has(vtkStreamingDemandDrivenPipeline::REQUEST_UPDATE_EXTENT())) { @@ -249,24 +269,21 @@ vtkTrivialProducer::ProcessRequest(vtkInformation* request, { // If EXACT_EXTENT() is not there, // make sure that we provide requested extent or more - int dataExt[6]; vtkDataObject* output = outputInfo->Get(vtkDataObject::DATA_OBJECT()); - output->GetInformation()->Get(vtkDataObject::DATA_EXTENT(), dataExt); - if (updateExt[0] < dataExt[0] || - updateExt[1] > dataExt[1] || - updateExt[2] < dataExt[2] || - updateExt[3] > dataExt[3] || - updateExt[4] < dataExt[4] || - updateExt[5] > dataExt[5]) + if (updateExt[0] < wholeExt[0] || + updateExt[1] > wholeExt[1] || + updateExt[2] < wholeExt[2] || + updateExt[3] > wholeExt[3] || + updateExt[4] < wholeExt[4] || + updateExt[5] > wholeExt[5]) { - if (output != this->Output) - { - outputInfo->Set(vtkDataObject::DATA_OBJECT(), this->Output); - } - else - { - vtkErrorMacro("This data object does not contain the requested extent."); - } + vtkErrorMacro("This data object does not contain the requested extent."); + } + // This means that we used a previously cropped output, replace it + // with current + else if (output != this->Output) + { + outputInfo->Set(vtkDataObject::DATA_OBJECT(), this->Output); } } } diff --git a/Common/ExecutionModel/vtkTrivialProducer.h b/Common/ExecutionModel/vtkTrivialProducer.h index 5a8cf0ae7f0b83da8bb2c9ad6b218e4ea54ad762..41349ad510a5e63c7dab0c2cf9a2b41d3c4bef38 100644 --- a/Common/ExecutionModel/vtkTrivialProducer.h +++ b/Common/ExecutionModel/vtkTrivialProducer.h @@ -52,6 +52,21 @@ public: // The modified time of this producer is the newer of this object or // the assigned output. virtual unsigned long GetMTime(); + + // Description: + // Set the whole extent to use for the data this producer is producing. + // This may be different than the extent of the output data when + // the trivial producer is used in parallel. + vtkSetVector6Macro(WholeExtent, int); + vtkGetVector6Macro(WholeExtent, int); + + // Description: + // This method can be used to copy meta-data from an existing data + // object to an information object. For example, whole extent, + // image data spacing, origin etc. + static void FillOutputDataInformation(vtkDataObject* output, + vtkInformation* outInfo); + protected: vtkTrivialProducer(); ~vtkTrivialProducer(); @@ -63,6 +78,8 @@ protected: // The real data object. vtkDataObject* Output; + int WholeExtent[6]; + virtual void ReportReferences(vtkGarbageCollector*); private: vtkTrivialProducer(const vtkTrivialProducer&); // Not implemented. diff --git a/Common/ExecutionModel/vtkUniformGridAMRAlgorithm.cxx b/Common/ExecutionModel/vtkUniformGridAMRAlgorithm.cxx index f4f340e19b24d5c993d443bfc296388320fb45fc..591cfb2932468244b22df32146c75de46ebd017f 100644 --- a/Common/ExecutionModel/vtkUniformGridAMRAlgorithm.cxx +++ b/Common/ExecutionModel/vtkUniformGridAMRAlgorithm.cxx @@ -92,29 +92,6 @@ int vtkUniformGridAMRAlgorithm::ProcessRequest( // execute information if(request->Has(vtkDemandDrivenPipeline::REQUEST_INFORMATION())) { - if(request->Has(vtkStreamingDemandDrivenPipeline::FROM_OUTPUT_PORT())) - { - int outputPort = - request->Get(vtkStreamingDemandDrivenPipeline::FROM_OUTPUT_PORT()); - vtkInformation* info = outputVector->GetInformationObject(outputPort); - if( info != NULL ) - { - info->Set( - vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), -1); - } - } - else - { - for (int outIdx=0; outIdx < this->GetNumberOfOutputPorts(); outIdx++) - { - vtkInformation* info = outputVector->GetInformationObject(outIdx); - if(info != NULL) - { - info->Set( - vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(),-1); - } - } - } return this->RequestInformation(request, inputVector, outputVector); } diff --git a/Filters/Core/vtkCleanPolyData.cxx b/Filters/Core/vtkCleanPolyData.cxx index 5c99efc4324213a161f33cabc362c0b0a7f4df5b..ed33eee642b9750fa7321dd995835862ffa41fd5 100644 --- a/Filters/Core/vtkCleanPolyData.cxx +++ b/Filters/Core/vtkCleanPolyData.cxx @@ -73,29 +73,6 @@ void vtkCleanPolyData::OperateOnBounds(double in[6], double out[6]) out[5] = in[5]; } -//-------------------------------------------------------------------------- -int vtkCleanPolyData::RequestInformation( - vtkInformation *vtkNotUsed(request), - vtkInformationVector **vtkNotUsed(inputVector), - vtkInformationVector *outputVector) -{ - // get the info object - vtkInformation *outInfo = outputVector->GetInformationObject(0); - - if (this->PieceInvariant) - { - outInfo->Set(vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), - 1); - } - else - { - outInfo->Set(vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), - -1); - } - - return 1; -} - //-------------------------------------------------------------------------- int vtkCleanPolyData::RequestUpdateExtent( vtkInformation *vtkNotUsed(request), diff --git a/Filters/Core/vtkCleanPolyData.h b/Filters/Core/vtkCleanPolyData.h index ad629aa22663d243ede2a7a8c83dbc1999f67b79..9f05259ee1ad1c4ce6b62084306b23f0d7e10210 100644 --- a/Filters/Core/vtkCleanPolyData.h +++ b/Filters/Core/vtkCleanPolyData.h @@ -167,7 +167,6 @@ protected: // Usual data generation method virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); - virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *); virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *); int PointMerging; diff --git a/Filters/Core/vtkDataObjectGenerator.cxx b/Filters/Core/vtkDataObjectGenerator.cxx index 3ababdc61caa66469ec0d81b979f58485b2df58c..310d8c8634490f0db6025617f6ce77f6b5a46ed7 100644 --- a/Filters/Core/vtkDataObjectGenerator.cxx +++ b/Filters/Core/vtkDataObjectGenerator.cxx @@ -428,8 +428,10 @@ int vtkDataObjectGenerator::RequestInformation(vtkInformation *req, //Say that this filter can break up its output into any number of pieces vtkInformation *outInfo = outV->GetInformationObject(0); + /* outInfo->Set( vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), -1); + */ //If my output is an atomic structured type, fill in the whole extent info vtkInternalStructureCache *top = this->Structure->children.front(); diff --git a/Filters/Core/vtkGridSynchronizedTemplates3D.cxx b/Filters/Core/vtkGridSynchronizedTemplates3D.cxx index ee2f1b99880ab998619ed39762ed36e5a642ef93..e12a62df81887f10700100ce96b045a1fcbc885d 100644 --- a/Filters/Core/vtkGridSynchronizedTemplates3D.cxx +++ b/Filters/Core/vtkGridSynchronizedTemplates3D.cxx @@ -55,10 +55,6 @@ vtkGridSynchronizedTemplates3D::vtkGridSynchronizedTemplates3D() this->ComputeScalars = 1; this->GenerateTriangles = 1; - this->ExecuteExtent[0] = this->ExecuteExtent[1] - = this->ExecuteExtent[2] = this->ExecuteExtent[3] - = this->ExecuteExtent[4] = this->ExecuteExtent[5] = 0; - this->MinimumPieceSize[0] = 10; this->MinimumPieceSize[1] = 10; this->MinimumPieceSize[2] = 10; @@ -870,94 +866,20 @@ int vtkGridSynchronizedTemplates3D::RequestUpdateExtent( vtkInformationVector **inputVector, vtkInformationVector *outputVector) { - // get the info objects - vtkInformation *inInfo = inputVector[0]->GetInformationObject(0); - vtkInformation *outInfo = outputVector->GetInformationObject(0); - - int piece, numPieces; - int *wholeExt; - int ext[6]; - - vtkExtentTranslator *translator = vtkExtentTranslator::SafeDownCast( - inInfo->Get(vtkStreamingDemandDrivenPipeline::EXTENT_TRANSLATOR())); - wholeExt = inInfo->Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT()); - - // Get request from output - piece = - outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_PIECE_NUMBER()); - numPieces = - outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_PIECES()); - - // Start with the whole grid. - inInfo->Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(), ext); - - // get the extent associated with the piece. - if (translator == NULL) - { - // Default behavior - if (piece != 0) - { - ext[0] = ext[2] = ext[4] = 0; - ext[1] = ext[3] = ext[5] = -1; - } - } - else - { - translator->PieceToExtentThreadSafe(piece, numPieces, 0, wholeExt, ext, - translator->GetSplitMode(),0); - } - - // As a side product of this call, ExecuteExtent is set. - // This is the region that we are really updating, although - // we may require a larger input region in order to generate - // it if normals / gradients are being computed - - this->ExecuteExtent[0] = ext[0]; - this->ExecuteExtent[1] = ext[1]; - this->ExecuteExtent[2] = ext[2]; - this->ExecuteExtent[3] = ext[3]; - this->ExecuteExtent[4] = ext[4]; - this->ExecuteExtent[5] = ext[5]; - - // expand if we need to compute gradients + // These require extra ghost levels if (this->ComputeGradients || this->ComputeNormals) { - ext[0] -= 1; - if (ext[0] < wholeExt[0]) - { - ext[0] = wholeExt[0]; - } - ext[1] += 1; - if (ext[1] > wholeExt[1]) - { - ext[1] = wholeExt[1]; - } - - ext[2] -= 1; - if (ext[2] < wholeExt[2]) - { - ext[2] = wholeExt[2]; - } - ext[3] += 1; - if (ext[3] > wholeExt[3]) - { - ext[3] = wholeExt[3]; - } + vtkInformation *inInfo = inputVector[0]->GetInformationObject(0); + vtkInformation *outInfo = outputVector->GetInformationObject(0); - ext[4] -= 1; - if (ext[4] < wholeExt[4]) - { - ext[4] = wholeExt[4]; - } - ext[5] += 1; - if (ext[5] > wholeExt[5]) - { - ext[5] = wholeExt[5]; - } + int ghostLevels; + ghostLevels = + outInfo->Get( + vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_GHOST_LEVELS()); + inInfo->Set(vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_GHOST_LEVELS(), + ghostLevels + 1); } - // Set the update extent of the input. - inInfo->Set(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT(), ext, 6); return 1; } @@ -1012,7 +934,7 @@ int vtkGridSynchronizedTemplates3D::RequestData( } // just call the threaded execute directly. - this->ThreadedExecute(this->GetExecuteExtent(), 0, input, inputVector, outInfo); + this->ThreadedExecute(input->GetExtent(), 0, input, inputVector, outInfo); output->Squeeze(); diff --git a/Filters/Core/vtkGridSynchronizedTemplates3D.h b/Filters/Core/vtkGridSynchronizedTemplates3D.h index 95a38da7e7cf93255f0ca6e456864421fca0c182..9b1480bf7279b3f235f49b2c5d194be67b1c4476 100644 --- a/Filters/Core/vtkGridSynchronizedTemplates3D.h +++ b/Filters/Core/vtkGridSynchronizedTemplates3D.h @@ -123,8 +123,7 @@ public: {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);} // Description: - // Needed by templated functions. - int *GetExecuteExtent() {return this->ExecuteExtent;} + // Main execution. void ThreadedExecute(int *exExt, int threadId, vtkStructuredGrid *input, vtkInformationVector **inVec, vtkInformation *outInfo); @@ -157,7 +156,6 @@ protected: vtkContourValues *ContourValues; int MinimumPieceSize[3]; - int ExecuteExtent[6]; int OutputPointsPrecision; private: diff --git a/Filters/Core/vtkProbeFilter.cxx b/Filters/Core/vtkProbeFilter.cxx index b2faa59cc079bbfcfb4984903d85660a26ebe11f..3f514432b8d6de8c758372e26d8e6583d2a2dee6 100644 --- a/Filters/Core/vtkProbeFilter.cxx +++ b/Filters/Core/vtkProbeFilter.cxx @@ -398,10 +398,13 @@ int vtkProbeFilter::RequestInformation( outInfo->Set(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(), inInfo->Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT()), 6); + /* outInfo->Set(vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), inInfo->Get( vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES())); + */ + /* // Special case for ParaView. if (this->SpatialMatch == 2) { @@ -410,18 +413,20 @@ int vtkProbeFilter::RequestInformation( sourceInfo->Get( vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES())); } + */ if (this->SpatialMatch == 1) { - int m1 = - inInfo->Get(vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES()); - int m2 = - sourceInfo->Get( - vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES()); + /* + //int m1 = + //inInfo->Get(vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES()); + //int m2 = + //sourceInfo->Get( + //vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES()); if (m1 < 0 && m2 < 0) { - outInfo->Set(vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), - -1); + //outInfo->Set(vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), + //-1); } else { @@ -437,9 +442,10 @@ int vtkProbeFilter::RequestInformation( { m1 = m2; } - outInfo->Set(vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), - m1); + //outInfo->Set(vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), + //m1); } + */ } // A variation of the bug fix from John Biddiscombe. diff --git a/Filters/Core/vtkRectilinearSynchronizedTemplates.cxx b/Filters/Core/vtkRectilinearSynchronizedTemplates.cxx index b49804880747a242af4a218d987d087cf9dbd2dd..c4d73524322d63b412b1e46a78ef7d6a171ee78b 100644 --- a/Filters/Core/vtkRectilinearSynchronizedTemplates.cxx +++ b/Filters/Core/vtkRectilinearSynchronizedTemplates.cxx @@ -56,10 +56,6 @@ vtkRectilinearSynchronizedTemplates::vtkRectilinearSynchronizedTemplates() this->ComputeScalars = 1; this->GenerateTriangles = 1; - this->ExecuteExtent[0] = this->ExecuteExtent[1] - = this->ExecuteExtent[2] = this->ExecuteExtent[3] - = this->ExecuteExtent[4] = this->ExecuteExtent[5] = 0; - this->ArrayComponent = 0; // by default process active point scalars @@ -692,14 +688,6 @@ int vtkRectilinearSynchronizedTemplates::RequestData( vtkDebugMacro(<< "Executing 3D structured contour"); - if ( this->ExecuteExtent[0] >= this->ExecuteExtent[1] || - this->ExecuteExtent[2] >= this->ExecuteExtent[3] || - this->ExecuteExtent[4] >= this->ExecuteExtent[5] ) - { - vtkDebugMacro(<<"3D structured contours requires 3D data"); - return 1; - } - // // Check data type and execute appropriate function // @@ -707,6 +695,7 @@ int vtkRectilinearSynchronizedTemplates::RequestData( if (inScalars == NULL) { vtkErrorMacro("No scalars for contouring."); + return 1; } int numComps = inScalars->GetNumberOfComponents(); @@ -717,11 +706,12 @@ int vtkRectilinearSynchronizedTemplates::RequestData( return 1; } - ptr = this->GetScalarsForExtent(inScalars, this->ExecuteExtent, data); + int* ext = data->GetExtent(); + ptr = this->GetScalarsForExtent(inScalars, ext, data); switch (inScalars->GetDataType()) { vtkTemplateMacro( - ContourRectilinearGrid(this, this->ExecuteExtent, data, + ContourRectilinearGrid(this, ext, data, output, (VTK_TT *)ptr, inScalars,this->GenerateTriangles!=0)); } @@ -734,96 +724,20 @@ int vtkRectilinearSynchronizedTemplates::RequestUpdateExtent( vtkInformationVector **inputVector, vtkInformationVector *outputVector) { - // get the info objects - vtkInformation *inInfo = inputVector[0]->GetInformationObject(0); - vtkInformation *outInfo = outputVector->GetInformationObject(0); - - int piece, numPieces; - int *wholeExt; - int ext[6]; - vtkExtentTranslator *translator; - - translator = vtkExtentTranslator::SafeDownCast( - inInfo->Get(vtkStreamingDemandDrivenPipeline::EXTENT_TRANSLATOR())); - - wholeExt = - inInfo->Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT()); - memcpy(ext, wholeExt, 6*sizeof(int)); - - // Get request from output - piece = - outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_PIECE_NUMBER()); - numPieces = - outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_PIECES()); - - // get the extent associated with the piece. - if (translator == NULL) - { - // Default behavior - if (piece != 0) - { - ext[0] = ext[2] = ext[4] = 0; - ext[1] = ext[3] = ext[5] = -1; - } - } - else - { - translator->PieceToExtentThreadSafe(piece, numPieces, 0, wholeExt, ext, - translator->GetSplitMode(),0); - } - - // As a side product of this call, ExecuteExtent is set. - // This is the region that we are really updating, although - // we may require a larger input region in order to generate - // it if normals / gradients are being computed - - this->ExecuteExtent[0] = ext[0]; - this->ExecuteExtent[1] = ext[1]; - this->ExecuteExtent[2] = ext[2]; - this->ExecuteExtent[3] = ext[3]; - this->ExecuteExtent[4] = ext[4]; - this->ExecuteExtent[5] = ext[5]; - - // expand if we need to compute gradients + // These require extra ghost levels if (this->ComputeGradients || this->ComputeNormals) { - ext[0] -= 1; - if (ext[0] < wholeExt[0]) - { - ext[0] = wholeExt[0]; - } - ext[1] += 1; - if (ext[1] > wholeExt[1]) - { - ext[1] = wholeExt[1]; - } + vtkInformation *inInfo = inputVector[0]->GetInformationObject(0); + vtkInformation *outInfo = outputVector->GetInformationObject(0); - ext[2] -= 1; - if (ext[2] < wholeExt[2]) - { - ext[2] = wholeExt[2]; - } - ext[3] += 1; - if (ext[3] > wholeExt[3]) - { - ext[3] = wholeExt[3]; - } - - ext[4] -= 1; - if (ext[4] < wholeExt[4]) - { - ext[4] = wholeExt[4]; - } - ext[5] += 1; - if (ext[5] > wholeExt[5]) - { - ext[5] = wholeExt[5]; - } + int ghostLevels; + ghostLevels = + outInfo->Get( + vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_GHOST_LEVELS()); + inInfo->Set(vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_GHOST_LEVELS(), + ghostLevels + 1); } - // Set the update extent of the input. - inInfo->Set(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT(), ext, 6); - return 1; } diff --git a/Filters/Core/vtkRectilinearSynchronizedTemplates.h b/Filters/Core/vtkRectilinearSynchronizedTemplates.h index 3661556c69b5818c2666dda69c5d1f2907e83dd0..079a0eef30c3fbf4734945d75b478d896af041ad 100644 --- a/Filters/Core/vtkRectilinearSynchronizedTemplates.h +++ b/Filters/Core/vtkRectilinearSynchronizedTemplates.h @@ -118,10 +118,6 @@ public: void GenerateValues(int numContours, double rangeStart, double rangeEnd) {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);} - // Description: - // Needed by templated functions. - int *GetExecuteExtent() {return this->ExecuteExtent;} - // Description: // Set/get which component of the scalar array to contour on; defaults to 0. vtkSetMacro(ArrayComponent, int); @@ -155,8 +151,6 @@ protected: virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *); virtual int FillInputPortInformation(int port, vtkInformation *info); - int ExecuteExtent[6]; - int ArrayComponent; void* GetScalarsForExtent(vtkDataArray *array, int extent[6], diff --git a/Filters/Core/vtkStructuredGridOutlineFilter.cxx b/Filters/Core/vtkStructuredGridOutlineFilter.cxx index 820ff15daed9c0eaae93735ec65e19e5b8460fa5..565a1eb0a923b378af01f6267b745f500ee7e161 100644 --- a/Filters/Core/vtkStructuredGridOutlineFilter.cxx +++ b/Filters/Core/vtkStructuredGridOutlineFilter.cxx @@ -70,7 +70,7 @@ int vtkStructuredGridOutlineFilter::RequestData( // Since it is possible that the extent is larger than the whole extent, // and we want the outline to be the whole extent, // compute the clipped extent. - inInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT(), cExt); + memcpy(cExt, ext, 6*sizeof(int)); for (i = 0; i < 3; ++i) { if (cExt[2*i] < wExt[2*i]) diff --git a/Filters/Core/vtkSynchronizedTemplates3D.cxx b/Filters/Core/vtkSynchronizedTemplates3D.cxx index 4cecad670b314a40fdc1aa3c5585fa30b9ac1f15..e203ee9c3188a2c5d940f9382415806d37042e0d 100644 --- a/Filters/Core/vtkSynchronizedTemplates3D.cxx +++ b/Filters/Core/vtkSynchronizedTemplates3D.cxx @@ -43,8 +43,6 @@ vtkStandardNewMacro(vtkSynchronizedTemplates3D); -vtkInformationKeyRestrictedMacro(vtkSynchronizedTemplates3D, EXECUTE_EXTENT, IntegerVector, 6); - //---------------------------------------------------------------------------- // Description: // Construct object with initial scalar range (0,1) and single contour value @@ -699,7 +697,7 @@ void vtkSynchronizedTemplates3D::ThreadedExecute(vtkImageData *data, output = vtkPolyData::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT())); - int* exExt = outInfo->Get(vtkSynchronizedTemplates3D::EXECUTE_EXTENT()); + int* exExt = data->GetExtent(); if ( exExt[0] >= exExt[1] || exExt[2] >= exExt[3] || exExt[4] >= exExt[5] ) { vtkDebugMacro(<<"3D structured contours requires 3D data"); @@ -767,100 +765,20 @@ int vtkSynchronizedTemplates3D::RequestUpdateExtent( vtkInformationVector **inputVector, vtkInformationVector *outputVector) { - // get the info objects - vtkInformation *inInfo = inputVector[0]->GetInformationObject(0); - vtkInformation *outInfo = outputVector->GetInformationObject(0); - - int piece, numPieces, ghostLevels; - int *wholeExt; - int ext[6]; - - vtkExtentTranslator *translator = vtkExtentTranslator::SafeDownCast( - inInfo->Get(vtkStreamingDemandDrivenPipeline::EXTENT_TRANSLATOR())); - wholeExt = - inInfo->Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT()); - - if (!wholeExt) - { - return 1; - } - - - // Get request from output - piece = - outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_PIECE_NUMBER()); - numPieces = - outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_PIECES()); - ghostLevels = - outInfo->Get( - vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_GHOST_LEVELS()); - - // Start with the whole grid. - inInfo->Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(), ext); - - // get the extent associated with the piece. - if (translator == NULL) - { - // Default behavior - if (piece != 0) - { - ext[0] = ext[2] = ext[4] = 0; - ext[1] = ext[3] = ext[5] = -1; - } - } - else - { - translator->PieceToExtentThreadSafe(piece, numPieces, ghostLevels, - wholeExt, ext, - translator->GetSplitMode(),0); - } - - // As a side product of this call, ExecuteExtent is set. - // This is the region that we are really updating, although - // we may require a larger input region in order to generate - // it if normals / gradients are being computed - outInfo->Set(vtkSynchronizedTemplates3D::EXECUTE_EXTENT(), ext, 6); - - // expand if we need to compute gradients + // These require extra ghost levels if (this->ComputeGradients || this->ComputeNormals) { - ext[0] -= 1; - if (ext[0] < wholeExt[0]) - { - ext[0] = wholeExt[0]; - } - ext[1] += 1; - if (ext[1] > wholeExt[1]) - { - ext[1] = wholeExt[1]; - } - - ext[2] -= 1; - if (ext[2] < wholeExt[2]) - { - ext[2] = wholeExt[2]; - } - ext[3] += 1; - if (ext[3] > wholeExt[3]) - { - ext[3] = wholeExt[3]; - } - - ext[4] -= 1; - if (ext[4] < wholeExt[4]) - { - ext[4] = wholeExt[4]; - } - ext[5] += 1; - if (ext[5] > wholeExt[5]) - { - ext[5] = wholeExt[5]; - } + vtkInformation *inInfo = inputVector[0]->GetInformationObject(0); + vtkInformation *outInfo = outputVector->GetInformationObject(0); + + int ghostLevels; + ghostLevels = + outInfo->Get( + vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_GHOST_LEVELS()); + inInfo->Set(vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_GHOST_LEVELS(), + ghostLevels + 1); } - // Set the update extent of the input. - inInfo->Set(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT(), ext, 6); - return 1; } diff --git a/Filters/Core/vtkSynchronizedTemplates3D.h b/Filters/Core/vtkSynchronizedTemplates3D.h index 290b4dc6b61a589a38f38f358eb1d4192b27378d..f28676ab3bf3e0bebd774642956e59f720704a21 100644 --- a/Filters/Core/vtkSynchronizedTemplates3D.h +++ b/Filters/Core/vtkSynchronizedTemplates3D.h @@ -157,8 +157,6 @@ protected: int GenerateTriangles; - static vtkInformationIntegerVectorKey* EXECUTE_EXTENT(); - private: vtkSynchronizedTemplates3D(const vtkSynchronizedTemplates3D&); // Not implemented. void operator=(const vtkSynchronizedTemplates3D&); // Not implemented. diff --git a/Filters/Core/vtkSynchronizedTemplatesCutter3D.cxx b/Filters/Core/vtkSynchronizedTemplatesCutter3D.cxx index 64e7989847a6e0dfddbb26eb9b6b0c245ad4d8a2..3df0710032d350330556cbba5c81f1d0e98d6dc9 100644 --- a/Filters/Core/vtkSynchronizedTemplatesCutter3D.cxx +++ b/Filters/Core/vtkSynchronizedTemplatesCutter3D.cxx @@ -549,7 +549,7 @@ void vtkSynchronizedTemplatesCutter3D::ThreadedExecute(vtkImageData *data, output = vtkPolyData::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT())); - int* exExt = outInfo->Get(vtkSynchronizedTemplates3D::EXECUTE_EXTENT()); + int* exExt = data->GetExtent(); if ( exExt[0] >= exExt[1] || exExt[2] >= exExt[3] || exExt[4] >= exExt[5] ) { vtkDebugMacro(<<"Cutter3D structured contours requires Cutter3D data"); @@ -563,7 +563,7 @@ void vtkSynchronizedTemplatesCutter3D::ThreadedExecute(vtkImageData *data, //---------------------------------------------------------------------------- int vtkSynchronizedTemplatesCutter3D::RequestData( - vtkInformation *request, + vtkInformation *vtkNotUsed(request), vtkInformationVector **inputVector, vtkInformationVector *outputVector) { @@ -577,9 +577,6 @@ int vtkSynchronizedTemplatesCutter3D::RequestData( vtkPolyData *output = vtkPolyData::SafeDownCast( outInfo->Get(vtkDataObject::DATA_OBJECT())); - // to be safe recompute the - this->RequestUpdateExtent(request,inputVector,outputVector); - // Just call the threaded execute directly. this->ThreadedExecute(input, outInfo, 0); diff --git a/Filters/Extraction/vtkExtractGrid.cxx b/Filters/Extraction/vtkExtractGrid.cxx index f18d1e41afe812dd64cf031bf2341793b61cf83e..d99cf34381adc23dd84c66dccbf86f60a5ec42ec 100644 --- a/Filters/Extraction/vtkExtractGrid.cxx +++ b/Filters/Extraction/vtkExtractGrid.cxx @@ -306,6 +306,23 @@ int vtkExtractGrid::RequestData( shift[1] = voi[2] - (shift[1]*rate[1]); shift[2] = voi[4] - (shift[2]*rate[2]); + // Input extent can be a subset of the input extent when there are + // multiple pieces. This takes cares of mapping existing input extent + // to what the output update extent would be based on it. + for (i=0; i<3; i++) + { + int ext; + ext = inExt[2*i] < voi[2*i] ? voi[2*i] : inExt[2*i]; + uExt[2*i] = (ext - shift[i]) / rate[i]; + ext = inExt[2*i+1] > voi[2*i+1] ? voi[2*i+1] : inExt[2*i+1]; + uExt[2*i+1] = (ext - shift[i]) / rate[i]; + // Shrink if beyond existing extents + if (uExt[2*i+1] * rate[i] + shift[i] > inExt[2*i+1]) + { + uExt[2*i+1]--; + } + } + output->SetExtent(uExt); // If output same as input, just pass data through diff --git a/Filters/FlowPaths/vtkParticleTracerBase.cxx b/Filters/FlowPaths/vtkParticleTracerBase.cxx index ff2df4d055245f911fe0f9eac905acf3baa6b132..a4dac00ff923f8f6f392cfe3a7d93bfcc73009c5 100644 --- a/Filters/FlowPaths/vtkParticleTracerBase.cxx +++ b/Filters/FlowPaths/vtkParticleTracerBase.cxx @@ -232,10 +232,9 @@ int vtkParticleTracerBase::ProcessRequest( int vtkParticleTracerBase::RequestInformation( vtkInformation *vtkNotUsed(request), vtkInformationVector **inputVector, - vtkInformationVector *outputVector) + vtkInformationVector *vtkNotUsed(outputVector)) { vtkInformation *inInfo = inputVector[0]->GetInformationObject(0); - vtkInformation *outInfo = outputVector->GetInformationObject(0); if (inInfo->Has(vtkStreamingDemandDrivenPipeline::TIME_STEPS()) ) { @@ -269,9 +268,6 @@ int vtkParticleTracerBase::RequestInformation( return 0; } - outInfo->Set( - vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), -1); - return 1; } namespace diff --git a/Filters/FlowPaths/vtkTemporalStreamTracer.cxx b/Filters/FlowPaths/vtkTemporalStreamTracer.cxx index dc5b72eb0f3ee8ae9a45f49535c3d5b0c3077c33..93c41472ca69c64b450273aada87b7ab6e740b8e 100644 --- a/Filters/FlowPaths/vtkTemporalStreamTracer.cxx +++ b/Filters/FlowPaths/vtkTemporalStreamTracer.cxx @@ -246,9 +246,6 @@ int vtkTemporalStreamTracer::RequestInformation( return 0; } - outInfo->Set( - vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), -1); - outInfo->Set(vtkStreamingDemandDrivenPipeline::TIME_STEPS(), &this->OutputTimeValues[0], static_cast<int>(this->OutputTimeValues.size())); diff --git a/Filters/General/Testing/Python/testDataSetTriangleFilter.py b/Filters/General/Testing/Python/testDataSetTriangleFilter.py index a52ba58b53124c47561f4c2795e9da59a69b499c..af343433ec695ecb8e2965d239f42a7eafe65596 100755 --- a/Filters/General/Testing/Python/testDataSetTriangleFilter.py +++ b/Filters/General/Testing/Python/testDataSetTriangleFilter.py @@ -34,8 +34,16 @@ tris2 = vtk.vtkDataSetTriangleFilter() tris2.SetInputConnection(clipper2.GetOutputPort()) geom = vtk.vtkGeometryFilter() geom.SetInputConnection(tris.GetOutputPort()) +pf = vtk.vtkProgrammableFilter() +pf.SetInputConnection(tris2.GetOutputPort()) +def remove_ghosts(): + input = pf.GetInput() + output = pf.GetOutputDataObject(0) + output.ShallowCopy(input) + output.RemoveGhostCells(1) +pf.SetExecuteMethod(remove_ghosts) edges = vtk.vtkExtractEdges() -edges.SetInputConnection(tris2.GetOutputPort()) +edges.SetInputConnection(pf.GetOutputPort()) mapper1 = vtk.vtkPolyDataMapper() mapper1.SetInputConnection(geom.GetOutputPort()) mapper1.ScalarVisibilityOn() @@ -46,6 +54,7 @@ mapper2 = vtk.vtkPolyDataMapper() mapper2.SetInputConnection(edges.GetOutputPort()) mapper2.SetPiece(PIECE) mapper2.SetNumberOfPieces(NUMBER_OF_PIECES) +mapper2.GetInput().RemoveGhostCells(1) actor1 = vtk.vtkActor() actor1.SetMapper(mapper1) actor2 = vtk.vtkActor() diff --git a/Filters/General/Testing/Tcl/testDataSetTriangleFilter.tcl b/Filters/General/Testing/Tcl/testDataSetTriangleFilter.tcl index e6696eabbdc116687ea522cf660166c8365684ff..4566a52fc45abe25d5ede7ab8d44530d4548be6a 100644 --- a/Filters/General/Testing/Tcl/testDataSetTriangleFilter.tcl +++ b/Filters/General/Testing/Tcl/testDataSetTriangleFilter.tcl @@ -39,8 +39,19 @@ vtkDataSetTriangleFilter tris2 vtkGeometryFilter geom geom SetInputConnection [tris GetOutputPort] +vtkProgrammableFilter pf + pf SetInputConnection [tris2 GetOutputPort] + pf SetExecuteMethod stripGhosts + +proc stripGhosts {} { + set inputDS [pf GetPolyDataInput] + set outputDS [pf GetUnstructuredGridOutput] + $outputDS ShallowCopy $inputDS + $outputDS RemoveGhostCells 1 +} + vtkExtractEdges edges - edges SetInputConnection [tris2 GetOutputPort] + edges SetInputConnection [pf GetOutputPort] vtkPolyDataMapper mapper1 mapper1 SetInputConnection [geom GetOutputPort] diff --git a/Filters/General/vtkMultiBlockDataGroupFilter.cxx b/Filters/General/vtkMultiBlockDataGroupFilter.cxx index a954430557a90a12c498c8d0a70020d89fa5aab2..a90cd1081356d85adfeb44f1692cc1169bd46ed6 100644 --- a/Filters/General/vtkMultiBlockDataGroupFilter.cxx +++ b/Filters/General/vtkMultiBlockDataGroupFilter.cxx @@ -34,27 +34,6 @@ vtkMultiBlockDataGroupFilter::~vtkMultiBlockDataGroupFilter() { } -//----------------------------------------------------------------------------- -int vtkMultiBlockDataGroupFilter::RequestInformation( - vtkInformation *vtkNotUsed(request), - vtkInformationVector **, - vtkInformationVector *outputVector) -{ - vtkInformation* outInfo = outputVector->GetInformationObject(0); - - // Setup ExtentTranslator so that all downstream piece requests are - // converted to whole extent update requests, as need by the histogram filter. - if (strcmp( - vtkStreamingDemandDrivenPipeline::GetExtentTranslator(outInfo) - ->GetClassName(), "vtkOnePieceExtentTranslator") != 0) - { - vtkExtentTranslator* et = vtkOnePieceExtentTranslator::New(); - vtkStreamingDemandDrivenPipeline::SetExtentTranslator(outInfo, et); - et->Delete(); - } - return 1; -} - //----------------------------------------------------------------------------- int vtkMultiBlockDataGroupFilter::RequestData( vtkInformation *vtkNotUsed(request), diff --git a/Filters/General/vtkMultiBlockDataGroupFilter.h b/Filters/General/vtkMultiBlockDataGroupFilter.h index 9d7d8a376036026f226638c27e6c8234ccb6fd01..18f8df657fa92fb9ee4d7af451b521b46949c822 100644 --- a/Filters/General/vtkMultiBlockDataGroupFilter.h +++ b/Filters/General/vtkMultiBlockDataGroupFilter.h @@ -51,9 +51,6 @@ protected: virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); - virtual int RequestInformation(vtkInformation*, - vtkInformationVector**, - vtkInformationVector*); virtual int FillInputPortInformation(int port, vtkInformation *info); diff --git a/Filters/General/vtkProbePolyhedron.cxx b/Filters/General/vtkProbePolyhedron.cxx index f0305dbd01fd0cddabb8e1135e613320319ea76f..59887eac1b0423329c6f5ffa1ae1b836f4139409 100644 --- a/Filters/General/vtkProbePolyhedron.cxx +++ b/Filters/General/vtkProbePolyhedron.cxx @@ -211,9 +211,6 @@ int vtkProbePolyhedron::RequestInformation( outInfo->Set(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(), inInfo->Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT()), 6); - outInfo->Set(vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), - inInfo->Get( - vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES())); return 1; } diff --git a/Filters/General/vtkRectilinearGridClip.cxx b/Filters/General/vtkRectilinearGridClip.cxx index f69de703a019ff33ed4473f5a7c775fbf3eab751..cecdfc3bc36d54a882df1ebd1d7a4c03a27b2788 100644 --- a/Filters/General/vtkRectilinearGridClip.cxx +++ b/Filters/General/vtkRectilinearGridClip.cxx @@ -16,7 +16,6 @@ #include "vtkAlgorithmOutput.h" #include "vtkCellData.h" -#include "vtkExtentTranslator.h" #include "vtkRectilinearGrid.h" #include "vtkInformation.h" #include "vtkInformationVector.h" @@ -208,47 +207,3 @@ int vtkRectilinearGridClip::RequestData(vtkInformation *vtkNotUsed(request), return 1; } - -//---------------------------------------------------------------------------- -void vtkRectilinearGridClip::SetOutputWholeExtent(int piece, int numPieces) -{ - vtkInformation *inInfo = this->GetExecutive()->GetInputInformation(0, 0); - vtkInformation *outInfo = this->GetExecutive()->GetOutputInformation(0); - vtkRectilinearGrid *input = vtkRectilinearGrid::SafeDownCast( - inInfo->Get(vtkDataObject::DATA_OBJECT())); - vtkRectilinearGrid *output = vtkRectilinearGrid::SafeDownCast( - outInfo->Get(vtkDataObject::DATA_OBJECT())); - vtkExtentTranslator *translator; - int ext[6]; - - if (input == NULL) - { - vtkErrorMacro("We must have an input to set the output extent by piece."); - return; - } - if (output == NULL) - { - vtkErrorMacro("We must have an output to set the output extent by piece."); - return; - } - translator = vtkExtentTranslator::SafeDownCast( - outInfo->Get(vtkStreamingDemandDrivenPipeline::EXTENT_TRANSLATOR())); - if (translator == NULL) - { - vtkErrorMacro("Output does not have an extent translator."); - return; - } - - vtkDemandDrivenPipeline* inputExec = - vtkDemandDrivenPipeline::SafeDownCast( - vtkExecutive::PRODUCER()->GetExecutive(inInfo)); - inputExec->UpdateInformation(); - inInfo->Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(),ext); - translator->SetWholeExtent(ext); - translator->SetPiece(piece); - translator->SetNumberOfPieces(numPieces); - translator->SetGhostLevel(0); - translator->PieceToExtent(); - translator->GetExtent(ext); - this->SetOutputWholeExtent(ext); -} diff --git a/Filters/General/vtkRectilinearGridClip.h b/Filters/General/vtkRectilinearGridClip.h index 60e34985b774eadb92ad00a45f7fb0bd3d3de172..fb076962e972dc4bd7ca6607b51925efc0f35a83 100644 --- a/Filters/General/vtkRectilinearGridClip.h +++ b/Filters/General/vtkRectilinearGridClip.h @@ -55,10 +55,6 @@ public: vtkGetMacro(ClipData, int); vtkBooleanMacro(ClipData, int); - // Description: - // Hack set output by piece - void SetOutputWholeExtent(int piece, int numPieces); - protected: vtkRectilinearGridClip(); ~vtkRectilinearGridClip() {} diff --git a/Filters/General/vtkStructuredGridClip.cxx b/Filters/General/vtkStructuredGridClip.cxx index 266aa8953d3e48bc03fc1f52ccac0d7c4f8671d1..8281819b0e24a271071140c07d5507b17e376b6f 100644 --- a/Filters/General/vtkStructuredGridClip.cxx +++ b/Filters/General/vtkStructuredGridClip.cxx @@ -16,7 +16,6 @@ #include "vtkAlgorithmOutput.h" #include "vtkCellData.h" -#include "vtkExtentTranslator.h" #include "vtkStructuredGrid.h" #include "vtkInformation.h" #include "vtkInformationExecutivePortKey.h" @@ -206,47 +205,3 @@ int vtkStructuredGridClip::RequestData(vtkInformation *vtkNotUsed(request), return 1; } - -//---------------------------------------------------------------------------- -void vtkStructuredGridClip::SetOutputWholeExtent(int piece, int numPieces) -{ - vtkInformation *inInfo = this->GetExecutive()->GetInputInformation(0, 0); - vtkInformation *outInfo = this->GetExecutive()->GetOutputInformation(0); - vtkStructuredGrid *input = vtkStructuredGrid::SafeDownCast( - inInfo->Get(vtkDataObject::DATA_OBJECT())); - vtkStructuredGrid *output = vtkStructuredGrid::SafeDownCast( - outInfo->Get(vtkDataObject::DATA_OBJECT())); - vtkExtentTranslator *translator; - int ext[6]; - - if (input == NULL) - { - vtkErrorMacro("We must have an input to set the output extent by piece."); - return; - } - if (output == NULL) - { - vtkErrorMacro("We must have an output to set the output extent by piece."); - return; - } - translator = vtkExtentTranslator::SafeDownCast( - outInfo->Get(vtkStreamingDemandDrivenPipeline::EXTENT_TRANSLATOR())); - if (translator == NULL) - { - vtkErrorMacro("Output does not have an extent translator."); - return; - } - - vtkDemandDrivenPipeline* inputExec = - vtkDemandDrivenPipeline::SafeDownCast( - vtkExecutive::PRODUCER()->GetExecutive(inInfo)); - inputExec->UpdateInformation(); - inInfo->Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(),ext); - translator->SetWholeExtent(ext); - translator->SetPiece(piece); - translator->SetNumberOfPieces(numPieces); - translator->SetGhostLevel(0); - translator->PieceToExtent(); - translator->GetExtent(ext); - this->SetOutputWholeExtent(ext); -} diff --git a/Filters/General/vtkStructuredGridClip.h b/Filters/General/vtkStructuredGridClip.h index a111a9f74a58bf716cdf71deebd8d13fb6a3a4f1..e97d75e1d693fd9b62526966669a7247c2239414 100644 --- a/Filters/General/vtkStructuredGridClip.h +++ b/Filters/General/vtkStructuredGridClip.h @@ -55,10 +55,6 @@ public: vtkGetMacro(ClipData, int); vtkBooleanMacro(ClipData, int); - // Description: - // Hack set output by piece - void SetOutputWholeExtent(int piece, int numPieces); - protected: vtkStructuredGridClip(); ~vtkStructuredGridClip() {} diff --git a/Filters/General/vtkTableToStructuredGrid.cxx b/Filters/General/vtkTableToStructuredGrid.cxx index 3067dacfd7771f8c6420080bc88a6276e2d9cbf2..0474797a1a0ece98a15c80a4b78c64bed7c5c2ae 100644 --- a/Filters/General/vtkTableToStructuredGrid.cxx +++ b/Filters/General/vtkTableToStructuredGrid.cxx @@ -65,19 +65,6 @@ int vtkTableToStructuredGrid::RequestInformation( outInfo->Set(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(), this->WholeExtent, 6); - // Setup ExtentTranslator so that all downstream piece requests are - // converted to whole extent update requests, as the data only exist on process 0. - // In parallel, filter expects the data to be available on root node and - // therefore produces empty extents on all other nodes. - if (strcmp( - vtkStreamingDemandDrivenPipeline::GetExtentTranslator(outInfo)->GetClassName(), - "vtkOnePieceExtentTranslator") != 0) - { - vtkExtentTranslator* et = vtkOnePieceExtentTranslator::New(); - vtkStreamingDemandDrivenPipeline::SetExtentTranslator(outInfo, et); - et->Delete(); - } - return 1; } diff --git a/Filters/General/vtkTemporalPathLineFilter.cxx b/Filters/General/vtkTemporalPathLineFilter.cxx index 72caabc45412970dd2c7bfa6004c03ada38f2f94..903349afbb197d8e5f20155547cf52f513c047ce 100644 --- a/Filters/General/vtkTemporalPathLineFilter.cxx +++ b/Filters/General/vtkTemporalPathLineFilter.cxx @@ -167,15 +167,13 @@ void vtkTemporalPathLineFilter::SetSelectionData(vtkDataSet *input) int vtkTemporalPathLineFilter::RequestInformation( vtkInformation *vtkNotUsed(request), vtkInformationVector **inputVector, - vtkInformationVector *outputVector) + vtkInformationVector *vtkNotUsed(outputVector)) { - vtkInformation *outInfo0 = outputVector->GetInformationObject(0); - outInfo0->Set(vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), -1); - vtkInformation *inInfo = inputVector[0]->GetInformationObject(0); - if (inInfo->Has(vtkStreamingDemandDrivenPipeline::TIME_STEPS())) { + if (inInfo->Has(vtkStreamingDemandDrivenPipeline::TIME_STEPS())) + { this->NumberOfTimeSteps = inInfo->Length(vtkStreamingDemandDrivenPipeline::TIME_STEPS()); - } + } return 1; } //--------------------------------------------------------------------------- diff --git a/Filters/General/vtkTimeSourceExample.cxx b/Filters/General/vtkTimeSourceExample.cxx index 5ecb67ddf936ea2327e769b2a9a78e22e775d96c..a169cafa2470db808d1a26e44f246c13c1d459f0 100644 --- a/Filters/General/vtkTimeSourceExample.cxx +++ b/Filters/General/vtkTimeSourceExample.cxx @@ -188,7 +188,7 @@ int vtkTimeSourceExample::RequestInformation( ); } - info->Set(vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), -1); + //info->Set(vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), -1); return 1; } diff --git a/Filters/Geometry/Testing/Python/officeStreamPoints.py b/Filters/Geometry/Testing/Python/officeStreamPoints.py index 0fb2b0242f6ec93f288db1a6396e596971379ba7..67680f604d774d818dfc43195a00ebaa71146f74 100755 --- a/Filters/Geometry/Testing/Python/officeStreamPoints.py +++ b/Filters/Geometry/Testing/Python/officeStreamPoints.py @@ -16,11 +16,6 @@ reader = vtk.vtkStructuredGridReader() reader.SetFileName(VTK_DATA_ROOT + "/Data/office.binary.vtk") reader.Update() -# force a read to occur -# to add coverage for vtkOnePieceExtentTranslator -translator = vtk.vtkOnePieceExtentTranslator() -reader.GetExecutive().SetExtentTranslator(0, translator) - length = reader.GetOutput().GetLength() maxVelocity = reader.GetOutput().GetPointData().GetVectors().GetMaxNorm() maxTime = 35.0 * length / maxVelocity diff --git a/Filters/Geometry/Testing/Tcl/officeStreamPoints.tcl b/Filters/Geometry/Testing/Tcl/officeStreamPoints.tcl index ae898651a550549c9c54c658ed1d73078c2e110b..d30a31987c95367a82185ca9fe44a5b1410c35fb 100644 --- a/Filters/Geometry/Testing/Tcl/officeStreamPoints.tcl +++ b/Filters/Geometry/Testing/Tcl/officeStreamPoints.tcl @@ -13,10 +13,6 @@ vtkStructuredGridReader reader reader SetFileName "$VTK_DATA_ROOT/Data/office.binary.vtk" reader Update;#force a read to occur -# to add coverage for vtkOnePieceExtentTranslator -vtkOnePieceExtentTranslator translator -[reader GetExecutive] SetExtentTranslator 0 translator - set length [[reader GetOutput] GetLength] set maxVelocity \ diff --git a/Filters/Geometry/vtkStructuredGridGeometryFilter.cxx b/Filters/Geometry/vtkStructuredGridGeometryFilter.cxx index 8525af69096ef338be1aee81f2bd2a73191960d3..29a251e53f774c37b12becdab6231a457799ddf2 100644 --- a/Filters/Geometry/vtkStructuredGridGeometryFilter.cxx +++ b/Filters/Geometry/vtkStructuredGridGeometryFilter.cxx @@ -16,7 +16,6 @@ #include "vtkCellArray.h" #include "vtkCellData.h" -#include "vtkExtentTranslator.h" #include "vtkInformation.h" #include "vtkInformationVector.h" #include "vtkObjectFactory.h" @@ -443,77 +442,33 @@ void vtkStructuredGridGeometryFilter::SetExtent(int extent[6]) int vtkStructuredGridGeometryFilter::RequestUpdateExtent( vtkInformation *vtkNotUsed(request), vtkInformationVector **inputVector, - vtkInformationVector *outputVector) + vtkInformationVector *vtkNotUsed(outputVector)) { // get the info objects vtkInformation *inInfo = inputVector[0]->GetInformationObject(0); - vtkInformation *outInfo = outputVector->GetInformationObject(0); - vtkExtentTranslator *translator = vtkExtentTranslator::SafeDownCast( - inInfo->Get(vtkStreamingDemandDrivenPipeline::EXTENT_TRANSLATOR())); int *wholeExt = inInfo->Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT()); // Copy whole extent only if present int ext[6]; - if ( wholeExt ) - { - memcpy( ext, wholeExt, 6 * sizeof( int ) ); - } + memcpy( ext, this->Extent, 6 * sizeof( int ) ); - // Get request from output information - int piece = - outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_PIECE_NUMBER()); - int numPieces = - outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_PIECES()); - - // get the extent associated with the piece. - if (translator == NULL) + if (wholeExt) { - // Default behavior - if (piece != 0) + // Clamp to whole extent + for (int i=0; i<3; i++) { - ext[0] = ext[2] = ext[4] = 0; - ext[1] = ext[3] = ext[5] = -1; + if (ext[2*i] < wholeExt[2*i]) + { + ext[2*i] = wholeExt[2*i]; + } + if (ext[2*i+1] > wholeExt[2*i+1]) + { + ext[2*i+1] = wholeExt[2*i+1]; + } } } - else - { - translator->PieceToExtentThreadSafe(piece, numPieces, 0, wholeExt, ext, - translator->GetSplitMode(),0); - } - - if (ext[0] < this->Extent[0]) - { - ext[0] = this->Extent[0]; - } - if (ext[1] > this->Extent[1]) - { - ext[1] = this->Extent[1]; - } - if (ext[2] < this->Extent[2]) - { - ext[2] = this->Extent[2]; - } - if (ext[3] > this->Extent[3]) - { - ext[3] = this->Extent[3]; - } - if (ext[4] < this->Extent[4]) - { - ext[4] = this->Extent[4]; - } - if (ext[5] > this->Extent[5]) - { - ext[5] = this->Extent[5]; - } - - // Should not be necessary, but will make things clearer. - if (ext[0] > ext[1] || ext[2] > ext[3] || ext[4] > ext[5]) - { - ext[0] = ext[2] = ext[4] = 0; - ext[1] = ext[3] = ext[5] = -1; - } // Set the update extent of the input. inInfo->Set(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT(), ext, 6); diff --git a/Filters/Hybrid/vtkTemporalFractal.cxx b/Filters/Hybrid/vtkTemporalFractal.cxx index ccc277cfeb5dd255b73b11b8cc442ee0c591b688..3d76cf4d74d1df825ff50ee66cb94b759652d8b3 100644 --- a/Filters/Hybrid/vtkTemporalFractal.cxx +++ b/Filters/Hybrid/vtkTemporalFractal.cxx @@ -489,6 +489,7 @@ int vtkTemporalFractal::ProcessRequest( // execute information if(request->Has(vtkDemandDrivenPipeline::REQUEST_INFORMATION())) { + /* if(request->Has(vtkStreamingDemandDrivenPipeline::FROM_OUTPUT_PORT())) { int outputPort = request->Get( @@ -500,6 +501,7 @@ int vtkTemporalFractal::ProcessRequest( vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), -1); } } + */ return this->RequestInformation(request, inputVector, outputVector); } @@ -550,7 +552,6 @@ int vtkTemporalFractal::RequestInformation( trange[1] = 10.0; info->Set(vtkStreamingDemandDrivenPipeline::TIME_RANGE(),trange,2); - info->Set(vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(),-1); return 1; } diff --git a/Filters/Hybrid/vtkTemporalShiftScale.cxx b/Filters/Hybrid/vtkTemporalShiftScale.cxx index f1c814684add59b24d28a08b869d87310cedc14d..76ea743f65dc71e8c5bcf01ee96f67c972fffe1d 100644 --- a/Filters/Hybrid/vtkTemporalShiftScale.cxx +++ b/Filters/Hybrid/vtkTemporalShiftScale.cxx @@ -79,17 +79,6 @@ int vtkTemporalShiftScale::ProcessRequest( // execute information if(request->Has(vtkDemandDrivenPipeline::REQUEST_INFORMATION())) { - if(request->Has(vtkStreamingDemandDrivenPipeline::FROM_OUTPUT_PORT())) - { - int outputPort = request->Get( - vtkStreamingDemandDrivenPipeline::FROM_OUTPUT_PORT()); - vtkInformation* info = outputVector->GetInformationObject(outputPort); - if (info) - { - info->Set( - vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), -1); - } - } return this->RequestInformation(request, inputVector, outputVector); } diff --git a/Filters/Hybrid/vtkTemporalSnapToTimeStep.cxx b/Filters/Hybrid/vtkTemporalSnapToTimeStep.cxx index e2342b7838c0d4c1bde2ee14ffe016ca59461a00..220fa5b64b8e996d3349d856f6245eb49bebbff1 100644 --- a/Filters/Hybrid/vtkTemporalSnapToTimeStep.cxx +++ b/Filters/Hybrid/vtkTemporalSnapToTimeStep.cxx @@ -66,17 +66,6 @@ int vtkTemporalSnapToTimeStep::ProcessRequest( // execute information if(request->Has(vtkDemandDrivenPipeline::REQUEST_INFORMATION())) { - if(request->Has(vtkStreamingDemandDrivenPipeline::FROM_OUTPUT_PORT())) - { - int outputPort = request->Get( - vtkStreamingDemandDrivenPipeline::FROM_OUTPUT_PORT()); - vtkInformation* info = outputVector->GetInformationObject(outputPort); - if (info) - { - info->Set( - vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), -1); - } - } return this->RequestInformation(request, inputVector, outputVector); } diff --git a/Filters/Parallel/vtkCollectGraph.cxx b/Filters/Parallel/vtkCollectGraph.cxx index 746ae221eb7d60d73b9ba7daa40e6b1705f9e475..1f838403ddac4dc1e402d8635ea6f4db2df637e9 100644 --- a/Filters/Parallel/vtkCollectGraph.cxx +++ b/Filters/Parallel/vtkCollectGraph.cxx @@ -73,20 +73,6 @@ vtkCollectGraph::~vtkCollectGraph() this->SetSocketController(0); } -//---------------------------------------------------------------------------- -int vtkCollectGraph::RequestInformation( - vtkInformation *vtkNotUsed(request), - vtkInformationVector **vtkNotUsed(inputVector), - vtkInformationVector *outputVector) -{ - // get the info object - vtkInformation *outInfo = outputVector->GetInformationObject(0); - outInfo->Set(vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), - -1); - - return 1; -} - //-------------------------------------------------------------------------- int vtkCollectGraph::RequestUpdateExtent( vtkInformation *vtkNotUsed(request), diff --git a/Filters/Parallel/vtkCollectGraph.h b/Filters/Parallel/vtkCollectGraph.h index cc8be95be65f7c037c527b281b02d36aa0f51f6c..96a55ccdc596a5228e1bc8fc97a63022472bea20 100644 --- a/Filters/Parallel/vtkCollectGraph.h +++ b/Filters/Parallel/vtkCollectGraph.h @@ -85,7 +85,6 @@ protected: // Data generation method virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *); virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); - virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *); virtual int RequestDataObject(vtkInformation *, vtkInformationVector **, vtkInformationVector *); vtkMultiProcessController *Controller; diff --git a/Filters/Parallel/vtkCollectPolyData.cxx b/Filters/Parallel/vtkCollectPolyData.cxx index 392520bf75d35f211503598fa90e934bf742b7ac..50e25920647bf418524890ac3ddb35eb5efd2976 100644 --- a/Filters/Parallel/vtkCollectPolyData.cxx +++ b/Filters/Parallel/vtkCollectPolyData.cxx @@ -48,20 +48,6 @@ vtkCollectPolyData::~vtkCollectPolyData() this->SetSocketController(0); } -//---------------------------------------------------------------------------- -int vtkCollectPolyData::RequestInformation( - vtkInformation *vtkNotUsed(request), - vtkInformationVector **vtkNotUsed(inputVector), - vtkInformationVector *outputVector) -{ - // get the info object - vtkInformation *outInfo = outputVector->GetInformationObject(0); - outInfo->Set(vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), - -1); - - return 1; -} - //-------------------------------------------------------------------------- int vtkCollectPolyData::RequestUpdateExtent( vtkInformation *vtkNotUsed(request), diff --git a/Filters/Parallel/vtkCollectPolyData.h b/Filters/Parallel/vtkCollectPolyData.h index 547970bdaeb23a5b8450e1b59aa29fc236b73b55..f734b824c41d469f842ce6f9a1fe0efa40caffb4 100644 --- a/Filters/Parallel/vtkCollectPolyData.h +++ b/Filters/Parallel/vtkCollectPolyData.h @@ -62,7 +62,6 @@ protected: // Data generation method virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *); virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); - virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *); vtkMultiProcessController *Controller; vtkSocketController *SocketController; diff --git a/Filters/Parallel/vtkCollectTable.cxx b/Filters/Parallel/vtkCollectTable.cxx index e1807ea461dfe447a6b09e2d09c83fb0f6e5c4e5..613878f67d8b1226f7f51b74a382cf54de041c42 100644 --- a/Filters/Parallel/vtkCollectTable.cxx +++ b/Filters/Parallel/vtkCollectTable.cxx @@ -50,20 +50,6 @@ vtkCollectTable::~vtkCollectTable() this->SetSocketController(0); } -//---------------------------------------------------------------------------- -int vtkCollectTable::RequestInformation( - vtkInformation *vtkNotUsed(request), - vtkInformationVector **vtkNotUsed(inputVector), - vtkInformationVector *outputVector) -{ - // get the info object - vtkInformation *outInfo = outputVector->GetInformationObject(0); - outInfo->Set(vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), - -1); - - return 1; -} - //-------------------------------------------------------------------------- int vtkCollectTable::RequestUpdateExtent( vtkInformation *vtkNotUsed(request), diff --git a/Filters/Parallel/vtkCollectTable.h b/Filters/Parallel/vtkCollectTable.h index 78c6e0aa3bf843f82d4a6ca4bac8fbdc830dcce5..af9150be160919540d8826f186ceb4b277ee5e47 100644 --- a/Filters/Parallel/vtkCollectTable.h +++ b/Filters/Parallel/vtkCollectTable.h @@ -66,7 +66,6 @@ protected: // Data generation method virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *); virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); - virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *); vtkMultiProcessController *Controller; vtkSocketController *SocketController; diff --git a/Filters/Parallel/vtkDuplicatePolyData.cxx b/Filters/Parallel/vtkDuplicatePolyData.cxx index 6a567dd59ba09206b60da8bafe8487f4b02af0ab..33abbc9d7876acaefb685735f7ad9c2c9b4c3043 100644 --- a/Filters/Parallel/vtkDuplicatePolyData.cxx +++ b/Filters/Parallel/vtkDuplicatePolyData.cxx @@ -170,20 +170,6 @@ void vtkDuplicatePolyData::InitializeSchedule(int numProcs) procFlags = NULL; } -//---------------------------------------------------------------------------- -int vtkDuplicatePolyData::RequestInformation( - vtkInformation *vtkNotUsed(request), - vtkInformationVector **vtkNotUsed(inputVector), - vtkInformationVector *outputVector) -{ - // get the info object - vtkInformation *outInfo = outputVector->GetInformationObject(0); - outInfo->Set(vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), - -1); - - return 1; -} - //-------------------------------------------------------------------------- int vtkDuplicatePolyData::RequestUpdateExtent( vtkInformation *vtkNotUsed(request), diff --git a/Filters/Parallel/vtkDuplicatePolyData.h b/Filters/Parallel/vtkDuplicatePolyData.h index ee3c42826234b5884c60b22772e07d85ef053f9b..e91f88c4ae7644c45973fb5a6d591aa06893f7ea 100644 --- a/Filters/Parallel/vtkDuplicatePolyData.h +++ b/Filters/Parallel/vtkDuplicatePolyData.h @@ -76,7 +76,6 @@ protected: virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *); virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); void ClientExecute(vtkPolyData *output); - virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *); vtkMultiProcessController *Controller; int Synchronous; diff --git a/Filters/Parallel/vtkExtractPolyDataPiece.cxx b/Filters/Parallel/vtkExtractPolyDataPiece.cxx index 5749a796fc7a230a38aa9b328afd202dce613108..c49b6e0d960a4a80eacbf158c1bb8cceb0663956 100644 --- a/Filters/Parallel/vtkExtractPolyDataPiece.cxx +++ b/Filters/Parallel/vtkExtractPolyDataPiece.cxx @@ -52,21 +52,6 @@ int vtkExtractPolyDataPiece::RequestUpdateExtent( return 1; } -//============================================================================= -int vtkExtractPolyDataPiece::RequestInformation( - vtkInformation *vtkNotUsed(request), - vtkInformationVector **vtkNotUsed(inputVector), - vtkInformationVector *outputVector) -{ - // get the info object - vtkInformation *outInfo = outputVector->GetInformationObject(0); - - outInfo->Set(vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), - -1); - - return 1; -} - //============================================================================= void vtkExtractPolyDataPiece::ComputeCellTags(vtkIntArray *tags, vtkIdList *pointOwnership, diff --git a/Filters/Parallel/vtkExtractPolyDataPiece.h b/Filters/Parallel/vtkExtractPolyDataPiece.h index 589d14b51b1e505d9338a581d8d60909c36fffe1..aef2d682342e8fe62749736756313f12bcaa42b8 100644 --- a/Filters/Parallel/vtkExtractPolyDataPiece.h +++ b/Filters/Parallel/vtkExtractPolyDataPiece.h @@ -43,7 +43,6 @@ protected: // Usual data generation method int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); - int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *); int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *); // A method for labeling which piece the cells belong to. diff --git a/Filters/Parallel/vtkExtractUnstructuredGridPiece.cxx b/Filters/Parallel/vtkExtractUnstructuredGridPiece.cxx index f86c3d59c0fd4679c07e1225c01f82b9e56470df..c075ea4e892955b8992a78a3b10b214e2214d7c6 100644 --- a/Filters/Parallel/vtkExtractUnstructuredGridPiece.cxx +++ b/Filters/Parallel/vtkExtractUnstructuredGridPiece.cxx @@ -53,6 +53,17 @@ vtkExtractUnstructuredGridPiece::vtkExtractUnstructuredGridPiece() this->CreateGhostCells = 1; } +int vtkExtractUnstructuredGridPiece::RequestInformation( + vtkInformation *vtkNotUsed(request), + vtkInformationVector **vtkNotUsed(inputVector), + vtkInformationVector *outputVector) +{ + vtkInformation* outInfo = outputVector->GetInformationObject(0); + outInfo->Set(vtkStreamingDemandDrivenPipeline::CAN_HANDLE_PIECE_REQUEST(), 1); + + return 1; +} + int vtkExtractUnstructuredGridPiece::RequestUpdateExtent( vtkInformation *vtkNotUsed(request), vtkInformationVector **inputVector, @@ -68,20 +79,6 @@ int vtkExtractUnstructuredGridPiece::RequestUpdateExtent( return 1; } -int vtkExtractUnstructuredGridPiece::RequestInformation( - vtkInformation *vtkNotUsed(request), - vtkInformationVector **vtkNotUsed(inputVector), - vtkInformationVector *outputVector) -{ - // get the info object - vtkInformation *outInfo = outputVector->GetInformationObject(0); - - outInfo->Set(vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), - -1); - - return 1; -} - void vtkExtractUnstructuredGridPiece::ComputeCellTags(vtkIntArray *tags, vtkIdList *pointOwnership, int piece, int numPieces, diff --git a/Filters/Parallel/vtkExtractUnstructuredGridPiece.h b/Filters/Parallel/vtkExtractUnstructuredGridPiece.h index 7f8518387da7a0d5e43207afc4a48fca7e88b91b..59bd0f334d87b356f00b7765e28166334282982a 100644 --- a/Filters/Parallel/vtkExtractUnstructuredGridPiece.h +++ b/Filters/Parallel/vtkExtractUnstructuredGridPiece.h @@ -43,8 +43,8 @@ protected: // Usual data generation method virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); - virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *); virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *); + virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *); // A method for labeling which piece the cells belong to. void ComputeCellTags(vtkIntArray *cellTags, vtkIdList *pointOwnership, diff --git a/Filters/Parallel/vtkPOutlineCornerFilter.cxx b/Filters/Parallel/vtkPOutlineCornerFilter.cxx index 533ede9496b30bd34d1b62d9abc55dd4e774251b..2b3c73454815afe9cd5aa5dc058aa4a73624e530 100644 --- a/Filters/Parallel/vtkPOutlineCornerFilter.cxx +++ b/Filters/Parallel/vtkPOutlineCornerFilter.cxx @@ -93,19 +93,6 @@ int vtkPOutlineCornerFilter::RequestData( return this->Internals->RequestData(request,inputVector,outputVector); } -int vtkPOutlineCornerFilter::RequestInformation( - vtkInformation *vtkNotUsed(request), - vtkInformationVector **vtkNotUsed(inputVector), - vtkInformationVector *outputVector) -{ - // get the info object - vtkInformation *outInfo = outputVector->GetInformationObject(0); - outInfo->Set(vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), - -1); - - return 1; -} - int vtkPOutlineCornerFilter::FillInputPortInformation(int, vtkInformation *info) { info->Set(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkDataSet"); diff --git a/Filters/Parallel/vtkPOutlineCornerFilter.h b/Filters/Parallel/vtkPOutlineCornerFilter.h index e4c0ae9a656f6174b55c8efdb14b0bfff1d9fa2c..0df235e50bd60305abf601177428362a68aead4c 100644 --- a/Filters/Parallel/vtkPOutlineCornerFilter.h +++ b/Filters/Parallel/vtkPOutlineCornerFilter.h @@ -65,7 +65,6 @@ protected: vtkMultiProcessController* Controller; vtkOutlineCornerSource *OutlineCornerSource; virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); - virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *); virtual int FillInputPortInformation(int port, vtkInformation *info); double CornerFactor; diff --git a/Filters/Parallel/vtkPOutlineFilter.cxx b/Filters/Parallel/vtkPOutlineFilter.cxx index d4318eed119a057c21e2750538865781be3e89a8..ea731ce860d34c5c2a72ba15a49380ab39c54488 100644 --- a/Filters/Parallel/vtkPOutlineFilter.cxx +++ b/Filters/Parallel/vtkPOutlineFilter.cxx @@ -59,19 +59,6 @@ int vtkPOutlineFilter::RequestData( return internals.RequestData(request,inputVector,outputVector); } -int vtkPOutlineFilter::RequestInformation( - vtkInformation *vtkNotUsed(request), - vtkInformationVector **vtkNotUsed(inputVector), - vtkInformationVector *outputVector) -{ - // get the info object - vtkInformation *outInfo = outputVector->GetInformationObject(0); - - outInfo->Set(vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), - -1); - return 1; -} - int vtkPOutlineFilter::FillInputPortInformation(int, vtkInformation *info) { info->Set(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkDataSet"); diff --git a/Filters/Parallel/vtkPOutlineFilter.h b/Filters/Parallel/vtkPOutlineFilter.h index 83a6f101e063dcdc71b1b97b462e04869601b4f6..b981c308b18ed29615ba8ff636434ab042239c72 100644 --- a/Filters/Parallel/vtkPOutlineFilter.h +++ b/Filters/Parallel/vtkPOutlineFilter.h @@ -45,7 +45,6 @@ protected: vtkMultiProcessController* Controller; vtkOutlineSource *OutlineSource; virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); - virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *); virtual int FillInputPortInformation(int port, vtkInformation *info); private: diff --git a/Filters/Parallel/vtkPProbeFilter.cxx b/Filters/Parallel/vtkPProbeFilter.cxx index 8fc661d2b3883dff31ad9c4a5d58c6c3c79b7d54..f4e37e67098930426406f73154e4b2f9aea12812 100644 --- a/Filters/Parallel/vtkPProbeFilter.cxx +++ b/Filters/Parallel/vtkPProbeFilter.cxx @@ -22,7 +22,6 @@ #include "vtkObjectFactory.h" #include "vtkPointData.h" #include "vtkCellData.h" -#include "vtkOnePieceExtentTranslator.h" #include "vtkPolyData.h" #include "vtkStreamingDemandDrivenPipeline.h" @@ -43,30 +42,6 @@ vtkPProbeFilter::~vtkPProbeFilter() this->SetController(0); } -//---------------------------------------------------------------------------- -int vtkPProbeFilter::RequestInformation(vtkInformation *request, - vtkInformationVector **inputVector, - vtkInformationVector *outputVector) -{ - this->Superclass::RequestInformation(request, inputVector, outputVector); - vtkInformation *outInfo = outputVector->GetInformationObject(0); - outInfo->Set(vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), - -1); - - // Setup ExtentTranslator so that all downstream piece requests are - // converted to whole extent update requests, as need by this filter. - if (strcmp( - vtkStreamingDemandDrivenPipeline::GetExtentTranslator(outInfo) - ->GetClassName(), "vtkOnePieceExtentTranslator") != 0) - { - vtkExtentTranslator* et = vtkOnePieceExtentTranslator::New(); - vtkStreamingDemandDrivenPipeline::SetExtentTranslator(outInfo, et); - et->Delete(); - } - - return 1; -} - //---------------------------------------------------------------------------- int vtkPProbeFilter::RequestData(vtkInformation *request, vtkInformationVector **inputVector, diff --git a/Filters/Parallel/vtkPProbeFilter.h b/Filters/Parallel/vtkPProbeFilter.h index 1f9e50c53ecbaf31b3ca390001ff7c5cd9d42c6d..ff5cc554c32152eb9e3f285ea19bbbe4407ffcc7 100644 --- a/Filters/Parallel/vtkPProbeFilter.h +++ b/Filters/Parallel/vtkPProbeFilter.h @@ -48,7 +48,6 @@ protected: // Usual data generation method virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); - virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *); virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *); virtual int FillInputPortInformation(int port, vtkInformation *info); diff --git a/Filters/Parallel/vtkTransmitPolyDataPiece.cxx b/Filters/Parallel/vtkTransmitPolyDataPiece.cxx index 8155ac5626f0bf99fef90dc8d3879bbc3d7703d5..523f6e6be8ef04d12f54f633961d6aa083333d0b 100644 --- a/Filters/Parallel/vtkTransmitPolyDataPiece.cxx +++ b/Filters/Parallel/vtkTransmitPolyDataPiece.cxx @@ -84,23 +84,6 @@ int vtkTransmitPolyDataPiece::RequestUpdateExtent( return 1; } -//---------------------------------------------------------------------------- -int vtkTransmitPolyDataPiece::RequestInformation( - vtkInformation *vtkNotUsed(request), - vtkInformationVector **inputVector, - vtkInformationVector *outputVector) -{ - // get the info objects - vtkInformation *inInfo = inputVector[0]->GetInformationObject(0); - vtkInformation *outInfo = outputVector->GetInformationObject(0); - - outInfo->Set(vtkStreamingDemandDrivenPipeline::EXTENT_TRANSLATOR(), - inInfo->Get(vtkStreamingDemandDrivenPipeline::EXTENT_TRANSLATOR())); - outInfo->Set(vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), - -1); - return 1; -} - //---------------------------------------------------------------------------- int vtkTransmitPolyDataPiece::RequestData( vtkInformation *vtkNotUsed(request), diff --git a/Filters/Parallel/vtkTransmitPolyDataPiece.h b/Filters/Parallel/vtkTransmitPolyDataPiece.h index 4d18ad49de8173151292571cfd6c8d45371fc308..3bc012c249c9cb04939132d0b40f5713814057a9 100644 --- a/Filters/Parallel/vtkTransmitPolyDataPiece.h +++ b/Filters/Parallel/vtkTransmitPolyDataPiece.h @@ -55,7 +55,6 @@ protected: int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); void RootExecute(vtkPolyData *input, vtkPolyData *output, vtkInformation *outInfo); void SatelliteExecute(int procId, vtkPolyData *output, vtkInformation *outInfo); - int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *); int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *); int CreateGhostCells; diff --git a/Filters/Parallel/vtkTransmitRectilinearGridPiece.cxx b/Filters/Parallel/vtkTransmitRectilinearGridPiece.cxx index c76c1e0db146c2ae02d5792e87d7d6fa336a75b4..cc15c12698cd696033a80f9f65b55b0e4bc41542 100644 --- a/Filters/Parallel/vtkTransmitRectilinearGridPiece.cxx +++ b/Filters/Parallel/vtkTransmitRectilinearGridPiece.cxx @@ -166,13 +166,17 @@ int vtkTransmitRectilinearGridPiece::RequestData( this->SatelliteExecute(procId, output, outInfo); } - int ghostLevel = outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_GHOST_LEVELS()); + // TODO (berk) + // Fix this + /* + int ghostLevel = outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_GHOST_LEVELS()); if (ghostLevel > 0 && this->CreateGhostCells) { 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, @@ -180,6 +184,7 @@ int vtkTransmitRectilinearGridPiece::RequestData( wholeExt, et); } + */ return 1; } diff --git a/Filters/Parallel/vtkTransmitStructuredGridPiece.cxx b/Filters/Parallel/vtkTransmitStructuredGridPiece.cxx index 36f1e8e9d47cc05fc8f87de4bacc145b4a386f1b..d7831ce88b1299f8f9f4b9845a0b82915c710b04 100644 --- a/Filters/Parallel/vtkTransmitStructuredGridPiece.cxx +++ b/Filters/Parallel/vtkTransmitStructuredGridPiece.cxx @@ -178,6 +178,9 @@ int vtkTransmitStructuredGridPiece::RequestData( this->SatelliteExecute(procId, output, outInfo); } + // TODO (berk) + // Fix this + /* int ghostLevel = outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_GHOST_LEVELS()); if (ghostLevel > 0 && this->CreateGhostCells) { @@ -192,6 +195,7 @@ int vtkTransmitStructuredGridPiece::RequestData( wholeExt, et); } + */ return 1; } diff --git a/Filters/Parallel/vtkTransmitUnstructuredGridPiece.cxx b/Filters/Parallel/vtkTransmitUnstructuredGridPiece.cxx index 657c0a86200f2c8f633a17996825058a10e4ab24..085ae305d450f9450270ec9910710323f5d73f13 100644 --- a/Filters/Parallel/vtkTransmitUnstructuredGridPiece.cxx +++ b/Filters/Parallel/vtkTransmitUnstructuredGridPiece.cxx @@ -87,24 +87,6 @@ int vtkTransmitUnstructuredGridPiece::RequestUpdateExtent( return 1; } -//---------------------------------------------------------------------------- -int vtkTransmitUnstructuredGridPiece::RequestInformation( - vtkInformation *vtkNotUsed(request), - vtkInformationVector **inputVector, - vtkInformationVector *outputVector) -{ - // get the info objects - vtkInformation *inInfo = inputVector[0]->GetInformationObject(0); - vtkInformation *outInfo = outputVector->GetInformationObject(0); - - outInfo->Set(vtkStreamingDemandDrivenPipeline::EXTENT_TRANSLATOR(), - inInfo->Get(vtkStreamingDemandDrivenPipeline::EXTENT_TRANSLATOR())); - outInfo->Set(vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), - -1); - - return 1; -} - //---------------------------------------------------------------------------- int vtkTransmitUnstructuredGridPiece::RequestData( vtkInformation *vtkNotUsed(request), diff --git a/Filters/Parallel/vtkTransmitUnstructuredGridPiece.h b/Filters/Parallel/vtkTransmitUnstructuredGridPiece.h index 4f6354f152800daf19ba61996a5ce935ecec0fab..4e9da5d5c2c628a3657947a955edd657e7369949 100644 --- a/Filters/Parallel/vtkTransmitUnstructuredGridPiece.h +++ b/Filters/Parallel/vtkTransmitUnstructuredGridPiece.h @@ -57,7 +57,6 @@ protected: vtkInformation *outInfo); void SatelliteExecute(int procId, vtkUnstructuredGrid *output, vtkInformation *outInfo); - virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *); virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *); int CreateGhostCells; diff --git a/Filters/ParallelFlowPaths/Testing/Cxx/TestPParticleTracers.cxx b/Filters/ParallelFlowPaths/Testing/Cxx/TestPParticleTracers.cxx index 1f78bd4583eb0ee9a5d7ff570b010ec1a57d0229..4abcc415020256676f9175f4bb1f83cd53bff3a8 100644 --- a/Filters/ParallelFlowPaths/Testing/Cxx/TestPParticleTracers.cxx +++ b/Filters/ParallelFlowPaths/Testing/Cxx/TestPParticleTracers.cxx @@ -186,6 +186,8 @@ protected: double origin[3] = {this->BoundingBox[0],this->BoundingBox[2],this->BoundingBox[4]}; outInfo->Set(vtkDataObject::ORIGIN(),origin,3); + outInfo->Set(vtkAlgorithm::CAN_PRODUCE_SUB_EXTENT(), 1); + return 1; } diff --git a/Filters/ParallelFlowPaths/vtkPStreamTracer.cxx b/Filters/ParallelFlowPaths/vtkPStreamTracer.cxx index 79dd5ca56fde57d3ff5d5c2ea87a411316e6d26f..f7c4b0811df61653712191014761116939a09c65 100644 --- a/Filters/ParallelFlowPaths/vtkPStreamTracer.cxx +++ b/Filters/ParallelFlowPaths/vtkPStreamTracer.cxx @@ -1542,17 +1542,6 @@ int vtkPStreamTracer::RequestUpdateExtent( return 1; } -int vtkPStreamTracer::RequestInformation( - vtkInformation *vtkNotUsed(request), - vtkInformationVector **vtkNotUsed(inputVector), - vtkInformationVector *outputVector) -{ - vtkInformation *outInfo = outputVector->GetInformationObject(0); - outInfo->Set(vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), -1); - - return 1; -} - int vtkPStreamTracer::RequestData( vtkInformation *request, vtkInformationVector **inputVector, diff --git a/Filters/ParallelFlowPaths/vtkPStreamTracer.h b/Filters/ParallelFlowPaths/vtkPStreamTracer.h index 4145e66990143b19907091e63195af16e3e311da..afb4bf9d10c779a09e5bfa656ad2512821004e16 100644 --- a/Filters/ParallelFlowPaths/vtkPStreamTracer.h +++ b/Filters/ParallelFlowPaths/vtkPStreamTracer.h @@ -58,7 +58,6 @@ protected: ~vtkPStreamTracer(); virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); - virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *); virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *); vtkMultiProcessController* Controller; diff --git a/Filters/ParallelImaging/vtkTransmitImageDataPiece.cxx b/Filters/ParallelImaging/vtkTransmitImageDataPiece.cxx index e7c04184c5656554595b1b4c8b453aa4c6ea90bc..ac38e1630b6730e4a0fbd5bafad0712fd3d8c377 100644 --- a/Filters/ParallelImaging/vtkTransmitImageDataPiece.cxx +++ b/Filters/ParallelImaging/vtkTransmitImageDataPiece.cxx @@ -37,13 +37,6 @@ vtkTransmitImageDataPiece::vtkTransmitImageDataPiece() this->CreateGhostCells = 1; this->SetNumberOfInputPorts(1); this->SetController(vtkMultiProcessController::GetGlobalController()); - if (this->Controller) - { - if (this->Controller->GetLocalProcessId() != 0) - { - this->SetNumberOfInputPorts(0); - } - } } //---------------------------------------------------------------------------- @@ -190,6 +183,9 @@ int vtkTransmitImageDataPiece::RequestData( this->SatelliteExecute(procId, output, outInfo); } + // TODO (berk) + // Fix this + /* int ghostLevel = outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_GHOST_LEVELS()); if (ghostLevel > 0 && this->CreateGhostCells) { @@ -204,6 +200,7 @@ int vtkTransmitImageDataPiece::RequestData( wholeExt, et); } + */ return 1; } diff --git a/Filters/ParallelMPI/vtkDistributedDataFilter.cxx b/Filters/ParallelMPI/vtkDistributedDataFilter.cxx index e046f737ea8bf0083bc0e6614fba4c585ca3b850..3c1ff3079ae4d73e732d180c0cc67edae671306e 100644 --- a/Filters/ParallelMPI/vtkDistributedDataFilter.cxx +++ b/Filters/ParallelMPI/vtkDistributedDataFilter.cxx @@ -411,9 +411,6 @@ int vtkDistributedDataFilter::RequestInformation( outInfo->Set(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(), inInfo->Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT()), 6); - outInfo->Set(vtkStreamingDemandDrivenPipeline::EXTENT_TRANSLATOR(), - inInfo->Get(vtkStreamingDemandDrivenPipeline::EXTENT_TRANSLATOR())); - outInfo->Set(vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), -1); return 1; } diff --git a/Filters/Sources/vtkArcSource.cxx b/Filters/Sources/vtkArcSource.cxx index e0ac9bdd64211a3ac91c5bee4f11db87d2b7ca97..1a12fb00acdcd39e615ad62bf8a8204b11378c8e 100644 --- a/Filters/Sources/vtkArcSource.cxx +++ b/Filters/Sources/vtkArcSource.cxx @@ -79,11 +79,13 @@ vtkArcSource::vtkArcSource(int res) int vtkArcSource::RequestInformation( vtkInformation *vtkNotUsed(request), vtkInformationVector **vtkNotUsed(inputVector), - vtkInformationVector *outputVector) + vtkInformationVector *vtkNotUsed(outputVector)) { + /* // get the info object vtkInformation* outInfo = outputVector->GetInformationObject(0); outInfo->Set( vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), -1 ); + */ return 1; } diff --git a/Filters/Sources/vtkConeSource.cxx b/Filters/Sources/vtkConeSource.cxx index b6e9d4a8692fef7f281a5970e6aac16de49a06ff..d86e77c8df5fe75df35ea880eed3be835e8ab932 100644 --- a/Filters/Sources/vtkConeSource.cxx +++ b/Filters/Sources/vtkConeSource.cxx @@ -304,11 +304,13 @@ int vtkConeSource::RequestData( int vtkConeSource::RequestInformation( vtkInformation *vtkNotUsed(request), vtkInformationVector **vtkNotUsed(inputVector), - vtkInformationVector *outputVector) + vtkInformationVector *vtkNotUsed(outputVector)) { + /* vtkInformation *outInfo = outputVector->GetInformationObject(0); outInfo->Set(vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), -1); + */ return 1; } diff --git a/Filters/Sources/vtkLineSource.cxx b/Filters/Sources/vtkLineSource.cxx index 5c4aa4bb57a20707c6a4888baa28f774c3caf377..0ffb95ff288b0d621b8dd8c45eb9877ae828b26f 100644 --- a/Filters/Sources/vtkLineSource.cxx +++ b/Filters/Sources/vtkLineSource.cxx @@ -58,12 +58,14 @@ vtkLineSource::~vtkLineSource() int vtkLineSource::RequestInformation( vtkInformation *vtkNotUsed(request), vtkInformationVector **vtkNotUsed(inputVector), - vtkInformationVector *outputVector) + vtkInformationVector *vtkNotUsed(outputVector)) { + /* // get the info object vtkInformation *outInfo = outputVector->GetInformationObject(0); outInfo->Set(vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), -1); + */ return 1; } diff --git a/Filters/Sources/vtkRegularPolygonSource.cxx b/Filters/Sources/vtkRegularPolygonSource.cxx index 6bea43dbfedb07330789a4a84198f28d5605ac00..66ff9069db32d625b2145c49a5db29266e9e509b 100644 --- a/Filters/Sources/vtkRegularPolygonSource.cxx +++ b/Filters/Sources/vtkRegularPolygonSource.cxx @@ -43,11 +43,13 @@ vtkRegularPolygonSource::vtkRegularPolygonSource() int vtkRegularPolygonSource::RequestInformation( vtkInformation *vtkNotUsed(request), vtkInformationVector **vtkNotUsed(inputVector), - vtkInformationVector *outputVector) + vtkInformationVector *vtkNotUsed(outputVector)) { + /* // get the info object vtkInformation *outInfo = outputVector->GetInformationObject(0); outInfo->Set(vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(),-1); + */ return 1; } diff --git a/Filters/Sources/vtkSelectionSource.cxx b/Filters/Sources/vtkSelectionSource.cxx index 6b58c5d811e2b2f69c4d93d0c8a58843feaa7b65..25db875e787d0f41dd23d0c75b53e22fd8714edc 100644 --- a/Filters/Sources/vtkSelectionSource.cxx +++ b/Filters/Sources/vtkSelectionSource.cxx @@ -258,20 +258,6 @@ void vtkSelectionSource::PrintSelf(ostream& os, vtkIndent indent) os << indent << "QueryString: " << (this->QueryString ? this->QueryString : "NULL") << endl; } -//---------------------------------------------------------------------------- -int vtkSelectionSource::RequestInformation( - vtkInformation* vtkNotUsed(request), - vtkInformationVector** vtkNotUsed(inputVector), - vtkInformationVector* outputVector) -{ - // We can handle multiple piece request. - vtkInformation* info = outputVector->GetInformationObject(0); - info->Set( - vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), -1); - - return 1; -} - //---------------------------------------------------------------------------- int vtkSelectionSource::RequestData( vtkInformation* vtkNotUsed( request ), diff --git a/Filters/Sources/vtkSelectionSource.h b/Filters/Sources/vtkSelectionSource.h index e263d6c4ca486c88cb36bc5fa5719b0bc731833b..cfb85da5e3666a1e839f35d8e5d73b6309fddd99 100644 --- a/Filters/Sources/vtkSelectionSource.h +++ b/Filters/Sources/vtkSelectionSource.h @@ -133,10 +133,6 @@ protected: vtkSelectionSource(); ~vtkSelectionSource(); - virtual int RequestInformation(vtkInformation* request, - vtkInformationVector** inputVector, - vtkInformationVector* outputVector); - virtual int RequestData(vtkInformation* request, vtkInformationVector** inputVector, vtkInformationVector* outputVector); diff --git a/Filters/Sources/vtkSphereSource.cxx b/Filters/Sources/vtkSphereSource.cxx index 639fcc8c9095c52224d1b9452c39d09872cd1842..ce0ad217279878eac530e92984a92d63e514b2c4 100644 --- a/Filters/Sources/vtkSphereSource.cxx +++ b/Filters/Sources/vtkSphereSource.cxx @@ -327,8 +327,12 @@ int vtkSphereSource::RequestInformation( // get the info object vtkInformation *outInfo = outputVector->GetInformationObject(0); + outInfo->Set(vtkStreamingDemandDrivenPipeline::CAN_HANDLE_PIECE_REQUEST(), 1); + + /* outInfo->Set(vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), -1); + */ outInfo->Set(vtkStreamingDemandDrivenPipeline::WHOLE_BOUNDING_BOX(), this->Center[0] - this->Radius, diff --git a/Geovis/Core/vtkGlobeSource.cxx b/Geovis/Core/vtkGlobeSource.cxx index 6ffffd49d0755ae4a5e09ed704ccf87cabb959c3..c65cf294a2c2afc38e7c7f013e469983d4674ffc 100644 --- a/Geovis/Core/vtkGlobeSource.cxx +++ b/Geovis/Core/vtkGlobeSource.cxx @@ -374,8 +374,10 @@ int vtkGlobeSource::RequestInformation( // get the info object vtkInformation *outInfo = outputVector->GetInformationObject(0); + /* outInfo->Set(vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), -1); + */ outInfo->Set(vtkStreamingDemandDrivenPipeline::WHOLE_BOUNDING_BOX(), -this->Radius, this->Radius, diff --git a/IO/EnSight/Testing/Python/EnSight6OfficeBin.py b/IO/EnSight/Testing/Python/EnSight6OfficeBin.py index fb6191b0f681d9a8efecd5c532235505f74efe78..acd6b627200d4ccc834889dcaca258a539ee635f 100755 --- a/IO/EnSight/Testing/Python/EnSight6OfficeBin.py +++ b/IO/EnSight/Testing/Python/EnSight6OfficeBin.py @@ -18,11 +18,7 @@ reader.SetDefaultExecutivePrototype(cdp) del cdp reader.SetCaseFileName("" + str(VTK_DATA_ROOT) + "/Data/EnSight/office6_bin.case") reader.Update() -# to add coverage for vtkOnePieceExtentTranslator -translator = vtk.vtkOnePieceExtentTranslator() -sddp = vtk.vtkStreamingDemandDrivenPipeline() -Outinfo = reader.GetOutputInformation(0) -sddp.SetExtentTranslator(Outinfo,translator) + outline = vtk.vtkStructuredGridOutlineFilter() outline.SetInputConnection(reader.GetOutputPort()) mapOutline = vtk.vtkHierarchicalPolyDataMapper() diff --git a/IO/EnSight/Testing/Python/EnSightOfficeASCII.py b/IO/EnSight/Testing/Python/EnSightOfficeASCII.py index 2ed27da608a57fa52001f25be4291caff4d74bd6..0d2b3da4d590f17a5b240566da85c0394222cab0 100755 --- a/IO/EnSight/Testing/Python/EnSightOfficeASCII.py +++ b/IO/EnSight/Testing/Python/EnSightOfficeASCII.py @@ -17,12 +17,6 @@ cdp = vtk.vtkCompositeDataPipeline() reader.SetDefaultExecutivePrototype(cdp) reader.SetCaseFileName("" + str(VTK_DATA_ROOT) + "/Data/EnSight/office_ascii.case") reader.Update() -# to add coverage for vtkOnePieceExtentTranslator -translator = vtk.vtkOnePieceExtentTranslator() -sddp = vtk.vtkStreamingDemandDrivenPipeline() -#[reader GetOutput] SetExtentTranslator translator -OutInfo = reader.GetOutputInformation(0) -sddp.SetExtentTranslator(OutInfo,translator) outline = vtk.vtkStructuredGridOutlineFilter() # outline SetInputConnection [reader GetOutputPort] outline.SetInputData(reader.GetOutput().GetBlock(0)) diff --git a/IO/EnSight/Testing/Python/EnSightOfficeBin.py b/IO/EnSight/Testing/Python/EnSightOfficeBin.py index 4e43e5aead8568d60b9c1bad85a5eefd9fc6e7e5..22183c080d3db2e86ee82945b23e63b3282d9896 100755 --- a/IO/EnSight/Testing/Python/EnSightOfficeBin.py +++ b/IO/EnSight/Testing/Python/EnSightOfficeBin.py @@ -17,12 +17,6 @@ cdp = vtk.vtkCompositeDataPipeline() reader.SetDefaultExecutivePrototype(cdp) reader.SetCaseFileName("" + str(VTK_DATA_ROOT) + "/Data/EnSight/office_bin.case") reader.Update() -# to add coverage for vtkOnePieceExtentTranslator -translator = vtk.vtkOnePieceExtentTranslator() -#[reader GetOutput] SetExtentTranslator translator -OutInfo = reader.GetOutputInformation(0) -sddp = vtk.vtkStreamingDemandDrivenPipeline() -sddp.SetExtentTranslator(OutInfo,translator) outline = vtk.vtkStructuredGridOutlineFilter() # outline SetInputConnection [reader GetOutputPort] outline.SetInputData(reader.GetOutput().GetBlock(0)) diff --git a/IO/EnSight/Testing/Tcl/EnSight6OfficeBin.tcl b/IO/EnSight/Testing/Tcl/EnSight6OfficeBin.tcl index c2b63298ec815bd4d20cc3f308c829b6acaedfee..2adbd835c65a8395c650f439f82f255b31820b4d 100644 --- a/IO/EnSight/Testing/Tcl/EnSight6OfficeBin.tcl +++ b/IO/EnSight/Testing/Tcl/EnSight6OfficeBin.tcl @@ -17,12 +17,6 @@ cdp Delete reader SetCaseFileName "$VTK_DATA_ROOT/Data/EnSight/office6_bin.case" reader Update -# to add coverage for vtkOnePieceExtentTranslator -vtkOnePieceExtentTranslator translator -vtkStreamingDemandDrivenPipeline sddp -set Outinfo [reader GetOutputInformation 0] -sddp SetExtentTranslator $Outinfo translator - vtkStructuredGridOutlineFilter outline outline SetInputConnection [reader GetOutputPort] vtkHierarchicalPolyDataMapper mapOutline diff --git a/IO/EnSight/Testing/Tcl/EnSightOfficeASCII.tcl b/IO/EnSight/Testing/Tcl/EnSightOfficeASCII.tcl index c0e15d203545cf6819897a559fcf51fd2204bcb4..8319e953bd343b3e24afc66fecd7960e2b4047ef 100644 --- a/IO/EnSight/Testing/Tcl/EnSightOfficeASCII.tcl +++ b/IO/EnSight/Testing/Tcl/EnSightOfficeASCII.tcl @@ -16,13 +16,6 @@ reader SetDefaultExecutivePrototype cdp reader SetCaseFileName "$VTK_DATA_ROOT/Data/EnSight/office_ascii.case" reader Update -# to add coverage for vtkOnePieceExtentTranslator -vtkOnePieceExtentTranslator translator -vtkStreamingDemandDrivenPipeline sddp -#[reader GetOutput] SetExtentTranslator translator -set OutInfo [reader GetOutputInformation 0] -sddp SetExtentTranslator $OutInfo translator - vtkStructuredGridOutlineFilter outline # outline SetInputConnection [reader GetOutputPort] outline SetInputData [[reader GetOutput] GetBlock 0] diff --git a/IO/EnSight/Testing/Tcl/EnSightOfficeBin.tcl b/IO/EnSight/Testing/Tcl/EnSightOfficeBin.tcl index 2b366044057b2ed97aaae7c0d16708543cdde87a..83a4917c5390357c8fdd0ec6d02d3f2ee34ab8c1 100644 --- a/IO/EnSight/Testing/Tcl/EnSightOfficeBin.tcl +++ b/IO/EnSight/Testing/Tcl/EnSightOfficeBin.tcl @@ -16,14 +16,6 @@ reader SetDefaultExecutivePrototype cdp reader SetCaseFileName "$VTK_DATA_ROOT/Data/EnSight/office_bin.case" reader Update -# to add coverage for vtkOnePieceExtentTranslator -vtkOnePieceExtentTranslator translator -#[reader GetOutput] SetExtentTranslator translator -set OutInfo [reader GetOutputInformation 0] -vtkStreamingDemandDrivenPipeline sddp -sddp SetExtentTranslator $OutInfo translator - - vtkStructuredGridOutlineFilter outline # outline SetInputConnection [reader GetOutputPort] outline SetInputData [[reader GetOutput] GetBlock 0] diff --git a/IO/Geometry/vtkMultiBlockPLOT3DReader.cxx b/IO/Geometry/vtkMultiBlockPLOT3DReader.cxx index efdc7806a17b3cb7ede796251539e52dcfa4eae4..b4162a6ea43e138b09ecfa39ee32201a4e804de3 100644 --- a/IO/Geometry/vtkMultiBlockPLOT3DReader.cxx +++ b/IO/Geometry/vtkMultiBlockPLOT3DReader.cxx @@ -897,8 +897,11 @@ int vtkMultiBlockPLOT3DReader::RequestInformation( fclose(qFp); } + /* info->Set( vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), 1); + */ + return 1; } diff --git a/IO/Geometry/vtkParticleReader.cxx b/IO/Geometry/vtkParticleReader.cxx index c9929958f3fb9a3b3c7fd307a481a0615273e339..e5f2b896793f381353ed1d51ec7c0d218f7686ed 100644 --- a/IO/Geometry/vtkParticleReader.cxx +++ b/IO/Geometry/vtkParticleReader.cxx @@ -184,8 +184,8 @@ int vtkParticleReader::RequestInformation( // get the info object vtkInformation *outInfo = outputVector->GetInformationObject(0); - outInfo->Set(vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), - -1); + outInfo->Set(vtkStreamingDemandDrivenPipeline::CAN_HANDLE_PIECE_REQUEST(), + 1); return 1; } diff --git a/IO/Geometry/vtkTecplotReader.cxx b/IO/Geometry/vtkTecplotReader.cxx index a673cd48e10e24295cf947a68679d95fd1c33950..70a6cc097687e89c26c1a7654a53b8dd45860ab1 100644 --- a/IO/Geometry/vtkTecplotReader.cxx +++ b/IO/Geometry/vtkTecplotReader.cxx @@ -582,8 +582,10 @@ int vtkTecplotReader::RequestInformation( vtkInformation * request, return 0; } + /* vtkInformation * info = outputVector->GetInformationObject( 0 ); info->Set( vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), -1 ); + */ this->GetDataArraysList(); diff --git a/IO/Image/vtkImageReader.cxx b/IO/Image/vtkImageReader.cxx index c96e84978a66da4bf17b3db91645343265573451..943e51e4ca90bf3846093ab2b724e7bf993bc06a 100644 --- a/IO/Image/vtkImageReader.cxx +++ b/IO/Image/vtkImageReader.cxx @@ -103,6 +103,8 @@ int vtkImageReader::RequestInformation ( // get the info objects vtkInformation* outInfo = outputVector->GetInformationObject(0); + outInfo->Set(vtkAlgorithm::CAN_PRODUCE_SUB_EXTENT(), 1); + double spacing[3]; int extent[6]; double origin[3]; @@ -213,6 +215,7 @@ void vtkImageReaderUpdate2(vtkImageReader *self, vtkImageData *data, // Get the requested extents. data->GetExtent(inExtent); + // Convert them into to the extent needed from the file. self->ComputeInverseTransformedExtent(inExtent,dataExtent); diff --git a/IO/LSDyna/vtkLSDynaReader.cxx b/IO/LSDyna/vtkLSDynaReader.cxx index 3e5cf89d615ea3327e9728d9095244032eceddd6..ec5b398c2f7d1c43895dbad2e9c20ed03b773f17 100644 --- a/IO/LSDyna/vtkLSDynaReader.cxx +++ b/IO/LSDyna/vtkLSDynaReader.cxx @@ -2367,9 +2367,11 @@ int vtkLSDynaReader::RequestInformation( vtkInformation* vtkNotUsed(request), timeRange[1] = p->TimeValues[p->TimeValues.size() - 1]; outInfo->Set( vtkStreamingDemandDrivenPipeline::TIME_RANGE(), timeRange, 2 ); + /* // Currently, this is a serial reader. outInfo->Set( vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), 1); + */ return 1; } diff --git a/IO/Legacy/vtkStructuredPointsReader.cxx b/IO/Legacy/vtkStructuredPointsReader.cxx index ce29417608d49005565e8ea6e2061298399a5800..b6ff608bcafa88f8e61fae396546a820429b4443 100644 --- a/IO/Legacy/vtkStructuredPointsReader.cxx +++ b/IO/Legacy/vtkStructuredPointsReader.cxx @@ -134,8 +134,6 @@ int vtkStructuredPointsReader::ReadMetaData(vtkInformation *outInfo) } outInfo->Set(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(), 0,dim[0]-1,0,dim[1]-1,0,dim[2]-1); - outInfo->Set(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT(), - 0,dim[0]-1,0,dim[1]-1,0,dim[2]-1); dimsRead = 1; } diff --git a/IO/MPIImage/Testing/Cxx/ParallelIso.cxx b/IO/MPIImage/Testing/Cxx/ParallelIso.cxx index df085c0d33c3d9c8be89fc20e1807888eacdefdd..4546d626586cb068684886db78d6edf41e984460 100644 --- a/IO/MPIImage/Testing/Cxx/ParallelIso.cxx +++ b/IO/MPIImage/Testing/Cxx/ParallelIso.cxx @@ -205,6 +205,7 @@ void MyMain( vtkMultiProcessController *controller, void *arg ) app->AddInputData(outputCopy); outputCopy->Delete(); app->Update(); + outputCopy->RemoveGhostCells(1); renWindow->Render(); *(args->retVal) = diff --git a/IO/NetCDF/vtkNetCDFCAMReader.cxx b/IO/NetCDF/vtkNetCDFCAMReader.cxx index d239f6415edd4c5f9c4d77455d69745afe186568..01e79c6a09e01d34930540b3ef198fbe5809e74e 100644 --- a/IO/NetCDF/vtkNetCDFCAMReader.cxx +++ b/IO/NetCDF/vtkNetCDFCAMReader.cxx @@ -246,8 +246,10 @@ int vtkNetCDFCAMReader::RequestInformation( outInfo->Remove(vtkStreamingDemandDrivenPipeline::TIME_RANGE()); } + /* outInfo->Set( vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), -1); + */ return 1; } diff --git a/IO/NetCDF/vtkNetCDFCFReader.cxx b/IO/NetCDF/vtkNetCDFCFReader.cxx index 0398886688d0d3be2484ae0cf2cd72406b5b5b46..256b52a93d0deb5bd42e21dcd03bb16a3686f0a5 100644 --- a/IO/NetCDF/vtkNetCDFCFReader.cxx +++ b/IO/NetCDF/vtkNetCDFCFReader.cxx @@ -992,6 +992,7 @@ int vtkNetCDFCFReader::RequestInformation(vtkInformation *request, return 0; } + /* // Superclass understands structured data, but we have to handle unstructured // "extents" (pieces). vtkInformation *outInfo = outputVector->GetInformationObject(0); @@ -1001,6 +1002,7 @@ int vtkNetCDFCFReader::RequestInformation(vtkInformation *request, outInfo->Set( vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), -1); } + */ return 1; } diff --git a/IO/NetCDF/vtkSLACParticleReader.cxx b/IO/NetCDF/vtkSLACParticleReader.cxx index 48c2d4099b1c476810ec51dd4366b5ff5c9e4684..613a28a332e5e65aaa48434fa19de7fbd0e4f27b 100644 --- a/IO/NetCDF/vtkSLACParticleReader.cxx +++ b/IO/NetCDF/vtkSLACParticleReader.cxx @@ -257,9 +257,11 @@ int vtkSLACParticleReader::RequestInformation( timeRange[0] = timeRange[1] = timeValue; outInfo->Set(vtkStreamingDemandDrivenPipeline::TIME_RANGE(), timeRange, 2); + /* // Report that we support any number of pieces (but we are only really going // to load anything for piece 0). outInfo->Set(vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), -1); + */ return 1; } diff --git a/IO/Parallel/vtkPChacoReader.cxx b/IO/Parallel/vtkPChacoReader.cxx index 092ffa40ea6feecd643221abfeff383d1961081a..dc85e5eb083296a15153e2b0108ff378b3278480 100644 --- a/IO/Parallel/vtkPChacoReader.cxx +++ b/IO/Parallel/vtkPChacoReader.cxx @@ -103,9 +103,9 @@ int vtkPChacoReader::RequestInformation( // as there are number of processors // get the info object - vtkInformation *outInfo = outputVector->GetInformationObject(0); - outInfo->Set(vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), - -1); + //vtkInformation *outInfo = outputVector->GetInformationObject(0); + //outInfo->Set(vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), + //-1); int retVal = 1; diff --git a/IO/Parallel/vtkPDataSetReader.cxx b/IO/Parallel/vtkPDataSetReader.cxx index 9d8b256654e6028a2548278cd230d566433fc513..8a781146ad5bea5690abdd3b3632e3e85eb827f6 100644 --- a/IO/Parallel/vtkPDataSetReader.cxx +++ b/IO/Parallel/vtkPDataSetReader.cxx @@ -517,12 +517,14 @@ void vtkPDataSetReader::ReadPVTKFileInformation( if (strcmp(param, "numberOfPieces") == 0) { this->SetNumberOfPieces(atoi(val)); + /* if (! this->StructuredFlag) { info->Set( vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), this->NumberOfPieces); } + */ } // Handle parameter: wholeExtent. @@ -761,10 +763,12 @@ void vtkPDataSetReader::ReadVTKFileInformation( vtkErrorMacro("I can not figure out what type of data set this is: " << str); return; } + /* if (this->DataType == VTK_POLY_DATA || this->DataType == VTK_UNSTRUCTURED_GRID) { info->Set(vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), 1); } + */ } void vtkPDataSetReader::SkipFieldData(ifstream *file) @@ -920,15 +924,7 @@ int vtkPDataSetReader::RequestData(vtkInformation* request, return 0; } - // Do not copy the ExtentTranslator (hack) - // reader should probably set the extent translator - // not paraview. - vtkExtentTranslator *tmp = - vtkStreamingDemandDrivenPipeline::GetExtentTranslator(info); - tmp->Register(this); output->CopyStructure(data); - vtkStreamingDemandDrivenPipeline::SetExtentTranslator(info, tmp); - tmp->UnRegister(tmp); output->GetFieldData()->PassData(data->GetFieldData()); output->GetCellData()->PassData(data->GetCellData()); output->GetPointData()->PassData(data->GetPointData()); diff --git a/IO/Parallel/vtkPOpenFOAMReader.cxx b/IO/Parallel/vtkPOpenFOAMReader.cxx index ccf7175ae9a2c3a67d654e08e179a1b3ea245904..e77bb421788ac1a66c22b22dbef2fac4f75398fe 100644 --- a/IO/Parallel/vtkPOpenFOAMReader.cxx +++ b/IO/Parallel/vtkPOpenFOAMReader.cxx @@ -288,10 +288,12 @@ int vtkPOpenFOAMReader::RequestInformation(vtkInformation *request, this->Superclass::Refresh = false; } + /* // it seems MAXIMUM_NUMBER_OF_PIECES must be returned every time // RequestInformation() is called outputVector->GetInformationObject(0)->Set(vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), this->MaximumNumberOfPieces); + */ return 1; } diff --git a/IO/Parallel/vtkPSLACReader.cxx b/IO/Parallel/vtkPSLACReader.cxx index d314dc2085a778ef7c2eb7463f8dd1a90a682f9e..07205da9cfe1f0c317c147803b8b3af20fe04dc3 100644 --- a/IO/Parallel/vtkPSLACReader.cxx +++ b/IO/Parallel/vtkPSLACReader.cxx @@ -417,6 +417,7 @@ int vtkPSLACReader::RequestInformation(vtkInformation *request, return 0; } + /* // We only work if each process requests the piece corresponding to its // own local process id. Hint at this by saying that we support the same // amount of pieces as processes. @@ -426,6 +427,7 @@ int vtkPSLACReader::RequestInformation(vtkInformation *request, outInfo->Set(vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), this->Controller->GetNumberOfProcesses()); } + */ return 1; } diff --git a/IO/ParallelExodus/vtkPExodusIIReader.cxx b/IO/ParallelExodus/vtkPExodusIIReader.cxx index 4bd810e47b237220fc01f0b37f68637e5d877246..58174e705c726078d72cd866d6a53bcb5f5c69ac 100644 --- a/IO/ParallelExodus/vtkPExodusIIReader.cxx +++ b/IO/ParallelExodus/vtkPExodusIIReader.cxx @@ -242,8 +242,8 @@ int vtkPExodusIIReader::RequestInformation( // as there are number of processors // get the info object vtkInformation* outInfo = outputVector->GetInformationObject( 0 ); - outInfo->Set( - vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), -1 ); + //outInfo->Set( + //vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), -1 ); #ifdef DBG_PEXOIIRDR this->Controller->Barrier(); diff --git a/IO/ParallelLSDyna/vtkPLSDynaReader.cxx b/IO/ParallelLSDyna/vtkPLSDynaReader.cxx index 63381da75b6a351e67c3a06a5dba41aac0a974d7..251790f64ebb7baee39fa73a5aa1ca796f3c388c 100644 --- a/IO/ParallelLSDyna/vtkPLSDynaReader.cxx +++ b/IO/ParallelLSDyna/vtkPLSDynaReader.cxx @@ -139,9 +139,11 @@ int vtkPLSDynaReader::RequestInformation( vtkInformation* request, //be a massive chunk of code this->Superclass::RequestInformation(request,iinfo,outputVector); + /* //force an override of the serial reader setting the number of pieces to 1 outInfo->Set(vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), -1); + */ return 1; } diff --git a/IO/VPIC/vtkVPICReader.cxx b/IO/VPIC/vtkVPICReader.cxx index bb32616e2d729534ce49876d66d29065c1aa1645..a79028b4e615d4f2186a5171a84bcca90e5f7f50 100644 --- a/IO/VPIC/vtkVPICReader.cxx +++ b/IO/VPIC/vtkVPICReader.cxx @@ -26,7 +26,6 @@ #include "vtkObjectFactory.h" #include "vtkPointData.h" #include "vtkStreamingDemandDrivenPipeline.h" -#include "vtkTableExtentTranslator.h" #include "vtkToolkits.h" #include "vtkMultiProcessController.h" @@ -207,8 +206,8 @@ int vtkVPICReader::RequestInformation( // Maximum number of pieces (processors) is number of files this->NumberOfPieces = this->vpicData->getNumberOfParts(); - outInfo->Set(vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), - this->NumberOfPieces); + //outInfo->Set(vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), + //this->NumberOfPieces); // Collect temporal information this->NumberOfTimeSteps = this->vpicData->getNumberOfTimeSteps(); @@ -266,9 +265,6 @@ int vtkVPICReader::RequestInformation( outInfo->Set(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(), this->WholeExtent, 6); - // Let the pipeline know how we want the data to be broken up - // Some processors might not get a piece of data to render - vtkTableExtentTranslator *extentTable = vtkTableExtentTranslator::New(); int processorUsed = this->vpicData->getProcessorUsed(); if(this->MPIController) @@ -277,20 +273,7 @@ int vtkVPICReader::RequestInformation( 1, vtkCommunicator::SUM_OP); } - extentTable->SetNumberOfPieces(this->UsedRank); - - for (int piece = 0; piece < this->UsedRank; piece++) { - int subextent[6]; - this->vpicData->getSubExtent(piece, subextent); - extentTable->SetExtentForPiece(piece, subextent); - } this->vpicData->getSubExtent(this->Rank, this->SubExtent); - extentTable->SetPiece(this->Rank); - extentTable->SetWholeExtent(this->WholeExtent); - extentTable->SetExtent(this->SubExtent); - - vtkStreamingDemandDrivenPipeline::SetExtentTranslator(outInfo, extentTable); - extentTable->Delete(); // Reset the SubExtent on this processor to include ghost cells // Leave the subextents in the extent table as the size without ghosts diff --git a/IO/XML/Testing/Python/TestXMLUnstructuredGridIO.py b/IO/XML/Testing/Python/TestXMLUnstructuredGridIO.py index ff67d594a63eb6a3b6ec6502ef2e9a1050bc48e4..9aecad7403e342fe99d85215933ac24264ad8bd6 100755 --- a/IO/XML/Testing/Python/TestXMLUnstructuredGridIO.py +++ b/IO/XML/Testing/Python/TestXMLUnstructuredGridIO.py @@ -110,6 +110,6 @@ ren.GetActiveCamera().SetFocalPoint(3.5, 32, 15) renWin.SetSize(300, 300) renWin.Render() -os.remove(file0) -os.remove(file1) -os.remove(file2) +#os.remove(file0) +#os.remove(file1) +#os.remove(file2) diff --git a/IO/XML/vtkXMLCompositeDataReader.cxx b/IO/XML/vtkXMLCompositeDataReader.cxx index ce6c6db872475fbf18cec3615fd755c9e0f7a7d8..ce391a6f2dd746cf638cb40d9acf2046d67056e7 100644 --- a/IO/XML/vtkXMLCompositeDataReader.cxx +++ b/IO/XML/vtkXMLCompositeDataReader.cxx @@ -383,9 +383,12 @@ int vtkXMLCompositeDataReader::RequestInformation( vtkInformationVector *outputVector) { this->Superclass::RequestInformation(request, inputVector, outputVector); - vtkInformation* info = outputVector->GetInformationObject(0); + + /* + vtkInformation* info = outputVector->GetInformationObject(0); info->Set( vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), -1); + */ return 1; } diff --git a/IO/XML/vtkXMLPStructuredDataWriter.cxx b/IO/XML/vtkXMLPStructuredDataWriter.cxx index 8041a601c6a6757069c89cbee5ad6e4149d093f3..f032f706c1bb38bf41ce9bf8b031df8060914f72 100644 --- a/IO/XML/vtkXMLPStructuredDataWriter.cxx +++ b/IO/XML/vtkXMLPStructuredDataWriter.cxx @@ -15,7 +15,6 @@ #include "vtkXMLPStructuredDataWriter.h" #include "vtkXMLStructuredDataWriter.h" #include "vtkExecutive.h" -#include "vtkExtentTranslator.h" #include "vtkErrorCode.h" #include "vtkDataSet.h" #include "vtkInformation.h" @@ -50,17 +49,8 @@ void vtkXMLPStructuredDataWriter::WritePrimaryElementAttributes(ostream &os, vtk //---------------------------------------------------------------------------- void vtkXMLPStructuredDataWriter::WritePPieceAttributes(int index) { - int extent[6]; - vtkInformation* inInfo = this->GetExecutive()->GetInputInformation(0, 0); - vtkExtentTranslator* et = vtkExtentTranslator::SafeDownCast( - inInfo->Get(vtkStreamingDemandDrivenPipeline::EXTENT_TRANSLATOR())); - - et->SetNumberOfPieces(this->GetNumberOfPieces()); - et->SetWholeExtent(inInfo->Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT())); - et->SetPiece(index); - et->SetGhostLevel(0); - et->PieceToExtent(); - et->GetExtent(extent); + vtkDataSet* input = this->GetInputAsDataSet(); + int* extent = input->GetInformation()->Get(vtkDataObject::DATA_EXTENT()); this->WriteVectorAttribute("Extent", 6, extent); if (this->ErrorCode == vtkErrorCode::OutOfDiskSpaceError) @@ -71,22 +61,27 @@ void vtkXMLPStructuredDataWriter::WritePPieceAttributes(int index) } //---------------------------------------------------------------------------- -vtkXMLWriter* vtkXMLPStructuredDataWriter::CreatePieceWriter(int index) +vtkXMLWriter* vtkXMLPStructuredDataWriter::CreatePieceWriter(int vtkNotUsed(index)) { - int extent[6]; - vtkInformation* inInfo = this->GetExecutive()->GetInputInformation(0, 0); - vtkExtentTranslator* et = vtkExtentTranslator::SafeDownCast( - inInfo->Get(vtkStreamingDemandDrivenPipeline::EXTENT_TRANSLATOR())); - - et->SetNumberOfPieces(this->GetNumberOfPieces()); - et->SetWholeExtent(inInfo->Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT())); - et->SetPiece(index); - et->SetGhostLevel(0); - et->PieceToExtent(); - et->GetExtent(extent); - + // int extent[6]; + // vtkInformation* inInfo = this->GetExecutive()->GetInputInformation(0, 0); + // // TODO (berk) + // // Need to fix this + // vtkExtentTranslator* et = 0; vtkExtentTranslator::SafeDownCast( + // inInfo->Get(vtkStreamingDemandDrivenPipeline::EXTENT_TRANSLATOR())); + + // et->SetNumberOfPieces(this->GetNumberOfPieces()); + // et->SetWholeExtent(inInfo->Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT())); + // et->SetPiece(index); + // et->SetGhostLevel(0); + // et->PieceToExtent(); + // et->GetExtent(extent); + + // TODO (berk) + // We need to ask for a piece from the input somehow. Maybe RequestUpdateExtent + // is enough but needs to be tested. vtkXMLStructuredDataWriter* pWriter = this->CreateStructuredPieceWriter(); - pWriter->SetWriteExtent(extent); + // pWriter->SetWriteExtent(extent); return pWriter; } @@ -115,8 +110,8 @@ int vtkXMLPStructuredDataWriter::RequestUpdateExtent( // The code below asks for an extent based on the number of pieces and // the first piece. This is mainly for the sake of other filters/writers - // that may internally use this reader. Those writers usually delegate - // RequestUpdateExtent() to the internal write and expect it to do the + // that may internally use this writer. Those writers usually delegate + // RequestUpdateExtent() to the internal writer and expect it to do the // right thing. Before this change, vtkXMLPStructuredDataWriter did not // bother setting the update extent because it is taken care of by the // vtkXMLStructuredDataWriter during WritePiece() (see vtkXMLPDataWriter). @@ -126,18 +121,9 @@ int vtkXMLPStructuredDataWriter::RequestUpdateExtent( // the default. This will not effect the behavior when writing multiple // pieces because that does its own RequestUpdateExtent with the right // piece information. - int extent[6]; - vtkExtentTranslator* et = vtkExtentTranslator::SafeDownCast( - inInfo->Get(vtkStreamingDemandDrivenPipeline::EXTENT_TRANSLATOR())); - - et->SetNumberOfPieces(this->GetNumberOfPieces()); - et->SetWholeExtent(inInfo->Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT())); - et->SetPiece(this->StartPiece); - et->SetGhostLevel(0); - et->PieceToExtent(); - et->GetExtent(extent); - - inInfo->Set(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT(), extent, 6); + + vtkStreamingDemandDrivenPipeline::SetUpdateExtent(inInfo, + this->StartPiece, this->GetNumberOfPieces(), 0); return 1; } diff --git a/IO/XML/vtkXMLPUnstructuredDataReader.cxx b/IO/XML/vtkXMLPUnstructuredDataReader.cxx index 4d333a30c627c2db1dba6bf87e08b348ba851c2b..c819f3849ad77b0f4f013b7103a66393e8fd45bd 100644 --- a/IO/XML/vtkXMLPUnstructuredDataReader.cxx +++ b/IO/XML/vtkXMLPUnstructuredDataReader.cxx @@ -131,17 +131,17 @@ void vtkXMLPUnstructuredDataReader::SetupOutputInformation(vtkInformation *outIn // Set the maximum number of pieces that can be provided by this // reader. - outInfo->Set(vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), this->NumberOfPieces); + //outInfo->Set(vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), this->NumberOfPieces); } //---------------------------------------------------------------------------- void vtkXMLPUnstructuredDataReader::CopyOutputInformation(vtkInformation *outInfo, int port) { this->Superclass::CopyOutputInformation(outInfo, port); - vtkInformation *localInfo = - this->GetExecutive()->GetOutputInformation( port ); - outInfo->CopyEntry(localInfo, - vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES() ); + //vtkInformation *localInfo = + //this->GetExecutive()->GetOutputInformation( port ); + //outInfo->CopyEntry(localInfo, + //vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES() ); } //---------------------------------------------------------------------------- diff --git a/IO/XML/vtkXMLStructuredDataReader.cxx b/IO/XML/vtkXMLStructuredDataReader.cxx index a234529781cf1d2b24987b940da7073e5dc1e37b..2b23dc6b7ba474c2b97cb369de8b1f2d3cd2180f 100644 --- a/IO/XML/vtkXMLStructuredDataReader.cxx +++ b/IO/XML/vtkXMLStructuredDataReader.cxx @@ -95,6 +95,15 @@ int vtkXMLStructuredDataReader::ReadPrimaryElement(vtkXMLDataElement* ePrimary) return this->Superclass::ReadPrimaryElement(ePrimary); } +//---------------------------------------------------------------------------- +void vtkXMLStructuredDataReader::SetupOutputInformation( + vtkInformation *outInfo) +{ + this->Superclass::SetupOutputInformation(outInfo); + + outInfo->Set(CAN_PRODUCE_SUB_EXTENT(), 1); +} + //---------------------------------------------------------------------------- void vtkXMLStructuredDataReader::CopyOutputInformation(vtkInformation* outInfo, @@ -219,6 +228,28 @@ void vtkXMLStructuredDataReader::ReadXMLData() outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT(), this->UpdateExtent); + // For debugging + /* + int numPieces = outInfo->Get( + vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_PIECES()); + int piece = outInfo->Get( + vtkStreamingDemandDrivenPipeline::UPDATE_PIECE_NUMBER()); + int numGhosts = outInfo->Get( + vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_GHOST_LEVELS()); + + if (piece == 0) + { + cout << "Piece:" << piece << " " << numPieces << " " << numGhosts << endl; + cout << "Extent: " + << this->UpdateExtent[0] << " " + << this->UpdateExtent[1] << " " + << this->UpdateExtent[2] << " " + << this->UpdateExtent[3] << " " + << this->UpdateExtent[4] << " " + << this->UpdateExtent[5] << endl; + } + */ + vtkDebugMacro("Updating extent " << this->UpdateExtent[0] << " " << this->UpdateExtent[1] << " " << this->UpdateExtent[2] << " " << this->UpdateExtent[3] << " " diff --git a/IO/XML/vtkXMLStructuredDataReader.h b/IO/XML/vtkXMLStructuredDataReader.h index 08522abc9f382b30bda9eaf0b589150ba60330ef..bf08fff73bd61302dc23e3d378344500cd01f9f5 100644 --- a/IO/XML/vtkXMLStructuredDataReader.h +++ b/IO/XML/vtkXMLStructuredDataReader.h @@ -65,6 +65,8 @@ protected: // Pipeline execute data driver. Called by vtkXMLReader. void ReadXMLData(); + void SetupOutputInformation(vtkInformation *outInfo); + // Internal representation of pieces in the file that may have come // from a streamed write. int* PieceExtents; diff --git a/IO/XML/vtkXMLStructuredGridReader.cxx b/IO/XML/vtkXMLStructuredGridReader.cxx index 0b3f3966aa98e2320815bcc811639ef11218cecd..33e2adc08e2a308dbf5b8b8d55060e677a461148 100644 --- a/IO/XML/vtkXMLStructuredGridReader.cxx +++ b/IO/XML/vtkXMLStructuredGridReader.cxx @@ -213,5 +213,6 @@ int vtkXMLStructuredGridReader::ReadPieceData() int vtkXMLStructuredGridReader::FillOutputPortInformation(int, vtkInformation *info) { info->Set(vtkDataObject::DATA_TYPE_NAME(), "vtkStructuredGrid"); + return 1; } diff --git a/IO/XML/vtkXMLUnstructuredDataReader.cxx b/IO/XML/vtkXMLUnstructuredDataReader.cxx index c57115cccb75cb1d5089b8ece656850ddcd1c952..188e545373768aac7b787bf664931aaf63418d27 100644 --- a/IO/XML/vtkXMLUnstructuredDataReader.cxx +++ b/IO/XML/vtkXMLUnstructuredDataReader.cxx @@ -352,21 +352,27 @@ void vtkXMLUnstructuredDataReader::SetupOutputInformation(vtkInformation *outInf { this->Superclass::SetupOutputInformation(outInfo); + if (this->NumberOfPieces > 1) + { + outInfo->Set(vtkStreamingDemandDrivenPipeline::CAN_HANDLE_PIECE_REQUEST(), 1); + } // Set the maximum number of pieces that can be provided by this // reader. - outInfo->Set(vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), - this->NumberOfPieces); + //outInfo->Set(vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), + //this->NumberOfPieces); } //---------------------------------------------------------------------------- void vtkXMLUnstructuredDataReader::CopyOutputInformation(vtkInformation *outInfo, int port) { + this->Superclass::CopyOutputInformation(outInfo, port); + /* vtkInformation *localInfo = this->GetExecutive()->GetOutputInformation( port ); - this->Superclass::CopyOutputInformation(outInfo, port); outInfo->CopyEntry(localInfo, vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES() ); + */ } diff --git a/IO/XML/vtkXMLUnstructuredDataWriter.cxx b/IO/XML/vtkXMLUnstructuredDataWriter.cxx index 0043edbfa2bb7a220101abe4aeb5b557608ca811..117401a8bb16830eae4b9ac7dcb3863607588017 100644 --- a/IO/XML/vtkXMLUnstructuredDataWriter.cxx +++ b/IO/XML/vtkXMLUnstructuredDataWriter.cxx @@ -125,14 +125,16 @@ int vtkXMLUnstructuredDataWriter::ProcessRequest(vtkInformation* request, // but we need to preserve the user's requested number of pieces in // case the input changes later. If MaximumNumberOfPieces is lower // than 1, any number of pieces can be produced by the pipeline. - vtkInformation* inInfo = inputVector[0]->GetInformationObject(0); + //vtkInformation* inInfo = inputVector[0]->GetInformationObject(0); int numPieces = this->NumberOfPieces; + /* int maxPieces = inInfo->Get(vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES()); if((maxPieces > 0) && (this->NumberOfPieces > maxPieces)) { this->NumberOfPieces = maxPieces; } + */ if (this->WritePiece >= 0) { diff --git a/IO/Xdmf2/vtkXdmfReader.cxx b/IO/Xdmf2/vtkXdmfReader.cxx index 55e6d21e0453e9abaff92387c7d30d97460c962f..b78f9822878f04d910055af106702b6aab80d29a 100644 --- a/IO/Xdmf2/vtkXdmfReader.cxx +++ b/IO/Xdmf2/vtkXdmfReader.cxx @@ -272,7 +272,7 @@ int vtkXdmfReader::RequestInformation(vtkInformation *, vtkInformationVector **, vtkXdmfDomain* domain = this->XdmfDocument->GetActiveDomain(); // * Publish the fact that this reader can satisfy any piece request. - outInfo->Set(vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), -1); + //outInfo->Set(vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), -1); this->LastTimeIndex = this->ChooseTimeStep(outInfo); diff --git a/Imaging/Core/Testing/Python/TestMapToRGBABlockStreaming.py b/Imaging/Core/Testing/Python/TestMapToRGBABlockStreaming.py index 87b65734f85904e7300da7a22731ea3eb4be7d80..3c4779bb586479adade2e1a3f31b6055ea66d3e3 100755 --- a/Imaging/Core/Testing/Python/TestMapToRGBABlockStreaming.py +++ b/Imaging/Core/Testing/Python/TestMapToRGBABlockStreaming.py @@ -4,6 +4,8 @@ from vtk.test import Testing from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() +vtk.vtkMultiThreader.SetGlobalMaximumNumberOfThreads(1) + reader = vtk.vtkImageReader() reader.SetDataByteOrderToLittleEndian() reader.SetDataExtent(0,63,0,63,1,93) diff --git a/Imaging/Core/vtkExtractVOI.cxx b/Imaging/Core/vtkExtractVOI.cxx index e8fb1261dbd848b24c5887643630b402bd1c6866..5122d484b98e3a8045a45228721c654c1472c50c 100644 --- a/Imaging/Core/vtkExtractVOI.cxx +++ b/Imaging/Core/vtkExtractVOI.cxx @@ -255,10 +255,6 @@ int vtkExtractVOI::RequestData( vtkDebugMacro(<< "Extracting Grid"); - outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT(), uExt32); - uExt[0] = uExt32[0]; uExt[1] = uExt32[1]; uExt[2] = uExt32[2]; - uExt[3] = uExt32[3]; uExt[4] = uExt32[4]; uExt[5] = uExt32[5]; - inExt32 = input->GetExtent(); inExt[0] = inExt32[0]; inExt[1] = inExt32[1]; inExt[2] = inExt32[2]; inExt[3] = inExt32[3]; inExt[4] = inExt32[4]; inExt[5] = inExt32[5]; @@ -312,6 +308,26 @@ int vtkExtractVOI::RequestData( shift[1] = voi[2] - (shift[1]*rate[1]); shift[2] = voi[4] - (shift[2]*rate[2]); + outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT(), uExt32); + // Input extent can be a subset of the input extent when there are + // multiple pieces. This takes cares of mapping existing input extent + // to what the output update extent would be based on it. + for (i=0; i<3; i++) + { + int ext; + ext = inExt32[2*i] < voi[2*i] ? voi[2*i] : inExt32[2*i]; + uExt32[2*i] = (ext - shift[i]) / rate[i]; + ext = inExt32[2*i+1] > voi[2*i+1] ? voi[2*i+1] : inExt32[2*i+1]; + uExt32[2*i+1] = (ext - shift[i]) / rate[i]; + // Shrink if beyond existing extents + if (uExt32[2*i+1] * rate[i] + shift[i] > inExt32[2*i+1]) + { + uExt32[2*i+1]--; + } + } + uExt[0] = uExt32[0]; uExt[1] = uExt32[1]; uExt[2] = uExt32[2]; + uExt[3] = uExt32[3]; uExt[4] = uExt32[4]; uExt[5] = uExt32[5]; + output->SetExtent(uExt32); // If output same as input, just pass data through diff --git a/Imaging/Core/vtkImageClip.cxx b/Imaging/Core/vtkImageClip.cxx index 5d043d4d8266684c4083892c12cbae6d18309d82..93bd58fb53267461e819e8683d733fb32a073704 100644 --- a/Imaging/Core/vtkImageClip.cxx +++ b/Imaging/Core/vtkImageClip.cxx @@ -204,44 +204,3 @@ int vtkImageClip::RequestData(vtkInformation *vtkNotUsed(request), return 1; } - -//---------------------------------------------------------------------------- -void vtkImageClip::SetOutputWholeExtent(int piece, int numPieces) -{ - vtkInformation *inInfo = this->GetExecutive()->GetInputInformation(0, 0); - vtkInformation *outInfo = this->GetExecutive()->GetOutputInformation(0); - vtkImageData *input = vtkImageData::SafeDownCast( - inInfo->Get(vtkDataObject::DATA_OBJECT())); - vtkImageData *output = vtkImageData::SafeDownCast( - outInfo->Get(vtkDataObject::DATA_OBJECT())); - vtkExtentTranslator *translator; - int ext[6]; - - if (input == NULL) - { - vtkErrorMacro("We must have an input to set the output extent by piece."); - return; - } - if (output == NULL) - { - vtkErrorMacro("We must have an output to set the output extent by piece."); - return; - } - translator = vtkExtentTranslator::SafeDownCast( - outInfo->Get(vtkStreamingDemandDrivenPipeline::EXTENT_TRANSLATOR())); - if (translator == NULL) - { - vtkErrorMacro("Output does not have an extent translator."); - return; - } - - this->GetInputConnection(0, 0)->GetProducer()->UpdateInformation(); - inInfo->Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(),ext); - translator->SetWholeExtent(ext); - translator->SetPiece(piece); - translator->SetNumberOfPieces(numPieces); - translator->SetGhostLevel(0); - translator->PieceToExtent(); - translator->GetExtent(ext); - this->SetOutputWholeExtent(ext); -} diff --git a/Imaging/Core/vtkImageClip.h b/Imaging/Core/vtkImageClip.h index 30d0cebec5278fe73960d0c9adecbdc3183312fe..43b8a8f6f448f54102578d70cae6af24cab1802d 100644 --- a/Imaging/Core/vtkImageClip.h +++ b/Imaging/Core/vtkImageClip.h @@ -55,10 +55,6 @@ public: vtkGetMacro(ClipData, int); vtkBooleanMacro(ClipData, int); - // Description: - // Hack set output by piece - void SetOutputWholeExtent(int piece, int numPieces); - protected: vtkImageClip(); ~vtkImageClip() {} diff --git a/Imaging/Core/vtkImageDataStreamer.cxx b/Imaging/Core/vtkImageDataStreamer.cxx index fa1eaab34f5c8678df4f38c6829e44563c968ef6..4cd1deaa9cc9b390cc864010225555e53d9c039f 100644 --- a/Imaging/Core/vtkImageDataStreamer.cxx +++ b/Imaging/Core/vtkImageDataStreamer.cxx @@ -120,6 +120,7 @@ int vtkImageDataStreamer::ProcessRequest(vtkInformation* request, int inExt[6]; inInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT(), inExt); + output->CopyAndCastFrom(input, inExt); // update the progress diff --git a/Imaging/Core/vtkRTAnalyticSource.cxx b/Imaging/Core/vtkRTAnalyticSource.cxx index 5b7c9fd69d521beb206da06130dda159ebb25ad5..46074ead2c0b7a1e5d0ac071c8cebb0d673f16d6 100644 --- a/Imaging/Core/vtkRTAnalyticSource.cxx +++ b/Imaging/Core/vtkRTAnalyticSource.cxx @@ -15,6 +15,7 @@ #include "vtkRTAnalyticSource.h" #include "vtkDataArray.h" +#include "vtkExtentTranslator.h" #include "vtkImageData.h" #include "vtkInformation.h" #include "vtkInformationVector.h" @@ -117,13 +118,15 @@ int vtkRTAnalyticSource::RequestInformation( outInfo->Set(vtkDataObject::SPACING(), this->SubsampleRate, this->SubsampleRate, this->SubsampleRate); vtkDataObject::SetPointDataActiveScalarInfo(outInfo, VTK_FLOAT, 1); + + outInfo->Set(CAN_PRODUCE_SUB_EXTENT(), 1); + return 1; } -void vtkRTAnalyticSource::ExecuteDataWithInformation(vtkDataObject *output, +void vtkRTAnalyticSource::ExecuteDataWithInformation(vtkDataObject *vtkNotUsed(output), vtkInformation *outInfo) { - vtkImageData *data; float *outPtr; int idxX, idxY, idxZ; int maxX, maxY, maxZ; @@ -136,7 +139,33 @@ void vtkRTAnalyticSource::ExecuteDataWithInformation(vtkDataObject *output, unsigned long count = 0; unsigned long target; - data = this->AllocateOutputData(output, outInfo); + // Split the update extent further based on piece request. + int* execExt = outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT()); + + // For debugging + /* + int numPieces = outInfo->Get( + vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_PIECES()); + int piece = outInfo->Get( + vtkStreamingDemandDrivenPipeline::UPDATE_PIECE_NUMBER()); + int numGhosts = outInfo->Get( + vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_GHOST_LEVELS()); + + if (piece == 0) + { + cout << "Piece:" << piece << " " << numPieces << " " << numGhosts << endl; + cout << "Extent: " + << execExt[0] << " " + << execExt[1] << " " + << execExt[2] << " " + << execExt[3] << " " + << execExt[4] << " " + << execExt[5] << endl; + } + */ + + vtkImageData *data = vtkImageData::GetData(outInfo); + this->AllocateOutputData(data, outInfo, execExt); if (data->GetScalarType() != VTK_FLOAT) { vtkErrorMacro("Execute: This source only outputs floats"); @@ -255,3 +284,14 @@ void vtkRTAnalyticSource::PrintSelf(ostream& os, vtkIndent indent) os << indent << "SubsampleRate: " << this->SubsampleRate << endl; } + +int vtkRTAnalyticSource::FillOutputPortInformation( + int port, vtkInformation* info) +{ + if (!this->Superclass::FillOutputPortInformation(port, info)) + { + return 0; + } + + return 1; +} diff --git a/Imaging/Core/vtkRTAnalyticSource.h b/Imaging/Core/vtkRTAnalyticSource.h index 5e68232fcef22801cf9bcb494e6599d68963d42f..75a15fc89ab4e518752ce2e64d0777290f6cf750 100644 --- a/Imaging/Core/vtkRTAnalyticSource.h +++ b/Imaging/Core/vtkRTAnalyticSource.h @@ -118,6 +118,9 @@ protected: vtkInformationVector **inputVector, vtkInformationVector *outputVector); virtual void ExecuteDataWithInformation(vtkDataObject *data, vtkInformation *outInfo); + + int FillOutputPortInformation(int port, vtkInformation* info); + private: vtkRTAnalyticSource(const vtkRTAnalyticSource&); // Not implemented. void operator=(const vtkRTAnalyticSource&); // Not implemented. diff --git a/Imaging/Hybrid/vtkFastSplatter.cxx b/Imaging/Hybrid/vtkFastSplatter.cxx index a1394c8e47b16b57a324174c422445333626c23d..fe88429934285524acee07552a00f95ded85a326 100644 --- a/Imaging/Hybrid/vtkFastSplatter.cxx +++ b/Imaging/Hybrid/vtkFastSplatter.cxx @@ -19,13 +19,11 @@ #include "vtkFastSplatter.h" -#include "vtkExtentTranslator.h" #include "vtkGraph.h" #include "vtkImageData.h" #include "vtkInformation.h" #include "vtkInformationVector.h" #include "vtkObjectFactory.h" -#include "vtkOnePieceExtentTranslator.h" #include "vtkPoints.h" #include "vtkPointSet.h" #include "vtkStreamingDemandDrivenPipeline.h" @@ -164,17 +162,6 @@ int vtkFastSplatter::RequestInformation( // splatInfo->Get(vtkDataObject::SCALAR_NUMBER_OF_COMPONENTS())); // } - // Setup ExtentTranslator so that all downstream piece requests are - // converted to whole extent update requests, as need by this filter. - if (strcmp( - vtkStreamingDemandDrivenPipeline::GetExtentTranslator(outInfo) - ->GetClassName(), "vtkOnePieceExtentTranslator") != 0) - { - vtkExtentTranslator* et = vtkOnePieceExtentTranslator::New(); - vtkStreamingDemandDrivenPipeline::SetExtentTranslator(outInfo, et); - et->Delete(); - } - return 1; } @@ -215,46 +202,21 @@ int vtkFastSplatter::RequestUpdateExtent(vtkInformation* vtkNotUsed(request), ghostLevel = outInfo->Get( vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_GHOST_LEVELS()); } + inInfo->Set(vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_PIECES(), + numPieces); + inInfo->Set(vtkStreamingDemandDrivenPipeline::UPDATE_PIECE_NUMBER(), + piece); + inInfo->Set(vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_GHOST_LEVELS(), + ghostLevel); + vtkDataObject* data = inInfo->Get(vtkDataObject::DATA_OBJECT()); - // If input extent is piece based, just pass the update requests - // from the output. Even though the output extent is structured, - // piece-based request still gets propagated. This will not work - // if there was no piece based request to start with. That is handled - // above. - if(data->GetExtentType() == VTK_PIECES_EXTENT) - { - inInfo->Set(vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_PIECES(), - numPieces); - inInfo->Set(vtkStreamingDemandDrivenPipeline::UPDATE_PIECE_NUMBER(), - piece); - inInfo->Set(vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_GHOST_LEVELS(), - ghostLevel); - } - else if(data->GetExtentType() == VTK_3D_EXTENT) + if(data->GetExtentType() == VTK_3D_EXTENT) { int* inWholeExtent = inInfo->Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT()); - - vtkExtentTranslator* translator = - vtkExtentTranslator::SafeDownCast( - inInfo->Get(vtkStreamingDemandDrivenPipeline::EXTENT_TRANSLATOR())); - if(translator) - { - translator->SetWholeExtent(inWholeExtent); - translator->SetPiece(piece); - translator->SetNumberOfPieces(numPieces); - translator->SetGhostLevel(ghostLevel); - translator->PieceToExtent(); - inInfo->Set(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT(), - translator->GetExtent(), - 6); - } - else - { - inInfo->Set(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT(), - inWholeExtent, - 6); - } + inInfo->Set(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT(), + inWholeExtent, + 6); } diff --git a/Rendering/Core/vtkGlyph3DMapper.cxx b/Rendering/Core/vtkGlyph3DMapper.cxx index 3b8a962c34a3b90f3b685425913011d202ef8039..5891ef3d09d168b6aac9bf951b923195d2816796 100644 --- a/Rendering/Core/vtkGlyph3DMapper.cxx +++ b/Rendering/Core/vtkGlyph3DMapper.cxx @@ -402,12 +402,6 @@ void vtkGlyph3DMapper::PrintSelf(ostream& os, vtkIndent indent) sourceInfo->Set(vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_GHOST_LEVELS(), 0); } - inInfo->Set(vtkStreamingDemandDrivenPipeline::UPDATE_PIECE_NUMBER(), - outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_PIECE_NUMBER())); - inInfo->Set(vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_PIECES(), - outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_PIECES())); - inInfo->Set(vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_GHOST_LEVELS(), - outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_GHOST_LEVELS())); inInfo->Set(vtkStreamingDemandDrivenPipeline::EXACT_EXTENT(), 1); return 1; diff --git a/Rendering/Core/vtkPolyDataMapper.cxx b/Rendering/Core/vtkPolyDataMapper.cxx index a5b1a36a1e9b60488d76610fcd40498489322de1..f3e75ec38d8132bf4b1faa8a05c28b8470f771d2 100644 --- a/Rendering/Core/vtkPolyDataMapper.cxx +++ b/Rendering/Core/vtkPolyDataMapper.cxx @@ -17,6 +17,7 @@ #include "vtkExecutive.h" #include "vtkObjectFactory.h" #include "vtkInformation.h" +#include "vtkInformationVector.h" #include "vtkMath.h" #include "vtkPolyData.h" #include "vtkRenderWindow.h" @@ -111,6 +112,24 @@ void vtkPolyDataMapper::Update() this->Superclass::Update(); } +//---------------------------------------------------------------------------- +int vtkPolyDataMapper::ProcessRequest(vtkInformation* request, + vtkInformationVector** inputVector, + vtkInformationVector*) +{ + if(request->Has(vtkStreamingDemandDrivenPipeline::REQUEST_UPDATE_EXTENT())) + { + vtkInformation* inInfo = inputVector[0]->GetInformationObject(0); + int currentPiece = this->NumberOfSubPieces * this->Piece; + vtkStreamingDemandDrivenPipeline::SetUpdateExtent( + inInfo, + currentPiece, + this->NumberOfSubPieces * this->NumberOfPieces, + this->GhostLevel); + } + return 1; +} + //---------------------------------------------------------------------------- // Get the bounds for the input of this mapper as // (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax). diff --git a/Rendering/Core/vtkPolyDataMapper.h b/Rendering/Core/vtkPolyDataMapper.h index 9b093ae46cea27eaca3343c8f1490cecaae8c34d..9160be17c3fb26224220a9ec5d66a7e6f0277f5b 100644 --- a/Rendering/Core/vtkPolyDataMapper.h +++ b/Rendering/Core/vtkPolyDataMapper.h @@ -106,6 +106,12 @@ public: // Remove all vertex attributes. virtual void RemoveAllVertexAttributeMappings(); + // Description: + // see vtkAlgorithm for details + virtual int ProcessRequest(vtkInformation*, + vtkInformationVector**, + vtkInformationVector*); + protected: vtkPolyDataMapper(); ~vtkPolyDataMapper() {} diff --git a/Rendering/LIC/vtkImageDataLIC2D.cxx b/Rendering/LIC/vtkImageDataLIC2D.cxx index c21cde264f95827a28d2f634843f7efb4965b299..f4f743d049649ff62dff6bb6a8bcb56429e2e69e 100644 --- a/Rendering/LIC/vtkImageDataLIC2D.cxx +++ b/Rendering/LIC/vtkImageDataLIC2D.cxx @@ -25,7 +25,6 @@ #include "vtkInformationVector.h" #include "vtkStructuredExtent.h" #include "vtkObjectFactory.h" -#include "vtkImageDataLIC2DExtentTranslator.h" #include "vtkLineIntegralConvolution2D.h" #include "vtkFrameBufferObject2.h" #include "vtkRenderbuffer.h" @@ -250,24 +249,6 @@ int vtkImageDataLIC2D::RequestInformation( outInfo->Set(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(), ext, 6); outInfo->Set(vtkDataObject::SPACING(), spacing, 3); - // Setup ExtentTranslator - vtkImageDataLIC2DExtentTranslator* extTranslator = - vtkImageDataLIC2DExtentTranslator::SafeDownCast( - vtkStreamingDemandDrivenPipeline::GetExtentTranslator(outInfo)); - - if (!extTranslator) - { - extTranslator = vtkImageDataLIC2DExtentTranslator::New(); - vtkStreamingDemandDrivenPipeline::SetExtentTranslator(outInfo, extTranslator); - extTranslator->Delete(); - } - - extTranslator->SetAlgorithm(this); - extTranslator->SetInputWholeExtent(wholeExtent); - extTranslator->SetInputExtentTranslator( - vtkExtentTranslator::SafeDownCast( - inInfo->Get(vtkStreamingDemandDrivenPipeline::EXTENT_TRANSLATOR()))); - return 1; } diff --git a/Rendering/Volume/vtkUnstructuredGridVolumeRayCastMapper.cxx b/Rendering/Volume/vtkUnstructuredGridVolumeRayCastMapper.cxx index 3f7ab0df70e63f1b0bf51718ec7fe1d85c440213..f166fb2e0c381c8f2e39913e826acd86aa407b61 100644 --- a/Rendering/Volume/vtkUnstructuredGridVolumeRayCastMapper.cxx +++ b/Rendering/Volume/vtkUnstructuredGridVolumeRayCastMapper.cxx @@ -201,6 +201,12 @@ void vtkUnstructuredGridVolumeRayCastMapper::Render( vtkRenderer *ren, vtkVolume return; } + int inputAlgPort; + vtkAlgorithm* inputAlg = this->GetInputAlgorithm(0, 0, inputAlgPort); + inputAlg->UpdateInformation(); + inputAlg->SetUpdateExtentToWholeExtent(inputAlgPort); + inputAlg->Update(); + this->Scalars = this->GetScalars(this->GetInput(), this->ScalarMode, this->ArrayAccessMode, this->ArrayId, this->ArrayName, @@ -212,12 +218,6 @@ void vtkUnstructuredGridVolumeRayCastMapper::Render( vtkRenderer *ren, vtkVolume return; } - int inputAlgPort; - vtkAlgorithm* inputAlg = this->GetInputAlgorithm(0, 0, inputAlgPort); - inputAlg->UpdateInformation(); - inputAlg->SetUpdateExtentToWholeExtent(inputAlgPort); - inputAlg->Update(); - // Check to make sure we have an appropriate integrator. if (this->RayIntegrator) { diff --git a/Rendering/Volume/vtkUnstructuredGridVolumeZSweepMapper.cxx b/Rendering/Volume/vtkUnstructuredGridVolumeZSweepMapper.cxx index 9b83488d0c8e2576f40a72f6d421c4d84e206221..95a92e2369b8c823705d9f0dc4ac8f7f05c25792 100644 --- a/Rendering/Volume/vtkUnstructuredGridVolumeZSweepMapper.cxx +++ b/Rendering/Volume/vtkUnstructuredGridVolumeZSweepMapper.cxx @@ -2663,6 +2663,12 @@ void vtkUnstructuredGridVolumeZSweepMapper::Render(vtkRenderer *ren, return; } + int inputAlgPort; + vtkAlgorithm* inputAlg = this->GetInputAlgorithm(0, 0, inputAlgPort); + inputAlg->UpdateInformation(); + inputAlg->SetUpdateExtentToWholeExtent(inputAlgPort); + inputAlg->Update(); + this->Scalars = this->GetScalars(this->GetInput(), this->ScalarMode, this->ArrayAccessMode, this->ArrayId, this->ArrayName, @@ -2674,12 +2680,6 @@ void vtkUnstructuredGridVolumeZSweepMapper::Render(vtkRenderer *ren, return; } - int inputAlgPort; - vtkAlgorithm* inputAlg = this->GetInputAlgorithm(0, 0, inputAlgPort); - inputAlg->UpdateInformation(); - inputAlg->SetUpdateExtentToWholeExtent(inputAlgPort); - inputAlg->Update(); - // Check to make sure we have an appropriate integrator. if (this->RayIntegrator) {