00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkExtractBlock.h,v $ 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 vtkTypeRevisionMacro(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 00063 //BTX 00064 protected: 00065 vtkExtractBlock(); 00066 ~vtkExtractBlock(); 00067 00069 static vtkInformationIntegerKey* DONT_PRUNE(); 00070 00072 virtual int RequestData(vtkInformation *, 00073 vtkInformationVector **, 00074 vtkInformationVector *); 00075 00076 00078 void CopySubTree(vtkCompositeDataIterator* loc, 00079 vtkMultiBlockDataSet* output, vtkMultiBlockDataSet* input); 00080 bool Prune(vtkMultiBlockDataSet* mblock); 00081 bool Prune(vtkMultiPieceDataSet* mblock); 00082 bool Prune(vtkDataObject* mblock); 00083 00084 int PruneOutput; 00085 private: 00086 vtkExtractBlock(const vtkExtractBlock&); // Not implemented. 00087 void operator=(const vtkExtractBlock&); // Not implemented. 00088 00089 class vtkSet; 00090 vtkSet *Indices; 00091 //ETX 00092 }; 00093 00094 #endif 00095 00096