Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | 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 =========================================================================*/
00045 #ifndef __vtkImageMask_h
00046 #define __vtkImageMask_h
00047 
00048 
00049 #include "vtkImageTwoInputFilter.h"
00050 
00051 class VTK_IMAGING_EXPORT vtkImageMask : public vtkImageTwoInputFilter
00052 {
00053 public:
00054   static vtkImageMask *New();
00055   vtkTypeRevisionMacro(vtkImageMask,vtkImageTwoInputFilter);
00056   void PrintSelf(ostream& os, vtkIndent indent);
00057 
00059 
00060   void SetMaskedOutputValue(int num, double *v);
00061   void SetMaskedOutputValue(double v) {this->SetMaskedOutputValue(1, &v);}
00062   void SetMaskedOutputValue(double v1, double v2) 
00063     {double v[2]; v[0]=v1; v[1]=v2; this->SetMaskedOutputValue(2, v);}
00064   void SetMaskedOutputValue(double v1, double v2, double v3) 
00065     {double v[3]; v[0]=v1; v[1]=v2; v[2]=v3; this->SetMaskedOutputValue(3, v);}
00066   double *GetMaskedOutputValue() {return this->MaskedOutputValue;}
00067   int GetMaskedOutputValueLength() {return this->MaskedOutputValueLength;}
00069 
00071 
00074   vtkSetClampMacro ( MaskAlpha, double, 0.0, 1.0 );
00075   vtkGetMacro ( MaskAlpha, double );
00077 
00079   void SetImageInput(vtkImageData *in) {this->SetInput1(in);}
00080 
00082   void SetMaskInput(vtkImageData *in) {this->SetInput2(in);}
00083   
00085 
00089   vtkSetMacro(NotMask,int);
00090   vtkGetMacro(NotMask,int);
00091   vtkBooleanMacro(NotMask, int);
00093   
00094 protected:
00095   vtkImageMask();
00096   ~vtkImageMask();
00097 
00098   double *MaskedOutputValue;
00099   int MaskedOutputValueLength;
00100   int NotMask;
00101   double MaskAlpha;
00102   
00103   void ExecuteInformation(vtkImageData **inDatas, vtkImageData *outData);
00104   void ExecuteInformation(){this->vtkImageTwoInputFilter::ExecuteInformation();};
00105  
00106   void ThreadedExecute(vtkImageData **inDatas, vtkImageData *outData,
00107                        int extent[6], int id);
00108 private:
00109   vtkImageMask(const vtkImageMask&);  // Not implemented.
00110   void operator=(const vtkImageMask&);  // Not implemented.
00111 };
00112 
00113 #endif
00114 
00115 
00116