VTK
dox/Imaging/vtkImageSlab.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkImageSlab.h
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 =========================================================================*/
00030 #ifndef __vtkImageSlab_h
00031 #define __vtkImageSlab_h
00032 
00033 #include "vtkThreadedImageAlgorithm.h"
00034 
00035 class VTK_IMAGING_EXPORT vtkImageSlab : public vtkThreadedImageAlgorithm
00036 {
00037 public:
00038   static vtkImageSlab *New();
00039   vtkTypeMacro(vtkImageSlab, vtkThreadedImageAlgorithm);
00040   void PrintSelf(ostream& os, vtkIndent indent);
00041 
00043 
00045   vtkSetClampMacro(Orientation, int, 0, 2);
00046   void SetOrientationToX() {
00047     this->SetOrientation(0); };
00048   void SetOrientationToY() {
00049     this->SetOrientation(1); };
00050   void SetOrientationToZ() {
00051     this->SetOrientation(2); };
00052   vtkGetMacro(Orientation, int);
00054 
00056 
00058   vtkSetVector2Macro(SliceRange, int);
00059   vtkGetVector2Macro(SliceRange, int);
00061 
00063 
00065   vtkSetClampMacro(Operation, int, VTK_IMAGE_SLAB_MIN, VTK_IMAGE_SLAB_SUM);
00066   void SetOperationToMin() {
00067     this->SetOperation(VTK_IMAGE_SLAB_MIN); };
00068   void SetOperationToMax() {
00069     this->SetOperation(VTK_IMAGE_SLAB_MAX); };
00070   void SetOperationToMean() {
00071     this->SetOperation(VTK_IMAGE_SLAB_MEAN); };
00072   void SetOperationToSum() {
00073     this->SetOperation(VTK_IMAGE_SLAB_SUM); };
00074   vtkGetMacro(Operation, int);
00075   const char *GetOperationAsString();
00077 
00079 
00083   vtkSetMacro(TrapezoidIntegration, int);
00084   vtkBooleanMacro(TrapezoidIntegration, int);
00085   vtkGetMacro(TrapezoidIntegration, int);
00087 
00089 
00094   vtkSetMacro(MultiSliceOutput, int);
00095   vtkBooleanMacro(MultiSliceOutput, int);
00096   vtkGetMacro(MultiSliceOutput, int);
00098 
00100 
00104   void SetOutputScalarTypeToFloat() {
00105     this->SetOutputScalarType(VTK_FLOAT); };
00106   void SetOutputScalarTypeToDouble() {
00107     this->SetOutputScalarType(VTK_DOUBLE); };
00108   void SetOutputScalarTypeToInputScalarType() {
00109     this->SetOutputScalarType(0); };
00110   vtkGetMacro(OutputScalarType, int);
00112 
00113 protected:
00114   vtkImageSlab();
00115   ~vtkImageSlab();
00116 
00117   virtual int RequestInformation(vtkInformation *, vtkInformationVector **,
00118                                  vtkInformationVector *);
00119   virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **,
00120                                   vtkInformationVector *);
00121   virtual void ThreadedRequestData(vtkInformation *request,
00122                                    vtkInformationVector **inputVector,
00123                                    vtkInformationVector *outputVector,
00124                                    vtkImageData ***inData,
00125                                    vtkImageData **outData, int ext[6], int id);
00126 
00127   vtkSetMacro(OutputScalarType, int);
00128 
00129   int Operation;
00130   int Orientation;
00131   int SliceRange[2];
00132   int OutputScalarType;
00133   int MultiSliceOutput;
00134   int TrapezoidIntegration;
00135 
00136 private:
00137   vtkImageSlab(const vtkImageSlab&);  // Not implemented.
00138   void operator=(const vtkImageSlab&);  // Not implemented.
00139 };
00140 
00141 #endif