<commit_before>/*
 * Copyright (C) 2005-2020 Centre National d'Etudes Spatiales (CNES)
 *
 * This file is part of Orfeo Toolbox
 *
 *     https://www.orfeo-toolbox.org/
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */


#ifndef otbTerraSarXSarImageMetadataInterface_h
#define otbTerraSarXSarImageMetadataInterface_h

#include <string>

#include "otbSarImageMetadataInterface.h"
#include "itkImageBase.h"

namespace otb
{
/** \class TerraSarXSarImageMetadataInterface
 *
 * \brief Creation of an "otb" TerraSarXSarImageMetadataInterface that gets metadata.
 *
 *
 * \ingroup OTBMetadata
 */
class OTBMetadata_EXPORT TerraSarXSarImageMetadataInterface : public SarImageMetadataInterface
{
public:
  typedef TerraSarXSarImageMetadataInterface Self;
  typedef SarImageMetadataInterface      Superclass;
  typedef itk::SmartPointer<Self>        Pointer;
  typedef itk::SmartPointer<const Self>  ConstPointer;

  /** Method for creation through the object factory. */
  itkNewMacro(Self);

  /** Run-time type information (and related methods). */
  itkTypeMacro(TerraSarXSarImageMetadataInterface, otbSarImageMetadataInterface);

  typedef itk::ImageBase<2>                     ImageType;
  typedef ImageType::IndexType                  IndexType;
  typedef std::vector<IndexType>                IndexVectorType;
  typedef itk::MetaDataDictionary               MetaDataDictionaryType;
  typedef MetaDataKey::VectorType               VectorType;
  typedef MetaDataKey::VariableLengthVectorType VariableLengthVectorType;
  typedef Superclass::ImageKeywordlistType      ImageKeywordlistType;
  typedef std::vector<double>                   DoubleVectorType;
  typedef std::vector<DoubleVectorType>         DoubleVectorVectorType;
  typedef std::vector<unsigned int>             UIntVectorType;

  typedef Superclass::PointSetType    PointSetType;
  typedef Superclass::PointSetPointer PointSetPointer;
  typedef double                      RealType;

  double   GetStartTimeUTC() const;
  double   GetStopTimeUTC() const;
  double GetRangeTimeFirstPixel() const;

  double GetRangeTimeLastPixel() const;


  double ConvertStringTimeUTCToJulianDay(const std::string& value) const;

  /** Get the imaging start acquisition day from the ossim metadata
   * \deprecated
   */
  int GetDay() const override;

  /** Get the imaging start acquisition month from the ossim metadata
   * \deprecated
   */
  int GetMonth() const override;

  /** Get the imaging start acquisition year from the ossim metadata
   * \deprecated
   */
  int GetYear() const override;

  /** Get the imaging start acquisition hour from the ossim metadata
   * \deprecated
   */
  int GetHour() const override;

  /** Get the imaging start acquisition minute from the ossim metadata
   * \deprecated
   */
  int GetMinute() const override;

  /** Get the imaging production day from the ossim metadata : generationTime variable
   * \deprecated
   */
  int GetProductionDay() const override;

  /** Get the imaging production month from the ossim metadata : generationTime variable
   * \deprecated
   */
  int GetProductionMonth() const override;

  /** Get the imaging production year from the ossim metadata : generationTime variable
   * \deprecated
   */
  int GetProductionYear() const override;

  /** Get the radar frequency */
  double GetRadarFrequency() const override;

  /** Get the PRF */
  double GetPRF() const override;

  /** Get the RSF */
  double GetRSF() const override;

  /** Get the center incidence angle */
  double GetCenterIncidenceAngle() const override;

    // Scene Corner and Center
  unsigned int GetNumberOfCornerIncidenceAngles() const;

  IndexType GetCenterIncidenceAngleIndex() const;

  DoubleVectorType GetCornersIncidenceAngles() const;

  IndexVectorType GetCornersIncidenceAnglesIndex() const;

  PointSetPointer GetRadiometricCalibrationIncidenceAngle() const;

  IndexType GetRadiometricCalibrationIncidenceAnglePolynomialDegree() const;
  
  bool CanRead() const override;

  double GetCalibrationFactor() const;

  double GetRadiometricCalibrationScale() const;

  double GetNoiseTimeUTC(unsigned int noiseRecord) const;

  double GetNoiseReferencePoint(unsigned int noiseRecord) const;

  unsigned int GetNumberOfNoiseRecords() const;

  double Horner(std::vector<double>& coefficients, const double tauMinusTauRef) const;

  DoubleVectorType GetNoisePolynomialCoefficients(unsigned int noiseRecord) const;

  UIntVectorType GetNoisePolynomialDegrees() const;

  unsigned int GetNoisePolynomialDegrees(unsigned int noiseRecord) const;

  IndexType GetRadiometricCalibrationNoisePolynomialDegree() const;

  PointSetPointer GetRadiometricCalibrationNoise() const;



  /** Get the 3 spectral band numbers corresponding to the default display for visualization,
   *  in the order R, G, B */
  std::vector<unsigned int> GetDefaultDisplay() const override;

protected:
  TerraSarXSarImageMetadataInterface() = default;
  ~TerraSarXSarImageMetadataInterface() = default;
 

private:
  TerraSarXSarImageMetadataInterface(const Self&) = delete;
  void operator=(const Self&) = delete;
};

} // end namespace otb

#endif
<commit_msg>COMP : Add override for some functions into TerraSarXSarImageMetadataInterface<commit_after>/*
 * Copyright (C) 2005-2020 Centre National d'Etudes Spatiales (CNES)
 *
 * This file is part of Orfeo Toolbox
 *
 *     https://www.orfeo-toolbox.org/
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */


#ifndef otbTerraSarXSarImageMetadataInterface_h
#define otbTerraSarXSarImageMetadataInterface_h

#include <string>

#include "otbSarImageMetadataInterface.h"
#include "itkImageBase.h"

namespace otb
{
/** \class TerraSarXSarImageMetadataInterface
 *
 * \brief Creation of an "otb" TerraSarXSarImageMetadataInterface that gets metadata.
 *
 *
 * \ingroup OTBMetadata
 */
class OTBMetadata_EXPORT TerraSarXSarImageMetadataInterface : public SarImageMetadataInterface
{
public:
  typedef TerraSarXSarImageMetadataInterface Self;
  typedef SarImageMetadataInterface      Superclass;
  typedef itk::SmartPointer<Self>        Pointer;
  typedef itk::SmartPointer<const Self>  ConstPointer;

  /** Method for creation through the object factory. */
  itkNewMacro(Self);

  /** Run-time type information (and related methods). */
  itkTypeMacro(TerraSarXSarImageMetadataInterface, otbSarImageMetadataInterface);

  typedef itk::ImageBase<2>                     ImageType;
  typedef ImageType::IndexType                  IndexType;
  typedef std::vector<IndexType>                IndexVectorType;
  typedef itk::MetaDataDictionary               MetaDataDictionaryType;
  typedef MetaDataKey::VectorType               VectorType;
  typedef MetaDataKey::VariableLengthVectorType VariableLengthVectorType;
  typedef Superclass::ImageKeywordlistType      ImageKeywordlistType;
  typedef std::vector<double>                   DoubleVectorType;
  typedef std::vector<DoubleVectorType>         DoubleVectorVectorType;
  typedef std::vector<unsigned int>             UIntVectorType;

  typedef Superclass::PointSetType    PointSetType;
  typedef Superclass::PointSetPointer PointSetPointer;
  typedef double                      RealType;

  double   GetStartTimeUTC() const;
  double   GetStopTimeUTC() const;
  double GetRangeTimeFirstPixel() const;

  double GetRangeTimeLastPixel() const;


  double ConvertStringTimeUTCToJulianDay(const std::string& value) const;

  /** Get the imaging start acquisition day from the ossim metadata
   * \deprecated
   */
  int GetDay() const override;

  /** Get the imaging start acquisition month from the ossim metadata
   * \deprecated
   */
  int GetMonth() const override;

  /** Get the imaging start acquisition year from the ossim metadata
   * \deprecated
   */
  int GetYear() const override;

  /** Get the imaging start acquisition hour from the ossim metadata
   * \deprecated
   */
  int GetHour() const override;

  /** Get the imaging start acquisition minute from the ossim metadata
   * \deprecated
   */
  int GetMinute() const override;

  /** Get the imaging production day from the ossim metadata : generationTime variable
   * \deprecated
   */
  int GetProductionDay() const override;

  /** Get the imaging production month from the ossim metadata : generationTime variable
   * \deprecated
   */
  int GetProductionMonth() const override;

  /** Get the imaging production year from the ossim metadata : generationTime variable
   * \deprecated
   */
  int GetProductionYear() const override;

  /** Get the radar frequency */
  double GetRadarFrequency() const override;

  /** Get the PRF */
  double GetPRF() const override;

  /** Get the RSF */
  double GetRSF() const override;

  /** Get the center incidence angle */
  double GetCenterIncidenceAngle() const override;

    // Scene Corner and Center
  unsigned int GetNumberOfCornerIncidenceAngles() const;

  IndexType GetCenterIncidenceAngleIndex() const;

  DoubleVectorType GetCornersIncidenceAngles() const;

  IndexVectorType GetCornersIncidenceAnglesIndex() const;

  PointSetPointer GetRadiometricCalibrationIncidenceAngle() const override;

  IndexType GetRadiometricCalibrationIncidenceAnglePolynomialDegree() const override;
  
  bool CanRead() const override;

  double GetCalibrationFactor() const;

  double GetRadiometricCalibrationScale() const override;

  double GetNoiseTimeUTC(unsigned int noiseRecord) const;

  double GetNoiseReferencePoint(unsigned int noiseRecord) const;

  unsigned int GetNumberOfNoiseRecords() const;

  double Horner(std::vector<double>& coefficients, const double tauMinusTauRef) const;

  DoubleVectorType GetNoisePolynomialCoefficients(unsigned int noiseRecord) const;

  UIntVectorType GetNoisePolynomialDegrees() const;

  unsigned int GetNoisePolynomialDegrees(unsigned int noiseRecord) const;

  IndexType GetRadiometricCalibrationNoisePolynomialDegree() const override;

  PointSetPointer GetRadiometricCalibrationNoise() const override;



  /** Get the 3 spectral band numbers corresponding to the default display for visualization,
   *  in the order R, G, B */
  std::vector<unsigned int> GetDefaultDisplay() const override;

protected:
  TerraSarXSarImageMetadataInterface() = default;
  ~TerraSarXSarImageMetadataInterface() = default;
 

private:
  TerraSarXSarImageMetadataInterface(const Self&) = delete;
  void operator=(const Self&) = delete;
};

} // end namespace otb

#endif

{'fraction_non_alphanumeric': 0.0726555652936021, 'fraction_numerical': 0.00245398773006135, 'mean_word_length': 4.21526508226691, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, 'https://': 2, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '830006', 'n_tokens_mistral': 3231, 'n_tokens_neox': 2994, 'n_words': 974}