All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Types | Private Attributes | List of all members
icarus_tool::ROICannyEdgeDetection Class Reference
Inheritance diagram for icarus_tool::ROICannyEdgeDetection:
icarus_tool::IROILocator

Public Member Functions

 ROICannyEdgeDetection (const fhicl::ParameterSet &pset)
 
 ~ROICannyEdgeDetection ()
 
void configure (const fhicl::ParameterSet &pset) override
 
void initializeHistograms (art::TFileDirectory &) override
 
void FindROIs (const art::Event &, const ArrayFloat &, const std::vector< raw::ChannelID_t > &, const geo::PlaneID &, ArrayFloat &, ArrayBool &) override
 
- Public Member Functions inherited from icarus_tool::IROILocator
virtual ~IROILocator () noexcept=default
 

Private Types

using FloatPairVec = std::vector< std::pair< float, float >>
 

Private Attributes

bool fDiagnosticOutput
 
unsigned int fButterworthOrder
 Order parameter for Butterworth filter. More...
 
unsigned int fButterworthThreshold
 Threshold for Butterworth filter. More...
 
unsigned int fADFilter_SX
 
unsigned int fADFilter_SY
 
float fSigma_x
 
float fSigma_y
 
float fSigma_r
 
float fLowThreshold
 
float fHighThreshold
 
unsigned int fBinaryDilation_SX
 
unsigned int fBinaryDilation_SY
 
icarus_signal_processing::VectorFloat fThresholdVec
 
const geo::GeometryfGeometry
 
std::unique_ptr
< icarus_signal_processing::IFFTFilterFunction > 
fButterworthFilter
 
std::unique_ptr
< icarus_signal_processing::BilateralFilters > 
fBilateralFilters
 
std::unique_ptr
< icarus_signal_processing::EdgeDetection > 
fEdgeDetection
 
std::unique_ptr
< icarus_signal_processing::IROIFinder2D > 
fROIFinder2D
 

Additional Inherited Members

- Public Types inherited from icarus_tool::IROILocator
using VectorBool = std::vector< bool >
 
using VectorFloat = std::vector< float >
 
using ArrayBool = std::vector< VectorBool >
 
using ArrayFloat = std::vector< VectorFloat >
 
using PlaneIDVec = std::vector< geo::PlaneID >
 

Detailed Description

Definition at line 30 of file ROICannyEdgeDetection_tool.cc.

Member Typedef Documentation

using icarus_tool::ROICannyEdgeDetection::FloatPairVec = std::vector<std::pair<float,float>>
private

Definition at line 44 of file ROICannyEdgeDetection_tool.cc.

Constructor & Destructor Documentation

icarus_tool::ROICannyEdgeDetection::ROICannyEdgeDetection ( const fhicl::ParameterSet &  pset)
explicit

Definition at line 89 of file ROICannyEdgeDetection_tool.cc.

90 {
91  configure(pset);
92 }
void configure(const fhicl::ParameterSet &pset) override
icarus_tool::ROICannyEdgeDetection::~ROICannyEdgeDetection ( )

Definition at line 94 of file ROICannyEdgeDetection_tool.cc.

95 {
96 }

Member Function Documentation

void icarus_tool::ROICannyEdgeDetection::configure ( const fhicl::ParameterSet &  pset)
overridevirtual

Implements icarus_tool::IROILocator.

Definition at line 98 of file ROICannyEdgeDetection_tool.cc.

99 {
100  fDiagnosticOutput = pset.get<bool >("DiagnosticOutput", false);
101 
102  fButterworthOrder = pset.get<unsigned int >("ButterworthOrder", 2);
103  fButterworthThreshold = pset.get<unsigned int >("ButterworthThreshld", 30);
104 
105  fButterworthFilter = std::make_unique<icarus_signal_processing::HighPassButterworthFilter>(fButterworthThreshold,fButterworthOrder,4096);
106  //fButterworthFilter = std::make_unique<icarus_signal_processing::NoFFTFilter>();
107 
108 // fMorph2DStructuringElementX = pset.get<unsigned int >("Morph2DStructuringElementX", 7);
109 // fMorph2DStructuringElementY = pset.get<unsigned int >("Morph2DStructuringElementX", 28);
110 //
111 // fMorphologicalFilter = std::make_unique<icarus_signal_processing::Dilation2D>(fMorph2DStructuringElementX,fMorph2DStructuringElementY);
112 //
113 // fCoherentNoiseGrouping = pset.get<unsigned int >("CoherentNoiseGrouping", 32);
114 // fCoherentNoiseOffset = pset.get<unsigned int >("CoherentNoiseOffset", 24);
115 // fMorphologicalWindow = pset.get<unsigned int >("MorphologicalWindow", 10);
116 // fCoherentThresholdFactor = pset.get<float >("CoherentThresholdFactor", 2.5);
117 //
118 // fThresholdVec.resize(6560/fCoherentNoiseGrouping,fCoherentThresholdFactor);
119 //
120 // fDenoiser2D = std::make_unique<icarus_signal_processing::Denoiser2D_Hough>(fMorphologicalFilter.get(), fThresholdVec, fCoherentNoiseGrouping, fCoherentNoiseOffset, fMorphologicalWindow);
121 // //fDenoiser2D = std::make_unique<icarus_signal_processing::Denoiser2D>(fMorphologicalFilter.get(), fThresholdVec, fCoherentNoiseGrouping, fMorphologicalWindow);
122 
123  fADFilter_SX = pset.get<unsigned int >("ADFilter_SX", 7);
124  fADFilter_SY = pset.get<unsigned int >("ADFilter_SY", 7);
125  fSigma_x = pset.get<float >("Sigma_x", 10.0);
126  fSigma_y = pset.get<float >("Sigma_y", 10.0);
127  fSigma_r = pset.get<float >("Sigma_r", 30.0);
128 
129  fLowThreshold = pset.get<float >("LowThreshold", 10.0);
130  fHighThreshold = pset.get<float >("HighThreshold", 20.0);
131 
132  fBinaryDilation_SX = pset.get<unsigned int >("BinaryDilation_SX", 31);
133  fBinaryDilation_SY = pset.get<unsigned int >("BinaryDilation_SY", 31);
134 
135  fBilateralFilters = std::make_unique<icarus_signal_processing::BilateralFilters>();
136  fEdgeDetection = std::make_unique<icarus_signal_processing::EdgeDetection>();
137 
138  fROIFinder2D = std::make_unique<icarus_signal_processing::ROICannyFilter>(fButterworthFilter.get(),
139  nullptr, //fDenoiser2D.get(),
140  fBilateralFilters.get(),
141  fEdgeDetection.get(),
142  fADFilter_SX,
143  fADFilter_SY,
144  fSigma_x,
145  fSigma_y,
146  fSigma_r,
151 
152  fGeometry = art::ServiceHandle<geo::Geometry const>{}.get();
153 
154  return;
155 }
std::unique_ptr< icarus_signal_processing::IROIFinder2D > fROIFinder2D
unsigned int fButterworthThreshold
Threshold for Butterworth filter.
unsigned int fButterworthOrder
Order parameter for Butterworth filter.
std::unique_ptr< icarus_signal_processing::BilateralFilters > fBilateralFilters
std::unique_ptr< icarus_signal_processing::EdgeDetection > fEdgeDetection
std::unique_ptr< icarus_signal_processing::IFFTFilterFunction > fButterworthFilter
void icarus_tool::ROICannyEdgeDetection::FindROIs ( const art::Event &  event,
const ArrayFloat inputImage,
const std::vector< raw::ChannelID_t > &  channelVec,
const geo::PlaneID planeID,
ArrayFloat output,
ArrayBool outputROIs 
)
overridevirtual

Implements icarus_tool::IROILocator.

Definition at line 157 of file ROICannyEdgeDetection_tool.cc.

158 {
159  cet::cpu_timer theClockTotal;
160 
161  theClockTotal.start();
162 
163  std::cout << " --> calling icarus_signal_processing canny edge finder" << std::endl;
164 
165  // Now pass the entire data array to the denoisercoherent
166  (*fROIFinder2D)(inputImage,output,outputROIs); //,fWaveLessCoherent,fCorrectedMedians,fIntrinsicRMS,fMorphedWaveforms,finalErosion);
167 
168  std::cout << " --> have returned from canny" << std::endl;
169 
170  theClockTotal.stop();
171 
172  double totalTime = theClockTotal.accumulated_real_time();
173 
174  mf::LogInfo("TPCNoiseFilterCannyMC") << " *totalTime: " << totalTime << std::endl;
175 
176  std::cout << "--> ROICannyEdgeDetection finished!" << std::endl;
177  std::cout << " - Total time: " << totalTime << std::endl;
178 
179  return;
180 }
BEGIN_PROLOG sequence::SlidingWindowTriggerPatternsOppositeWindows END_PROLOG simSlidingORM6O6 effSlidingORW output
BEGIN_PROLOG could also be cout
void icarus_tool::ROICannyEdgeDetection::initializeHistograms ( art::TFileDirectory &  )
inlineoverridevirtual

Implements icarus_tool::IROILocator.

Definition at line 38 of file ROICannyEdgeDetection_tool.cc.

38 {return;}

Member Data Documentation

unsigned int icarus_tool::ROICannyEdgeDetection::fADFilter_SX
private

Definition at line 64 of file ROICannyEdgeDetection_tool.cc.

unsigned int icarus_tool::ROICannyEdgeDetection::fADFilter_SY
private

Definition at line 65 of file ROICannyEdgeDetection_tool.cc.

std::unique_ptr<icarus_signal_processing::BilateralFilters> icarus_tool::ROICannyEdgeDetection::fBilateralFilters
private

Definition at line 82 of file ROICannyEdgeDetection_tool.cc.

unsigned int icarus_tool::ROICannyEdgeDetection::fBinaryDilation_SX
private

Definition at line 71 of file ROICannyEdgeDetection_tool.cc.

unsigned int icarus_tool::ROICannyEdgeDetection::fBinaryDilation_SY
private

Definition at line 72 of file ROICannyEdgeDetection_tool.cc.

std::unique_ptr<icarus_signal_processing::IFFTFilterFunction> icarus_tool::ROICannyEdgeDetection::fButterworthFilter
private

Definition at line 79 of file ROICannyEdgeDetection_tool.cc.

unsigned int icarus_tool::ROICannyEdgeDetection::fButterworthOrder
private

Order parameter for Butterworth filter.

Definition at line 49 of file ROICannyEdgeDetection_tool.cc.

unsigned int icarus_tool::ROICannyEdgeDetection::fButterworthThreshold
private

Threshold for Butterworth filter.

Definition at line 50 of file ROICannyEdgeDetection_tool.cc.

bool icarus_tool::ROICannyEdgeDetection::fDiagnosticOutput
private

Definition at line 46 of file ROICannyEdgeDetection_tool.cc.

std::unique_ptr<icarus_signal_processing::EdgeDetection> icarus_tool::ROICannyEdgeDetection::fEdgeDetection
private

Definition at line 83 of file ROICannyEdgeDetection_tool.cc.

const geo::Geometry* icarus_tool::ROICannyEdgeDetection::fGeometry
private

Definition at line 76 of file ROICannyEdgeDetection_tool.cc.

float icarus_tool::ROICannyEdgeDetection::fHighThreshold
private

Definition at line 70 of file ROICannyEdgeDetection_tool.cc.

float icarus_tool::ROICannyEdgeDetection::fLowThreshold
private

Definition at line 69 of file ROICannyEdgeDetection_tool.cc.

std::unique_ptr<icarus_signal_processing::IROIFinder2D> icarus_tool::ROICannyEdgeDetection::fROIFinder2D
private

Definition at line 84 of file ROICannyEdgeDetection_tool.cc.

float icarus_tool::ROICannyEdgeDetection::fSigma_r
private

Definition at line 68 of file ROICannyEdgeDetection_tool.cc.

float icarus_tool::ROICannyEdgeDetection::fSigma_x
private

Definition at line 66 of file ROICannyEdgeDetection_tool.cc.

float icarus_tool::ROICannyEdgeDetection::fSigma_y
private

Definition at line 67 of file ROICannyEdgeDetection_tool.cc.

icarus_signal_processing::VectorFloat icarus_tool::ROICannyEdgeDetection::fThresholdVec
private

Definition at line 74 of file ROICannyEdgeDetection_tool.cc.


The documentation for this class was generated from the following file: