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

# Imaging/vtkImageMask.h

Go to the documentation of this file.

    00001 /*=========================================================================
    00002
    00003   Program:   Visualization Toolkit
    00004   Module:    $RCSfile: vtkImageMask.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 =========================================================================*/
    00049 #ifndef __vtkImageMask_h
    00050 #define __vtkImageMask_h
    00051
    00052
    00053 #include "vtkImageTwoInputFilter.h"
    00054
    00055 class VTK_IMAGING_EXPORT vtkImageMask : public vtkImageTwoInputFilter
    00056 {
    00057 public:
    00058   static vtkImageMask *New();
    00059   vtkTypeRevisionMacro(vtkImageMask,vtkImageTwoInputFilter);
    00060   void PrintSelf(ostream& os, vtkIndent indent);
    00061
    00063
    00064   void SetMaskedOutputValue(int num, float *v);
    00065   void SetMaskedOutputValue(float v) {this->SetMaskedOutputValue(1, &v);}
    00066   void SetMaskedOutputValue(float v1, float v2)
    00067     {float v[2]; v[0]=v1; v[1]=v2; this->SetMaskedOutputValue(2, v);}
    00068   void SetMaskedOutputValue(float v1, float v2, float v3)
    00069     {float v[3]; v[0]=v1; v[1]=v2; v[2]=v3; this->SetMaskedOutputValue(3, v);}
    00070   float *GetMaskedOutputValue() {return this->MaskedOutputValue;}
    00071   int GetMaskedOutputValueLength() {return this->MaskedOutputValueLength;}
    00073
    00075
    00078   vtkSetClampMacro ( MaskAlpha, float, 0.0, 1.0 );
    00079   vtkGetMacro ( MaskAlpha, float );
    00081
    00083   void SetImageInput(vtkImageData *in) {this->SetInput1(in);}
    00084
    00086   void SetMaskInput(vtkImageData *in) {this->SetInput2(in);}
    00087
    00089
    00093   vtkSetMacro(NotMask,int);
    00094   vtkGetMacro(NotMask,int);
    00095   vtkBooleanMacro(NotMask, int);
    00097
    00098 protected:
    00099   vtkImageMask();
    00100   ~vtkImageMask();
    00101
    00102   float *MaskedOutputValue;
    00103   int MaskedOutputValueLength;
    00104   int NotMask;
    00105   float MaskAlpha;
    00106
    00107   void ExecuteInformation(vtkImageData **inDatas, vtkImageData *outData);
    00108   void ExecuteInformation(){this->vtkImageTwoInputFilter::ExecuteInformation();};
    00109
    00110   void ThreadedExecute(vtkImageData **inDatas, vtkImageData *outData,
    00111                        int extent[6], int id);
    00112 private:
    00113   vtkImageMask(const vtkImageMask&);  // Not implemented.
    00114   void operator=(const vtkImageMask&);  // Not implemented.
    00115 };
    00116
    00117 #endif
    00118
    00119
    00120