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