Commit 5ec85f33 authored by Julien Osman's avatar Julien Osman
Browse files

WIP: Read band-dependant metadata

parent f8eeec26
......@@ -86,7 +86,7 @@ public:
itkExceptionMacro("GetRadiometricCalibrationRangeSpreadLoss() not implemented in SarDefaultImageMetadataInterface, no captor type found");
}
PointSetPointer GetRadiometricCalibrationNoise(const MetadataSupplierInterface&, const ImageMetadata&) const override
PointSetPointer GetRadiometricCalibrationNoise(const MetadataSupplierInterface&, const ImageMetadata&, const std::string&) const override
{
itkExceptionMacro("GetRadiometricCalibrationNoise(const MetadataSupplierInterface&) not implemented in SarDefaultImageMetadataInterface, no captor type found");
}
......
......@@ -76,7 +76,7 @@ public:
virtual PointSetPointer GetRadiometricCalibrationAntennaPatternOldGain() const;
virtual PointSetPointer GetRadiometricCalibrationIncidenceAngle(const MetadataSupplierInterface &) const;
virtual PointSetPointer GetRadiometricCalibrationRangeSpreadLoss() const;
virtual PointSetPointer GetRadiometricCalibrationNoise(const MetadataSupplierInterface&, const ImageMetadata&) const;
virtual PointSetPointer GetRadiometricCalibrationNoise(const MetadataSupplierInterface&, const ImageMetadata&, const std::string& b="") const;
virtual ArrayIndexType GetRadiometricCalibrationAntennaPatternNewGainPolynomialDegree() const;
virtual ArrayIndexType GetRadiometricCalibrationAntennaPatternOldGainPolynomialDegree() const;
......@@ -123,7 +123,7 @@ public:
* @param mds The MetadataSupplierInterface containing the calibration data
* @param imd The ImageMetadata containing the calibration data
*/
void LoadRadiometricCalibrationData(SARCalib& sarCalib, const MetadataSupplierInterface& mds, const ImageMetadata& imd) const;
void LoadRadiometricCalibrationData(SARCalib& sarCalib, const MetadataSupplierInterface& mds, const ImageMetadata& imd, const std::string &band="") const;
protected:
SarImageMetadataInterface();
......
......@@ -112,25 +112,10 @@ public:
double GetCalibrationFactor() const;
/** Get the number of noise records */
unsigned int GetNumberOfNoiseRecords(const MetadataSupplierInterface&) const;
unsigned int GetNumberOfNoiseRecords(const MetadataSupplierInterface&, const unsigned int) const;
/** Get the polynomial degree list */
UIntVectorType GetNoisePolynomialDegrees(const MetadataSupplierInterface &mds) const;
/** Get the polynomial coefficient list */
DoubleVectorVectorType GetNoisePolynomialCoefficientsList(const MetadataSupplierInterface &mds) const;
/** Get timeUTC noise acquisition list in Julian day */
DoubleVectorType GetNoiseTimeUTCList(const MetadataSupplierInterface &mds) const;
/** Get noise minimum validity range list */
DoubleVectorType GetNoiseValidityRangeMinList(const MetadataSupplierInterface &mds) const;
/** Get noise maximum validity range list */
DoubleVectorType GetNoiseValidityRangeMaxList(const MetadataSupplierInterface &mds) const;
/** Get noise reference point list */
DoubleVectorType GetNoiseReferencePointList(const MetadataSupplierInterface &mds) const;
UIntVectorType GetNoisePolynomialDegrees(const MetadataSupplierInterface &mds, const unsigned int polLayer) const;
/** Get the radar frequency */
double GetRadarFrequency() const override;
......@@ -162,7 +147,7 @@ public:
/** Get the constant calibration factor */
RealType GetRadiometricCalibrationScale() const override;
PointSetPointer GetRadiometricCalibrationNoise(const MetadataSupplierInterface&, const ImageMetadata&) const override;
PointSetPointer GetRadiometricCalibrationNoise(const MetadataSupplierInterface&, const ImageMetadata&, const std::string& b="") const override;
ArrayIndexType GetRadiometricCalibrationNoisePolynomialDegree() const override;
PointSetPointer GetRadiometricCalibrationIncidenceAngle(const MetadataSupplierInterface&) const override;
......@@ -193,16 +178,16 @@ protected:
double ConvertStringTimeUTCToJulianDay(const std::string& value) const;
/** Get the polynomial degree for a given noise record */
unsigned int GetNoisePolynomialDegrees(const unsigned int noiseRecord, const MetadataSupplierInterface &mds) const;
unsigned int GetNoisePolynomialDegrees(const unsigned int noiseRecord, const MetadataSupplierInterface &mds, const unsigned int polLayer) const;
/** Get the polynomial coefficient for a given noise record */
DoubleVectorType GetNoisePolynomialCoefficients(const unsigned int noiseRecord, const MetadataSupplierInterface& mds) const;
DoubleVectorType GetNoisePolynomialCoefficients(const unsigned int noiseRecord, const MetadataSupplierInterface& mds, const unsigned int polLayer) const;
/** Get timeUTC noise acquisition in Julian day for a given noise record*/
double GetNoiseTimeUTC(const unsigned int noiseRecord, const MetadataSupplierInterface& mds) const;
double GetNoiseTimeUTC(const unsigned int noiseRecord, const MetadataSupplierInterface& mds, const unsigned int polLayer) const;
/** Get noise reference point for a given noise record */
double GetNoiseReferencePoint(const unsigned int noiseRecord, const MetadataSupplierInterface &mds) const;
double GetNoiseReferencePoint(const unsigned int noiseRecord, const MetadataSupplierInterface &mds, const unsigned int polLayer) const;
private:
TerraSarImageMetadataInterface(const Self&) = delete;
......
......@@ -120,7 +120,7 @@ SarImageMetadataInterface::PointSetPointer SarImageMetadataInterface::GetConstan
}
SarImageMetadataInterface::PointSetPointer
SarImageMetadataInterface::GetRadiometricCalibrationNoise(const MetadataSupplierInterface &, const ImageMetadata &) const
SarImageMetadataInterface::GetRadiometricCalibrationNoise(const MetadataSupplierInterface &, const ImageMetadata &, const std::string&) const
{
return SarImageMetadataInterface::GetConstantValuePointSet(0.0);
}
......@@ -298,7 +298,7 @@ bool SarImageMetadataInterface::GetSAR(SARParam & sarParam) const
}
void SarImageMetadataInterface::LoadRadiometricCalibrationData(SARCalib &sarCalib, const MetadataSupplierInterface &mds,
const ImageMetadata &imd) const
const ImageMetadata &imd, const std::string& band) const
{
sarCalib.rescalingFactor = GetRescalingFactor();
auto coeffs = GetRadiometricCalibrationNoisePolynomialDegree();
......@@ -311,7 +311,7 @@ void SarImageMetadataInterface::LoadRadiometricCalibrationData(SARCalib &sarCali
std::copy(coeffs.begin(), coeffs.end(), sarCalib.radiometricCalibrationIncidenceAnglePolynomialDegree.begin());
coeffs = GetRadiometricCalibrationRangeSpreadLossPolynomialDegree();
std::copy(coeffs.begin(), coeffs.end(), sarCalib.radiometricCalibrationRangeSpreadLossPolynomialDegree.begin());
sarCalib.radiometricCalibrationNoise = GetRadiometricCalibrationNoise(mds, imd);
sarCalib.radiometricCalibrationNoise = GetRadiometricCalibrationNoise(mds, imd, band);
sarCalib.radiometricCalibrationAntennaPatternNewGain = GetRadiometricCalibrationAntennaPatternNewGain();
sarCalib.radiometricCalibrationAntennaPatternOldGain = GetRadiometricCalibrationAntennaPatternOldGain();
sarCalib.radiometricCalibrationIncidenceAngle = GetRadiometricCalibrationIncidenceAngle(mds);
......
......@@ -182,7 +182,8 @@ void SarParametricMapFunction<TInputImage, TCoordRep>::EvaluateParametricCoeffic
*
*/
template <class TInputImage, class TCoordRep>
typename SarParametricMapFunction<TInputImage, TCoordRep>::RealType SarParametricMapFunction<TInputImage, TCoordRep>::Evaluate(const PointType& point) const
typename SarParametricMapFunction<TInputImage, TCoordRep>::RealType
SarParametricMapFunction<TInputImage, TCoordRep>::Evaluate(const PointType& point) const
{
RealType result = itk::NumericTraits<RealType>::Zero;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment