Skip to content
Snippets Groups Projects
Commit ef234e2e authored by Guillaume Borrut's avatar Guillaume Borrut
Browse files

MRG

parents 7c10546d a4ac536f
No related branches found
No related tags found
No related merge requests found
......@@ -56,30 +56,30 @@ public:
/** Accessors */
void SetCalFactor( double val ) { m_CalFactor = val; m_RadarBrightness.SetCalFactor(val); };
double GetCalFactor() { return m_CalFactor; };
double GetCalFactor() const { return m_CalFactor; };
void SetNoiseRangeValidityMin( double val ) { m_NoiseRangeValidityMin = val; };
double GetNoiseRangeValidityMin() { return m_NoiseRangeValidityMin; };
double GetNoiseRangeValidityMin() const { return m_NoiseRangeValidityMin; };
void SetNoiseRangeValidityMax( double val ) { m_NoiseRangeValidityMax = val; };
double GetNoiseRangeValidityMax() { return m_NoiseRangeValidityMax; };
double GetNoiseRangeValidityMax() const { return m_NoiseRangeValidityMax; };
void SetNoiseRangeValidityRef( double val ) { m_NoiseRangeValidityRef = val; };
double GetNoiseRangeValidityRef() { return m_NoiseRangeValidityRef; };
double GetNoiseRangeValidityRef() const { return m_NoiseRangeValidityRef; };
void SetLocalIncidentAngle( double val )
{
m_LocalIncidentAngle = val;
m_SinLocalIncidentAngle = vcl_sin(m_LocalIncidentAngle*CONST_PI_180);
};
double GetLocalIncidentAngle() { return m_LocalIncidentAngle; };
double GetLocalIncidentAngle() const { return m_LocalIncidentAngle; };
double GetSinLocalIncidentAngle() const { return m_SinLocalIncidentAngle; };
void SetNoisePolynomialCoefficientsList( DoubleVectorVectorType vect ) { m_NoisePolynomialCoefficientsList = vect; };
DoubleVectorVectorType GetNoisePolynomialCoefficientsList() { return m_NoisePolynomialCoefficientsList; };
DoubleVectorVectorType GetNoisePolynomialCoefficientsList() const { return m_NoisePolynomialCoefficientsList; };
void SetImageSize( SizeType size ) { m_ImageSize = size; };
SizeType GetImageSize() { return m_ImageSize; };
SizeType GetImageSize() const { return m_ImageSize; };
void SetUseFastCalibrationMethod( bool b ) { m_UseFastCalibrationMethod = b; };
bool GetUseFastCalibrationMethod() { return m_UseFastCalibrationMethod; };
bool GetUseFastCalibrationMethod() const { return m_UseFastCalibrationMethod; };
void SetTimeUTC( LIntVectorType vect ) { m_TimeUTC = vect; };
LIntVectorType GetTimeUTC() { return m_TimeUTC; };
LIntVectorType GetTimeUTC() const { return m_TimeUTC; };
void SetPRF( double val ) { m_PRF = val; m_InvPRF = 1./m_PRF; };
double GetPRF() { return m_PRF; };
double GetPRF() const { return m_PRF; };
double GetInvPRF() const { return m_InvPRF; };
double ComputeCurrentNoise( unsigned int colId );
......@@ -167,35 +167,35 @@ public:
/** Accessors */
/** Calibration Factor */
void SetCalFactor( double val );
double GetCalFactor();
double GetCalFactor() const;
/** Noise minimal range validity */
void SetNoiseRangeValidityMin( double val );
double GetNoiseRangeValidityMin() ;
double GetNoiseRangeValidityMin() const;
/** Noise maximal range validity */
void SetNoiseRangeValidityMax( double val );
double GetNoiseRangeValidityMax();
double GetNoiseRangeValidityMax() const;
/** Noise reference range validity */
void SetNoiseRangeValidityRef( double val );
double GetNoiseRangeValidityRef();
double GetNoiseRangeValidityRef() const;
/** Sensor local incident angle in degree */
void SetLocalIncidentAngle( double val );
double GetLocalIncidentAngle();
double GetLocalIncidentAngle() const;
/** Sinus of the sensor local incident angle in degree */
double GetSinLocalIncidentAngle() const;
/** Vector of vector that contain noise polinomial coefficient */
void SetNoisePolynomialCoefficientsList( DoubleVectorVectorType vect );
DoubleVectorVectorType GetNoisePolynomialCoefficientsList();
DoubleVectorVectorType GetNoisePolynomialCoefficientsList() const;
/** Fast Calibration Method. If set to trus, will consider only the first noise coefficient else,
* will use all of them and applied it according to its acquisition UTC time and the coordinates
* of the pixel in the image. */
void SetUseFastCalibrationMethod( bool b );
bool GetUseFastCalibrationMethod();
bool GetUseFastCalibrationMethod() const;
/** TimeUTC for each noise coefficient acquisition (in second). */
void SetTimeUTC( LIntVectorType vect );
LIntVectorType GetTimeUTC();
LIntVectorType GetTimeUTC() const;
/** Pulse Repetition Frequency */
void SetPRF( double val );
double GetPRF();
double GetPRF() const;
/** Inverse Pulse Repetition Frequency */
double GetInvPRF() const;
......
......@@ -185,7 +185,7 @@ TerraSarCalibrationImageFilter<TInputImage,TOutputImage>
template <class TInputImage, class TOutputImage>
double
TerraSarCalibrationImageFilter<TInputImage,TOutputImage>
::GetCalFactor()
::GetCalFactor() const
{
return this->GetFunctor().GetCalFactor();
}
......@@ -202,7 +202,7 @@ TerraSarCalibrationImageFilter<TInputImage,TOutputImage>
template <class TInputImage, class TOutputImage>
double
TerraSarCalibrationImageFilter<TInputImage,TOutputImage>
::GetNoiseRangeValidityMin()
::GetNoiseRangeValidityMin() const
{
return this->GetFunctor().GetNoiseRangeValidityMin();
}
......@@ -219,7 +219,7 @@ TerraSarCalibrationImageFilter<TInputImage,TOutputImage>
template <class TInputImage, class TOutputImage>
double
TerraSarCalibrationImageFilter<TInputImage,TOutputImage>
::GetNoiseRangeValidityMax()
::GetNoiseRangeValidityMax() const
{
return this->GetFunctor().GetNoiseRangeValidityMax();
}
......@@ -237,7 +237,7 @@ TerraSarCalibrationImageFilter<TInputImage,TOutputImage>
template <class TInputImage, class TOutputImage>
double
TerraSarCalibrationImageFilter<TInputImage,TOutputImage>
::GetNoiseRangeValidityRef()
::GetNoiseRangeValidityRef() const
{
return this->GetFunctor().GetNoiseRangeValidityRef();
}
......@@ -255,7 +255,7 @@ TerraSarCalibrationImageFilter<TInputImage,TOutputImage>
template <class TInputImage, class TOutputImage>
double
TerraSarCalibrationImageFilter<TInputImage,TOutputImage>
::GetLocalIncidentAngle()
::GetLocalIncidentAngle() const
{
return this->GetFunctor().GetLocalIncidentAngle();
}
......@@ -281,7 +281,7 @@ TerraSarCalibrationImageFilter<TInputImage,TOutputImage>
template <class TInputImage, class TOutputImage>
typename TerraSarCalibrationImageFilter<TInputImage,TOutputImage>::DoubleVectorVectorType
TerraSarCalibrationImageFilter<TInputImage,TOutputImage>
::GetNoisePolynomialCoefficientsList()
::GetNoisePolynomialCoefficientsList() const
{
return this->GetFunctor().GetNoisePolynomialCoefficientsList();
}
......@@ -298,7 +298,7 @@ TerraSarCalibrationImageFilter<TInputImage,TOutputImage>
template <class TInputImage, class TOutputImage>
bool
TerraSarCalibrationImageFilter<TInputImage,TOutputImage>
::GetUseFastCalibrationMethod()
::GetUseFastCalibrationMethod() const
{
return this->GetFunctor().GetUseFastCalibrationMethod();
}
......@@ -317,7 +317,7 @@ TerraSarCalibrationImageFilter<TInputImage,TOutputImage>
template <class TInputImage, class TOutputImage>
typename TerraSarCalibrationImageFilter<TInputImage,TOutputImage>::LIntVectorType
TerraSarCalibrationImageFilter<TInputImage,TOutputImage>
::GetTimeUTC()
::GetTimeUTC() const
{
return this->GetFunctor().GetTimeUTC();
}
......@@ -336,7 +336,7 @@ TerraSarCalibrationImageFilter<TInputImage,TOutputImage>
template <class TInputImage, class TOutputImage>
double
TerraSarCalibrationImageFilter<TInputImage,TOutputImage>
::GetPRF()
::GetPRF() const
{
return this->GetFunctor().GetPRF();
}
......@@ -356,28 +356,39 @@ void
TerraSarCalibrationImageFilter<TInputImage,TOutputImage>
::PrintSelf(std::ostream& os, itk::Indent indent) const
{
// os << "Calibration Factor : " << this->GetCalFact() << std::endl;
// os << "Sensor local incident angle : " << this->GetLocalIncidentAngle() << std::endl;
// os << "Noise minimal range validity : " << this->GetNoiseRangeValidityMin() << std::endl;
// os << "Noise maxinimal range validity: " << this->GetNoiseRangeValidityMax() << std::endl;
// os << "Noise reference range : " << this->GetNoiseRangeValidityRef() << std::endl;
Superclass::PrintSelf(os, indent);
os << "Calibration Factor : " << this->GetCalFactor() << std::endl;
os << "Sensor local incident angle : " << this->GetLocalIncidentAngle() << std::endl;
os << "Noise minimal range validity: " << this->GetNoiseRangeValidityMin() << std::endl;
os << "Noise maximal range validity: " << this->GetNoiseRangeValidityMax() << std::endl;
os << "Noise reference range : " << this->GetNoiseRangeValidityRef() << std::endl;
// if(this->GetUseFastCalibrationMethod())
// {
// os << "Noise polinomial coefficient : " << this->GetNoisePolynomialCoefficientsList()[0] << std::endl;
// os << "Noise TimeUTC : " << this->GetTimeUTC()[0] << std::endl;
// }
// else
// {
// os << "Pulse Repetition Frequency : " << this->GetPRF() << std::endl;
// os << "Noise acquisitions : " << this->GetNoisePolynomialCoefficientsList().size() << std::endl;
// for (unsigned int i=0; i<this->GetNoisePolynomialCoefficientsList.size(); ++i)
// {
// os << "Noise acquisition "<< i << ":" << std::endl;
// os << "Noise TimeUTC : " << this->GetTimeUTC()[i] << std::endl;
// os << "Noise polinomial coeff. : " << this->GetNoisePolynomialCoefficientsList()[i] << std::endl;
// }
// }
if(this->GetUseFastCalibrationMethod())
{
os << "Noise polinomial coefficient: [ ";
for (unsigned int i=0; i<this->GetNoisePolynomialCoefficientsList()[0].size(); ++i)
{
os << this->GetNoisePolynomialCoefficientsList()[0][i] << " ";
}
os << "]" << std::endl;
}
else
{
os << "Pulse Repetition Frequency : " << this->GetPRF() << std::endl;
os << "Noise acquisitions : " << this->GetNoisePolynomialCoefficientsList().size() << std::endl;
for (unsigned int i=0; i<this->GetNoisePolynomialCoefficientsList().size(); ++i)
{
os << "Noise acquisition"<< i << ":" << std::endl;
os << "Noise TimeUTC : " << this->GetTimeUTC()[i] << std::endl;
os << "Noise polinomial coefficient: [ ";
for (unsigned int j=0; j<this->GetNoisePolynomialCoefficientsList()[j].size(); ++j)
{
os << this->GetNoisePolynomialCoefficientsList()[i][j] << " ";
}
os << "]" << std::endl;
}
}
}
......
......@@ -62,5 +62,7 @@ int otbTerraSarCalibrationImageFilterTest(int argc, char * argv[])
writer->SetInput(filter->GetOutput());
writer->Update();
std::cout<<filter<<std::endl;
return EXIT_SUCCESS;
}
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