Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
otb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
David Youssefi
otb
Commits
e3528bd2
Commit
e3528bd2
authored
18 years ago
by
Thomas Feuvrier
Browse files
Options
Downloads
Patches
Plain Diff
Correction des fichiers sur le filtre FillGaps : remplacement du fichier txx par un cxx.
parent
8845e116
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Code/FeatureExtraction/otbFillGapsFilter.txx
+18
-17
18 additions, 17 deletions
Code/FeatureExtraction/otbFillGapsFilter.txx
with
18 additions
and
17 deletions
Code/FeatureExtraction/otbFillGapsFilter.txx
+
18
−
17
View file @
e3528bd2
...
...
@@ -15,8 +15,6 @@
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef __otbFillGapsFilter_txx
#define __otbFillGapsFilter_txx
#include "otbFillGapsFilter.h"
...
...
@@ -27,7 +25,6 @@ namespace otb
* Constructor
*/
#if 0
FillGapsFilter::FillGapsFilter()
{
this->itk::ProcessObject::SetNumberOfRequiredInputs(1);
...
...
@@ -48,7 +45,6 @@ FillGapsFilter
{
this->itk::ProcessObject::SetNthInput(0,
const_cast< LineSpatialObjectListType * >( input ) );
}
...
...
@@ -60,6 +56,7 @@ FillGapsFilter
(this->itk::ProcessObject::GetInput(0) );
}
FillGapsFilter::LineSpatialObjectListType *
FillGapsFilter
::GetOutput(void)
...
...
@@ -159,7 +156,8 @@ FillGapsFilter
if(R14 < Rmin) Rmin = R14;
if(R23 < Rmin) Rmin = R23;
if(R24 < Rmin) Rmin = R24;
if(Rmin < m_Radius)
{
// Sort Points such as the radius of P2 and P3 is the smallest one.
...
...
@@ -175,7 +173,7 @@ FillGapsFilter
x1 = x2 ; y1 = y2;
x2 = xTemp; y2 = yTemp;
}
if(Rmin == R1
3
)
if(Rmin == R1
4
)
{
xTemp = x3 ; yTemp = y3 ;
x3 = x4 ; y3 = y4;
...
...
@@ -186,21 +184,28 @@ FillGapsFilter
}
//Estimate the norm each line
double Norm12,Norm23,Norm34;
/*
double Norm12,Norm23,Norm34;
Norm12 = sqrt( (x1-x2)*(x1-x2) + (y1-y2)*(y1-y2) );
Norm23 = sqrt( (x2-x3)*(x2-x3) + (y2-y3)*(y2-y3) );
Norm34 = sqrt( (x3-x4)*(x3-x4) + (y3-y4)*(y3-y4) );
double Angle12_23,Angle12_34;
*/
double Angle12_23,Angle12_34
,Angle23_34
;
//Estimate the angle between lines 12-23 and lines 12-34
Angle12_23 = (x2-x1)*(x3-x2) + (y2-y1)*(y3-y2);
/*
Angle12_23 = (x2-x1)*(x3-x2) + (y2-y1)*(y3-y2);
Angle12_23 = Angle12_23 / Norm12 / Norm23;
Angle12_34 = (x2-x1)*(x4-x3) + (y2-y1)*(y4-y3);
Angle12_34 = Angle12_34 / Norm12 / Norm34;
Angle12_34 = Angle12_34 / Norm12 / Norm34;*/
Angle12_23 = cos(atan2((y2-y1), (x2-x1))-atan2((y3-y2), (x3-x2)));
Angle12_34 = cos(atan2((y2-y1), (x2-x1))-atan2((y4-y3), (x4-x3)));
Angle23_34 = cos(atan2((y3-y2), (x3-x2))-atan2((y4-y3), (x4-x3)));
if( (Angle12_23 > CosTheta) && (Angle12_34 > CosTheta) )
if( (Angle12_23 > CosTheta) && (Angle12_34 > CosTheta)
&& (Angle23_34 > CosTheta)
)
{
// Store 23-segment
PointType point;
PointListType pointList;
...
...
@@ -244,8 +249,6 @@ FillGapsFilter
pointList.clear();
}
...
...
@@ -257,11 +260,9 @@ void
FillGapsFilter
::PrintSelf(std::ostream& os, itk::Indent indent) const
{
Superclass::PrintSelf(os,indent);
Superclass::PrintSelf(os,indent);
}
#endif
} // end namespace otb
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment