00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkXMLImageDataReader.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 =========================================================================*/ 00034 #ifndef __vtkXMLImageDataReader_h 00035 #define __vtkXMLImageDataReader_h 00036 00037 #include "vtkXMLStructuredDataReader.h" 00038 00039 class vtkImageData; 00040 00041 class VTK_IO_EXPORT vtkXMLImageDataReader : public vtkXMLStructuredDataReader 00042 { 00043 public: 00044 vtkTypeMacro(vtkXMLImageDataReader,vtkXMLStructuredDataReader); 00045 void PrintSelf(ostream& os, vtkIndent indent); 00046 static vtkXMLImageDataReader *New(); 00047 00049 00050 vtkImageData *GetOutput(); 00051 vtkImageData *GetOutput(int idx); 00053 00056 virtual void CopyOutputInformation(vtkInformation *outInfo, int port); 00057 00058 protected: 00059 vtkXMLImageDataReader(); 00060 ~vtkXMLImageDataReader(); 00061 00062 double Origin[3]; 00063 double Spacing[3]; 00064 int PieceExtent[6]; 00065 00066 const char* GetDataSetName(); 00067 void SetOutputExtent(int* extent); 00068 virtual void SetupUpdateExtentInformation(vtkInformation *outInfo); 00069 00070 int ReadPrimaryElement(vtkXMLDataElement* ePrimary); 00071 00072 // Setup the output's information. 00073 void SetupOutputInformation(vtkInformation *outInfo); 00074 00075 virtual int FillOutputPortInformation(int, vtkInformation*); 00076 00077 00078 00079 private: 00080 vtkXMLImageDataReader(const vtkXMLImageDataReader&); // Not implemented. 00081 void operator=(const vtkXMLImageDataReader&); // Not implemented. 00082 }; 00083 00084 #endif