Skip to content
Snippets Groups Projects
Commit ca38030f authored by Gaëlle USSEGLIO's avatar Gaëlle USSEGLIO
Browse files

UPDATE : Changing TopographicPhase Filter with the new OTB function : LineToSatPositionAndVelocity

parent 6054f46b
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......@@ -650,11 +666,11 @@ namespace otb
indexSlavePerLine[1] = Le;
//ImageInPixelType slaveCartMean = this->GetSlaveCartesianMeanInput()->GetPixel(indexSlave);
ImageInPixelType slaveCartMeanPerLine = this->GetSlaveCartesianMeanPerLineInput()->GetPixel(indexSlavePerLine);
//ImageInPixelType slaveCartMeanPerLine = this->GetSlaveCartesianMeanPerLineInput()->GetPixel(indexSlavePerLine);
////////// Estimate satellite positions for the current line //////////
// Slave
ossimEcefPoint SlaveEcef;
/*ossimEcefPoint SlaveEcef;
SlaveEcef.x() = slaveCartMeanPerLine[0];
SlaveEcef.y() = slaveCartMeanPerLine[1];
SlaveEcef.z() = slaveCartMeanPerLine[2];
......@@ -677,14 +693,21 @@ namespace otb
worldMaster[2] = MasterGpt.hgt;
m_SarSensorModelAdapterForMaster->WorldToSatPositionAndVelocity(worldMaster,
satPosMaster, satVelMaster);
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 < this->GetSlaveCartesianMeanPerLineInput()->GetLargestPossibleRegion().GetSize()[1])
//if (Le >= 0 &&
//Le < this->GetSlaveCartesianMeanPerLineInput()->GetLargestPossibleRegion().GetSize()[1])
if (checkSlave)
{
// Check if Value into Master and Slave Cartesian Mean with IsData Mask
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment