PlusLib  2.9.0
Software library for tracked ultrasound image acquisition, calibration, and processing.
vtkPlusRfToBrightnessConvert.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 __vtkPlusRfToBrightnessConvert_h
8 #define __vtkPlusRfToBrightnessConvert_h
9 
10 #include "vtkPlusImageProcessingExport.h"
11 #include "vtkThreadedImageAlgorithm.h"
12 
36 class vtkPlusImageProcessingExport vtkPlusRfToBrightnessConvert : public vtkThreadedImageAlgorithm
37 {
38 public:
39  static vtkPlusRfToBrightnessConvert *New();
40  vtkTypeMacro(vtkPlusRfToBrightnessConvert,vtkThreadedImageAlgorithm);
41  virtual void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
42 
44  virtual PlusStatus ReadConfiguration(vtkXMLDataElement* rfToBrightnessElement);
45 
47  virtual PlusStatus WriteConfiguration(vtkXMLDataElement* rfToBrightnessElement);
48 
50  vtkSetMacro(ImageType, US_IMAGE_TYPE);
51  vtkGetMacro(ImageType, US_IMAGE_TYPE);
52 
53  vtkSetMacro(NumberOfHilbertFilterCoeffs, int);
54  vtkGetMacro(NumberOfHilbertFilterCoeffs, int);
55 
56  vtkSetMacro(BrightnessScale, double);
57  vtkGetMacro(BrightnessScale, double);
58 
59 protected:
62 
63  virtual int RequestInformation(vtkInformation*,
64  vtkInformationVector**,
65  vtkInformationVector* outputVector);
66 
67  void ThreadedRequestData( vtkInformation *request,
68  vtkInformationVector **inputVector,
69  vtkInformationVector *outputVector,
70  vtkImageData ***inData, vtkImageData **outData,
71  int outExt[6], int id);
72 
74  virtual void ComputeHilbertTransformCoeffs();
75 
77  template<typename ScalarType>
78  void ThreadedLineByLineHilbertTransform(int inExt[6], int outExt[6], vtkImageData ***inData, vtkImageData **outData, int threadId);
79 
81  template<typename ScalarType>
82  PlusStatus ComputeHilbertTransform(ScalarType *hilbertTransformOutput, ScalarType *input, int npt);
83 
85  template<typename ScalarType>
86  void ComputeAmplitudeILineQLine(unsigned char *ampl, ScalarType *inputSignal, ScalarType *inputSignalHilbertTransformed, int npt);
87 
89  template<typename ScalarType>
90  void ComputeAmplitudeIqLine(unsigned char *ampl, ScalarType *inputSignal, const int npt);
91 
94 
97 
99  std::vector<double> HilbertTransformCoeffs;
100 
102  US_IMAGE_TYPE ImageType;
103 
104 private:
106  void operator=(const vtkPlusRfToBrightnessConvert&); // Not implemented.
107 };
108 
109 #endif
110 
111 
112 
This class converts ultrasound RF data to brightness values.
igsioStatus PlusStatus
Definition: PlusCommon.h:40
#define VTK_OVERRIDE
Definition: PlusCommon.h:49