dox/Imaging/vtkImageComparison.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   vtkCNMRRLibrary
00004   Module:    $RCSfile: vtkImageComparison.h,v $
00005 
00006   Copyright  2006  The Pennsylvania State University
00007   
00008       Notice
00009  
00010   The contents of this file are subject to The Pennsylvania State University 
00011   Open Source License (the "License"); you may not use this file except in 
00012   compliance with the License. You may obtain a copy of the License at H066 
00013   Radiology, NMR Building, 500 University Drive, Hershey, PA, 
00014   tel. (717) 531-6069 or via email at dcb210@psu.edu.
00015  
00016   Software distributed under the License is distributed on an "AS IS" basis, 
00017   WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 
00018   for the specific language governing rights and limitations under the 
00019   License.
00020  
00021   The Original Code is listed under Exhibit A of the license.
00022  
00023   The Initial Developer of the Original Code is Don Bigler.
00024  
00025   Contributor(s):
00026 
00027 =========================================================================*/
00037 #ifndef __vtkImageComparison_h
00038 #define __vtkImageComparison_h
00039 
00040 
00041 // Operation options.
00042 #define VTK_GREATER_THAN       0
00043 #define VTK_LESS_THAN          1
00044 #define VTK_GREATER_THAN_EQUAL 2
00045 #define VTK_LESS_THAN_EQUAL    3
00046 #define VTK_EQUAL              4
00047 
00048 #include "vtkThreadedImageAlgorithm.h"
00049 #include "vtkCNMRRImagingWin32Header.h"
00050 
00051 class VTK_CNMRR_IMAGING_EXPORT vtkImageComparison : 
00052   public vtkThreadedImageAlgorithm
00053 {
00054 public:
00055   static vtkImageComparison *New();
00056   vtkTypeRevisionMacro(vtkImageComparison,vtkThreadedImageAlgorithm);
00057   void PrintSelf(ostream& os, vtkIndent indent);
00058 
00060 
00061   vtkSetMacro(Operation,int);
00062   vtkGetMacro(Operation,int);
00063   void SetOperationToGreaterThan() 
00064     {this->SetOperation(VTK_GREATER_THAN);}
00065   void SetOperationToLessThan() 
00066     {this->SetOperation(VTK_LESS_THAN);}
00067   void SetOperationToGreaterThanEqual() 
00068     {this->SetOperation(VTK_GREATER_THAN_EQUAL);}
00069   void SetOperationToLessThanEqual() 
00070     {this->SetOperation(VTK_LESS_THAN_EQUAL);}
00071   void SetOperationToEqual() 
00072     {this->SetOperation(VTK_EQUAL);}
00074   
00075   vtkSetMacro(ConstantC,double);
00076   vtkGetMacro(ConstantC,double);
00077   
00079 
00080   vtkSetMacro(OutputTrueValue, double);
00081   vtkGetMacro(OutputTrueValue, double);
00083   
00085 
00086   virtual void SetInput1(vtkDataObject *in) { this->SetInput(0,in); }
00087   virtual void SetInput2(vtkDataObject *in) { this->SetInput(1,in); }
00089   
00091 
00092   vtkSetMacro(OutputScalarType, int);
00093   vtkGetMacro(OutputScalarType, int);
00094   void SetOutputScalarTypeToDouble()
00095     {this->SetOutputScalarType(VTK_DOUBLE);}
00096   void SetOutputScalarTypeToFloat()
00097     {this->SetOutputScalarType(VTK_FLOAT);}
00098   void SetOutputScalarTypeToLong()
00099     {this->SetOutputScalarType(VTK_LONG);}
00100   void SetOutputScalarTypeToUnsignedLong()
00101     {this->SetOutputScalarType(VTK_UNSIGNED_LONG);}
00102   void SetOutputScalarTypeToInt()
00103     {this->SetOutputScalarType(VTK_INT);}
00104   void SetOutputScalarTypeToUnsignedInt()
00105     {this->SetOutputScalarType(VTK_UNSIGNED_INT);}
00106   void SetOutputScalarTypeToShort()
00107     {this->SetOutputScalarType(VTK_SHORT);}
00108   void SetOutputScalarTypeToUnsignedShort()
00109     {this->SetOutputScalarType(VTK_UNSIGNED_SHORT);}
00110   void SetOutputScalarTypeToChar()
00111     {this->SetOutputScalarType(VTK_CHAR);}
00112   void SetOutputScalarTypeToSignedChar()
00113     {this->SetOutputScalarType(VTK_SIGNED_CHAR);}
00114   void SetOutputScalarTypeToUnsignedChar()
00115     {this->SetOutputScalarType(VTK_UNSIGNED_CHAR);}
00117 
00118 protected:
00119   vtkImageComparison();
00120   ~vtkImageComparison() {};
00121 
00122   int     Operation;
00123   double  ConstantC;
00124   double  OutputTrueValue;
00125   int     OutputScalarType;
00126   
00127   virtual int RequestInformation (vtkInformation *, 
00128                                   vtkInformationVector **,
00129                                   vtkInformationVector *);
00130   
00131   virtual void ThreadedRequestData(vtkInformation *request, 
00132                                    vtkInformationVector **inputVector, 
00133                                    vtkInformationVector *outputVector,
00134                                    vtkImageData ***inData, 
00135                                    vtkImageData **outData,
00136                                    int extent[6], int threadId);
00137 
00138   virtual int FillInputPortInformation(int port, vtkInformation* info);
00139   
00140 private:
00141   vtkImageComparison(const vtkImageComparison&);  // Not implemented.
00142   void operator=(const vtkImageComparison&);  // Not implemented.
00143 };
00144 
00145 #endif

Generated on Tue May 12 14:53:03 2009 for vtkCNMRRLibrary by  doxygen 1.4.7