PlusLib  2.9.0
Software library for tracked ultrasound image acquisition, calibration, and processing.
vtkPlusForoughiBoneSurfaceProbability.h
Go to the documentation of this file.
1 /*=Plus=header=begin======================================================
2  Program: Plus
3  Copyright (c) Laboratory for Percutaneous Surgery. All rights reserved.
4  See License.txt for details.
5 =========================================================Plus=header=end*/
6 
7 #ifndef vtkPlusForoughiBoneSurfaceProbability_h
8 #define vtkPlusForoughiBoneSurfaceProbability_h
9 
30 #include "vtkPlusImageProcessingExport.h"
31 
32 #include "vtkSimpleImageToImageFilter.h"
33 #include "vtkSmartPointer.h"
34 
35 class vtkPlusImageProcessingExport vtkPlusForoughiBoneSurfaceProbability : public vtkSimpleImageToImageFilter
36 {
37 public:
39  vtkTypeMacro(vtkPlusForoughiBoneSurfaceProbability, vtkSimpleImageToImageFilter);
40 
42  vtkSetMacro(BlurredVSBLoG, int);
43  vtkGetMacro(BlurredVSBLoG, int);
44 
46  vtkSetMacro(BoneThreshold, double);
47  vtkGetMacro(BoneThreshold, double);
48 
50  vtkSetMacro(ShadowSigma, double);
51  vtkGetMacro(ShadowSigma, double);
52 
53  /* Controls the ratio between the shadow map and the reflection number. */
54  vtkSetMacro(ShadowVSIntensity, int);
55  vtkGetMacro(ShadowVSIntensity, int);
56 
58  vtkSetMacro(SmoothingSigma, double);
59  vtkGetMacro(SmoothingSigma, double);
60 
62  vtkSetMacro(TransducerMargin, int);
63  vtkGetMacro(TransducerMargin, int);
64 
65 protected:
68 
69  void UpdateKernels();
70  void DeleteKernels();
71 
72  void Foroughi2007(double* inputBuffer, double* outputBuffer, double smoothingSigma, int transducerMargin, double shadowSigma, double boneThreshold, int blurredVSBLoG, int shadowVSIntensity, int nx, int ny, int nz);
73  void Conv2(const double* inputBuffer, const double* kernelBuffer, double* tempBuffer, double* outputBuffer, int nx, int ny, int kx, int ky);
74  void ResizeMatrix(const double* inputBuffer, double* outputBuffer, int xClipping, int yClipping, int xInputSize, int yInputSize);
75  double GetMaxPixelValue(const double* buffer, int size);
76  void Normalize(double* buffer, int size, bool doInverse, double maxValue = 1.0);
77 
78  virtual void SimpleExecute(vtkImageData* input, vtkImageData* output);
79 
81  double BoneThreshold;
82  double ShadowSigma;
86 
88 
90  FrameSizeType FrameSize;
91 
98  double* MklShadowModel;
101 
102 private:
104  void operator=(const vtkPlusForoughiBoneSurfaceProbability&); // Not implemented.
105 };
106 
107 #endif
This class computes bone surface probability by dynamic programming.