• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

dox/Hybrid/vtkPolyDataToImageStencil.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkPolyDataToImageStencil.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 =========================================================================*/
00015 /*=========================================================================
00016 
00017 Copyright (c) 2008 Atamai, Inc.
00018 
00019 Use, modification and redistribution of the software, in source or
00020 binary forms, are permitted provided that the following terms and
00021 conditions are met:
00022 
00023 1) Redistribution of the source code, in verbatim or modified
00024    form, must retain the above copyright notice, this license,
00025    the following disclaimer, and any notices that refer to this
00026    license and/or the following disclaimer.  
00027 
00028 2) Redistribution in binary form must include the above copyright
00029    notice, a copy of this license and the following disclaimer
00030    in the documentation or with other materials provided with the
00031    distribution.
00032 
00033 3) Modified copies of the source code must be clearly marked as such,
00034    and must not be misrepresented as verbatim copies of the source code.
00035 
00036 THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS"
00037 WITHOUT EXPRESSED OR IMPLIED WARRANTY INCLUDING, BUT NOT LIMITED TO,
00038 THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
00039 PURPOSE.  IN NO EVENT SHALL ANY COPYRIGHT HOLDER OR OTHER PARTY WHO MAY
00040 MODIFY AND/OR REDISTRIBUTE THE SOFTWARE UNDER THE TERMS OF THIS LICENSE
00041 BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL OR CONSEQUENTIAL DAMAGES
00042 (INCLUDING, BUT NOT LIMITED TO, LOSS OF DATA OR DATA BECOMING INACCURATE
00043 OR LOSS OF PROFIT OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF
00044 THE USE OR INABILITY TO USE THE SOFTWARE, EVEN IF ADVISED OF THE
00045 POSSIBILITY OF SUCH DAMAGES.
00046 
00047 =========================================================================*/
00066 #ifndef __vtkPolyDataToImageStencil_h
00067 #define __vtkPolyDataToImageStencil_h
00068 
00069 #include "vtkImageStencilSource.h"
00070 
00071 class vtkMergePoints;
00072 class vtkDataSet;
00073 class vtkPolyData;
00074 class vtkImageData;
00075 
00076 class VTK_HYBRID_EXPORT vtkPolyDataToImageStencil :
00077   public vtkImageStencilSource
00078 {
00079 public:
00080   static vtkPolyDataToImageStencil* New();
00081   vtkTypeRevisionMacro(vtkPolyDataToImageStencil, vtkImageStencilSource);
00082   void PrintSelf(ostream& os, vtkIndent indent);
00083 
00085 
00086   virtual void SetInput(vtkPolyData*);
00087   vtkPolyData *GetInput();
00089   
00091 
00096   virtual void SetInformationInput(vtkImageData*);
00097   vtkGetObjectMacro(InformationInput, vtkImageData);
00099 
00101 
00104   vtkSetVector3Macro(OutputOrigin, double);
00105   vtkGetVector3Macro(OutputOrigin, double);
00107 
00109 
00112   vtkSetVector3Macro(OutputSpacing, double);
00113   vtkGetVector3Macro(OutputSpacing, double);
00115 
00117 
00121   vtkSetVector6Macro(OutputWholeExtent, int);
00122   vtkGetVector6Macro(OutputWholeExtent, int);  
00124 
00126 
00129   vtkSetClampMacro(Tolerance, double, 0.0, 1.0);
00130   vtkGetMacro(Tolerance, double);
00132 
00133 protected:
00134   vtkPolyDataToImageStencil();
00135   ~vtkPolyDataToImageStencil();
00136 
00137   void ThreadedExecute(vtkImageStencilData *output,
00138                        int extent[6], int threadId);
00139 
00140   static void DataSetCutter(vtkDataSet *input, vtkPolyData *output,
00141                             double z, vtkMergePoints *locator);
00142   
00143   virtual int RequestData(vtkInformation *, vtkInformationVector **,
00144                           vtkInformationVector *);
00145   virtual int RequestInformation(vtkInformation *, vtkInformationVector **,
00146                                  vtkInformationVector *);
00147   virtual int FillInputPortInformation(int, vtkInformation*);
00148 
00150   vtkImageData *InformationInput;
00151 
00153 
00154   int OutputWholeExtent[6];
00155   double OutputOrigin[3];
00156   double OutputSpacing[3];
00158 
00160   double Tolerance;
00161 
00162 private:
00163   vtkPolyDataToImageStencil(const vtkPolyDataToImageStencil&);  // Not implemented.
00164   void operator=(const vtkPolyDataToImageStencil&);  // Not implemented.
00165 };
00166 
00167 #endif

Generated by  doxygen 1.7.1