Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef _mitk_labeled_image_to_surface_filter__h_
00019 #define _mitk_labeled_image_to_surface_filter__h_
00020
00021 #include <mitkImageToSurfaceFilter.h>
00022 #include "MitkExtExports.h"
00023 #include <vtkImageData.h>
00024 #include <map>
00025
00026 namespace mitk
00027 {
00028
00040 class MitkExt_EXPORT LabeledImageToSurfaceFilter : public ImageToSurfaceFilter
00041 {
00042 public:
00043
00044 mitkClassMacro( LabeledImageToSurfaceFilter, ImageToSurfaceFilter );
00045
00046 itkNewMacro( Self );
00047
00048 typedef int LabelType;
00049
00050 typedef std::map<LabelType, unsigned long> LabelMapType;
00051
00052 typedef std::map<unsigned int, LabelType> IdxToLabelMapType;
00053
00059 itkSetMacro( GenerateAllLabels, bool );
00060
00065 itkGetMacro( GenerateAllLabels, bool );
00066
00067 itkBooleanMacro( GenerateAllLabels );
00068
00074 itkSetMacro( Label, LabelType );
00075
00081 itkGetMacro( Label, LabelType );
00082
00087 itkSetMacro( BackgroundLabel, LabelType );
00088
00093 itkGetMacro( BackgroundLabel, LabelType );
00094
00099 itkSetMacro( GaussianStandardDeviation, double );
00100
00105 itkGetMacro( GaussianStandardDeviation, double );
00106
00115 LabelType GetLabelForNthOutput( const unsigned int& i );
00116
00123 mitk::ScalarType GetVolumeForNthOutput( const unsigned int& i );
00124
00133 mitk::ScalarType GetVolumeForLabel( const LabelType& label );
00134
00135 protected:
00136
00137 double m_GaussianStandardDeviation;
00138
00139 bool m_GenerateAllLabels;
00140
00141 LabelType m_Label;
00142
00143 LabelType m_BackgroundLabel;
00144
00145 LabelMapType m_AvailableLabels;
00146
00147 IdxToLabelMapType m_IdxToLabels;
00148
00149 virtual void GenerateData();
00150
00151 virtual void GenerateOutputInformation();
00152
00153 virtual void CreateSurface( int time, vtkImageData *vtkimage, mitk::Surface * surface, LabelType label );
00154
00155 virtual LabelMapType GetAvailableLabels();
00156
00157 LabeledImageToSurfaceFilter();
00158
00159 virtual ~LabeledImageToSurfaceFilter();
00160
00161 private:
00162
00163 itkSetMacro(Threshold, ScalarType);
00164
00165 itkGetConstMacro(Threshold, ScalarType);
00166
00167 virtual void CreateSurface(int time, vtkImageData *vtkimage, mitk::Surface * surface, const ScalarType threshold);
00168 };
00169
00170 }
00171
00172 #endif
00173
00174
00175