VTK
dox/IO/MPIImage/vtkMPIImageReader.h
Go to the documentation of this file.
00001 // -*- c++ -*-
00002 /*=========================================================================
00003 
00004   Program:   Visualization Toolkit
00005   Module:    vtkMPIImageReader.h
00006 
00007   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00008   All rights reserved.
00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00010 
00011      This software is distributed WITHOUT ANY WARRANTY; without even
00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00013      PURPOSE.  See the above copyright notice for more information.
00014 
00015 =========================================================================*/
00016 /*----------------------------------------------------------------------------
00017  Copyright (c) Sandia Corporation
00018  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
00019 ----------------------------------------------------------------------------*/
00020 
00047 #ifndef __vtkMPIImageReader_h
00048 #define __vtkMPIImageReader_h
00049 
00050 #include "vtkIOMPIImageModule.h" // For export macro
00051 #include "vtkImageReader.h"
00052 
00053 class vtkMPIOpaqueFileHandle;
00054 class vtkMultiProcessController;
00055 
00056 class VTKIOMPIIMAGE_EXPORT vtkMPIImageReader : public vtkImageReader
00057 {
00058 public:
00059   vtkTypeMacro(vtkMPIImageReader, vtkImageReader);
00060   static vtkMPIImageReader *New();
00061   virtual void PrintSelf(ostream &os, vtkIndent indent);
00062 
00064 
00066   vtkGetObjectMacro(Controller, vtkMultiProcessController);
00067   virtual void SetController(vtkMultiProcessController *);
00069 
00070 protected:
00071   vtkMPIImageReader();
00072   ~vtkMPIImageReader();
00073 
00074   vtkMultiProcessController *Controller;
00075 
00078   int GetDataScalarTypeSize();
00079 
00084   virtual void PartitionController(const int extent[6]);
00085 
00088   virtual unsigned long GetHeaderSize(vtkMPIOpaqueFileHandle &file);
00089 
00094   virtual void SetupFileView(vtkMPIOpaqueFileHandle &file, const int extent[6]);
00095 
00100   virtual void ReadSlice(int slice, const int extent[6], void *buffer);
00101 
00104   virtual void TransformData(vtkImageData *data);
00105 
00107 
00109   void SetGroupedController(vtkMultiProcessController *);
00110   vtkMultiProcessController *GroupedController;
00112 
00113   virtual void ExecuteDataWithInformation(vtkDataObject *data,
00114                                           vtkInformation *outInfo);
00115 
00116 private:
00117   vtkMPIImageReader(const vtkMPIImageReader &); // Not implemented
00118   void operator=(const vtkMPIImageReader &);    // Not implemented
00119 };
00120 
00121 #endif //__vtkMPIImageReader_h