00001 /*========================================================================= 00002 00003 Program: Medical Imaging & Interaction Toolkit 00004 Language: C++ 00005 Date: $Date$ 00006 Version: $Revision$ 00007 00008 Copyright (c) German Cancer Research Center, Division of Medical and 00009 Biological Informatics. All rights reserved. 00010 See MITKCopyright.txt or https://www.mitk.org/copyright.html for details. 00011 00012 This software is distributed WITHOUT ANY WARRANTY; without even 00013 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00014 PURPOSE. See the above copyright notices for more information. 00015 00016 =========================================================================*/ 00017 00018 #ifndef _mitkSurfaceToImageFilter_h__ 00019 #define _mitkSurfaceToImageFilter_h__ 00020 00021 #include "mitkCommon.h" 00022 #include "MitkExtExports.h" 00023 #include "mitkImageSource.h" 00024 #include "mitkSurface.h" 00025 //#include "mitkImage.h" 00026 00027 class vtkPolyData; 00028 00029 namespace mitk { 00030 00031 //class Mesh; 00032 //class VectorOfContourLines; 00033 00055 class MitkExt_EXPORT SurfaceToImageFilter : public ImageSource 00056 { 00057 public: 00058 mitkClassMacro(SurfaceToImageFilter, ImageSource); 00059 itkNewMacro(Self); 00060 00061 itkSetMacro(MakeOutputBinary, bool); 00062 itkGetMacro(MakeOutputBinary, bool); 00063 itkBooleanMacro(MakeOutputBinary); 00064 00065 itkGetConstMacro(BackgroundValue,float); 00066 itkSetMacro(BackgroundValue,float); 00067 00068 virtual void GenerateInputRequestedRegion(); 00069 00070 virtual void GenerateOutputInformation(); 00071 00072 virtual void GenerateData(); 00073 00074 const mitk::Surface *GetInput(void); 00075 00076 virtual void SetInput(const mitk::Surface *surface); 00077 00078 void SetImage(const mitk::Image *source); 00079 00080 const mitk::Image *GetImage(void); 00081 00082 protected: 00083 SurfaceToImageFilter(); 00084 00085 virtual ~SurfaceToImageFilter(); 00086 00087 void Stencil3DImage(int time = 0); 00088 00089 bool m_MakeOutputBinary; 00090 00091 float m_BackgroundValue; 00092 00093 }; 00094 00095 } // namespace mitk 00096 00097 #endif /* MITKCOONSPATCHFILTER_H_HEADER_INCLUDED_C10B22CD */