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