VTK
dox/Filters/Extraction/vtkExtractBlock.h
Go to the documentation of this file.
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 "vtkFiltersExtractionModule.h" // For export macro
00033 #include "vtkMultiBlockDataSetAlgorithm.h"
00034 
00035 class vtkDataObjectTreeIterator;
00036 class vtkMultiPieceDataSet;
00037 
00038 class VTKFILTERSEXTRACTION_EXPORT vtkExtractBlock : public vtkMultiBlockDataSetAlgorithm
00039 {
00040 public:
00041   static vtkExtractBlock* New();
00042   vtkTypeMacro(vtkExtractBlock, vtkMultiBlockDataSetAlgorithm);
00043   void PrintSelf(ostream& os, vtkIndent indent);
00044 
00046 
00051   void AddIndex(unsigned int index);
00052   void RemoveIndex(unsigned int index);
00053   void RemoveAllIndices();
00055 
00057 
00059   vtkSetMacro(PruneOutput, int);
00060   vtkGetMacro(PruneOutput, int);
00061   vtkBooleanMacro(PruneOutput, int);
00063 
00065 
00069   vtkSetMacro(MaintainStructure, int);
00070   vtkGetMacro(MaintainStructure, int);
00071   vtkBooleanMacro(MaintainStructure, int);
00073 
00074 //BTX
00075 protected:
00076   vtkExtractBlock();
00077   ~vtkExtractBlock();
00078 
00080   static vtkInformationIntegerKey* DONT_PRUNE();
00081 
00083   virtual int RequestData(vtkInformation *,
00084                           vtkInformationVector **,
00085                           vtkInformationVector *);
00086 
00087 
00089   void CopySubTree(vtkDataObjectTreeIterator* loc,
00090     vtkMultiBlockDataSet* output, vtkMultiBlockDataSet* input);
00091   bool Prune(vtkMultiBlockDataSet* mblock);
00092   bool Prune(vtkMultiPieceDataSet* mblock);
00093   bool Prune(vtkDataObject* mblock);
00094 
00095   int PruneOutput;
00096   int MaintainStructure;
00097 private:
00098   vtkExtractBlock(const vtkExtractBlock&); // Not implemented.
00099   void operator=(const vtkExtractBlock&); // Not implemented.
00100 
00101   class vtkSet;
00102   vtkSet *Indices;
00103   vtkSet *ActiveIndices;
00104 //ETX
00105 };
00106 
00107 #endif
00108 
00109