diff --git a/Common/DataModel/CMakeLists.txt b/Common/DataModel/CMakeLists.txt index 05ee164840c5680d78bb42baa7d7dbafb3e37cba..20df9b27fd0a1fb870791b27799c9922e903ba66 100644 --- a/Common/DataModel/CMakeLists.txt +++ b/Common/DataModel/CMakeLists.txt @@ -205,7 +205,6 @@ set(Module_SRCS vtkAMRDataInternals.cxx vtkUniformGridAMR.cxx vtkUniformGridAMRDataIterator.cxx - vtkExtentTranslator.cxx # needed by vtkDataSet ) set(${vtk-module}_HDRS diff --git a/Common/DataModel/vtkDataSet.cxx b/Common/DataModel/vtkDataSet.cxx index 3e6edb2c6d6ee3261a46a56055e58c452462ba82..82dffddddfe2038af3ac9d063368b5bb99573332 100644 --- a/Common/DataModel/vtkDataSet.cxx +++ b/Common/DataModel/vtkDataSet.cxx @@ -18,7 +18,6 @@ #include "vtkCellData.h" #include "vtkCellTypes.h" #include "vtkDataSetCellIterator.h" -#include "vtkExtentTranslator.h" #include "vtkGenericCell.h" #include "vtkIdList.h" #include "vtkInformation.h" diff --git a/Common/DataModel/vtkDataSet.h b/Common/DataModel/vtkDataSet.h index 9a0aed1e772d7c95516a964b5ad15cb4f0792705..61c5800db6c8e06a50aa029f672d175afb5f8e70 100644 --- a/Common/DataModel/vtkDataSet.h +++ b/Common/DataModel/vtkDataSet.h @@ -44,7 +44,6 @@ class vtkCell; class vtkCellData; class vtkCellIterator; class vtkCellTypes; -class vtkExtentTranslator; class vtkGenericCell; class vtkIdList; class vtkPointData; diff --git a/Common/ExecutionModel/CMakeLists.txt b/Common/ExecutionModel/CMakeLists.txt index dc05e2e6d3b11bf420a31d716950259eefe865ad..da6e9ab343cdfd8d69a96c123357add2b0cef4e9 100644 --- a/Common/ExecutionModel/CMakeLists.txt +++ b/Common/ExecutionModel/CMakeLists.txt @@ -13,6 +13,7 @@ SET(Module_SRCS vtkDirectedGraphAlgorithm.cxx vtkExecutive.cxx vtkExtentSplitter.cxx + vtkExtentTranslator.cxx vtkFilteringInformationKeyManager.cxx vtkGraphAlgorithm.cxx vtkHierarchicalBoxDataSetAlgorithm.cxx @@ -27,7 +28,6 @@ SET(Module_SRCS vtkInformationExecutivePortVectorKey.cxx vtkMultiBlockDataSetAlgorithm.cxx vtkMultiTimeStepAlgorithm.cxx - vtkOnePieceExtentTranslator.cxx vtkPassInputTypeAlgorithm.cxx vtkPiecewiseFunctionAlgorithm.cxx vtkPiecewiseFunctionShiftScale.cxx @@ -40,7 +40,6 @@ SET(Module_SRCS vtkStreamingDemandDrivenPipeline.cxx vtkStructuredGridAlgorithm.cxx vtkTableAlgorithm.cxx - vtkTableExtentTranslator.cxx vtkSMPProgressObserver.cxx vtkThreadedCompositeDataPipeline.cxx vtkThreadedImageAlgorithm.cxx diff --git a/Common/DataModel/vtkExtentTranslator.cxx b/Common/ExecutionModel/vtkExtentTranslator.cxx similarity index 100% rename from Common/DataModel/vtkExtentTranslator.cxx rename to Common/ExecutionModel/vtkExtentTranslator.cxx diff --git a/Common/DataModel/vtkExtentTranslator.h b/Common/ExecutionModel/vtkExtentTranslator.h similarity index 95% rename from Common/DataModel/vtkExtentTranslator.h rename to Common/ExecutionModel/vtkExtentTranslator.h index 3f519eb7d000375e72f85fe7809cf0702a8cbe10..96a6088e66c341375ac82cc455753de96db2c596 100644 --- a/Common/DataModel/vtkExtentTranslator.h +++ b/Common/ExecutionModel/vtkExtentTranslator.h @@ -19,17 +19,15 @@ // extent. It uses a recursive scheme that splits the largest axis. A hard // coded extent can be used for a starting point. -// .SECTION Caveats -// This object is still under development. #ifndef __vtkExtentTranslator_h #define __vtkExtentTranslator_h -#include "vtkCommonDataModelModule.h" // For export macro +#include "vtkCommonExecutionModelModule.h" // For export macro #include "vtkObject.h" -class VTKCOMMONDATAMODEL_EXPORT vtkExtentTranslator : public vtkObject +class VTKCOMMONEXECUTIONMODEL_EXPORT vtkExtentTranslator : public vtkObject { public: static vtkExtentTranslator *New(); diff --git a/Common/ExecutionModel/vtkOnePieceExtentTranslator.cxx b/Common/ExecutionModel/vtkOnePieceExtentTranslator.cxx deleted file mode 100644 index debf27c2318435c66a29e9b8c44e122eff672fe8..0000000000000000000000000000000000000000 --- a/Common/ExecutionModel/vtkOnePieceExtentTranslator.cxx +++ /dev/null @@ -1,47 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: vtkOnePieceExtentTranslator.cxx - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -#include "vtkOnePieceExtentTranslator.h" - -#include "vtkObjectFactory.h" - -vtkStandardNewMacro(vtkOnePieceExtentTranslator); -//----------------------------------------------------------------------------- -vtkOnePieceExtentTranslator::vtkOnePieceExtentTranslator() -{ -} - -//----------------------------------------------------------------------------- -vtkOnePieceExtentTranslator::~vtkOnePieceExtentTranslator() -{ -} - -//----------------------------------------------------------------------------- -int vtkOnePieceExtentTranslator::PieceToExtentThreadSafe( - int vtkNotUsed(piece), - int vtkNotUsed(numPieces), - int vtkNotUsed(ghostLevel), - int *wholeExtent, int *resultExtent, - int vtkNotUsed(splitMode), - int vtkNotUsed(byPoints)) -{ - memcpy(resultExtent, wholeExtent, sizeof(int)*6); - return 1; -} - -//----------------------------------------------------------------------------- -void vtkOnePieceExtentTranslator::PrintSelf(ostream& os, vtkIndent indent) -{ - this->Superclass::PrintSelf(os, indent); -} diff --git a/Common/ExecutionModel/vtkOnePieceExtentTranslator.h b/Common/ExecutionModel/vtkOnePieceExtentTranslator.h deleted file mode 100644 index 8a3e17e6974ebbe60befbc5e87e6460cc96e7a31..0000000000000000000000000000000000000000 --- a/Common/ExecutionModel/vtkOnePieceExtentTranslator.h +++ /dev/null @@ -1,49 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: vtkOnePieceExtentTranslator.h - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -// .NAME vtkOnePieceExtentTranslator - Returns the whole extent for any piece.. -// vtkOnePieceExtentTranslator returns the whole extent for any piece. - -#ifndef __vtkOnePieceExtentTranslator_h -#define __vtkOnePieceExtentTranslator_h - -#include "vtkCommonExecutionModelModule.h" // For export macro -#include "vtkExtentTranslator.h" - -class VTKCOMMONEXECUTIONMODEL_EXPORT vtkOnePieceExtentTranslator : public vtkExtentTranslator -{ -public: - static vtkOnePieceExtentTranslator* New(); - vtkTypeMacro(vtkOnePieceExtentTranslator, vtkExtentTranslator); - void PrintSelf(ostream& os, vtkIndent indent); - -protected: - vtkOnePieceExtentTranslator(); - ~vtkOnePieceExtentTranslator(); - - virtual int PieceToExtentThreadSafe(int vtkNotUsed(piece), - int vtkNotUsed(numPieces), - int vtkNotUsed(ghostLevel), - int *wholeExtent, int *resultExtent, - int vtkNotUsed(splitMode), - int vtkNotUsed(byPoints)); -private: - vtkOnePieceExtentTranslator(const vtkOnePieceExtentTranslator&); // Not implemented. - void operator=(const vtkOnePieceExtentTranslator&); // Not implemented. - -}; - -#endif - -// VTK-HeaderTest-Exclude: vtkOnePieceExtentTranslator.h diff --git a/Common/ExecutionModel/vtkTableExtentTranslator.cxx b/Common/ExecutionModel/vtkTableExtentTranslator.cxx deleted file mode 100644 index 7c215868e71adaa96c8a6e29bf862c29a0c37296..0000000000000000000000000000000000000000 --- a/Common/ExecutionModel/vtkTableExtentTranslator.cxx +++ /dev/null @@ -1,314 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: vtkTableExtentTranslator.cxx - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -#include "vtkTableExtentTranslator.h" -#include "vtkObjectFactory.h" - -vtkStandardNewMacro(vtkTableExtentTranslator); - -//---------------------------------------------------------------------------- -vtkTableExtentTranslator::vtkTableExtentTranslator() -{ - this->ExtentTable = 0; - this->MaximumGhostLevel = 0; - this->PieceAvailable = 0; - this->NumberOfPiecesInTable = 0; -} - -//---------------------------------------------------------------------------- -vtkTableExtentTranslator::~vtkTableExtentTranslator() -{ - this->SetNumberOfPiecesInTable(0); -} - -//---------------------------------------------------------------------------- -void vtkTableExtentTranslator::PrintSelf(ostream& os, vtkIndent indent) -{ - this->Superclass::PrintSelf(os, indent); - if(this->ExtentTable) - { - vtkIndent nextIndent = indent.GetNextIndent(); - int* extent = this->ExtentTable; - int i; - - os << indent << "ExtentTable: 0: " - << extent[0] << " " << extent[1] << " " - << extent[2] << " " << extent[3] << " " - << extent[4] << " " << extent[5] << "\n"; - for(i=1;i < this->NumberOfPiecesInTable;++i) - { - extent += 6; - os << nextIndent << " " << i << ": " - << extent[0] << " " << extent[1] << " " - << extent[2] << " " << extent[3] << " " - << extent[4] << " " << extent[5] << "\n"; - } - } - else - { - os << indent << "ExtentTable: (none)\n"; - } - os << indent << "MaximumGhostLevel: " << this->MaximumGhostLevel << "\n"; - os << indent << "NumberOfPiecesInTable: " - << this->NumberOfPiecesInTable << "\n"; - if(this->PieceAvailable) - { - vtkIndent nextIndent = indent.GetNextIndent(); - int* available = this->PieceAvailable; - int i; - - os << indent << "PieceAvailable: 0: " << *available << "\n"; - for(i=1;i < this->NumberOfPiecesInTable;++i) - { - ++available; - os << nextIndent << " " << i << ": " - << *available << "\n"; - } - } - else - { - os << indent << "PieceAvailable: (none)\n"; - } -} - -//---------------------------------------------------------------------------- -void vtkTableExtentTranslator::SetNumberOfPieces(int pieces) -{ - // Allocate a table for this number of pieces. - if(this->NumberOfPiecesInTable == 0) - { - this->SetNumberOfPiecesInTable(pieces); - } - this->Superclass::SetNumberOfPieces(pieces); -} - -//---------------------------------------------------------------------------- -void vtkTableExtentTranslator::SetNumberOfPiecesInTable(int pieces) -{ - // Make sure we are really changing the number of pieces. - if(this->NumberOfPiecesInTable == pieces) - { - return; - } - - // The default number of pieces returned is the real number of - // pieces. - this->Superclass::SetNumberOfPieces(pieces); - this->NumberOfPiecesInTable = pieces; - - // Clean out any old extent table. - delete [] this->ExtentTable; - this->ExtentTable = 0; - delete [] this->PieceAvailable; - this->PieceAvailable = 0; - - // Create and initialize a new extent table if there are any pieces. - // Assume all pieces are available. - if(this->NumberOfPiecesInTable > 0) - { - this->ExtentTable = new int[this->NumberOfPiecesInTable*6]; - this->PieceAvailable = new int[this->NumberOfPiecesInTable]; - int i; - for(i=0;i < this->NumberOfPiecesInTable;++i) - { - int* extent = this->ExtentTable + i*6; - extent[0] = extent[2] = extent[4] = 0; - extent[1] = extent[3] = extent[5] = -1; - this->PieceAvailable[i] = 1; - } - } -} - -//---------------------------------------------------------------------------- -void vtkTableExtentTranslator::SetExtentForPiece(int piece, int* extent) -{ - if((!this->ExtentTable) || (piece < 0) || - (piece >= this->NumberOfPiecesInTable)) - { - vtkErrorMacro("Piece " << piece << " does not exist. " - "NumberOfPiecesInTable is " << this->NumberOfPiecesInTable); - return; - } - memcpy(this->ExtentTable+piece*6, extent, sizeof(int)*6); -} - -//---------------------------------------------------------------------------- -void vtkTableExtentTranslator::GetExtentForPiece(int piece, int* extent) -{ - if((!this->ExtentTable) || (piece < 0) || - (piece >= this->NumberOfPiecesInTable)) - { - vtkErrorMacro("Piece " << piece << " does not exist. " - "NumberOfPiecesInTable is " << this->NumberOfPiecesInTable); - extent[0] = extent[2] = extent[4] = 0; - extent[1] = extent[3] = extent[5] = -1; - return; - } - memcpy(extent, this->ExtentTable+piece*6, sizeof(int)*6); -} - -//---------------------------------------------------------------------------- -int* vtkTableExtentTranslator::GetExtentForPiece(int piece) -{ - static int emptyExtent[6] = {0,-1,0,-1,0,-1}; - if((!this->ExtentTable) || (piece < 0) || - (piece >= this->NumberOfPiecesInTable)) - { - vtkErrorMacro("Piece " << piece << " does not exist. " - "NumberOfPiecesInTable is " << this->NumberOfPiecesInTable); - return emptyExtent; - } - return this->ExtentTable+piece*6; -} - -//---------------------------------------------------------------------------- -void vtkTableExtentTranslator::SetPieceAvailable(int piece, int available) -{ - if((!this->ExtentTable) || (piece < 0) || - (piece >= this->NumberOfPiecesInTable)) - { - vtkErrorMacro("Piece " << piece << " does not exist. " - "NumberOfPiecesInTable is " << this->NumberOfPiecesInTable); - return; - } - this->PieceAvailable[piece] = available?1:0; -} - -//---------------------------------------------------------------------------- -int vtkTableExtentTranslator::GetPieceAvailable(int piece) -{ - if((!this->ExtentTable) || (piece < 0) || - (piece >= this->NumberOfPiecesInTable)) - { - vtkErrorMacro("Piece " << piece << " does not exist. " - "NumberOfPiecesInTable is " << this->NumberOfPiecesInTable); - return 0; - } - return this->PieceAvailable[piece]; -} - -//---------------------------------------------------------------------------- -int vtkTableExtentTranslator::PieceToExtentByPoints() -{ - vtkErrorMacro("PieceToExtentByPoints not supported."); - return 0; -} - -//---------------------------------------------------------------------------- -int -vtkTableExtentTranslator::PieceToExtentThreadSafe(int piece, int numPieces, - int ghostLevel, - int *wholeExtent, - int *resultExtent, - int vtkNotUsed(splitMode), - int byPoints) -{ - if (byPoints) - { - vtkErrorMacro("PieceToExtentByPoints not supported."); - return 0; - } - - if((!this->ExtentTable) || (piece < 0) || - (piece >= numPieces)) - { - vtkErrorMacro("Piece " << piece << " does not exist."); - return 0; - } - - if(ghostLevel > this->MaximumGhostLevel) - { - vtkWarningMacro("Ghost level " << ghostLevel - << " is larger than MaximumGhostLevel " - << this->MaximumGhostLevel << ". Using the maximum."); - ghostLevel = this->MaximumGhostLevel; - } - - if(numPieces == 1) - { - // The number of pieces requested is one. Return the whole extent. - memcpy(resultExtent, wholeExtent, sizeof(int)*6); - } - else if(piece < this->NumberOfPiecesInTable) - { - // Return the extent from the table entry. - memcpy(resultExtent, this->ExtentTable+piece*6, sizeof(int)*6); - } - else - { - // The requested piece is beyond the table. Return an empty extent. - resultExtent[0] = 0; - resultExtent[1] = -1; - resultExtent[2] = 0; - resultExtent[3] = -1; - resultExtent[4] = 0; - resultExtent[5] = -1; - } - - if(((resultExtent[1] - resultExtent[0] + 1)* - (resultExtent[3] - resultExtent[2] + 1)* - (resultExtent[5] - resultExtent[4] + 1)) == 0) - { - return 0; - } - - if(ghostLevel > 0) - { - resultExtent[0] -= this->GhostLevel; - resultExtent[1] += this->GhostLevel; - resultExtent[2] -= this->GhostLevel; - resultExtent[3] += this->GhostLevel; - resultExtent[4] -= this->GhostLevel; - resultExtent[5] += this->GhostLevel; - - if (resultExtent[0] < wholeExtent[0]) - { - resultExtent[0] = wholeExtent[0]; - } - if (resultExtent[1] > wholeExtent[1]) - { - resultExtent[1] = wholeExtent[1]; - } - if (resultExtent[2] < wholeExtent[2]) - { - resultExtent[2] = wholeExtent[2]; - } - if (resultExtent[3] > wholeExtent[3]) - { - resultExtent[3] = wholeExtent[3]; - } - if (resultExtent[4] < wholeExtent[4]) - { - resultExtent[4] = wholeExtent[4]; - } - if (resultExtent[5] > wholeExtent[5]) - { - resultExtent[5] = wholeExtent[5]; - } - } - - return 1; - -} - -//---------------------------------------------------------------------------- -int vtkTableExtentTranslator::PieceToExtent() -{ - return this->PieceToExtentThreadSafe(this->Piece, this->NumberOfPieces, - this->GhostLevel, - this->WholeExtent, - this->Extent, - this->SplitMode, - 0); -} diff --git a/Common/ExecutionModel/vtkTableExtentTranslator.h b/Common/ExecutionModel/vtkTableExtentTranslator.h deleted file mode 100644 index 644326b084f1a3e42353834f71543767a6b85269..0000000000000000000000000000000000000000 --- a/Common/ExecutionModel/vtkTableExtentTranslator.h +++ /dev/null @@ -1,110 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: vtkTableExtentTranslator.h - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -// .NAME vtkTableExtentTranslator - Extent translation through lookup table. -// .SECTION Description -// vtkTableExtentTranslator provides a vtkExtentTranslator that is -// programmed with a specific extent corresponding to each piece -// number. Readers can provide this to an application to allow the -// pipeline to execute using the same piece breakdown that is provided -// in the input file. - -#ifndef __vtkTableExtentTranslator_h -#define __vtkTableExtentTranslator_h - -#include "vtkCommonExecutionModelModule.h" // For export macro -#include "vtkExtentTranslator.h" - -class VTKCOMMONEXECUTIONMODEL_EXPORT vtkTableExtentTranslator : public vtkExtentTranslator -{ -public: - vtkTypeMacro(vtkTableExtentTranslator,vtkExtentTranslator); - void PrintSelf(ostream& os, vtkIndent indent); - - static vtkTableExtentTranslator* New(); - - // Description: - - // Set the number of pieces into which the whole extent will be - // split. If this is 1 then the whole extent will be returned. If - // this is more than the number of pieces in the table then the - // extra pieces will be empty data. If this is more than one but - // less than the number of pieces in the table then only this many - // pieces will be returned (FIXME). - void SetNumberOfPieces(int pieces); - - // Description: - // Set the real number of pieces in the extent table. - void SetNumberOfPiecesInTable(int pieces); - vtkGetMacro(NumberOfPiecesInTable, int); - - // Description: - // Called to translate the current piece into an extent. This is - // not thread safe. - int PieceToExtent(); - - // Description: - // Not supported by this subclass of vtkExtentTranslator. - int PieceToExtentByPoints(); - - // Description: - // Not supported by this subclass of vtkExtentTranslator. - int PieceToExtentThreadSafe(int piece, int numPieces, - int ghostLevel, int *wholeExtent, - int *resultExtent, int splitMode, - int byPoints); - - // Description: - // Set the extent to be used for a piece. This sets the extent table - // entry for the piece. - virtual void SetExtentForPiece(int piece, int* extent); - - // Description: - // Get the extent table entry for the given piece. This is only for - // code that is setting up the table. Extent translation should - // always be done through the PieceToExtent method. - virtual void GetExtentForPiece(int piece, int* extent); - virtual int* GetExtentForPiece(int piece); - - // Description: - // Set the maximum ghost level that can be requested. This can be - // used by a reader to make sure an extent request does not go - // outside the boundaries of the piece's file. - vtkSetMacro(MaximumGhostLevel, int); - vtkGetMacro(MaximumGhostLevel, int); - - // Description: - // Get/Set whether the given piece is available. Requesting a piece - // that is not available will produce errors in the pipeline. - virtual void SetPieceAvailable(int piece, int available); - virtual int GetPieceAvailable(int piece); - -protected: - vtkTableExtentTranslator(); - ~vtkTableExtentTranslator(); - - // Store the extent table in a single array. Every 6 values form an extent. - int* ExtentTable; - int NumberOfPiecesInTable; - int MaximumGhostLevel; - - // Store a flag for the availability of each piece. - int* PieceAvailable; - -private: - vtkTableExtentTranslator(const vtkTableExtentTranslator&); // Not implemented. - void operator=(const vtkTableExtentTranslator&); // Not implemented. -}; - -#endif diff --git a/Filters/AMR/vtkImageToAMR.cxx b/Filters/AMR/vtkImageToAMR.cxx index 8411104b6b2231d4e6ed72d79ad149a4b48d9acb..effb7147ab18bd127469a7163aa9ba20501aec7e 100644 --- a/Filters/AMR/vtkImageToAMR.cxx +++ b/Filters/AMR/vtkImageToAMR.cxx @@ -23,7 +23,6 @@ #include "vtkObjectFactory.h" #include "vtkOverlappingAMR.h" #include "vtkSmartPointer.h" -#include "vtkExtentTranslator.h" #include "vtkTuple.h" #include "vtkAMRBox.h" #include "vtkUniformGrid.h" diff --git a/Filters/Core/vtkGridSynchronizedTemplates3D.cxx b/Filters/Core/vtkGridSynchronizedTemplates3D.cxx index 0c26c3669ea6de67a73191f4b8d0f3754db4c22e..aca0e79c971bae210d7dc77f73caaa51c7214d8a 100644 --- a/Filters/Core/vtkGridSynchronizedTemplates3D.cxx +++ b/Filters/Core/vtkGridSynchronizedTemplates3D.cxx @@ -18,7 +18,6 @@ #include "vtkCellData.h" #include "vtkCharArray.h" #include "vtkDoubleArray.h" -#include "vtkExtentTranslator.h" #include "vtkFloatArray.h" #include "vtkGridSynchronizedTemplates3D.h" #include "vtkInformation.h" diff --git a/Filters/Core/vtkRectilinearSynchronizedTemplates.cxx b/Filters/Core/vtkRectilinearSynchronizedTemplates.cxx index 242303c5a7c42ae0c04c7812b04c961d08a61adc..c4ad3d0302d5d4760c43063e123c79d346412d0d 100644 --- a/Filters/Core/vtkRectilinearSynchronizedTemplates.cxx +++ b/Filters/Core/vtkRectilinearSynchronizedTemplates.cxx @@ -18,7 +18,6 @@ #include "vtkCellData.h" #include "vtkCharArray.h" #include "vtkDoubleArray.h" -#include "vtkExtentTranslator.h" #include "vtkFloatArray.h" #include "vtkInformation.h" #include "vtkInformationVector.h" diff --git a/Filters/Core/vtkSynchronizedTemplates3D.cxx b/Filters/Core/vtkSynchronizedTemplates3D.cxx index 1513c179bdd8e8d7cfdfe220f337ee28b6dcb29d..2141685f68f60e6dd3d635780a87905513a4da65 100644 --- a/Filters/Core/vtkSynchronizedTemplates3D.cxx +++ b/Filters/Core/vtkSynchronizedTemplates3D.cxx @@ -18,7 +18,6 @@ #include "vtkCellData.h" #include "vtkCharArray.h" #include "vtkDoubleArray.h" -#include "vtkExtentTranslator.h" #include "vtkFloatArray.h" #include "vtkInformation.h" #include "vtkInformationIntegerVectorKey.h" diff --git a/Filters/Core/vtkSynchronizedTemplatesCutter3D.cxx b/Filters/Core/vtkSynchronizedTemplatesCutter3D.cxx index 3df0710032d350330556cbba5c81f1d0e98d6dc9..158c53264b81352bafa28323bc1e0121fad739aa 100644 --- a/Filters/Core/vtkSynchronizedTemplatesCutter3D.cxx +++ b/Filters/Core/vtkSynchronizedTemplatesCutter3D.cxx @@ -18,7 +18,6 @@ #include "vtkCellData.h" #include "vtkCharArray.h" #include "vtkDoubleArray.h" -#include "vtkExtentTranslator.h" #include "vtkFloatArray.h" #include "vtkImplicitFunction.h" #include "vtkInformation.h" diff --git a/Filters/Extraction/vtkExtractArraysOverTime.cxx b/Filters/Extraction/vtkExtractArraysOverTime.cxx index 7c424e561167621315e38c0b0780956eb174407a..9cc8fd6692525fe626159048c3b7f4f43d31ec2b 100644 --- a/Filters/Extraction/vtkExtractArraysOverTime.cxx +++ b/Filters/Extraction/vtkExtractArraysOverTime.cxx @@ -30,7 +30,6 @@ #include "vtkNew.h" #include "vtkObjectFactory.h" #include "vtkOrderStatistics.h" -#include "vtkOnePieceExtentTranslator.h" #include "vtkPointData.h" #include "vtkTable.h" #include "vtkSelection.h" @@ -847,11 +846,6 @@ int vtkExtractArraysOverTime::RequestInformation( outInfo->Remove(vtkStreamingDemandDrivenPipeline::TIME_RANGE()); } - /* - * This filter is no longer producing rectilinear grid, instead it is - * producing a multiblock of rectilinear grids. That being the case, we do not - * need any specific extent translation - */ return 1; } @@ -872,10 +866,6 @@ int vtkExtractArraysOverTime::RequestUpdateExtent( inInfo1->Set(vtkStreamingDemandDrivenPipeline::UPDATE_TIME_STEP(), timeReq); } - /* Again, extent related stuff is no longer relevant since we are not - * producing rectilinear grid as the output, instead it is multiblock. - */ - return 1; } diff --git a/Filters/Extraction/vtkExtractTemporalFieldData.h b/Filters/Extraction/vtkExtractTemporalFieldData.h index a1d11132bf7cf99de69ced8340641649c88056b5..c81fb9c7680a2312acc91cc3edb41a66cfbe812a 100644 --- a/Filters/Extraction/vtkExtractTemporalFieldData.h +++ b/Filters/Extraction/vtkExtractTemporalFieldData.h @@ -23,9 +23,6 @@ // This algorithm does not produce a TIME_STEPS or TIME_RANGE information // because it works across time. // .Section Caveat -// vtkExtractTemporalFieldData puts a vtkOnePieceExtentTranslator in the -// output during RequestInformation(). As a result, the same whole -// extented is produced independent of the piece request. // This algorithm works only with source that produce TIME_STEPS(). // Continuous time range is not yet supported. diff --git a/Filters/General/vtkMultiBlockDataGroupFilter.cxx b/Filters/General/vtkMultiBlockDataGroupFilter.cxx index a90cd1081356d85adfeb44f1692cc1169bd46ed6..1864520b5ac9db603dd73c90350526af4ceb296a 100644 --- a/Filters/General/vtkMultiBlockDataGroupFilter.cxx +++ b/Filters/General/vtkMultiBlockDataGroupFilter.cxx @@ -20,7 +20,6 @@ #include "vtkInformationVector.h" #include "vtkMultiBlockDataSet.h" #include "vtkObjectFactory.h" -#include "vtkOnePieceExtentTranslator.h" #include "vtkStreamingDemandDrivenPipeline.h" vtkStandardNewMacro(vtkMultiBlockDataGroupFilter); diff --git a/Filters/General/vtkTableToStructuredGrid.cxx b/Filters/General/vtkTableToStructuredGrid.cxx index 0474797a1a0ece98a15c80a4b78c64bed7c5c2ae..ab284d3526d926e7f956adbc4a5fa6091d3e06ed 100644 --- a/Filters/General/vtkTableToStructuredGrid.cxx +++ b/Filters/General/vtkTableToStructuredGrid.cxx @@ -18,7 +18,6 @@ #include "vtkInformation.h" #include "vtkInformationVector.h" #include "vtkObjectFactory.h" -#include "vtkOnePieceExtentTranslator.h" #include "vtkPointData.h" #include "vtkPoints.h" #include "vtkStreamingDemandDrivenPipeline.h" diff --git a/IO/NetCDF/vtkMPASReader.cxx b/IO/NetCDF/vtkMPASReader.cxx index bc337b627baaec9da6c4e45e7bdfcf6807663a8b..d219c2a78b866a8ad52941d6dc99184b64b2f063 100644 --- a/IO/NetCDF/vtkMPASReader.cxx +++ b/IO/NetCDF/vtkMPASReader.cxx @@ -81,7 +81,6 @@ PURPOSE. See the above copyright notice for more information. #include "vtkSmartPointer.h" #include "vtkStreamingDemandDrivenPipeline.h" #include "vtkStringArray.h" -#include "vtkTableExtentTranslator.h" #include "vtkToolkits.h" #include "vtkUnstructuredGrid.h" diff --git a/IO/XML/vtkXMLPStructuredDataReader.cxx b/IO/XML/vtkXMLPStructuredDataReader.cxx index d8ff53abd14796a0be0f686a2d461c72950aba9a..106a2bb7ff57b1ba8bc21b0bc70133765783f65a 100644 --- a/IO/XML/vtkXMLPStructuredDataReader.cxx +++ b/IO/XML/vtkXMLPStructuredDataReader.cxx @@ -20,7 +20,6 @@ #include "vtkInformation.h" #include "vtkInformationVector.h" #include "vtkStreamingDemandDrivenPipeline.h" -//#include "vtkTableExtentTranslator.h" #include "vtkXMLDataElement.h" #include "vtkXMLStructuredDataReader.h" @@ -30,7 +29,6 @@ //---------------------------------------------------------------------------- vtkXMLPStructuredDataReader::vtkXMLPStructuredDataReader() { - //this->ExtentTranslator = vtkTableExtentTranslator::New(); this->ExtentSplitter = vtkExtentSplitter::New(); this->PieceExtents = 0; memset(this->UpdateExtent, 0, sizeof(this->UpdateExtent)); @@ -53,7 +51,6 @@ vtkXMLPStructuredDataReader::~vtkXMLPStructuredDataReader() { if(this->NumberOfPieces) { this->DestroyPieces(); } this->ExtentSplitter->Delete(); - //this->ExtentTranslator->Delete(); } //---------------------------------------------------------------------------- @@ -62,13 +59,6 @@ void vtkXMLPStructuredDataReader::PrintSelf(ostream& os, vtkIndent indent) this->Superclass::PrintSelf(os, indent); } -//---------------------------------------------------------------------------- -vtkExtentTranslator* vtkXMLPStructuredDataReader::GetExtentTranslator() -{ - return 0; - //return this->ExtentTranslator; -} - //---------------------------------------------------------------------------- vtkIdType vtkXMLPStructuredDataReader::GetNumberOfPoints() { @@ -249,8 +239,6 @@ void vtkXMLPStructuredDataReader::SetupOutputData() void vtkXMLPStructuredDataReader::SetupPieces(int numPieces) { this->Superclass::SetupPieces(numPieces); - //this->ExtentTranslator->SetNumberOfPiecesInTable(this->NumberOfPieces); - //this->ExtentTranslator->SetMaximumGhostLevel(this->GhostLevel); this->PieceExtents = new int[6*this->NumberOfPieces]; int i; for(i=0;i < this->NumberOfPieces;++i) @@ -284,11 +272,6 @@ int vtkXMLPStructuredDataReader::ReadPiece(vtkXMLDataElement* ePiece) return 0; } - // Set this table entry in the extent translator. - //this->ExtentTranslator->SetExtentForPiece(this->Piece, pieceExtent); - //this->ExtentTranslator->SetPieceAvailable(this->Piece, - // this->CanReadPiece(this->Piece)); - return 1; } diff --git a/IO/XML/vtkXMLPStructuredDataReader.h b/IO/XML/vtkXMLPStructuredDataReader.h index 3f18bc779f8ab4ced01864b758b17496fbe21079..9dbfca2eee89863049195fa3b6f00eb666f94aa5 100644 --- a/IO/XML/vtkXMLPStructuredDataReader.h +++ b/IO/XML/vtkXMLPStructuredDataReader.h @@ -28,8 +28,6 @@ #include "vtkXMLPDataReader.h" class vtkExtentSplitter; -class vtkExtentTranslator; -//class vtkTableExtentTranslator; class vtkXMLStructuredDataReader; class VTKIOXML_EXPORT vtkXMLPStructuredDataReader : public vtkXMLPDataReader @@ -38,14 +36,6 @@ public: vtkTypeMacro(vtkXMLPStructuredDataReader,vtkXMLPDataReader); void PrintSelf(ostream& os, vtkIndent indent); - // Description: - // Get an extent translator that will create pieces matching the - // input file's piece breakdown. This can be used further down the - // pipeline to prevent reading from outside this process's piece. - // The translator is only valid after an UpdateInformation has been - // called. - virtual vtkExtentTranslator* GetExtentTranslator(); - // For the specified port, copy the information this reader sets up in // SetupOutputInformation to outInfo virtual void CopyOutputInformation(vtkInformation *outInfo, int port); @@ -77,7 +67,6 @@ protected: vtkDataArray* inArray, vtkDataArray* outArray); int ComputePieceSubExtents(); - //vtkTableExtentTranslator* ExtentTranslator; vtkExtentSplitter* ExtentSplitter; // The extent to be updated in the output. diff --git a/Imaging/Core/vtkImageClip.cxx b/Imaging/Core/vtkImageClip.cxx index 93bd58fb53267461e819e8683d733fb32a073704..11cedd38eb8bdabb0a45ea69f05e8227b7fb0af4 100644 --- a/Imaging/Core/vtkImageClip.cxx +++ b/Imaging/Core/vtkImageClip.cxx @@ -16,7 +16,6 @@ #include "vtkAlgorithmOutput.h" #include "vtkCellData.h" -#include "vtkExtentTranslator.h" #include "vtkImageData.h" #include "vtkInformation.h" #include "vtkInformationVector.h" diff --git a/Imaging/Core/vtkRTAnalyticSource.cxx b/Imaging/Core/vtkRTAnalyticSource.cxx index 46074ead2c0b7a1e5d0ac071c8cebb0d673f16d6..eb61d3b08358ad4a20bfb36e25a81f0b41a7b4fc 100644 --- a/Imaging/Core/vtkRTAnalyticSource.cxx +++ b/Imaging/Core/vtkRTAnalyticSource.cxx @@ -15,7 +15,6 @@ #include "vtkRTAnalyticSource.h" #include "vtkDataArray.h" -#include "vtkExtentTranslator.h" #include "vtkImageData.h" #include "vtkInformation.h" #include "vtkInformationVector.h" diff --git a/Rendering/LIC/CMakeLists.txt b/Rendering/LIC/CMakeLists.txt index 782a408b03bea866ae4b7e18e670c91a66a75c08..3a5cc38eb349d5b20db57dee5c83dd6c67c93da5 100644 --- a/Rendering/LIC/CMakeLists.txt +++ b/Rendering/LIC/CMakeLists.txt @@ -1,6 +1,5 @@ set(Module_SRCS vtkImageDataLIC2D.cxx - vtkImageDataLIC2DExtentTranslator.cxx vtkLineIntegralConvolution2D.cxx vtkPixelTransfer.cxx vtkStructuredGridLIC2D.cxx diff --git a/Rendering/LIC/vtkImageDataLIC2DExtentTranslator.cxx b/Rendering/LIC/vtkImageDataLIC2DExtentTranslator.cxx deleted file mode 100644 index 2ba97a5d6a6feec408fcf0b8f103ba665d868714..0000000000000000000000000000000000000000 --- a/Rendering/LIC/vtkImageDataLIC2DExtentTranslator.cxx +++ /dev/null @@ -1,121 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: vtkImageDataLIC2DExtentTranslator.cxx - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -#include "vtkImageDataLIC2DExtentTranslator.h" - -#include "vtkObjectFactory.h" -#include "vtkImageDataLIC2D.h" - -//---------------------------------------------------------------------------- -vtkStandardNewMacro(vtkImageDataLIC2DExtentTranslator); - -//---------------------------------------------------------------------------- -vtkCxxSetObjectMacro( - vtkImageDataLIC2DExtentTranslator, - InputExtentTranslator, - vtkExtentTranslator); - -//---------------------------------------------------------------------------- -vtkImageDataLIC2DExtentTranslator::vtkImageDataLIC2DExtentTranslator() -{ - this->Algorithm = 0; - this->InputExtentTranslator = 0; - this->InputWholeExtent[0] = - this->InputWholeExtent[1] = - this->InputWholeExtent[2] = - this->InputWholeExtent[3] = - this->InputWholeExtent[4] = - this->InputWholeExtent[5] = 0; -} - -//---------------------------------------------------------------------------- -vtkImageDataLIC2DExtentTranslator::~vtkImageDataLIC2DExtentTranslator() -{ - this->SetInputExtentTranslator(0); -} - -//---------------------------------------------------------------------------- -void vtkImageDataLIC2DExtentTranslator::SetAlgorithm( - vtkImageDataLIC2D* alg) -{ - if (this->Algorithm.GetPointer() != alg) - { - this->Algorithm = alg; - this->Modified(); - } -} - -//---------------------------------------------------------------------------- -vtkImageDataLIC2D* vtkImageDataLIC2DExtentTranslator::GetAlgorithm() -{ - return this->Algorithm.GetPointer(); -} - -//---------------------------------------------------------------------------- -int vtkImageDataLIC2DExtentTranslator::PieceToExtentThreadSafe( - int piece, - int numPieces, - int ghostLevel, - int *wholeExtent, - int *resultExtent, - int splitMode, - int byPoints) -{ - if (!this->Algorithm) - { - return this->Superclass::PieceToExtentThreadSafe( - piece, - numPieces, - ghostLevel, - wholeExtent, - resultExtent, - splitMode, - byPoints); - } - - // Let the input extent translator do the translation. - int inExt[6]; - this->InputExtentTranslator->PieceToExtentThreadSafe( - piece, - numPieces, - ghostLevel, - this->InputWholeExtent, - inExt, - splitMode, - byPoints); - - this->Algorithm->TranslateInputExtent( - inExt, - this->InputWholeExtent, - resultExtent); - - return 1; -} - -//---------------------------------------------------------------------------- -void vtkImageDataLIC2DExtentTranslator::PrintSelf( ostream & os, vtkIndent indent ) -{ - this->Superclass::PrintSelf( os, indent ); - - os << indent << "Algorithm: " << this->Algorithm << endl; - os << indent << "InputWholeExtent: (" - << this->InputWholeExtent[0] << ", " - << this->InputWholeExtent[1] << ", " - << this->InputWholeExtent[2] << ", " - << this->InputWholeExtent[3] << ", " - << this->InputWholeExtent[4] << ", " - << this->InputWholeExtent[5] << ")" << endl; - os << indent << "InputExtentTranslator: " - << this->InputExtentTranslator << endl; -} diff --git a/Rendering/LIC/vtkImageDataLIC2DExtentTranslator.h b/Rendering/LIC/vtkImageDataLIC2DExtentTranslator.h deleted file mode 100644 index e869bb4499f7dd5af5769437d428808511c64edf..0000000000000000000000000000000000000000 --- a/Rendering/LIC/vtkImageDataLIC2DExtentTranslator.h +++ /dev/null @@ -1,74 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: vtkImageDataLIC2DExtentTranslator.h - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -// .NAME vtkImageDataLIC2DExtentTranslator -// .SECTION Description -// This is needed because vtkImageDataLIC2D produces a larger output -// extents by setting a magnification factor. This class calls -// vtkImageLIC2D to do the translation. - -#ifndef __vtkImageDataLIC2DExtentTranslator_h -#define __vtkImageDataLIC2DExtentTranslator_h - -#include "vtkRenderingLICModule.h" // For export macro -#include "vtkExtentTranslator.h" -#include "vtkWeakPointer.h" // needed for vtkWeakPointer. - -class vtkImageDataLIC2D; - -class VTKRENDERINGLIC_EXPORT vtkImageDataLIC2DExtentTranslator - : public vtkExtentTranslator -{ -public: - static vtkImageDataLIC2DExtentTranslator* New(); - vtkTypeMacro(vtkImageDataLIC2DExtentTranslator, vtkExtentTranslator); - void PrintSelf(ostream& os, vtkIndent indent); - - // Description: - // Set the vtkImageDataLIC2D algorithm for which this extent translator is - // being used. vtkImageDataLIC2D will be called to make the translation - // which is dependant on the magnification factor. - void SetAlgorithm(vtkImageDataLIC2D*); - vtkImageDataLIC2D* GetAlgorithm(); - - void SetInputExtentTranslator(vtkExtentTranslator*); - vtkGetObjectMacro(InputExtentTranslator, vtkExtentTranslator); - - vtkSetVector6Macro(InputWholeExtent, int); - vtkGetVector6Macro(InputWholeExtent, int); - - virtual int PieceToExtentThreadSafe( - int piece, - int numPieces, - int ghostLevel, - int *wholeExtent, - int *resultExtent, - int splitMode, - int byPoints); - -//BTX -protected: - vtkImageDataLIC2DExtentTranslator(); - ~vtkImageDataLIC2DExtentTranslator(); - - int InputWholeExtent[6]; - vtkExtentTranslator* InputExtentTranslator; - vtkWeakPointer<vtkImageDataLIC2D> Algorithm; -private: - vtkImageDataLIC2DExtentTranslator(const vtkImageDataLIC2DExtentTranslator&); // Not implemented. - void operator=(const vtkImageDataLIC2DExtentTranslator&); // Not implemented. -//ETX -}; - -#endif