Commit 70a3f75ecc8c6045a2edb9179bd710d22fa1c1a1

Authored by Rémi Cresson (IRSTEA)
2 parents 693f6db6 a08d2309
Exists in master

merge mainstream repo

app/GenericRegionMerging.cxx
@@ -127,7 +127,7 @@ namespace otb @@ -127,7 +127,7 @@ namespace otb
127 segmenter.Update(); 127 segmenter.Update();
128 128
129 labelImage = segmenter.GetLabeledClusteredOutput(); 129 labelImage = segmenter.GetLabeledClusteredOutput();
130 -// rvbLabelImage = segmenter.GetClusteredImageOutput(); 130 + //SetParameterOutputImage<LabelImageType>("out", segmenter.GetLabeledClusteredOutput());
131 } 131 }
132 else if(selectedCriterion == "ed") 132 else if(selectedCriterion == "ed")
133 { 133 {
@@ -143,7 +143,7 @@ namespace otb @@ -143,7 +143,7 @@ namespace otb
143 segmenter.Update(); 143 segmenter.Update();
144 144
145 labelImage = segmenter.GetLabeledClusteredOutput(); 145 labelImage = segmenter.GetLabeledClusteredOutput();
146 -// rvbLabelImage = segmenter.GetClusteredImageOutput(); 146 + //SetParameterOutputImage<LabelImageType>("out", segmenter.GetLabeledClusteredOutput());
147 } 147 }
148 else if(selectedCriterion == "fls") 148 else if(selectedCriterion == "fls")
149 { 149 {
@@ -159,21 +159,14 @@ namespace otb @@ -159,21 +159,14 @@ namespace otb
159 segmenter.Update(); 159 segmenter.Update();
160 160
161 labelImage = segmenter.GetLabeledClusteredOutput(); 161 labelImage = segmenter.GetLabeledClusteredOutput();
162 - rvbLabelImage = segmenter.GetClusteredImageOutput(); 162 + //SetParameterOutputImage<LabelImageType>("out", segmenter.GetLabeledClusteredOutput());
163 } 163 }
164 - 164 +
165 // Set output image projection, origin and spacing for labelImage 165 // Set output image projection, origin and spacing for labelImage
166 labelImage->SetProjectionRef(image->GetProjectionRef()); 166 labelImage->SetProjectionRef(image->GetProjectionRef());
167 labelImage->SetOrigin(image->GetOrigin()); 167 labelImage->SetOrigin(image->GetOrigin());
168 labelImage->SetSpacing(image->GetSpacing()); 168 labelImage->SetSpacing(image->GetSpacing());
169 SetParameterOutputImage<LabelImageType>("out", labelImage); 169 SetParameterOutputImage<LabelImageType>("out", labelImage);
170 -  
171 -// // Set output image projection, origin and spacing for RVB labelImage  
172 -// rvbLabelImage->SetProjectionRef(image->GetProjectionRef());  
173 -// rvbLabelImage->SetOrigin(image->GetOrigin());  
174 -// rvbLabelImage->SetSpacing(image->GetSpacing());  
175 -// SetParameterOutputImage<RGBLabelImageType>("outrvb", rvbLabelImage);  
176 -  
177 } 170 }
178 }; 171 };
179 } // end of namespace Wrapper 172 } // end of namespace Wrapper
include/grmBaatzSegmenter.h
@@ -15,8 +15,8 @@ @@ -15,8 +15,8 @@
15 PURPOSE. See the above copyright notices for more information. 15 PURPOSE. See the above copyright notices for more information.
16 16
17 =========================================================================*/ 17 =========================================================================*/
18 -#ifndef __GRM_BAATZ_SEGMENTER_H  
19 -#define __GRM_BAATZ_SEGMENTER_H 18 +#ifndef GRM_BAATZ_SEGMENTER_H
  19 +#define GRM_BAATZ_SEGMENTER_H
20 #include "grmSegmenter.h" 20 #include "grmSegmenter.h"
21 21
22 namespace grm 22 namespace grm
@@ -57,7 +57,4 @@ namespace grm @@ -57,7 +57,4 @@ namespace grm
57 }; 57 };
58 } // end of namespace grm 58 } // end of namespace grm
59 #include "grmBaatzSegmenter.txx" 59 #include "grmBaatzSegmenter.txx"
60 -#endif  
61 -  
62 -  
63 - 60 +#endif
64 \ No newline at end of file 61 \ No newline at end of file
include/grmBaatzSegmenter.txx
@@ -15,10 +15,11 @@ @@ -15,10 +15,11 @@
15 PURPOSE. See the above copyright notices for more information. 15 PURPOSE. See the above copyright notices for more information.
16 16
17 =========================================================================*/ 17 =========================================================================*/
18 -#ifndef __GRM_BAATZ_SEGMENTER_TXX  
19 -#define __GRM_BAATZ_SEGMENTER_TXX 18 +#ifndef GRM_BAATZ_SEGMENTER_TXX
  19 +#define GRM_BAATZ_SEGMENTER_TXX
20 #include <otbImageFileReader.h> 20 #include <otbImageFileReader.h>
21 #include <itkImageRegionIterator.h> 21 #include <itkImageRegionIterator.h>
  22 +#include "grmBaatzSegmenter.h"
22 23
23 namespace grm 24 namespace grm
24 { 25 {
@@ -69,7 +70,7 @@ namespace grm @@ -69,7 +70,7 @@ namespace grm
69 std = std::sqrt((square_mean - 2*mean*sum + a_sum * mean* mean) / a_sum); 70 std = std::sqrt((square_mean - 2*mean*sum + a_sum * mean* mean) / a_sum);
70 spect_cost += (a_sum * std - a1 * n1->m_Std[b] - a2 * n2->m_Std[b]); 71 spect_cost += (a_sum * std - a1 * n1->m_Std[b] - a2 * n2->m_Std[b]);
71 } 72 }
72 - spect_cost *= this->m_Param.m_ShapeWeight; 73 + spect_cost *= this->m_Param.m_SpectralWeight;
73 74
74 if(spect_cost < this->m_Threshold) 75 if(spect_cost < this->m_Threshold)
75 { 76 {
@@ -91,7 +92,7 @@ namespace grm @@ -91,7 +92,7 @@ namespace grm
91 92
92 shape_cost = this->m_Param.m_ShapeWeight * compact_f + (1-this->m_Param.m_ShapeWeight) * smooth_f; 93 shape_cost = this->m_Param.m_ShapeWeight * compact_f + (1-this->m_Param.m_ShapeWeight) * smooth_f;
93 94
94 - return (spect_cost + (1-this->m_Param.m_ShapeWeight)*shape_cost); 95 + return (spect_cost + (1-this->m_Param.m_SpectralWeight)*shape_cost);
95 } 96 }
96 else 97 else
97 return spect_cost; 98 return spect_cost;
@@ -116,11 +117,4 @@ namespace grm @@ -116,11 +117,4 @@ namespace grm
116 } 117 }
117 } // end of namespace grm 118 } // end of namespace grm
118 119
119 -#endif  
120 -  
121 -  
122 -  
123 -  
124 -  
125 -  
126 - 120 +#endif
127 \ No newline at end of file 121 \ No newline at end of file
include/grmDataStructures.h
@@ -15,8 +15,8 @@ @@ -15,8 +15,8 @@
15 PURPOSE. See the above copyright notices for more information. 15 PURPOSE. See the above copyright notices for more information.
16 16
17 =========================================================================*/ 17 =========================================================================*/
18 -#ifndef __GRM_DATA_STRUCTURES_H  
19 -#define __GRM_DATA_STRUCTURES_H 18 +#ifndef GRM_DATA_STRUCTURES_H
  19 +#define GRM_DATA_STRUCTURES_H
20 #include <stdexcept> 20 #include <stdexcept>
21 #include <bitset> 21 #include <bitset>
22 #include <vector> 22 #include <vector>
include/grmFullLambdaScheduleSegmenter.h
@@ -15,8 +15,8 @@ @@ -15,8 +15,8 @@
15 PURPOSE. See the above copyright notices for more information. 15 PURPOSE. See the above copyright notices for more information.
16 16
17 =========================================================================*/ 17 =========================================================================*/
18 -#ifndef __GRM_FULL_LAMBDA_SCHEDULE_SEGMENTER_H  
19 -#define __GRM_FULL_LAMBDA_SCHEDULE_SEGMENTER_H 18 +#ifndef GRM_FULL_LAMBDA_SCHEDULE_SEGMENTER_H
  19 +#define GRM_FULL_LAMBDA_SCHEDULE_SEGMENTER_H
20 #include "grmSegmenter.h" 20 #include "grmSegmenter.h"
21 21
22 namespace grm 22 namespace grm
@@ -46,5 +46,4 @@ namespace grm @@ -46,5 +46,4 @@ namespace grm
46 }; 46 };
47 } // end of namespace grm 47 } // end of namespace grm
48 #include "grmFullLambdaScheduleSegmenter.txx" 48 #include "grmFullLambdaScheduleSegmenter.txx"
49 -#endif  
50 - 49 +#endif
51 \ No newline at end of file 50 \ No newline at end of file
include/grmFullLambdaScheduleSegmenter.txx
@@ -15,8 +15,10 @@ @@ -15,8 +15,10 @@
15 PURPOSE. See the above copyright notices for more information. 15 PURPOSE. See the above copyright notices for more information.
16 16
17 =========================================================================*/ 17 =========================================================================*/
18 -#ifndef __GRM_FULL_LAMBDA_SCHEDULE_SEGMENTER_TXX  
19 -#define __GRM_FULL_LAMBDA_SCHEDULE_SEGMENTER_TXX 18 +#ifndef GRM_FULL_LAMBDA_SCHEDULE_SEGMENTER_TXX
  19 +#define GRM_FULL_LAMBDA_SCHEDULE_SEGMENTER_TXX
  20 +
  21 +#include "grmFullLambdaScheduleSegmenter.h"
20 22
21 namespace grm 23 namespace grm
22 { 24 {
include/grmGraph.h
@@ -15,8 +15,8 @@ @@ -15,8 +15,8 @@
15 PURPOSE. See the above copyright notices for more information. 15 PURPOSE. See the above copyright notices for more information.
16 16
17 =========================================================================*/ 17 =========================================================================*/
18 -#ifndef __GRM_GRAPH_H  
19 -#define __GRM_GRAPH_H 18 +#ifndef GRM_GRAPH_H
  19 +#define GRM_GRAPH_H
20 #include "grmDataStructures.h" 20 #include "grmDataStructures.h"
21 #include "lpContour.h" 21 #include "lpContour.h"
22 22
@@ -103,6 +103,4 @@ namespace grm @@ -103,6 +103,4 @@ namespace grm
103 }; 103 };
104 104
105 } // end of namespace grm 105 } // end of namespace grm
106 -#endif  
107 -  
108 - 106 +#endif
109 \ No newline at end of file 107 \ No newline at end of file
include/grmGraphOperations.h
@@ -15,8 +15,8 @@ @@ -15,8 +15,8 @@
15 PURPOSE. See the above copyright notices for more information. 15 PURPOSE. See the above copyright notices for more information.
16 16
17 =========================================================================*/ 17 =========================================================================*/
18 -#ifndef __GRM_GRAPH_OPERATIONS_H  
19 -#define __GRM_GRAPH_OPERATIONS_H 18 +#ifndef GRM_GRAPH_OPERATIONS_H
  19 +#define GRM_GRAPH_OPERATIONS_H
20 #include "grmGraph.h" 20 #include "grmGraph.h"
21 #include "grmNeighborhood.h" 21 #include "grmNeighborhood.h"
22 #include <iostream> 22 #include <iostream>
@@ -203,8 +203,4 @@ namespace grm @@ -203,8 +203,4 @@ namespace grm
203 } // end of namespace lsrm 203 } // end of namespace lsrm
204 204
205 #include "grmGraphOperations.txx" 205 #include "grmGraphOperations.txx"
206 -#endif  
207 -  
208 -  
209 -  
210 - 206 +#endif
211 \ No newline at end of file 207 \ No newline at end of file
include/grmGraphOperations.txx
@@ -15,9 +15,10 @@ @@ -15,9 +15,10 @@
15 PURPOSE. See the above copyright notices for more information. 15 PURPOSE. See the above copyright notices for more information.
16 16
17 =========================================================================*/ 17 =========================================================================*/
18 -#ifndef __GRM_GRAPH_OPERATIONS_TXX  
19 -#define __GRM_GRAPH_OPERATIONS_TXX 18 +#ifndef GRM_GRAPH_OPERATIONS_TXX
  19 +#define GRM_GRAPH_OPERATIONS_TXX
20 #include <otbImageFileReader.h> 20 #include <otbImageFileReader.h>
  21 +#include "grmGraphOperations.h"
21 22
22 namespace grm 23 namespace grm
23 { 24 {
@@ -546,12 +547,4 @@ namespace grm @@ -546,12 +547,4 @@ namespace grm
546 } 547 }
547 } // end of namespace grm 548 } // end of namespace grm
548 549
549 -#endif  
550 -  
551 -  
552 -  
553 -  
554 -  
555 -  
556 -  
557 - 550 +#endif
558 \ No newline at end of file 551 \ No newline at end of file
include/grmGraphToOtbImage.h
@@ -15,8 +15,8 @@ @@ -15,8 +15,8 @@
15 PURPOSE. See the above copyright notices for more information. 15 PURPOSE. See the above copyright notices for more information.
16 16
17 =========================================================================*/ 17 =========================================================================*/
18 -#ifndef __GRM_GRAPH_TO_OTBIMAGE_H  
19 -#define __GRM_GRAPH_TO_OTBIMAGE_H 18 +#ifndef GRM_GRAPH_TO_OTBIMAGE_H
  19 +#define GRM_GRAPH_TO_OTBIMAGE_H
20 #include <itkRGBPixel.h> 20 #include <itkRGBPixel.h>
21 #include <itkImageRegion.h> 21 #include <itkImageRegion.h>
22 #include <otbImage.h> 22 #include <otbImage.h>
include/grmGraphToOtbImage.txx
@@ -15,8 +15,8 @@ @@ -15,8 +15,8 @@
15 PURPOSE. See the above copyright notices for more information. 15 PURPOSE. See the above copyright notices for more information.
16 16
17 =========================================================================*/ 17 =========================================================================*/
18 -#ifndef __GRM_GRAPH_TO_OTBIMAGE_TXX  
19 -#define __GRM_GRAPH_TO_OTBIMAGE_TXX 18 +#ifndef GRM_GRAPH_TO_OTBIMAGE_TXX
  19 +#define GRM_GRAPH_TO_OTBIMAGE_TXX
20 #include "grmGraphToOtbImage.h" 20 #include "grmGraphToOtbImage.h"
21 #include "itkImageRegionIterator.h" 21 #include "itkImageRegionIterator.h"
22 #include "itkGrayscaleFillholeImageFilter.h" 22 #include "itkGrayscaleFillholeImageFilter.h"
include/grmMacroGenerator.h
@@ -15,8 +15,8 @@ @@ -15,8 +15,8 @@
15 PURPOSE. See the above copyright notices for more information. 15 PURPOSE. See the above copyright notices for more information.
16 16
17 =========================================================================*/ 17 =========================================================================*/
18 -#ifndef __MG_H  
19 -#define __MG_H 18 +#ifndef MG_H
  19 +#define MG_H
20 20
21 // Generate automatically get/set methods 21 // Generate automatically get/set methods
22 #define GRMGetMacro(type, name) \ 22 #define GRMGetMacro(type, name) \
include/grmNeighborhood.h
@@ -15,8 +15,8 @@ @@ -15,8 +15,8 @@
15 PURPOSE. See the above copyright notices for more information. 15 PURPOSE. See the above copyright notices for more information.
16 16
17 =========================================================================*/ 17 =========================================================================*/
18 -#ifndef __GRM_NEIGHBORHOOD_H  
19 -#define __GRM_NEIGHBORHOOD_H 18 +#ifndef GRM_NEIGHBORHOOD_H
  19 +#define GRM_NEIGHBORHOOD_H
20 20
21 enum CONNECTIVITY{FOUR = 0, EIGHT}; 21 enum CONNECTIVITY{FOUR = 0, EIGHT};
22 22
include/grmSegmenter.h
@@ -15,8 +15,8 @@ @@ -15,8 +15,8 @@
15 PURPOSE. See the above copyright notices for more information. 15 PURPOSE. See the above copyright notices for more information.
16 16
17 =========================================================================*/ 17 =========================================================================*/
18 -#ifndef __GRM_SEGMENTER_H  
19 -#define __GRM_SEGMENTER_H 18 +#ifndef GRM_SEGMENTER_H
  19 +#define GRM_SEGMENTER_H
20 #include "grmMacroGenerator.h" 20 #include "grmMacroGenerator.h"
21 #include "grmGraphOperations.h" 21 #include "grmGraphOperations.h"
22 #include "grmGraphToOtbImage.h" 22 #include "grmGraphToOtbImage.h"
@@ -170,8 +170,4 @@ namespace grm @@ -170,8 +170,4 @@ namespace grm
170 }; 170 };
171 } // end of namespace grm 171 } // end of namespace grm
172 172
173 -#endif  
174 -  
175 -  
176 -  
177 - 173 +#endif
178 \ No newline at end of file 174 \ No newline at end of file
include/grmSpringSegmenter.h
@@ -15,8 +15,8 @@ @@ -15,8 +15,8 @@
15 PURPOSE. See the above copyright notices for more information. 15 PURPOSE. See the above copyright notices for more information.
16 16
17 =========================================================================*/ 17 =========================================================================*/
18 -#ifndef __GRM_SPRING_SEGMENTER_H  
19 -#define __GRM_SPRING_SEGMENTER_H 18 +#ifndef GRM_SPRING_SEGMENTER_H
  19 +#define GRM_SPRING_SEGMENTER_H
20 #include "grmSegmenter.h" 20 #include "grmSegmenter.h"
21 21
22 namespace grm 22 namespace grm
include/grmSpringSegmenter.txx
@@ -15,10 +15,11 @@ @@ -15,10 +15,11 @@
15 PURPOSE. See the above copyright notices for more information. 15 PURPOSE. See the above copyright notices for more information.
16 16
17 =========================================================================*/ 17 =========================================================================*/
18 -#ifndef __GRM_SPRING_SEGMENTER_TXX  
19 -#define __GRM_SPRING_SEGMENTER_TXX 18 +#ifndef GRM_SPRING_SEGMENTER_TXX
  19 +#define GRM_SPRING_SEGMENTER_TXX
20 #include <otbImageFileReader.h> 20 #include <otbImageFileReader.h>
21 #include <itkImageRegionIterator.h> 21 #include <itkImageRegionIterator.h>
  22 +#include "grmSpringSegmenter.h"
22 23
23 namespace grm 24 namespace grm
24 { 25 {
include/lpContour.h
@@ -15,8 +15,8 @@ @@ -15,8 +15,8 @@
15 PURPOSE. See the above copyright notices for more information. 15 PURPOSE. See the above copyright notices for more information.
16 16
17 =========================================================================*/ 17 =========================================================================*/
18 -#ifndef __LP_CONTOUR_H  
19 -#define __LP_CONTOUR_H 18 +#ifndef LP_CONTOUR_H
  19 +#define LP_CONTOUR_H
20 #include <cassert> 20 #include <cassert>
21 #include <iostream> 21 #include <iostream>
22 #include <bitset> 22 #include <bitset>
@@ -111,13 +111,4 @@ namespace lp @@ -111,13 +111,4 @@ namespace lp
111 const std::size_t gridSizeX); 111 const std::size_t gridSizeX);
112 }; 112 };
113 } // end of namespace lp 113 } // end of namespace lp
114 -#endif  
115 -  
116 -  
117 -  
118 -  
119 -  
120 -  
121 -  
122 -  
123 - 114 +#endif
124 \ No newline at end of file 115 \ No newline at end of file