VTK
vtkPNrrdReader.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 /*=========================================================================
3 
4  Program: Visualization Toolkit
5  Module: vtkPNrrdReader.h
6 
7  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
8  All rights reserved.
9  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
10 
11  This software is distributed WITHOUT ANY WARRANTY; without even
12  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
13  PURPOSE. See the above copyright notice for more information.
14 
15 =========================================================================*/
16 /*----------------------------------------------------------------------------
17  Copyright (c) Sandia Corporation
18  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
19 ----------------------------------------------------------------------------*/
20 
43 #ifndef vtkPNrrdReader_h
44 #define vtkPNrrdReader_h
45 
46 #include "vtkIOMPIImageModule.h" // For export macro
47 #include "vtkNrrdReader.h"
48 
49 class vtkCharArray;
51 class vtkMPIOpaqueFileHandle;
52 
53 class VTKIOMPIIMAGE_EXPORT vtkPNrrdReader : public vtkNrrdReader
54 {
55 public:
56  vtkTypeMacro(vtkPNrrdReader, vtkNrrdReader);
57  static vtkPNrrdReader *New();
58  virtual void PrintSelf(ostream &os, vtkIndent indent);
59 
61 
65  vtkGetObjectMacro(Controller, vtkMultiProcessController);
66  virtual void SetController(vtkMultiProcessController *);
68 
69 protected:
71  ~vtkPNrrdReader();
72 
73  virtual int ReadHeader();
74  virtual int ReadHeader(vtkCharArray *headerBuffer);
75 
79  int GetDataScalarTypeSize();
80 
86  virtual void PartitionController(const int extent[6]);
87 
92  virtual unsigned long GetHeaderSize(vtkMPIOpaqueFileHandle &file);
93 
100  virtual void SetupFileView(vtkMPIOpaqueFileHandle &file, const int extent[6]);
101 
108  virtual void ReadSlice(int slice, const int extent[6], void *buffer);
109 
114  virtual void TransformData(vtkImageData *data);
115 
117 
121  void SetGroupedController(vtkMultiProcessController *);
124 
126  vtkInformation *outInfo);
127 
129 
130 private:
131  vtkPNrrdReader(const vtkPNrrdReader &) VTK_DELETE_FUNCTION;
132  void operator=(const vtkPNrrdReader &) VTK_DELETE_FUNCTION;
133 };
134 
135 #endif //vtkPNrrdReader_h
Read nrrd files efficiently from parallel file systems (and reasonably well elsewhere).
Store vtkAlgorithm input/output information.
vtkMultiProcessController * GroupedController
A group of processes that are reading the same file (as determined by PartitionController.
unsigned long GetHeaderSize()
Get the size of the header computed by this object.
dynamic, self-adjusting array of char
Definition: vtkCharArray.h:38
a simple class to control print indentation
Definition: vtkIndent.h:39
void ExecuteDataWithInformation(vtkDataObject *data, vtkInformation *outInfo)
This is a convenience method that is implemented in many subclasses instead of RequestData.
topologically and geometrically regular array of data
Definition: vtkImageData.h:45
vtkMultiProcessController * Controller
Read nrrd files file system.
Definition: vtkNrrdReader.h:50
virtual int ReadHeader()
static vtkNrrdReader * New()
virtual void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
general representation of visualization data
Definition: vtkDataObject.h:64
Multiprocessing communication superclass.