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