NIREP
|
00001 /*========================================================================= 00002 00003 Program: vtkINRIA3D 00004 Module: $Id: RelativeOverlap.h,v 1.2 2009/08/03 18:57:38 hawle Exp $ 00005 Language: C++ 00006 Author: $Author: hawle $ 00007 Date: $Date: 2009/08/03 18:57:38 $ 00008 Version: $Revision: 1.2 $ 00009 00010 Copyright (c) 2007 INRIA - Asclepios Project. All rights reserved. 00011 See Copyright.txt for details. 00012 00013 This software is distributed WITHOUT ANY WARRANTY; without even 00014 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00015 PURPOSE. See the above copyright notices for more information. 00016 00017 =========================================================================*/ 00018 00019 //I have renamed this class from vtkImageBlendWithMask to 00020 //RelativeOverlap. Once this was done I then started 00021 //to make changes so that we can take two objects maps 00022 //and figure out the relative overlap. 00023 //The biggest chang happened in the function vtkRelativeOverlapExecute 00024 //where I changed how the inner most part of the double for loop 00025 //sets the output image. 00026 //Jeffrey Hawley 00027 00028 #ifndef _RelativeOverlap_h_ 00029 #define _RelativeOverlap_h_ 00030 00031 #include "vtkINRIA3DConfigure.h" 00032 00033 #include "vtkThreadedImageAlgorithm.h" 00034 #include "vtkLookupTable.h" 00035 00036 class VTK_RENDERINGADDON_EXPORT RelativeOverlap : public vtkThreadedImageAlgorithm 00037 { 00038 public: 00039 static RelativeOverlap *New(); 00040 vtkTypeRevisionMacro (RelativeOverlap, vtkThreadedImageAlgorithm); 00041 void PrintSelf (ostream &os, vtkIndent indent); 00042 00043 00044 // Set/Get the LUT to map the mask 00045 vtkSetObjectMacro (LookupTable, vtkLookupTable); 00046 vtkGetObjectMacro (LookupTable, vtkLookupTable); 00047 00048 00049 00050 00051 // Description: 00052 // Set the input to be masked. 00053 void SetImageInput(vtkImageData *in); 00054 00055 // Description: 00056 // Set the mask to be used. 00057 void SetMaskInput(vtkImageData *in); 00058 00059 // Description: 00060 // Set the two inputs to this filter 00061 virtual void SetInput1(vtkDataObject *in) { this->SetInput(0,in); } 00062 virtual void SetInput2(vtkDataObject *in) { this->SetInput(1,in); } 00063 00064 protected: 00065 RelativeOverlap(); 00066 ~RelativeOverlap(); 00067 00068 vtkLookupTable* LookupTable; 00069 00070 virtual int RequestInformation (vtkInformation *, 00071 vtkInformationVector **, 00072 vtkInformationVector *); 00073 00074 00075 virtual void ThreadedRequestData(vtkInformation *request, 00076 vtkInformationVector **inputVector, 00077 vtkInformationVector *outputVector, 00078 vtkImageData ***inData, 00079 vtkImageData **outData, 00080 int extent[6], int threadId); 00081 00082 00083 private: 00084 RelativeOverlap (const RelativeOverlap&); 00085 void operator=(const RelativeOverlap&); 00086 00087 }; 00088 00089 00090 00091 #endif