VTK
dox/IO/XML/vtkXMLPImageDataReader.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkXMLPImageDataReader.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 =========================================================================*/
00028 #ifndef __vtkXMLPImageDataReader_h
00029 #define __vtkXMLPImageDataReader_h
00030 
00031 #include "vtkIOXMLModule.h" // For export macro
00032 #include "vtkXMLPStructuredDataReader.h"
00033 
00034 class vtkImageData;
00035 
00036 class VTKIOXML_EXPORT vtkXMLPImageDataReader : public vtkXMLPStructuredDataReader
00037 {
00038 public:
00039   vtkTypeMacro(vtkXMLPImageDataReader,vtkXMLPStructuredDataReader);
00040   void PrintSelf(ostream& os, vtkIndent indent);
00041   static vtkXMLPImageDataReader *New();
00042 
00044 
00045   vtkImageData *GetOutput();
00046   vtkImageData *GetOutput(int idx);
00048 
00049   // For the specified port, copy the information this reader sets up in
00050   // SetupOutputInformation to outInfo
00051   virtual void CopyOutputInformation(vtkInformation *outInfo, int port);
00052 
00053 protected:
00054   vtkXMLPImageDataReader();
00055   ~vtkXMLPImageDataReader();
00056 
00057   double Origin[3];
00058   double Spacing[3];
00059 
00060   vtkImageData* GetPieceInput(int index);
00061 
00062   void SetupEmptyOutput();
00063   const char* GetDataSetName();
00064   void SetOutputExtent(int* extent);
00065   void GetPieceInputExtent(int index, int* extent);
00066   int ReadPrimaryElement(vtkXMLDataElement* ePrimary);
00067 
00068   // Setup the output's information.
00069   void SetupOutputInformation(vtkInformation *outInfo);
00070 
00071   vtkXMLDataReader* CreatePieceReader();
00072   virtual int FillOutputPortInformation(int, vtkInformation*);
00073 
00074 private:
00075   vtkXMLPImageDataReader(const vtkXMLPImageDataReader&);  // Not implemented.
00076   void operator=(const vtkXMLPImageDataReader&);  // Not implemented.
00077 };
00078 
00079 #endif