Commit 70a3f75e authored by remi cresson's avatar remi cresson

merge mainstream repo

parents 693f6db6 a08d2309
......@@ -127,7 +127,7 @@ namespace otb
segmenter.Update();
labelImage = segmenter.GetLabeledClusteredOutput();
// rvbLabelImage = segmenter.GetClusteredImageOutput();
//SetParameterOutputImage<LabelImageType>("out", segmenter.GetLabeledClusteredOutput());
}
else if(selectedCriterion == "ed")
{
......@@ -143,7 +143,7 @@ namespace otb
segmenter.Update();
labelImage = segmenter.GetLabeledClusteredOutput();
// rvbLabelImage = segmenter.GetClusteredImageOutput();
//SetParameterOutputImage<LabelImageType>("out", segmenter.GetLabeledClusteredOutput());
}
else if(selectedCriterion == "fls")
{
......@@ -159,21 +159,14 @@ namespace otb
segmenter.Update();
labelImage = segmenter.GetLabeledClusteredOutput();
rvbLabelImage = segmenter.GetClusteredImageOutput();
//SetParameterOutputImage<LabelImageType>("out", segmenter.GetLabeledClusteredOutput());
}
// Set output image projection, origin and spacing for labelImage
labelImage->SetProjectionRef(image->GetProjectionRef());
labelImage->SetOrigin(image->GetOrigin());
labelImage->SetSpacing(image->GetSpacing());
SetParameterOutputImage<LabelImageType>("out", labelImage);
// // Set output image projection, origin and spacing for RVB labelImage
// rvbLabelImage->SetProjectionRef(image->GetProjectionRef());
// rvbLabelImage->SetOrigin(image->GetOrigin());
// rvbLabelImage->SetSpacing(image->GetSpacing());
// SetParameterOutputImage<RGBLabelImageType>("outrvb", rvbLabelImage);
}
};
} // end of namespace Wrapper
......
......@@ -15,8 +15,8 @@
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef __GRM_BAATZ_SEGMENTER_H
#define __GRM_BAATZ_SEGMENTER_H
#ifndef GRM_BAATZ_SEGMENTER_H
#define GRM_BAATZ_SEGMENTER_H
#include "grmSegmenter.h"
namespace grm
......@@ -57,7 +57,4 @@ namespace grm
};
} // end of namespace grm
#include "grmBaatzSegmenter.txx"
#endif
#endif
\ No newline at end of file
......@@ -15,10 +15,11 @@
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef __GRM_BAATZ_SEGMENTER_TXX
#define __GRM_BAATZ_SEGMENTER_TXX
#ifndef GRM_BAATZ_SEGMENTER_TXX
#define GRM_BAATZ_SEGMENTER_TXX
#include <otbImageFileReader.h>
#include <itkImageRegionIterator.h>
#include "grmBaatzSegmenter.h"
namespace grm
{
......@@ -69,7 +70,7 @@ namespace grm
std = std::sqrt((square_mean - 2*mean*sum + a_sum * mean* mean) / a_sum);
spect_cost += (a_sum * std - a1 * n1->m_Std[b] - a2 * n2->m_Std[b]);
}
spect_cost *= this->m_Param.m_ShapeWeight;
spect_cost *= this->m_Param.m_SpectralWeight;
if(spect_cost < this->m_Threshold)
{
......@@ -91,7 +92,7 @@ namespace grm
shape_cost = this->m_Param.m_ShapeWeight * compact_f + (1-this->m_Param.m_ShapeWeight) * smooth_f;
return (spect_cost + (1-this->m_Param.m_ShapeWeight)*shape_cost);
return (spect_cost + (1-this->m_Param.m_SpectralWeight)*shape_cost);
}
else
return spect_cost;
......@@ -116,11 +117,4 @@ namespace grm
}
} // end of namespace grm
#endif
#endif
\ No newline at end of file
......@@ -15,8 +15,8 @@
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef __GRM_DATA_STRUCTURES_H
#define __GRM_DATA_STRUCTURES_H
#ifndef GRM_DATA_STRUCTURES_H
#define GRM_DATA_STRUCTURES_H
#include <stdexcept>
#include <bitset>
#include <vector>
......
......@@ -15,8 +15,8 @@
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef __GRM_FULL_LAMBDA_SCHEDULE_SEGMENTER_H
#define __GRM_FULL_LAMBDA_SCHEDULE_SEGMENTER_H
#ifndef GRM_FULL_LAMBDA_SCHEDULE_SEGMENTER_H
#define GRM_FULL_LAMBDA_SCHEDULE_SEGMENTER_H
#include "grmSegmenter.h"
namespace grm
......@@ -46,5 +46,4 @@ namespace grm
};
} // end of namespace grm
#include "grmFullLambdaScheduleSegmenter.txx"
#endif
#endif
\ No newline at end of file
......@@ -15,8 +15,10 @@
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef __GRM_FULL_LAMBDA_SCHEDULE_SEGMENTER_TXX
#define __GRM_FULL_LAMBDA_SCHEDULE_SEGMENTER_TXX
#ifndef GRM_FULL_LAMBDA_SCHEDULE_SEGMENTER_TXX
#define GRM_FULL_LAMBDA_SCHEDULE_SEGMENTER_TXX
#include "grmFullLambdaScheduleSegmenter.h"
namespace grm
{
......
......@@ -15,8 +15,8 @@
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef __GRM_GRAPH_H
#define __GRM_GRAPH_H
#ifndef GRM_GRAPH_H
#define GRM_GRAPH_H
#include "grmDataStructures.h"
#include "lpContour.h"
......@@ -103,6 +103,4 @@ namespace grm
};
} // end of namespace grm
#endif
#endif
\ No newline at end of file
......@@ -15,8 +15,8 @@
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef __GRM_GRAPH_OPERATIONS_H
#define __GRM_GRAPH_OPERATIONS_H
#ifndef GRM_GRAPH_OPERATIONS_H
#define GRM_GRAPH_OPERATIONS_H
#include "grmGraph.h"
#include "grmNeighborhood.h"
#include <iostream>
......@@ -203,8 +203,4 @@ namespace grm
} // end of namespace lsrm
#include "grmGraphOperations.txx"
#endif
#endif
\ No newline at end of file
......@@ -15,9 +15,10 @@
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef __GRM_GRAPH_OPERATIONS_TXX
#define __GRM_GRAPH_OPERATIONS_TXX
#ifndef GRM_GRAPH_OPERATIONS_TXX
#define GRM_GRAPH_OPERATIONS_TXX
#include <otbImageFileReader.h>
#include "grmGraphOperations.h"
namespace grm
{
......@@ -546,12 +547,4 @@ namespace grm
}
} // end of namespace grm
#endif
#endif
\ No newline at end of file
......@@ -15,8 +15,8 @@
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef __GRM_GRAPH_TO_OTBIMAGE_H
#define __GRM_GRAPH_TO_OTBIMAGE_H
#ifndef GRM_GRAPH_TO_OTBIMAGE_H
#define GRM_GRAPH_TO_OTBIMAGE_H
#include <itkRGBPixel.h>
#include <itkImageRegion.h>
#include <otbImage.h>
......
......@@ -15,8 +15,8 @@
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef __GRM_GRAPH_TO_OTBIMAGE_TXX
#define __GRM_GRAPH_TO_OTBIMAGE_TXX
#ifndef GRM_GRAPH_TO_OTBIMAGE_TXX
#define GRM_GRAPH_TO_OTBIMAGE_TXX
#include "grmGraphToOtbImage.h"
#include "itkImageRegionIterator.h"
#include "itkGrayscaleFillholeImageFilter.h"
......
......@@ -15,8 +15,8 @@
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef __MG_H
#define __MG_H
#ifndef MG_H
#define MG_H
// Generate automatically get/set methods
#define GRMGetMacro(type, name) \
......
......@@ -15,8 +15,8 @@
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef __GRM_NEIGHBORHOOD_H
#define __GRM_NEIGHBORHOOD_H
#ifndef GRM_NEIGHBORHOOD_H
#define GRM_NEIGHBORHOOD_H
enum CONNECTIVITY{FOUR = 0, EIGHT};
......
......@@ -15,8 +15,8 @@
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef __GRM_SEGMENTER_H
#define __GRM_SEGMENTER_H
#ifndef GRM_SEGMENTER_H
#define GRM_SEGMENTER_H
#include "grmMacroGenerator.h"
#include "grmGraphOperations.h"
#include "grmGraphToOtbImage.h"
......@@ -170,8 +170,4 @@ namespace grm
};
} // end of namespace grm
#endif
#endif
\ No newline at end of file
......@@ -15,8 +15,8 @@
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef __GRM_SPRING_SEGMENTER_H
#define __GRM_SPRING_SEGMENTER_H
#ifndef GRM_SPRING_SEGMENTER_H
#define GRM_SPRING_SEGMENTER_H
#include "grmSegmenter.h"
namespace grm
......
......@@ -15,10 +15,11 @@
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef __GRM_SPRING_SEGMENTER_TXX
#define __GRM_SPRING_SEGMENTER_TXX
#ifndef GRM_SPRING_SEGMENTER_TXX
#define GRM_SPRING_SEGMENTER_TXX
#include <otbImageFileReader.h>
#include <itkImageRegionIterator.h>
#include "grmSpringSegmenter.h"
namespace grm
{
......
......@@ -15,8 +15,8 @@
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef __LP_CONTOUR_H
#define __LP_CONTOUR_H
#ifndef LP_CONTOUR_H
#define LP_CONTOUR_H
#include <cassert>
#include <iostream>
#include <bitset>
......@@ -111,13 +111,4 @@ namespace lp
const std::size_t gridSizeX);
};
} // end of namespace lp
#endif
#endif
\ No newline at end of file
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