OTB
9.0.0
Orfeo Toolbox
|
Classes | |
class | BinaryFunctorImageFilterWithNBands |
struct | doy_multi_year |
class | IdentityGapFillingFunctor |
class | LinearGapFillingFunctor |
struct | MultiComponentTimeSeriesFunctorAdaptor |
class | SplineGapFillingFunctor |
Typedefs | |
using | DateVector = std::vector< std::tm > |
using | PrecisionType = double |
using | VectorType = vnl_vector< PrecisionType > |
Functions | |
int | delta_days (std::tm t1, std::tm t2) |
unsigned int | doy (const std::tm &d) |
std::tm | make_date (const std::string &d) |
std::string | pad_int (int x) |
std::vector< std::string > | string_split (const std::string &s, const std::string &sep) |
template<typename ValueType > | |
itk::VariableLengthVector< ValueType > | vectorToPixel (const std::vector< ValueType > &v) |
template<typename ValueType , typename VectorType > | |
itk::VariableLengthVector< ValueType > | vectorToPixel (const VectorType &v) |
using GapFilling::DateVector = typedef std::vector<std::tm> |
Definition at line 31 of file otbDateUtils.h.
using GapFilling::PrecisionType = typedef double |
Definition at line 29 of file otbDateUtils.h.
using GapFilling::VectorType = typedef vnl_vector<PrecisionType> |
Definition at line 30 of file otbDateUtils.h.
|
inline |
Generate a new pixel and a corresponding mask after interlacing input and output dates. The resulting pixel values for the dates which were not available in the input have a nundefined value and are masked.
Definition at line 133 of file otbTemporalGapFilling.h.
Referenced by GapFilling::LinearGapFillingFunctor< PixelType >::operator()(), and GapFilling::SplineGapFillingFunctor< PixelType >::operator()().
int GapFilling::delta_days | ( | std::tm | t1, |
std::tm | t2 | ||
) |
Returns the difference in days between 2 time structures.
unsigned int GapFilling::doy | ( | const std::tm & | d | ) |
Return the day of year.
Referenced by GapFilling::doy_multi_year::operator()(), otb::Functor::EnvelopeSavitzkyGolayInterpolationFunctor< Radius, TSeries, TDates, TWeight >::SetDates(), otb::Functor::TimeSeriesLeastSquareFittingFunctor< TSeriesType, TTimeFunction, TDateType, TWeightType >::SetDates(), and otb::Functor::SavitzkyGolayInterpolationFunctor< Radius, TSeries, TDates, TSeries >::SetDates().
|
inline |
Return 2 vectors containing, for each date, the position of the last (resp next) valid date and a bool which is true if there are no valid dates
Definition at line 178 of file otbTemporalGapFilling.h.
Referenced by GapFilling::LinearGapFillingFunctor< PixelType >::operator()(), and GapFilling::SplineGapFillingFunctor< PixelType >::operator()().
|
inline |
Return 2 vectors containing, for each date, the position of the last (resp next) valid date and a bool which is true if there are no valid dates
Definition at line 104 of file otbTemporalGapFilling.h.
Referenced by GapFilling::LinearGapFillingFunctor< PixelType >::operator()(), and GapFilling::SplineGapFillingFunctor< PixelType >::operator()().
void GapFilling::gapfill_time_series | ( | typename ImageType::Pointer | inIma, |
typename ImageType::Pointer | maskIma, | ||
typename BinaryFunctorImageFilterWithNBands< ImageType, ImageType, ImageType, FunctorType >::Pointer | filter, | ||
typename BinaryFunctorImageFilterWithNBands< ImageType, ImageType, ImageType, MultiComponentFunctorType >::Pointer | filter_mc, | ||
vcl_size_t | components_per_date = 1 , |
||
typename ImageType::PixelType | dv = typename ImageType::PixelType{} , |
||
typename ImageType::PixelType | odv = typename ImageType::PixelType{} |
||
) |
The gapfill_time_series function takes 2 input time series files (the image data and the mask data) and produces an output file (the gapfilled image data). The number of components (spectral bands, for instance) per date can be provided (default is 1) so that the different components are processed as individual time series. A file containing the dates of the acquisition can be provided. It should contain one date per line in YYYMMDD format.
The mask time series is supposed to contain 0s for the valid dates. The function is templated over the ImageType (typically an otb::VectorImage<double,2>) and on the interpolating functor.
Definition at line 653 of file otbTemporalGapFilling.h.
std::vector<VectorType> GapFilling::get_csv_profiles | ( | const std::string & | fname, |
int | pos, | ||
int | ndates | ||
) |
Extracts the profiles from a csv file (MAISEO format). Returns a vector of profiles. Gets as parameters the file name, the starting position of the dates (column) and the number of availble dates in the file.
std::vector<std::pair<long int, VectorType> > GapFilling::get_sirhyus_profiles | ( | const std::string & | df, |
unsigned int | nbDates | ||
) |
Extracts the profiles from a csv file (Sirhyus format). Returns a vector of pairs where each pair is <field id, profile> Gets as parameters the file name.
std::tm GapFilling::make_date | ( | const std::string & | d | ) |
Makes a date (std::tm struct) from a string with format YYYYMMDD.
int GapFilling::months | ( | const std::string & | m | ) |
Map to convert months from text to int.
std::string GapFilling::pad_int | ( | int | x | ) |
return a string with a 0 at the front if the int is < 10
DateVector GapFilling::parse_date_file | ( | const std::string & | df | ) |
Parses an ASCII file containing a date per line (string with format YYYYMMDD) and returns an std::vector< std::tm > containing the dates in the order of reading
std::pair<DateVector, int> GapFilling::parse_dates_csv_file | ( | const std::string & | df, |
int | year | ||
) |
Parses the first line of a csv file looking for dates like 4-Feb and returns an std::vector< std::tm >. The year is passed as parameter. Returns a pair containing a vector of dates and the starting position (column) of the dates in the file.
DateVector GapFilling::parse_dates_sirhyus | ( | const std::string & | fname | ) |
Parses the first line of a cvs file with this format: parcelle;f090215;f090317;f090321;f090603;f090623;f090701;f090712;f090726;f090805;f090814;f090830;f090906;f090924;f090930;f091016;f091225 and returns a DateVector
std::vector<std::string> GapFilling::string_split | ( | const std::string & | s, |
const std::string & | sep | ||
) |
Split a string using a given separator.
|
inline |
Definition at line 47 of file otbTemporalGapFilling.h.
|
inline |
Definition at line 37 of file otbTemporalGapFilling.h.