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

UPDATE : Optimizations into robust interferogram filters

parent 3b8c1bd7
No related branches found
No related tags found
No related merge requests found
......@@ -170,9 +170,9 @@ namespace otb
GetInternalApplication("TopographicPhaseApp")->SetParameterInputImage("incartmeanperlinemaster",
MasterCartMeanPerLinePtr);
GetInternalApplication("TopographicPhaseApp")->SetParameterInputImage("incartmeanslave",
SlaveCartMeanPtr);
SlaveCartMeanPtr);
GetInternalApplication("TopographicPhaseApp")->SetParameterInputImage("incartmeanperlineslave",
SlaveCartMeanPerLinePtr);
SlaveCartMeanPerLinePtr);
GetInternalApplication("TopographicPhaseApp")->SetParameterInt("gridsteprange", gridStepRan);
GetInternalApplication("TopographicPhaseApp")->SetParameterInt("gridstepazimut", gridStepAzi);
GetInternalApplication("TopographicPhaseApp")->SetParameterInt("mlran", mlRan);
......
......@@ -157,13 +157,13 @@ namespace otb
filterTopoPhase->SetGridStep(gridStepRan, gridStepAzi);
filterTopoPhase->SetMaxShiftInRange(maxAbsRan);
filterTopoPhase->SetMaxShiftInAzimut(maxAbsAzi);
std::cout << "filterTopoPhase->GetCoordinateTolerance() = " << filterTopoPhase->GetCoordinateTolerance() << std::endl;
FloatVectorImageType::Pointer inputSlave = GetParameterFloatVectorImage("incartmeanslave");
filterTopoPhase->SetSlaveImageKeyWorList(inputSlave->GetImageKeywordlist());
// Pipeline
filterTopoPhase->SetMasterCartesianMeanInput(GetParameterFloatVectorImage("incartmeanmaster"));
filterTopoPhase->SetSlaveCartesianMeanInput(GetParameterFloatVectorImage("incartmeanslave"));
filterTopoPhase->SetMasterCartesianMeanPerLineInput(GetParameterFloatVectorImage("incartmeanperlinemaster"));
filterTopoPhase->SetSlaveCartesianMeanPerLineInput(GetParameterFloatVectorImage("incartmeanperlineslave"));
filterTopoPhase->SetGridInput(GridPtr);
......
......@@ -795,7 +795,7 @@ namespace otb
if (!inMasterIt.IsAtEndOfLine() && !inSlaveIt.IsAtEndOfLine())
{
// Check isData (grom topographic phase)
if (inTopoPhaseIt.Get()[4] != 0)
if (inTopoPhaseIt.Get()[1] != 0)
{
// Complex Raw interferogram (master * conj(slave))
double real_RawInterfero = (inMasterIt.Get().real()*inSlaveIt.Get().real() +
......
......@@ -129,11 +129,13 @@ public:
itkSetMacro(MLAzi, unsigned int);
itkSetMacro(MaxShiftInRange, float);
itkSetMacro(MaxShiftInAzimut, float);
itkSetMacro(MasterCopy, bool);
// Getter
itkGetMacro(MLRan, unsigned int);
itkGetMacro(MLAzi, unsigned int);
itkGetMacro(MaxShiftInRange, float);
itkGetMacro(MaxShiftInAzimut, float);
itkGetMacro(MasterCopy, bool);
void SetGridStep(unsigned int stepRange, unsigned int stepAzimut)
{
......@@ -155,6 +157,8 @@ public:
return m_GridStep[1];
}
void SetSlaveImageKeyWorList(ImageKeywordlist sarSlaveKWL);
// Setter/Getter for inputs (Cartesian mean per pixel and per line)
/** Connect one of the operands for topographic phase estimation : Master Cartesian Mean */
void SetMasterCartesianMeanInput( const ImageInType* image);
......@@ -163,7 +167,7 @@ public:
void SetMasterCartesianMeanPerLineInput( const ImageInType* image);
/** Connect one of the operands for topographic phase estimation : Slave Cartesian Mean */
void SetSlaveCartesianMeanInput( const ImageInType* image);
// void SetSlaveCartesianMeanInput( const ImageInType* image);
/** Connect one of the operands for topographic phase estimation : Slave Cartesian Mean Per line */
void SetSlaveCartesianMeanPerLineInput( const ImageInType* image);
......@@ -173,7 +177,7 @@ public:
/** Get the inputs */
const ImageInType* GetMasterCartesianMeanInput() const;
const ImageInType* GetMasterCartesianMeanPerLineInput() const;
const ImageInType* GetSlaveCartesianMeanInput() const;
//const ImageInType* GetSlaveCartesianMeanInput() const;
const ImageInType* GetSlaveCartesianMeanPerLineInput() const;
const GridType * GetGridInput() const;
......@@ -203,9 +207,9 @@ protected:
virtual void GenerateInputRequestedRegion() ITK_OVERRIDE;
/**
* OutputRegionToInputRegion returns the input Slave Cartesian Mean (Max shift between master and slave images)
* OutputRegionToInputRegion returns the input Slave Cartesian Per Line Mean
*/
ImageInRegionType OutputRegionToSlaveInputRegion(const ImageOutRegionType& outputRegion) const;
ImageInRegionType OutputRegionToSlavePerLineInputRegion(const ImageOutRegionType& outputRegion) const;
GridRegionType OutputRegionToInputGridRegion(const ImageOutRegionType& outputRegion) const;
......@@ -248,6 +252,12 @@ protected:
// Lamdba
float m_Lambda;
// KeyWordlist for slave image
ImageKeywordlist m_SlaveKeyWordList;
// bool to activate master Cart Mean Copy
bool m_MasterCopy;
// Instance of SarSensorModelAdapter for Slave
SarSensorModelAdapter::Pointer m_SarSensorModelAdapterForSlave;
......
This diff is collapsed.
......@@ -333,8 +333,8 @@ if __name__ == "__main__":
appCartMeanMaster.SetParameterString("indemproj", os.path.join(output_dir, demProj_Master))
appCartMeanMaster.SetParameterInt("indirectiondemc", appDEMProjectionMaster.GetParameterInt("directiontoscandemc"))
appCartMeanMaster.SetParameterInt("indirectiondeml", appDEMProjectionMaster.GetParameterInt("directiontoscandeml"))
appCartMeanMaster.SetParameterInt("mlran", ml_range)
appCartMeanMaster.SetParameterInt("mlazi", ml_azimut)
appCartMeanMaster.SetParameterInt("mlran", 1)
appCartMeanMaster.SetParameterInt("mlazi", 1)
appCartMeanMaster.SetParameterString("ram", "4000")
appCartMeanMaster.SetParameterString("out", os.path.join(output_dir, master_cartesian_mean))
appCartMeanMaster.SetParameterString("outopt", os.path.join(output_dir, master_cartesianperline_mean))
......@@ -349,8 +349,8 @@ if __name__ == "__main__":
appCartMeanSlave.SetParameterString("indemproj", os.path.join(output_dir, demProj_Slave))
appCartMeanSlave.SetParameterInt("indirectiondemc", appDEMProjectionSlave.GetParameterInt("directiontoscandemc"))
appCartMeanSlave.SetParameterInt("indirectiondeml", appDEMProjectionSlave.GetParameterInt("directiontoscandeml"))
appCartMeanSlave.SetParameterInt("mlran", ml_range)
appCartMeanSlave.SetParameterInt("mlazi", ml_azimut)
appCartMeanSlave.SetParameterInt("mlran", 1)
appCartMeanSlave.SetParameterInt("mlazi", 1)
appCartMeanSlave.SetParameterString("ram", "4000")
appCartMeanSlave.SetParameterString("out", os.path.join(output_dir, slave_cartesian_mean))
appCartMeanSlave.SetParameterString("outopt", os.path.join(output_dir, slave_cartesianperline_mean))
......
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