Commit afc6c387 authored by remi cresson's avatar remi cresson
Browse files

DOC: update markdown and application description

parent 4e9ba7f2
# NDVI Time Series applications
This module contains two applications for NDVI time series processing.
## TimeSeriesIndexTrend
This application computes the trend of a given time series index (e.g. NDVI).
The implemented pipeline is described in Leroux et al. (https://doi.org/10.1016/j.rse.2017.01.014)
![Pipeline](diagram.png)
### Dependencies
OTB (https://www.orfeo-toolbox.org/)
### How to build it
The module can be built like any other otb remote module. You can build it either from within OTB's sources or outside it.
### How to use it
TimeSeriesIndexTrend provides an OTBApplication.
```
This is the TimeSeriesIndexTrend application, version 6.0.0
Compute the trend of the vegetation index time series
Parameters:
-progress <boolean> Report progress
MISSING -ndvits <string list> Input NDVI time series images (mandatory)
MISSING -ndvidates <string list> Input NDVI time series dates (Must be dd/mm/yyyy format) (mandatory)
MISSING -rainfts <string list> Input rainfall time series images (mandatory)
MISSING -rainfdates <string list> Input rainfall time series dates (Must be dd/mm/yyyy format) (mandatory)
-ndvi.reduce <string> Method to reduce time series [cumul/max/amplitude] (mandatory, default value is cumul)
-ndvi.reduce.cumul.day1 <int32> Day 1 (mandatory, default value is 1)
-ndvi.reduce.cumul.day2 <int32> Day 2 (mandatory, default value is 31)
-ndvi.reduce.cumul.month1 <int32> Month 1 (mandatory, default value is 7)
-ndvi.reduce.cumul.month2 <int32> Month 2 (mandatory, default value is 10)
-ndvitrend <string> [pixel] Output image for NDVI trend (Contains [slope, pvalue, correlation]) [pixel=uint8/uint16/int16/uint32/int32/float/double] (default value is float) (optional, off by default)
-ndvilabel <string> [pixel] Output image for NDVI label [pixel=uint8/uint16/int16/uint32/int32/float/double] (default value is uint8) (optional, off by default)
-rain.reduce <string> Method to reduce time series [cumul] (mandatory, default value is cumul)
-rain.reduce.cumul.day1 <int32> Day 1 (mandatory, default value is 1)
-rain.reduce.cumul.day2 <int32> Day 2 (mandatory, default value is 31)
-rain.reduce.cumul.month1 <int32> Month 1 (mandatory, default value is 6)
-rain.reduce.cumul.month2 <int32> Month 2 (mandatory, default value is 10)
-residues <string> [pixel] Output image for NDVI residues [pixel=uint8/uint16/int16/uint32/int32/float/double] (default value is float) (optional, off by default)
-restrend <string> [pixel] Output image for NDVI residues trend [pixel=uint8/uint16/int16/uint32/int32/float/double] (default value is float) (optional, off by default)
-reslabel <string> [pixel] Output image for NDVI residues trend labels [pixel=uint8/uint16/int16/uint32/int32/float/double] (default value is uint8) (optional, off by default)
MISSING -factorslabel <string> [pixel] Output image for factors labels [pixel=uint8/uint16/int16/uint32/int32/float/double] (default value is uint8) (mandatory)
-ram <int32> Available RAM (Mb) (optional, off by default, default value is 128)
-inxml <string> Load otb application from xml file (optional, off by default)
Examples:
None
```
### License
Please see the license for legal issues on the use of the software (CeCILL).
......@@ -39,10 +39,10 @@ class TimeSeriesIndexTrend : public Application
{
public:
/** Standard class typedefs. */
typedef TimeSeriesIndexTrend Self;
typedef Application Superclass;
typedef itk::SmartPointer<Self> Pointer;
typedef itk::SmartPointer<const Self> ConstPointer;
typedef TimeSeriesIndexTrend Self;
typedef Application Superclass;
typedef itk::SmartPointer<Self> Pointer;
typedef itk::SmartPointer<const Self> ConstPointer;
/** Standard macro */
itkNewMacro(Self);
......@@ -50,44 +50,62 @@ public:
/** Typedefs for image concatenation */
typedef otb::ImageList<FloatImageType> ImageListType;
typedef ImageListToVectorImageFilter<ImageListType, FloatVectorImageType> ListConcatenerFilterType;
typedef MultiToMonoChannelExtractROI<FloatVectorImageType::InternalPixelType, FloatImageType::PixelType> ExtractROIFilterType;
typedef ObjectList<ExtractROIFilterType> ExtractROIFilterListType;
typedef ImageListToVectorImageFilter<ImageListType, FloatVectorImageType> ListConcatenerFilterType;
typedef MultiToMonoChannelExtractROI<FloatVectorImageType::InternalPixelType,
FloatImageType::PixelType> ExtractROIFilterType;
typedef ObjectList<ExtractROIFilterType> ExtractROIFilterListType;
/** typedef for reduce operation */
typedef otb::functor::TSAmplitudeReduceFunctor<FloatVectorImageType::PixelType, FloatVectorImageType::PixelType> TSAmplitudeReduceFunctorType;
typedef otb::functor::TSCumulatedRangeReduceFunctor<FloatVectorImageType::PixelType, FloatVectorImageType::PixelType> TSCumulatedRangeReduceFunctorType;
typedef otb::functor::TSMaxReduceFunctor<FloatVectorImageType::PixelType, FloatVectorImageType::PixelType> TSMaxReduceFunctorType;
typedef otb::UnaryFunctorImageFilter<FloatVectorImageType, FloatVectorImageType, TSAmplitudeReduceFunctorType> TSAmplitudeReduceFilterType;
typedef otb::UnaryFunctorImageFilter<FloatVectorImageType, FloatVectorImageType, TSCumulatedRangeReduceFunctorType> TSCumulatedRangeReduceFilterType;
typedef otb::UnaryFunctorImageFilter<FloatVectorImageType, FloatVectorImageType, TSMaxReduceFunctorType> TSMaxReduceFilterType;
typedef otb::functor::TSAmplitudeReduceFunctor<FloatVectorImageType::PixelType,
FloatVectorImageType::PixelType> TSAmplitudeReduceFunctorType;
typedef otb::functor::TSCumulatedRangeReduceFunctor<FloatVectorImageType::PixelType,
FloatVectorImageType::PixelType> TSCumulatedRangeReduceFunctorType;
typedef otb::functor::TSMaxReduceFunctor<FloatVectorImageType::PixelType,
FloatVectorImageType::PixelType> TSMaxReduceFunctorType;
typedef otb::UnaryFunctorImageFilter<FloatVectorImageType, FloatVectorImageType,
TSAmplitudeReduceFunctorType> TSAmplitudeReduceFilterType;
typedef otb::UnaryFunctorImageFilter<FloatVectorImageType, FloatVectorImageType,
TSCumulatedRangeReduceFunctorType> TSCumulatedRangeReduceFilterType;
typedef otb::UnaryFunctorImageFilter<FloatVectorImageType, FloatVectorImageType,
TSMaxReduceFunctorType> TSMaxReduceFilterType;
/** typedef for trend computing (slope, p-value) */
typedef otb::functor::SlopeAndPValueFunctor<FloatVectorImageType::PixelType, FloatVectorImageType::PixelType> SlopeAndPValueFunctorType;
typedef otb::UnaryFunctorImageFilter<FloatVectorImageType, FloatVectorImageType, SlopeAndPValueFunctorType> SlopeAndPValueFilterType;
typedef otb::functor::SlopeAndPValueFunctor<FloatVectorImageType::PixelType,
FloatVectorImageType::PixelType> SlopeAndPValueFunctorType;
typedef otb::UnaryFunctorImageFilter<FloatVectorImageType, FloatVectorImageType,
SlopeAndPValueFunctorType> SlopeAndPValueFilterType;
/** typedefs for trend labeling */
typedef otb::functor::SlopeAndPValueLabelingFunctor<FloatVectorImageType::PixelType, UInt8VectorImageType::PixelType> SlopeAndPValueLabelFunctorType;
typedef otb::UnaryFunctorImageFilter<FloatVectorImageType, UInt8VectorImageType, SlopeAndPValueLabelFunctorType> SlopeAndPValueLabelFilterType;
typedef otb::functor::SlopeAndPValueLabelingFunctor<FloatVectorImageType::PixelType,
UInt8VectorImageType::PixelType> SlopeAndPValueLabelFunctorType;
typedef otb::UnaryFunctorImageFilter<FloatVectorImageType, UInt8VectorImageType,
SlopeAndPValueLabelFunctorType> SlopeAndPValueLabelFilterType;
/* typedefs for dates*/
typedef otb::dates::SingleDate DateType;
typedef otb::dates::SingleDate DateType;
/* typedefs for image resampling */
typedef otb::StreamingResampleImageFilter<FloatVectorImageType, FloatVectorImageType> ResampleImageFilterType;
typedef itk::LinearInterpolateImageFunction<FloatVectorImageType> LinearInterpolatorType;
typedef otb::StreamingResampleImageFilter<FloatVectorImageType,
FloatVectorImageType> ResampleImageFilterType;
typedef itk::LinearInterpolateImageFunction<FloatVectorImageType> LinearInterpolatorType;
/* typedefs for residues processing */
typedef otb::functor::RainfallEstimatedNDVIResiduesFunctor<FloatVectorImageType::PixelType, FloatVectorImageType::PixelType> ResiduesFunctorType;
typedef itk::BinaryFunctorImageFilter<FloatVectorImageType, FloatVectorImageType, FloatVectorImageType, ResiduesFunctorType> ResiduesFilterType;
typedef otb::functor::RainfallEstimatedNDVIResiduesFunctor<FloatVectorImageType::PixelType,
FloatVectorImageType::PixelType> ResiduesFunctorType;
typedef itk::BinaryFunctorImageFilter<FloatVectorImageType, FloatVectorImageType,
FloatVectorImageType, ResiduesFunctorType> ResiduesFilterType;
/** typedefs for pearson correlation */
typedef otb::functor::PearsonCorrelationCoefficientFunctor<FloatVectorImageType::PixelType, FloatVectorImageType::PixelType, FloatVectorImageType::PixelType> PearsonCorrelationFunctorType;
typedef otb::BinaryFunctorImageFilter<FloatVectorImageType, FloatVectorImageType, FloatVectorImageType, PearsonCorrelationFunctorType> PearsonCorrelationFilterType;
typedef otb::functor::PearsonCorrelationCoefficientFunctor<FloatVectorImageType::PixelType,
FloatVectorImageType::PixelType, FloatVectorImageType::PixelType> PearsonCorrelationFunctorType;
typedef otb::BinaryFunctorImageFilter<FloatVectorImageType, FloatVectorImageType,
FloatVectorImageType, PearsonCorrelationFunctorType> PearsonCorrelationFilterType;
/** typedefs for final labeling */
typedef otb::functor::FactorsLabelingFunctor<FloatVectorImageType::PixelType, UInt8VectorImageType::PixelType> FactorsLabelingFunctorType;
typedef otb::TernaryFunctorImageFilter<FloatVectorImageType, FloatVectorImageType, FloatVectorImageType, FloatVectorImageType, FactorsLabelingFunctorType> FactorsLabelingFilterType;
typedef otb::functor::FactorsLabelingFunctor<FloatVectorImageType::PixelType,
UInt8VectorImageType::PixelType> FactorsLabelingFunctorType;
typedef otb::TernaryFunctorImageFilter<FloatVectorImageType, FloatVectorImageType,
FloatVectorImageType, FloatVectorImageType, FactorsLabelingFunctorType> FactorsLabelingFilterType;
private:
......@@ -119,10 +137,8 @@ private:
void DoInit()
{
testFunctor();
SetName("TimeSeriesIndexTrend");
SetDescription("Compute the trend of the indices time series");
SetDescription("Compute the trend of the vegetation index time series");
// Documentation
SetDocName("NDVITimeSeriesIndices");
......@@ -472,38 +488,38 @@ private:
}
// Layerstack
ListConcatenerFilterType::Pointer m_NDVIConcatener;
ExtractROIFilterListType::Pointer m_NDVIExtractorList;
ImageListType::Pointer m_NDVIImageList;
ListConcatenerFilterType::Pointer m_RFConcatener;
ExtractROIFilterListType::Pointer m_RFExtractorList;
ImageListType::Pointer m_RFImageList;
ListConcatenerFilterType::Pointer m_NDVIConcatener;
ExtractROIFilterListType::Pointer m_NDVIExtractorList;
ImageListType::Pointer m_NDVIImageList;
ListConcatenerFilterType::Pointer m_RFConcatener;
ExtractROIFilterListType::Pointer m_RFExtractorList;
ImageListType::Pointer m_RFImageList;
// Reduce filters
TSAmplitudeReduceFilterType::Pointer m_NDVIAmplitudeReduceFilter;
TSCumulatedRangeReduceFilterType::Pointer m_NDVICumulReduceFilter;
TSMaxReduceFilterType::Pointer m_NDVIMaxReduceFilter;
TSCumulatedRangeReduceFilterType::Pointer m_RFCumulReduceFilter;
TSAmplitudeReduceFilterType::Pointer m_NDVIAmplitudeReduceFilter;
TSCumulatedRangeReduceFilterType::Pointer m_NDVICumulReduceFilter;
TSMaxReduceFilterType::Pointer m_NDVIMaxReduceFilter;
TSCumulatedRangeReduceFilterType::Pointer m_RFCumulReduceFilter;
// Trend filters
SlopeAndPValueFilterType::Pointer m_NDVITimeSeriesRegressionFilter;
SlopeAndPValueFilterType::Pointer m_NDVIResiduesRegressionFilter;
SlopeAndPValueFilterType::Pointer m_NDVITimeSeriesRegressionFilter;
SlopeAndPValueFilterType::Pointer m_NDVIResiduesRegressionFilter;
// Label filters
SlopeAndPValueLabelFilterType::Pointer m_NDVITimeSeriesLabelFilter;
SlopeAndPValueLabelFilterType::Pointer m_NDVIResiduesLabelFilter;
SlopeAndPValueLabelFilterType::Pointer m_NDVITimeSeriesLabelFilter;
SlopeAndPValueLabelFilterType::Pointer m_NDVIResiduesLabelFilter;
// Resample filter
ResampleImageFilterType::Pointer m_ResampleFilter;
ResampleImageFilterType::Pointer m_ResampleFilter;
// Filter for residues
ResiduesFilterType::Pointer m_ResiduesFilter;
ResiduesFilterType::Pointer m_ResiduesFilter;
// Pearson correlation filter
PearsonCorrelationFilterType::Pointer m_CorrelationFilter;
PearsonCorrelationFilterType::Pointer m_CorrelationFilter;
// Final labeling filter
FactorsLabelingFilterType::Pointer m_FactorsLabelFilter;
FactorsLabelingFilterType::Pointer m_FactorsLabelFilter;
};
}
}
......
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