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

merge mainstream repo

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