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 void SetOutput(vtkImageData *output); 00048 vtkImageData *GetOutput(); 00049 vtkImageData *GetOutput(int idx); 00051 00054 virtual void CopyOutputInformation(vtkInformation *outInfo, int port); 00055 00056 protected: 00057 vtkXMLImageDataReader(); 00058 ~vtkXMLImageDataReader(); 00059 00060 double Origin[3]; 00061 double Spacing[3]; 00062 00063 const char* GetDataSetName(); 00064 void SetOutputExtent(int* extent); 00065 int ReadPrimaryElement(vtkXMLDataElement* ePrimary); 00066 00067 // Setup the output's information. 00068 void SetupOutputInformation(vtkInformation *outInfo); 00069 00070 virtual int FillOutputPortInformation(int, vtkInformation*); 00071 00072 private: 00073 vtkXMLImageDataReader(const vtkXMLImageDataReader&); // Not implemented. 00074 void operator=(const vtkXMLImageDataReader&); // Not implemented. 00075 }; 00076 00077 #endif