Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

vtkImageMask.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkImageMask.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 =========================================================================*/
00032 #ifndef __vtkImageMask_h
00033 #define __vtkImageMask_h
00034 
00035 
00036 #include "vtkThreadedImageAlgorithm.h"
00037 
00038 class VTK_IMAGING_EXPORT vtkImageMask : public vtkThreadedImageAlgorithm
00039 {
00040 public:
00041   static vtkImageMask *New();
00042   vtkTypeRevisionMacro(vtkImageMask,vtkThreadedImageAlgorithm);
00043   void PrintSelf(ostream& os, vtkIndent indent);
00044 
00046 
00047   void SetMaskedOutputValue(int num, double *v);
00048   void SetMaskedOutputValue(double v) {this->SetMaskedOutputValue(1, &v);}
00049   void SetMaskedOutputValue(double v1, double v2) 
00050     {double v[2]; v[0]=v1; v[1]=v2; this->SetMaskedOutputValue(2, v);}
00051   void SetMaskedOutputValue(double v1, double v2, double v3) 
00052     {double v[3]; v[0]=v1; v[1]=v2; v[2]=v3; this->SetMaskedOutputValue(3, v);}
00053   double *GetMaskedOutputValue() {return this->MaskedOutputValue;}
00054   int GetMaskedOutputValueLength() {return this->MaskedOutputValueLength;}
00056 
00058 
00061   vtkSetClampMacro ( MaskAlpha, double, 0.0, 1.0 );
00062   vtkGetMacro ( MaskAlpha, double );
00064 
00066   void SetImageInput(vtkImageData *in);
00067 
00069   void SetMaskInput(vtkImageData *in);
00070   
00072 
00076   vtkSetMacro(NotMask,int);
00077   vtkGetMacro(NotMask,int);
00078   vtkBooleanMacro(NotMask, int);
00080   
00082 
00083   virtual void SetInput1(vtkDataObject *in) { this->SetInput(0,in); }
00084   virtual void SetInput2(vtkDataObject *in) { this->SetInput(1,in); }
00086 
00087 protected:
00088   vtkImageMask();
00089   ~vtkImageMask();
00090 
00091   double *MaskedOutputValue;
00092   int MaskedOutputValueLength;
00093   int NotMask;
00094   double MaskAlpha;
00095   
00096   virtual int RequestInformation (vtkInformation *, 
00097                                   vtkInformationVector **,
00098                                   vtkInformationVector *);
00099   
00100  
00101   virtual void ThreadedRequestData(vtkInformation *request, 
00102                                    vtkInformationVector **inputVector, 
00103                                    vtkInformationVector *outputVector,
00104                                    vtkImageData ***inData, 
00105                                    vtkImageData **outData,
00106                                    int extent[6], int threadId);
00107 
00108 private:
00109   vtkImageMask(const vtkImageMask&);  // Not implemented.
00110   void operator=(const vtkImageMask&);  // Not implemented.
00111 };
00112 
00113 #endif
00114 
00115 
00116 

Generated on Mon Jan 21 23:07:29 2008 for VTK by  doxygen 1.4.3-20050530