VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkExtractBlock.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00029 #ifndef __vtkExtractBlock_h 00030 #define __vtkExtractBlock_h 00031 00032 #include "vtkMultiBlockDataSetAlgorithm.h" 00033 00034 class vtkCompositeDataIterator; 00035 class vtkMultiPieceDataSet; 00036 00037 class VTK_GRAPHICS_EXPORT vtkExtractBlock : public vtkMultiBlockDataSetAlgorithm 00038 { 00039 public: 00040 static vtkExtractBlock* New(); 00041 vtkTypeMacro(vtkExtractBlock, vtkMultiBlockDataSetAlgorithm); 00042 void PrintSelf(ostream& os, vtkIndent indent); 00043 00045 00050 void AddIndex(unsigned int index); 00051 void RemoveIndex(unsigned int index); 00052 void RemoveAllIndices(); 00054 00056 00058 vtkSetMacro(PruneOutput, int); 00059 vtkGetMacro(PruneOutput, int); 00060 vtkBooleanMacro(PruneOutput, int); 00062 00064 00068 vtkSetMacro(MaintainStructure, int); 00069 vtkGetMacro(MaintainStructure, int); 00070 vtkBooleanMacro(MaintainStructure, int); 00072 00073 //BTX 00074 protected: 00075 vtkExtractBlock(); 00076 ~vtkExtractBlock(); 00077 00079 static vtkInformationIntegerKey* DONT_PRUNE(); 00080 00082 virtual int RequestData(vtkInformation *, 00083 vtkInformationVector **, 00084 vtkInformationVector *); 00085 00086 00088 void CopySubTree(vtkCompositeDataIterator* loc, 00089 vtkMultiBlockDataSet* output, vtkMultiBlockDataSet* input); 00090 bool Prune(vtkMultiBlockDataSet* mblock); 00091 bool Prune(vtkMultiPieceDataSet* mblock); 00092 bool Prune(vtkDataObject* mblock); 00093 00094 int PruneOutput; 00095 int MaintainStructure; 00096 private: 00097 vtkExtractBlock(const vtkExtractBlock&); // Not implemented. 00098 void operator=(const vtkExtractBlock&); // Not implemented. 00099 00100 class vtkSet; 00101 vtkSet *Indices; 00102 vtkSet *ActiveIndices; 00103 //ETX 00104 }; 00105 00106 #endif 00107 00108