Commit e04114d4 authored by Guillaume Pasero's avatar Guillaume Pasero

COV: fix UNINIT_CTOR

parent 679695bb
......@@ -67,6 +67,12 @@ public:
private:
SOMClassification()
{
m_UseMask = false;
m_Classifier = ClassificationFilterType::New();
}
void DoInit()
{
SetName("SOMClassification");
......@@ -367,7 +373,6 @@ private:
/*******************************************/
otbAppLogINFO("-- CLASSIFICATION --");
m_Classifier = ClassificationFilterType::New();
m_Classifier->SetInput(input);
m_Classifier->SetMap(m_SOMMap);
if (m_UseMask) m_Classifier->SetInputMask(mask);
......
......@@ -79,7 +79,7 @@ class VectorMapping
public:
typedef typename TOutput::ValueType ValueType;
VectorMapping() {}
VectorMapping() : m_OutputSize(0) {}
virtual ~VectorMapping() {}
typedef std::map<TInput, TOutput, VectorLexicographicCompare<TInput> > ChangeMapType;
......@@ -636,7 +636,7 @@ private:
{
LabelType clabel = mapIt->first;
meanValue = mapIt->second; //meanValue.Size() is null if label is not present in label image
if (meanValue.Size()==0)
if (meanValue.Size() != supportImage->GetNumberOfComponentsPerPixel())
{
color.Fill(0.0);
}
......
......@@ -68,6 +68,8 @@ public:
private:
int m_Mode;
DownloadSRTMTiles() : m_Mode(Mode_Download) {}
bool SRTMTileExists(const std::string & url) const
{
......
......@@ -81,7 +81,7 @@ public:
void ComputeBoundingRegion();
protected:
/** Constructor */
VectorDataProperties(){};
VectorDataProperties() : m_VectorDataObject(NULL) {};
/** Destructor */
virtual ~VectorDataProperties() {}
/**PrintSelf method */
......
......@@ -36,6 +36,7 @@ DEMToImageGenerator<TDEMImage>
m_OutputSize[1] = 1;
m_OutputOrigin[0] = 0;
m_OutputOrigin[1] = 0;
m_DefaultUnknownValue = itk::NumericTraits<PixelType>::ZeroValue();
m_AboveEllipsoid = false;
m_Transform = GenericRSTransformType::New();
......
......@@ -29,6 +29,7 @@ namespace otb
template <class TInputImage, class TOutputImage>
ChangeLabelImageFilter<TInputImage, TOutputImage>
::ChangeLabelImageFilter()
: m_NumberOfComponentsPerPixel(0)
{
}
......
......@@ -28,6 +28,7 @@ namespace otb
template <class TImage>
StreamingShrinkStreamingManager<TImage>::StreamingShrinkStreamingManager()
: m_ShrinkFactor(10)
{
}
......
......@@ -35,10 +35,11 @@ MeanShiftSmoothingImageFilter<TInputImage, TOutputImage, TKernel, TOutputIterati
// , m_SpatialRadius(???)
, m_Threshold(1e-3), m_MaxIterationNumber(10)
// , m_Kernel(...)
// , m_NumberOfComponentsPerPixel(...)
, m_NumberOfComponentsPerPixel(0)
// , m_JointImage(0)
// , m_ModeTable(0)
, m_ModeSearch(true)
, m_ThreadIdNumberOfBits(0)
#if 0
, m_BucketOptimization(false)
#endif
......
......@@ -28,6 +28,8 @@ namespace otb
template <class TVectorData, class TPrecision>
VectorDataToDSValidatedVectorDataFilter<TVectorData, TPrecision>
::VectorDataToDSValidatedVectorDataFilter() :
m_Bel(0.0),
m_Plau(0.0),
m_CriterionFormula("((Belief + Plausibility)/2.)"),
m_CriterionThreshold(0.5),
m_CurrentID(0)
......
......@@ -30,7 +30,11 @@ ConfusionMatrixCalculator<TRefListLabel, TProdListLabel>
m_TrueNegativeValue(0.0),
m_FalsePositiveValue(0.0),
m_TruePositiveValue(0.0),
m_NumberOfClasses(0)
m_Precision(0.0),
m_Recall(0.0),
m_FScore(0.0),
m_NumberOfClasses(0),
m_NumberOfSamples(0)
{
m_ConfusionMatrix = ConfusionMatrixType(m_NumberOfClasses, m_NumberOfClasses);
......
......@@ -31,7 +31,8 @@ template <class TInputLabelImage, class TInputSpectralImage, class TOutputLabelI
LabelImageRegionMergingFilter<TInputLabelImage, TInputSpectralImage, TOutputLabelImage, TOutputClusteredImage>
::LabelImageRegionMergingFilter()
{
m_RangeBandwidth=1.0;
m_NumberOfComponentsPerPixel=0;
this->SetNumberOfRequiredInputs( 2 );
this->SetNumberOfRequiredOutputs(2);
......
......@@ -31,6 +31,7 @@ template <class TInputLabelImage, class TInputSpectralImage, class TOutputLabelI
LabelImageRegionPruningFilter<TInputLabelImage, TInputSpectralImage, TOutputLabelImage, TOutputClusteredImage>
::LabelImageRegionPruningFilter()
{
m_NumberOfComponentsPerPixel=0;
m_MinRegionSize=100;
this->SetNumberOfRequiredInputs( 2 );
......
......@@ -30,6 +30,7 @@ MorphologicalProfilesSegmentationFilter<TInputImage,TOuputImage,TInternalPrecisi
m_ProfileSize = 5;
m_ProfileStart = 1;
m_ProfileStep = 1;
m_Sigma = 0.0;
m_ClassificationFilter = MultiScaleClassificationFilterType::New();
m_ConnectedComponentsFilter = ConnectedComponentsFilterType::New();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment