Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
diapotb
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
Container Registry
Model registry
Operate
Environments
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
Remote Modules
diapotb
Commits
f4a80e05
Commit
f4a80e05
authored
6 years ago
by
Gaëlle USSEGLIO
Browse files
Options
Downloads
Patches
Plain Diff
BUG : Correction into SARInterferogram filter with Margin
parent
a324b641
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
include/otbSARInterferogramImageFilter.txx
+23
-88
23 additions, 88 deletions
include/otbSARInterferogramImageFilter.txx
with
23 additions
and
88 deletions
include/otbSARInterferogramImageFilter.txx
+
23
−
88
View file @
f4a80e05
...
...
@@ -619,7 +619,7 @@ namespace otb
itk::ThreadIdType threadId)
{
// Compute corresponding input region for SAR images
ImageSARRegionType inputRegionForThread = OutputRegionToInputRegion(outputRegionForThread,
fals
e);
ImageSARRegionType inputRegionForThread = OutputRegionToInputRegion(outputRegionForThread,
tru
e);
// Define/declare an iterator that will walk the input regions for this
// thread.
...
...
@@ -662,21 +662,9 @@ namespace otb
indFirstL = -m_MarginAzi;
}
ImageSARIndexType indSARL;
indSARL[0] = inMasterIt.GetIndex()[0];
indSARL[1] = inMasterIt.GetIndex()[1] - (-indFirstL);
if ((indSARL[1] + indLastL) > (m_nbLinesSAR-1))
{
indLastL = (m_nbLinesSAR-1) - indSARL[1];
}
// Check previous index
if (indSARL[1] >= 0 && m_MarginAzi != 0)
if ((inMasterIt.GetIndex()[1] + indLastL - indFirstL) > (m_nbLinesSAR-1))
{
// Previous index inputs
inMasterIt.SetIndex(indSARL);
inSlaveIt.SetIndex(indSARL);
indLastL = (m_nbLinesSAR-1) - inMasterIt.GetIndex()[1] + indFirstL;
}
bool backTopreviousLines = false;
...
...
@@ -706,9 +694,9 @@ namespace otb
indSARL[0] = inMasterIt.GetIndex()[0];
indSARL[1] = inMasterIt.GetIndex()[1] - (2*m_MarginAzi);
if ((indSARL[1] + indLastL) > (m_nbLinesSAR-1))
if ((indSARL[1] + indLastL
- indFirstL
) > (m_nbLinesSAR-1))
{
indLastL = (m_nbLinesSAR - 1) - indSARL[1];
indLastL = (m_nbLinesSAR - 1) - indSARL[1]
+ indFirstL
;
}
// Check previous index
...
...
@@ -745,22 +733,11 @@ namespace otb
indFirstC = -m_MarginRan;
}
ImageSARIndexType indSARC;
indSARC[0] = inMasterIt.GetIndex()[0] - (-indFirstC);
indSARC[1] = inMasterIt.GetIndex()[1];
if ((indSARC[0] + indLastC) > (m_nbColSAR-1))
if ((inMasterIt.GetIndex()[0] + indLastC - indFirstC) > (m_nbColSAR-1))
{
indLastC = (m_nbColSAR-1) - in
dSARC[0]
;
indLastC = (m_nbColSAR-1) - in
MasterIt.GetIndex()[0] + indFirstC
;
}
// Check previous index
if (indSARC[0] >= 0 && m_MarginRan != 0)
{
// Previous index inputs
inMasterIt.SetIndex(indSARC);
inSlaveIt.SetIndex(indSARC);
}
// For each column
while (!inMasterIt.IsAtEndOfLine() && !inSlaveIt.IsAtEndOfLine() && !outIt.IsAtEndOfLine())
...
...
@@ -777,9 +754,9 @@ namespace otb
indSARC[0] = inMasterIt.GetIndex()[0] - (2*m_MarginRan);
indSARC[1] = inMasterIt.GetIndex()[1];
if ((indSARC[0] + indLastC) > (m_nbColSAR-1))
if ((indSARC[0] + indLastC
- indFirstC
) > (m_nbColSAR-1))
{
indLastC = (m_nbColSAR-1) - indSARC[0];
indLastC = (m_nbColSAR-1) - indSARC[0]
+ indFirstC
;
}
// Check previous index
...
...
@@ -877,12 +854,12 @@ namespace otb
itk::ThreadIdType threadId)
{
// Compute corresponding input region for SAR images
ImageSARRegionType inputRegionForThread = OutputRegionToInputRegion(outputRegionForThread,
fals
e);
ImageSARRegionType inputRegionForThread = OutputRegionToInputRegion(outputRegionForThread,
tru
e);
// Compute corresponding input region for Topographic phase image
bool sameGeoAsMainOutput; // If true => Geo TopoPhase == main output geo else Geo TopoPhase = SAR Geo
ImagePhaseRegionType inputPhaseRegionForThread = OutputRegionToInputPhaseRegion(outputRegionForThread,
sameGeoAsMainOutput,
fals
e);
sameGeoAsMainOutput,
tru
e);
// Define/declare an iterator that will walk the input regions for this
// thread.
typedef itk::ImageScanlineConstIterator< ImageSARType > InputIterator;
...
...
@@ -927,33 +904,12 @@ namespace otb
{
indFirstL = -m_MarginAzi;
}
ImageSARIndexType indSARL;
indSARL[0] = inMasterIt.GetIndex()[0];
indSARL[1] = inMasterIt.GetIndex()[1] - (-indFirstL);
ImagePhaseIndexType indPhaL;
indPhaL[0] = inTopoPhaseIt.GetIndex()[0];
indPhaL[1] = inTopoPhaseIt.GetIndex()[1] - (-indFirstL);
if ((indSARL[1] + indLastL) > (m_nbLinesSAR-1))
{
indLastL = (m_nbLinesSAR-1) - indSARL[1];
}
// Check previous index
if (indSARL[1] >= 0 && indPhaL[1] >= 0 && m_MarginAzi != 0)
if ((inMasterIt.GetIndex()[1] + (indLastL - indFirstL)) > (m_nbLinesSAR-1))
{
// Previous index inputs
inMasterIt.SetIndex(indSARL);
inSlaveIt.SetIndex(indSARL);
// If topographic phase has SAR geo
if (!sameGeoAsMainOutput)
{
inTopoPhaseIt.SetIndex(indPhaL);
}
indLastL = (m_nbLinesSAR-1) + indFirstL - inMasterIt.GetIndex()[1];
}
bool backTopreviousLines = false;
bool backTopreviousColunms = false;
...
...
@@ -987,9 +943,9 @@ namespace otb
indPhaL[1] = inTopoPhaseIt.GetIndex()[1] - (2*m_MarginAzi);
if ((indSARL[1] + indLastL) > (m_nbLinesSAR-1))
if ((indSARL[1] + indLastL
- indFirstL
) > (m_nbLinesSAR-1))
{
indLastL = (m_nbLinesSAR - 1) - indSARL[1];
indLastL = (m_nbLinesSAR - 1) - indSARL[1]
+ indFirstL
;
}
// Check previous index
...
...
@@ -1010,6 +966,7 @@ namespace otb
backTopreviousLines = true;
// GenerateInputRequestedRegion function requires an input region with
// In_nbLine = m_Averaging * Out_nbLine (Averaing in function of ML Factors and Margins)
for (int i = indFirstL ; i < indLastL; i++)
...
...
@@ -1026,38 +983,16 @@ namespace otb
int indFirstC = 0;
int indLastC = m_MLRan + m_MarginRan;
if (inMasterIt.GetIndex()[0] >= m_MarginRan && m_MarginRan != 0)
if (inMasterIt.GetIndex()[0] >= m_MarginRan && m_MarginRan != 0)
{
indFirstC = -m_MarginRan;
}
ImageSARIndexType indSARC;
indSARC[0] = inMasterIt.GetIndex()[0] - (-indFirstC);
indSARC[1] = inMasterIt.GetIndex()[1];
ImagePhaseIndexType indPhaC;
indPhaC[0] = inTopoPhaseIt.GetIndex()[0] - (-indFirstC);
indPhaC[1] = inTopoPhaseIt.GetIndex()[1];
if ((indSARC[0] + indLastC) > (m_nbColSAR-1))
if ((inMasterIt.GetIndex()[0] + (indLastC - indFirstC)) > (m_nbColSAR-1))
{
indLastC = (m_nbColSAR-1)
-
ind
SARC
[0];
indLastC = (m_nbColSAR-1)
+
ind
FirstC - inMasterIt.GetIndex()
[0];
}
// Check previous index
if (indSARC[0] >= 0 && indPhaC[0] >= 0 && m_MarginRan != 0)
{
// Previous index inputs
inMasterIt.SetIndex(indSARC);
inSlaveIt.SetIndex(indSARC);
// If topographic phase has SAR geo
if (!sameGeoAsMainOutput)
{
inTopoPhaseIt.SetIndex(indPhaC);
}
}
///////// For each column /////////
while (!inMasterIt.IsAtEndOfLine() && !inSlaveIt.IsAtEndOfLine() && !inTopoPhaseIt.IsAtEndOfLine()
...
...
@@ -1081,9 +1016,9 @@ namespace otb
indPhaC[1] = inTopoPhaseIt.GetIndex()[1];
if ((indSARC[0] + indLastC) > (m_nbColSAR-1))
if ((indSARC[0] + indLastC
- indFirstC
) > (m_nbColSAR-1))
{
indLastC = (m_nbColSAR-1) - indSARC[0];
indLastC = (m_nbColSAR-1) - indSARC[0]
+ indFirstC
;
}
// Check previous index
...
...
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