Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

Parallel/vtkImageBlockReader.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkImageBlockReader.h,v $
00005   Language:  C++
00006 
00007   Copyright (c) 1993-2002 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 =========================================================================*/
00040 #ifndef __vtkImageBlockReader_h
00041 #define __vtkImageBlockReader_h
00042 
00043 #include "vtkImageSource.h"
00044 
00045 
00046 class VTK_PARALLEL_EXPORT vtkImageBlockReader : public vtkImageSource
00047 {
00048 public:
00049   static vtkImageBlockReader *New();
00050   vtkTypeRevisionMacro(vtkImageBlockReader,vtkImageSource);
00051   void PrintSelf(ostream& os, vtkIndent indent);
00052 
00054 
00056   vtkSetVector3Macro(Divisions, int);
00057   vtkGetVector3Macro(Divisions, int);
00059 
00061 
00063   vtkSetMacro(Overlap, int);
00064   vtkGetMacro(Overlap, int);
00066 
00068 
00070   vtkSetVector6Macro(WholeExtent, int);
00071   vtkGetVector6Macro(WholeExtent, int);
00073 
00075 
00077   vtkSetMacro(NumberOfScalarComponents, int);  
00078   vtkGetMacro(NumberOfScalarComponents, int);  
00080   
00082 
00084   vtkSetMacro(ScalarType, int);  
00085   vtkGetMacro(ScalarType, int);  
00087   
00089 
00090   vtkSetStringMacro(FilePattern);
00091   vtkGetStringMacro(FilePattern);
00093 
00094 
00095   
00096 protected:
00097   vtkImageBlockReader();
00098   ~vtkImageBlockReader();
00099   
00100   char *FilePattern;
00101 
00102   int WholeExtent[6];
00103   int NumberOfScalarComponents;
00104   int ScalarType;
00105   int Divisions[3];
00106   int Overlap;
00107 
00108 
00110 
00111   void Execute(vtkImageData *data);
00112   void ExecuteInformation();
00114 
00115   // This method computes the XYZExtents.
00116   void ComputeBlockExtents();
00117   void DeleteBlockExtents();
00118 
00119   // helper methods
00120   void Read(vtkImageData *data, int *ext);
00121   void ReadRemainder(vtkImageData *data, int *ext, int *doneExt);
00122   void ReadBlock(int xIdx, int yIdx, int zIdx, 
00123                  vtkImageData *data, int *ext);
00124 
00127   void ModifyOutputUpdateExtent();
00128 
00129   // extents (min, max) of the divisions.
00130   int *XExtents;
00131   int *YExtents;
00132   int *ZExtents;
00133 private:
00134   vtkImageBlockReader(const vtkImageBlockReader&);  // Not implemented.
00135   void operator=(const vtkImageBlockReader&);  // Not implemented.
00136 };
00137 
00138 
00139 #endif
00140 
00141