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
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
Luc Hermitte
diapotb
Commits
60bef9e7
Commit
60bef9e7
authored
6 years ago
by
Gaëlle USSEGLIO
Browse files
Options
Downloads
Patches
Plain Diff
UPDATE : Changing TopographicPhase Filter with the new OTB function : LineToSatPositionAndVelocity
parent
cc7a9fca
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
include/otbSARTopographicPhaseImageFilter.txx
+25
-33
25 additions, 33 deletions
include/otbSARTopographicPhaseImageFilter.txx
with
25 additions
and
33 deletions
include/otbSARTopographicPhaseImageFilter.txx
+
25
−
33
View file @
60bef9e7
...
...
@@ -538,7 +538,7 @@ namespace otb
///////////// For Mena Per Line all image requested /////////////
ImageInPointer masterPerLinePtr = const_cast< ImageInType * >(this->GetMasterCartesianMeanPerLineInput());
/*
ImageInPointer masterPerLinePtr = const_cast< ImageInType * >(this->GetMasterCartesianMeanPerLineInput());
ImageInRegionType masterPerLineRequestedRegion = outputRequestedRegion;
ImageInIndexType indexMasterPerLine;
indexMasterPerLine[0] = 0;
...
...
@@ -555,7 +555,23 @@ namespace otb
ImageInPointer slavePerLinePtr = const_cast< ImageInType * >( this->GetSlaveCartesianMeanPerLineInput() );
ImageInRegionType inputSlaveCartMeanPerLineRequestedRegion =
OutputRegionToSlavePerLineInputRegion(outputRequestedRegion);
slavePerLinePtr->SetRequestedRegion(inputSlaveCartMeanPerLineRequestedRegion);
slavePerLinePtr->SetRequestedRegion(inputSlaveCartMeanPerLineRequestedRegion);*/
ImageInRegionType perLineRequestedRegion = outputRequestedRegion;
ImageInIndexType indexPerLine;
indexPerLine[0] = 0;
indexPerLine[1] = 0;
ImageInSizeType sizePerLine;
sizePerLine[0] = 1;
sizePerLine[1] = 1;
perLineRequestedRegion.SetIndex(indexPerLine);
perLineRequestedRegion.SetSize(sizePerLine);
ImageInPointer masterPerLinePtr = const_cast< ImageInType * >(this->GetMasterCartesianMeanPerLineInput());
ImageInPointer slavePerLinePtr = const_cast< ImageInType * >( this->GetSlaveCartesianMeanPerLineInput() );
masterPerLinePtr->SetRequestedRegion(perLineRequestedRegion);
slavePerLinePtr->SetRequestedRegion(perLineRequestedRegion);
///////////// Find the region into Shift Grid ////////////
GridRegionType gridRequestedRegion = OutputRegionToInputGridRegion(outputRequestedRegion);
...
...
@@ -626,7 +642,7 @@ namespace otb
indexMasterPerLine[0] = 0; // Always 0 since Master/Slave Cartesain Per Line are vectors
indexMasterPerLine[1] = ind_Line;
ImageInPixelType masterCartMeanPerLine = this->GetMasterCartesianMeanPerLineInput()->GetPixel(indexMasterPerLine);
//
ImageInPixelType masterCartMeanPerLine = this->GetMasterCartesianMeanPerLineInput()->GetPixel(indexMasterPerLine);
// Get the index of current tile into grid to retrive the shifts (the closest (round) grid point
// at the center of current tile). Output Geo = Master Cart Mean Geo = (Grid geo / GridStep)
...
...
@@ -648,43 +664,19 @@ namespace otb
ImageInIndexType indexSlavePerLine;
indexSlavePerLine[0] = 0; // Always 0 since Master/Slave Cartesain Per Line are vectors
indexSlavePerLine[1] = Le;
//ImageInPixelType slaveCartMean = this->GetSlaveCartesianMeanInput()->GetPixel(indexSlave);
ImageInPixelType slaveCartMeanPerLine = this->GetSlaveCartesianMeanPerLineInput()->GetPixel(indexSlavePerLine);
////////// Estimate satellite positions for the current line //////////
// Slave
ossimEcefPoint SlaveEcef;
SlaveEcef.x() = slaveCartMeanPerLine[0];
SlaveEcef.y() = slaveCartMeanPerLine[1];
SlaveEcef.z() = slaveCartMeanPerLine[2];
ossimGpt SlaveGpt(SlaveEcef);
worldSlave[0] = SlaveGpt.lon;
worldSlave[1] = SlaveGpt.lat;
worldSlave[2] = SlaveGpt.hgt;
m_SarSensorModelAdapterForSlave->WorldToSatPositionAndVelocity(worldSlave,
satPosSlave, satVelSlave);
// Master
ossimEcefPoint MasterEcef;
MasterEcef.x() = masterCartMeanPerLine[0];
MasterEcef.y() = masterCartMeanPerLine[1];
MasterEcef.z() = masterCartMeanPerLine[2];
ossimGpt MasterGpt(MasterEcef);
worldMaster[0] = MasterGpt.lon;
worldMaster[1] = MasterGpt.lat;
worldMaster[2] = MasterGpt.hgt;
m_SarSensorModelAdapterForMaster->WorldToSatPositionAndVelocity(worldMaster,
satPosMaster, satVelMaster);
bool checkSlave = m_SarSensorModelAdapterForSlave->LineToSatPositionAndVelocity(static_cast<double>(Le), satPosSlave,
satVelSlave);
bool checkMaster = m_SarSensorModelAdapterForMaster->LineToSatPositionAndVelocity(static_cast<double>(ind_Line),
satPosMaster, satVelMaster);
// For each colunm
while (!OutIt.IsAtEndOfLine() && !InMasterCartMeanIt.IsAtEndOfLine())
{
// Check slave Index
if (Le >= 0 &&
Le < static_cast<int>(this->GetSlaveCartesianMeanPerLineInput()->GetLargestPossibleRegion().GetSize()[1]))
if (checkSlave)
{
// Check if Value into Master and Slave Cartesian Mean with IsData Mask
...
...
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