Skip to content
Snippets Groups Projects
Commit 975034c4 authored by Luc Hermitte's avatar Luc Hermitte
Browse files

REFACT: `=default`/`=delete` as much as possible

parent 41c51b0e
No related branches found
No related tags found
1 merge request!1Resolve "Adapt DiapOTB SARCartesianMeanEstimation to keep shadows"
......@@ -319,10 +319,7 @@ public:
}
// default constructor
SARCartesianMeanFunctor()
{
}
SARCartesianMeanFunctor() = delete;
/** Constructor */ //
SARCartesianMeanFunctor(int nbThreads, unsigned int mlran = 1, unsigned int mlazi = 1,
......
......@@ -161,11 +161,11 @@ public:
void initializeMarginAndRSTransform();
protected:
// Constructor
SARDEMPolygonsAnalysisImageFilter();
// Default Constructor
SARDEMPolygonsAnalysisImageFilter() = default;
// Destructor
virtual ~SARDEMPolygonsAnalysisImageFilter() final {};
virtual ~SARDEMPolygonsAnalysisImageFilter() final = default;
// Print
void PrintSelf(std::ostream & os, itk::Indent indent) const final;
......@@ -205,7 +205,6 @@ protected:
* ImageToImageFilter::GenerateData() */
virtual void ThreadedGenerateData(const ImageOutRegionType& outputRegionForThread, itk::ThreadIdType threadId) final;
/**
* Select for the current SAR Line (ind_LineSAR), the polygons that intersect the current SAR line.
* This selection is always made with the SAR Line (even in ML geometry for the main output).
......@@ -229,11 +228,11 @@ protected:
int nbCol_into_outputRegion, ImageOutPixelType * outValueTab, int threadId);
private:
SARDEMPolygonsAnalysisImageFilter(const Self&); // purposely not implemented
void operator=(const Self &); // purposely not
SARDEMPolygonsAnalysisImageFilter(const Self&) = delete;
Self& operator=(const Self &) = delete;
// Instance of SarSensorModelAdapter
SarSensorModelAdapter::Pointer m_SarSensorModelAdapter;
SarSensorModelAdapter::Pointer m_SarSensorModelAdapter = nullptr;
// SAR Image (only metadata)
ImageSARPointer m_SarImagePtr;
......@@ -245,17 +244,17 @@ private:
ImageKeywordlist m_SarImageKwl;
// Multiplying gain to obtain a mean radiometry at 100
double m_Gain;
double m_Gain = 100.;
// Directions to scan the DEM in function of SAR geometry (from near to far range)
int m_DEMdirL;
int m_DEMdirC;
// Margin for polygon selection
int m_Margin;
int m_Margin = 0;
// Value for NoDATA
int m_NoData;
int m_NoData = -32768;
// Function to apply on DEM Polygon
FunctionPointer m_FunctionOnPolygon;
......@@ -263,8 +262,8 @@ private:
// Output Geometry (SAR or ML)
std::string m_OutGeometry;
// ML factor (for ML geometry)
unsigned int m_MLRan;
unsigned int m_MLAzi;
unsigned int m_MLRan = 1;
unsigned int m_MLAzi = 1;
// Sar dimensions
int m_NbLinesSAR;
......
......@@ -35,16 +35,6 @@
namespace otb
{
/**
* Constructor with default initialization
*/
template <class TImageIn, class TImageOut, class TImageDEM, class TImageSAR, class TFunction>
SARDEMPolygonsAnalysisImageFilter< TImageIn ,TImageOut, TImageDEM, TImageSAR, TFunction >
::SARDEMPolygonsAnalysisImageFilter()
: m_SarSensorModelAdapter(nullptr), m_Gain(100.), m_Margin(0), m_NoData(-32768), m_MLRan(1), m_MLAzi(1)
{
}
/**
* Set Sar Image keyWordList
*/
......
......@@ -91,14 +91,10 @@ public:
bool isFirstMaille, double & tgElevationMaxForCurrentLine, int threadId=1) = 0;
// Synthetize method
virtual void synthetize(int /*nbElt*/, TOutputPixel * /*outValue*/, int /*threadId=1*/)
{
}
virtual void synthetize(int /*nbElt*/, TOutputPixel * /*outValue*/, int /*threadId=1*/) = 0;
// estimateOptionnalImage method
virtual void estimateOptionnalImage(TOutputPixel * /*outValue*/, int /*threadId=1*/)
{
}
virtual void estimateOptionnalImage(TOutputPixel * /*outValue*/, int /*threadId=1*/) {}
// Getter/Setter
itkSetMacro(NumberOfExpectedComponents, unsigned int);
......@@ -151,26 +147,20 @@ public:
return m_RequiredComponentsToInd;
}
/** Constructor */
SARPolygonsFunctor()
{
m_NumberOfExpectedComponents = 1;
m_NumberOfEstimatedComponents = 1;
m_OutputGeometry = "SAR";
m_WithOptionnalOutput = false;
}
/** Default constructor */
SARPolygonsFunctor() = default;
/** Destructor */
~SARPolygonsFunctor() override {}
~SARPolygonsFunctor() override = default;
private :
// Number of expected Components for input
unsigned m_NumberOfExpectedComponents;
unsigned m_NumberOfExpectedComponents = 1;
// Number of estimated Components for output
unsigned m_NumberOfEstimatedComponents;
unsigned m_NumberOfEstimatedComponents = 1;
// Geometry of output image into PolygonsAnalysis Filter (SAR or Polygons)
std::string m_OutputGeometry;
std::string m_OutputGeometry = "SAR";
// Vector of required Components
std::vector<std::string> m_RequiredComponents;
// Map of required Components
......@@ -181,8 +171,7 @@ private :
int m_NbColSAR;
int m_NbLinesSAR;
// Boolean for optionnal output
bool m_WithOptionnalOutput; // Optionnal output must be a complement of the main output (small image)
bool m_WithOptionnalOutput = false; // Optionnal output must be a complement of the main output (small image)
};
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment