VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile$ 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 =========================================================================*/ 00027 #ifndef vtkCompositeDataReader_h 00028 #define vtkCompositeDataReader_h 00029 00030 #include "vtkIOLegacyModule.h" // For export macro 00031 #include "vtkDataReader.h" 00032 00033 class vtkCompositeDataSet; 00034 class vtkHierarchicalBoxDataSet; 00035 class vtkMultiBlockDataSet; 00036 class vtkMultiPieceDataSet; 00037 class vtkNonOverlappingAMR; 00038 class vtkOverlappingAMR; 00039 00040 class VTKIOLEGACY_EXPORT vtkCompositeDataReader : public vtkDataReader 00041 { 00042 public: 00043 static vtkCompositeDataReader* New(); 00044 vtkTypeMacro(vtkCompositeDataReader, vtkDataReader); 00045 void PrintSelf(ostream& os, vtkIndent indent); 00046 00048 00049 vtkCompositeDataSet *GetOutput(); 00050 vtkCompositeDataSet *GetOutput(int idx); 00051 void SetOutput(vtkCompositeDataSet *output); 00053 00054 //BTX 00055 protected: 00056 vtkCompositeDataReader(); 00057 ~vtkCompositeDataReader(); 00058 00059 virtual int RequestData(vtkInformation *, vtkInformationVector **, 00060 vtkInformationVector *); 00061 00062 // Override ProcessRequest to handle request data object event 00063 virtual int ProcessRequest(vtkInformation *, vtkInformationVector **, 00064 vtkInformationVector *); 00065 00066 // Since the Outputs[0] has the same UpdateExtent format 00067 // as the generic DataObject we can copy the UpdateExtent 00068 // as a default behavior. 00069 virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, 00070 vtkInformationVector *); 00071 00072 // Create output (a directed or undirected graph). 00073 virtual int RequestDataObject(vtkInformation *, vtkInformationVector **, 00074 vtkInformationVector *); 00075 00076 virtual int FillOutputPortInformation(int, vtkInformation*); 00077 00079 int ReadOutputType(); 00080 00081 bool ReadCompositeData(vtkMultiPieceDataSet*); 00082 bool ReadCompositeData(vtkMultiBlockDataSet*); 00083 bool ReadCompositeData(vtkHierarchicalBoxDataSet*); 00084 bool ReadCompositeData(vtkOverlappingAMR*); 00085 bool ReadCompositeData(vtkNonOverlappingAMR*); 00086 vtkDataObject* ReadChild(); 00087 00088 private: 00089 vtkCompositeDataReader(const vtkCompositeDataReader&); // Not implemented. 00090 void operator=(const vtkCompositeDataReader&); // Not implemented. 00091 //ETX 00092 }; 00093 00094 #endif