Commit e2de7110 authored by OTB Bot's avatar OTB Bot
Browse files

STYLE

parent 18228983
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
#ifndef __dataSpecP5B_h
#define __dataSpecP5B_h
// ***********************************************************************
// dataSpec_P5.m - (february, 25th 2008)
// ***********************************************************************
// [1] = wavelength (nm)
// [2] = refractive index of leaf material
// [3] = specific absorption coefficient of chlorophyll (a+b) (cm2.microg-1)
// [4] = specific absorption coefficient of carotenoids (cm2.microg-1)
// [5] = specific absorption coefficient of brown pigments (arbitrary units)
// [6] = specific absorption coefficient of water (cm-1)
// [7] = specific absorption coefficient of dry matter (g.cm-1)
// [8] = direct light
// [9] = diffuse light
// [10] = dry soil
// [11] = wet soil
// Feret et al. (2008), PROSPECT-4 and 5: Advances in the Leaf Optical
// Properties Model Separating Photosynthetic Pigments, Remote Sensing of
// Environment
// The specific absorption coefficient corresponding to brown pigment is
// provided by Frederic Baret (EMMAH, INRA Avignon, baret@avignon.inra.fr)
// and used with his autorization.
// ***********************************************************************
struct dataSpec {
double lambda;
double refLeafMatInd;
double chlAbsCoef;
double carAbsCoef;
double brownAbsCoef;
double waterAbsCoef;
double dryAbsCoef;
double directLight;
double diffuseLight;
double drySoil;
double wetSoil;
};
#define DATASPECSIZE 2101
#ifndef INDATASPEC_P5B_CXX_FILE
extern dataSpec dataSpecP5B[DATASPECSIZE];
#endif /* INDATASPEC_P5B_CXX_FILE */
#endif /* __dataSpecP5B_h */
#ifndef __dataSpecP5B_h
#define __dataSpecP5B_h
// ***********************************************************************
// dataSpec_P5.m - (february, 25th 2008)
// ***********************************************************************
// [1] = wavelength (nm)
// [2] = refractive index of leaf material
// [3] = specific absorption coefficient of chlorophyll (a+b) (cm2.microg-1)
// [4] = specific absorption coefficient of carotenoids (cm2.microg-1)
// [5] = specific absorption coefficient of brown pigments (arbitrary units)
// [6] = specific absorption coefficient of water (cm-1)
// [7] = specific absorption coefficient of dry matter (g.cm-1)
// [8] = direct light
// [9] = diffuse light
// [10] = dry soil
// [11] = wet soil
// Feret et al. (2008), PROSPECT-4 and 5: Advances in the Leaf Optical
// Properties Model Separating Photosynthetic Pigments, Remote Sensing of
// Environment
// The specific absorption coefficient corresponding to brown pigment is
// provided by Frederic Baret (EMMAH, INRA Avignon, baret@avignon.inra.fr)
// and used with his autorization.
// ***********************************************************************
struct dataSpec {
double lambda;
double refLeafMatInd;
double chlAbsCoef;
double carAbsCoef;
double brownAbsCoef;
double waterAbsCoef;
double dryAbsCoef;
double directLight;
double diffuseLight;
double drySoil;
double wetSoil;
};
#define DATASPECSIZE 2101
#ifndef INDATASPEC_P5B_CXX_FILE
extern dataSpec dataSpecP5B[DATASPECSIZE];
#endif /* INDATASPEC_P5B_CXX_FILE */
#endif /* __dataSpecP5B_h */
......@@ -25,15 +25,15 @@
namespace otb
{
/** \class AtmosphericEffects
* \brief This class applies atmospheric effects, computed from otbAtmosphericCorrectionParametersTo6SRadiativeTerms to an input spectrum (otbSpectralResponse) using the otbSurfaceReflectanceToReflectanceFilter.
* \brief This class applies atmospheric effects, computed from otbAtmosphericCorrectionParametersTo6SRadiativeTerms to an input spectrum (otbSpectralResponse) using the otbSurfaceReflectanceToReflectanceFilter.
*
* The two templates indicate:
* - the SpectralResponse input (from the JPL ASTER spectral library for example)
* - the SatelliteRSR relatives spectral response of a sensor (RSR).
* - the SatelliteRSR relatives spectral response of a sensor (RSR).
*
* \sa itk::DataObject
*/
template <class TSpectralResponse ,class TRSR>
template <class TSpectralResponse , class TRSR>
class AtmosphericEffects
: public itk::DataObject
{
......@@ -64,7 +64,7 @@ class AtmosphericEffects
/** Standard macros */
itkNewMacro(Self);
itkTypeMacro(AtmosphericEffects,DataObject);
itkTypeMacro(AtmosphericEffects, DataObject);
itkGetConstObjectMacro(InputSatRSR, InputRSRType);
itkSetObjectMacro(InputSatRSR, InputRSRType);
......
......@@ -25,8 +25,8 @@
namespace otb
{
template <class TSpectralResponse ,class TRSR>
AtmosphericEffects<TSpectralResponse ,TRSR>
template <class TSpectralResponse , class TRSR>
AtmosphericEffects<TSpectralResponse , TRSR>
::AtmosphericEffects()
{
m_InputSpectralResponse = InputSpectralResponseType::New();
......@@ -34,9 +34,9 @@ AtmosphericEffects<TSpectralResponse ,TRSR>
m_InputSatRSR = InputRSRType::New();
}
/*
template <class TSpectralResponse ,class TRSR>
void
AtmosphericEffects<TSpectralResponse ,TRSR>
template <class TSpectralResponse , class TRSR>
void
AtmosphericEffects<TSpectralResponse , TRSR>
::LoadFilterFunctionAtmosphericCorrectionParameters(double step)
{
//LMoad the filter function from the RSR
......@@ -46,9 +46,9 @@ AtmosphericEffects<TSpectralResponse ,TRSR>
}
}
*/
template <class TSpectralResponse ,class TRSR>
void
AtmosphericEffects<TSpectralResponse ,TRSR>
template <class TSpectralResponse , class TRSR>
void
AtmosphericEffects<TSpectralResponse , TRSR>
::Process6S(/*const unsigned int numBand*/)
{
typedef otb::AtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms
......@@ -61,7 +61,7 @@ AtmosphericEffects<TSpectralResponse ,TRSR>
typedef FilterFunctionValuesType::ValuesVectorType ValuesVectorType;
ValuesVectorType valuesVector;
const double step = 0.0025;
for (unsigned int i=0;i < this->m_InputSatRSR->GetNbBands();++i)
for (unsigned int i=0; i < this->m_InputSatRSR->GetNbBands(); ++i)
{
//Foreach band
valuesVector.clear();
......@@ -74,7 +74,7 @@ AtmosphericEffects<TSpectralResponse ,TRSR>
pair.second=0.;
m_CorrectedSpectralResponse->GetResponse().push_back(pair);
for ( double j=inter.first ; j <= inter.second; j+=step)
for ( double j=inter.first; j <= inter.second; j+=step)
{
valuesVector.push_back( (*this->m_InputSatRSR->GetRSR()[i])(j) );
}
......
......@@ -47,7 +47,7 @@ namespace otb
*
* ImageSimulationMethod converts a vectorData describing spatial distibution of materials into an image of reflectance.
* Reflectance image is computed by applying the RSR (relatives spectral response) of the satellite to the spectra obtained
* by the spectrum simulator. Then the satellite FTM is applied to compute spatial distribution of spectra.
* by the spectrum simulator. Then the satellite FTM is applied to compute spatial distribution of spectra.
* FTM is computed using otbThreamingResampleImageFilter and a ProlateInterpolateImageFunction.
* This method is not a true composite filter and the method UpdateData() must be called in a main program using this class.
*
......@@ -91,14 +91,14 @@ public:
typedef typename OutputImageType::Pointer OutputImagePointer;
typedef typename OutputImageType::IndexType IndexType;
typedef typename OutputImageType::InternalPixelType InternalPixelType;
typedef otb::Image<LabelType,2> OutputLabelImageType;
typedef otb::Image<LabelType, 2> OutputLabelImageType;
typedef otb::LabelMapToSimulatedImageFilter<LabelMapType,
SimulationStep1Type,SimulationStep2Type,OutputImageType> LabelMapToSimulatedImageFilterType;
SimulationStep1Type, SimulationStep2Type, OutputImageType> LabelMapToSimulatedImageFilterType;
typedef typename LabelMapToSimulatedImageFilterType::Pointer LabelMapToSimulatedImageFilterPointer;
typedef otb::MultiToMonoChannelExtractROI<double,double> MultiToMonoChannelFilterType;
typedef otb::MultiToMonoChannelExtractROI<double, double> MultiToMonoChannelFilterType;
typedef typename MultiToMonoChannelFilterType::Pointer MultiToMonoChannelFilterPointer;
typedef MultiToMonoChannelFilterType::OutputImageType SingleImageType;
typedef otb::ImageList<SingleImageType> ImageListType;
......@@ -109,11 +109,11 @@ public:
typedef otb::ProlateInterpolateImageFunction<SingleImageType> InterpolatorType;
typedef typename InterpolatorType::Pointer InterpolatorPointer;
typedef itk::ResampleImageFilter<SingleImageType,SingleImageType,double> FTMFilterType;
typedef itk::ResampleImageFilter<SingleImageType, SingleImageType, double> FTMFilterType;
// typedef otb::StreamingResampleImageFilter<SingleImageType, SingleImageType, double> FTMFilterType;
typedef typename FTMFilterType::Pointer FTMFilterPointer;
typedef itk::LabelMapToLabelImageFilter<LabelMapType,OutputLabelImageType> LabelMapToLabelImageFilterType;
typedef itk::LabelMapToLabelImageFilter<LabelMapType, OutputLabelImageType> LabelMapToLabelImageFilterType;
typedef typename LabelMapToLabelImageFilterType::Pointer LabelMapToLabelImageFilterPointer;
/** Standard Macro*/
......
......@@ -34,10 +34,10 @@ ImageSimulationMethod< TInputVectorData, TSpatialisation, TSimulationStep1, TSim
// this->SetNumberOfRequiredOutputs(2);
// this->SetNthOutput(0,OutputImageType::New());
// this->SetNthOutput(1,OutputLabelImageType::New());
// this->SetNthOutput(0, OutputImageType::New());
// this->SetNthOutput(1, OutputLabelImageType::New());
//TODO a changer mais pour le moment obligatoire car ProlateInterpolateImageFunction
//TODO a changer mais pour le moment obligatoire car ProlateInterpolateImageFunction
// ne fonctionne qu'avec des image mono canal.
// m_FTMFilter = FTMFilterType::New();
// m_Interpolator = InterpolatorType::New();
......@@ -61,9 +61,9 @@ ImageSimulationMethod< TInputVectorData, TSpatialisation, TSimulationStep1, TSim
// ImageSimulationMethod< TInputVectorData, TSpatialisation, TSimulationStep1, TSimulationStep2, TFTM, TOutputImage>
// ::SetInput(const InputVectorDataType* object)
// {
// this->itk::ProcessObject::SetNthInput(0,const_cast<InputVectorDataType *>(object));
// this->itk::ProcessObject::SetNthInput(0, const_cast<InputVectorDataType *>(object));
// }
//
//
// template <class TInputVectorData, class TSpatialisation, class TSimulationStep1, class TSimulationStep2, class TFTM, class TOutputImage>
// typename ImageSimulationMethod<TInputVectorData, TSpatialisation, TSimulationStep1, TSimulationStep2, TFTM, TOutputImage>::InputVectorDataType *
// ImageSimulationMethod< TInputVectorData, TSpatialisation, TSimulationStep1, TSimulationStep2, TFTM, TOutputImage>
......@@ -85,7 +85,7 @@ ImageSimulationMethod< TInputVectorData, TSpatialisation, TSimulationStep1, TSim
// }
// return static_cast<OutputImageType *>(this->itk::ProcessObject::GetOutput(0));
// }
//
//
// /** Get output label image */
// template <class TInputVectorData, class TSpatialisation, class TSimulationStep1, class TSimulationStep2, class TFTM, class TOutputImage>
// typename ImageSimulationMethod< TInputVectorData, TSpatialisation, TSimulationStep1, TSimulationStep2, TFTM, TOutputImage>::OutputLabelImageType *
......@@ -200,11 +200,11 @@ ImageSimulationMethod< TInputVectorData, TSpatialisation, TSimulationStep1, TSim
// ImageSimulationMethod< TInputVectorData, TSpatialisation, TSimulationStep1, TSimulationStep2, TFTM, TOutputImage>
// ::GenerateData()
// {
//
//
// // m_Spatialisation->SetInput(m_InputVectorData);
// // m_Spatialisation->SetInitialLabel(1);
// // m_Spatialisation->SetBackgroundValue(0);
//
//
// m_LabelMapToSimulatedImageFilter->SetInput(m_Spatialisation->GetOutput());
// m_LabelMapToSimulatedImageFilter->SetNumberOfComponentsPerPixel(m_NumberOfComponentsPerPixel);
// m_LabelMapToSimulatedImageFilter->SetSatRSRFilename(m_SatRSRFilename);
......@@ -212,35 +212,35 @@ ImageSimulationMethod< TInputVectorData, TSpatialisation, TSimulationStep1, TSim
// m_LabelMapToSimulatedImageFilter->SetPathRoot(m_PathRoot);
// m_LabelMapToSimulatedImageFilter->SetMean(m_Mean);
// m_LabelMapToSimulatedImageFilter->SetVariance(m_Variance);
//
//
// m_LabelMapToLabelImageFilter->SetInput(m_Spatialisation->GetOutput());
// m_LabelMapToLabelImageFilter->GraftNthOutput(0,this->GetOutputLabelImage());
// m_LabelMapToLabelImageFilter->GraftNthOutput(0, this->GetOutputLabelImage());
// m_LabelMapToLabelImageFilter->Update();
// this->GraftNthOutput(1,m_LabelMapToLabelImageFilter->GetOutput());
//
// // m_LabelMapToSimulatedImageFilter->GraftNthOutput(0,this->GetOutputReflectanceImage());
// this->GraftNthOutput(1, m_LabelMapToLabelImageFilter->GetOutput());
//
// // m_LabelMapToSimulatedImageFilter->GraftNthOutput(0, this->GetOutputReflectanceImage());
// // m_LabelMapToSimulatedImageFilter->Update();
// // this->GraftNthOutput(0,m_LabelMapToSimulatedImageFilter->GetOutput());
//
// // this->GraftNthOutput(0, m_LabelMapToSimulatedImageFilter->GetOutput());
//
// for(unsigned int i = 0; i<m_NumberOfComponentsPerPixel; i++)
// {
//
//
// MultiToMonoChannelFilterPointer multiToMonoChannelFilter = MultiToMonoChannelFilterType::New();
// InterpolatorPointer interpolator = InterpolatorType::New();
// FTMFilterPointer FTMFilter = FTMFilterType::New();
//
//
// multiToMonoChannelFilter->SetInput(m_LabelMapToSimulatedImageFilter->GetOutput());
// multiToMonoChannelFilter->SetChannel(i+1);
// multiToMonoChannelFilter->SetExtractionRegion(m_LabelMapToSimulatedImageFilter->GetOutput()->GetLargestPossibleRegion());
//
//
//
//
// //TODO comment changer interpolateur !
// interpolator->SetInputImage(multiToMonoChannelFilter->GetOutput());
// interpolator->SetRadius(m_Radius);
// interpolator->Initialize();
//
//
// multiToMonoChannelFilter->UpdateOutputInformation();
//
//
// FTMFilter->SetInterpolator(interpolator);
// // FTMFilter->SetOutputSize(multiToMonoChannelFilter->GetOutput()->GetLargestPossibleRegion().GetSize());
// FTMFilter->SetSize(multiToMonoChannelFilter->GetOutput()->GetLargestPossibleRegion().GetSize());
......@@ -248,19 +248,18 @@ ImageSimulationMethod< TInputVectorData, TSpatialisation, TSimulationStep1, TSim
// FTMFilter->SetOutputOrigin(multiToMonoChannelFilter->GetOutput()->GetOrigin());
// FTMFilter->SetInput(multiToMonoChannelFilter->GetOutput());
// FTMFilter->Update();
//
//
// m_ImageList->PushBack(FTMFilter->GetOutput());
// }
// m_ImageListToVectorImageFilter->SetInput(m_ImageList);
//
// m_ImageListToVectorImageFilter->GraftNthOutput(0,this->GetOutputReflectanceImage());
//
// m_ImageListToVectorImageFilter->GraftNthOutput(0, this->GetOutputReflectanceImage());
// m_ImageListToVectorImageFilter->Update();
// this->GraftNthOutput(0,m_ImageListToVectorImageFilter->GetOutput());
//
// this->GraftNthOutput(0, m_ImageListToVectorImageFilter->GetOutput());
//
// }
template <class TInputVectorData, class TSpatialisation, class TSimulationStep1, class TSimulationStep2, class TFTM, class TOutputImage>
void
ImageSimulationMethod< TInputVectorData, TSpatialisation, TSimulationStep1, TSimulationStep2, TFTM, TOutputImage>
......
......@@ -28,7 +28,6 @@
#include "otbSatelliteRSR.h"
namespace otb
{
......@@ -38,7 +37,7 @@ namespace otb
*
* LabelMapToSimulatedImageFilter convert a label map into a reflectance image.
* Reflectance of the image are computed by applying the RSR (relative spectral response) of the satellite to the spectrum obtained
* by the spectrum simulator (or read in the database). A gaussian noise is added to the reflectance value of
* by the spectrum simulator (or read in the database). A gaussian noise is added to the reflectance value of
* each pixel of the object. However the method used to add this noise (itk::Statistics::MersenneTwisterRandomVariateGenerator)
* is not thread safe, and then (even if all the remaining is multithread) the number of thread must be set to 1.
*
......@@ -81,11 +80,11 @@ public:
typedef LabelToProSailParameters<AttributesValueType> LabelToParametersType;
typedef typename LabelToParametersType::Pointer LabelToParametersPointer;
typedef SpectralResponse<double,double> SpectralResponseType;
typedef SpectralResponse<double, double> SpectralResponseType;
typedef typename SpectralResponseType::Pointer SpectralResponsePointer;
typedef SatelliteRSR<double,double> SatelliteRSRType;
typedef SatelliteRSR<double, double> SatelliteRSRType;
typedef typename SatelliteRSRType::Pointer SatelliteRSRPointer;
typedef ReduceSpectralResponse<SpectralResponseType,SatelliteRSRType> ReduceSpectralResponseType;
typedef ReduceSpectralResponse<SpectralResponseType, SatelliteRSRType> ReduceSpectralResponseType;
typedef typename ReduceSpectralResponseType::Pointer ReduceSpectralResponsePointer;
typedef itk::Statistics::MersenneTwisterRandomVariateGenerator RandomGeneratorType;
......
......@@ -75,14 +75,14 @@ LabelMapToSimulatedImageFilter<TInputLabelMap, TSimuStep1, TSimuStep2, TOutputIm
SpectralResponsePointer readSpectrum = SpectralResponseType::New();
bool hasPath=false;
//Check if the spectrum associated to this object is given by a database.
for(unsigned int i=0; i<labelObject->GetNumberOfAttributes();i++)
for(unsigned int i=0; i<labelObject->GetNumberOfAttributes(); i++)
{
if(labelObject->GetAvailableAttributes()[i].compare("path")==0) hasPath=true;
}
if(hasPath==true)
{
// std::cout<<"had path : "<< m_PathRoot + labelObject->GetAttribute("path") << std::endl;
readSpectrum->Load( m_PathRoot + labelObject->GetAttribute("path"),100 );
readSpectrum->Load( m_PathRoot + labelObject->GetAttribute("path"), 100 );
reduceSpectralResponse->SetInputSpectralResponse(readSpectrum);
}
else //compute the spectrum using ProSail
......@@ -126,9 +126,9 @@ LabelMapToSimulatedImageFilter<TInputLabelMap, TSimuStep1, TSimuStep2, TOutputIm
for( unsigned int i=0; i<length; i++)
{
//add gaussian white noise
for(unsigned int i=0;i<m_NumberOfComponentsPerPixel;i++)
for(unsigned int i=0; i<m_NumberOfComponentsPerPixel; i++)
{
double ran = randomGen->GetNormalVariate(m_Mean,m_Variance);
double ran = randomGen->GetNormalVariate(m_Mean, m_Variance);
pixel[i]=static_cast<InternalPixelType>(reduceSpectralResponse->GetReduceResponse()->GetResponse()[i].second + ran);
}
// pixel[i]=static_cast<InternalPixelType>(reduceSpectralResponse->GetReduceResponse()->GetResponse()[i].second);
......@@ -139,7 +139,6 @@ LabelMapToSimulatedImageFilter<TInputLabelMap, TSimuStep1, TSimuStep2, TOutputIm
}
template <class TInputLabelMap, class TSimuStep1, class TSimuStep2, class TOutputImage>
void
LabelMapToSimulatedImageFilter<TInputLabelMap, TSimuStep1, TSimuStep2, TOutputImage>
......
......@@ -20,7 +20,6 @@
#define __otbLabelToProSailParameters_h
#include "otbLabelToSimulationParametersBase.h"
namespace otb
......
......@@ -31,21 +31,20 @@ LeafParameters
::LeafParameters()
{
m_Cab=30.0;
m_Car=10.0;
m_CBrown=0.0;
m_Cw=0.015;
m_Car=10.0;
m_CBrown=0.0;
m_Cw=0.015;
m_Cm=0.009;
m_N=1.2;
m_N=1.2;
}
/**PrintSelf method */
void
LeafParameters
::PrintSelf(std::ostream& os, itk::Indent indent) const
{
Superclass::PrintSelf(os,indent);
Superclass::PrintSelf(os, indent);
os << "Chlorophyll content : " << m_Cab << std::endl;
os << "Carotenoid content : " << m_Car << std::endl;
os << "Brown pigment content : " << m_CBrown << std::endl;
......
......@@ -57,7 +57,7 @@ class ITK_EXPORT LeafParameters : public itk::DataObject
itkSetMacro(CBrown, double);
itkGetMacro(CBrown, double);
/** Set/Get equivalent leaf water thickness,EWT (cm)*/
/** Set/Get equivalent leaf water thickness, EWT (cm)*/
itkSetMacro(Cw, double);
itkGetMacro(Cw, double);
......
File mode changed from 100755 to 100644
......@@ -24,7 +24,7 @@
#include "otbMath.h"
//TODO check EPSILON matlab
#define EPSILON 0.0000000000000000000000001
#define EPSILON 0.0000000000000000000000001
namespace otb
{
......@@ -37,10 +37,10 @@ ProspectModel
this->ProcessObject::SetNumberOfRequiredOutputs(2);
SpectralResponseType::Pointer outputRefl = static_cast<SpectralResponseType *>(this->MakeOutput(0).GetPointer());
this->itk::ProcessObject::SetNthOutput(0,outputRefl.GetPointer());
this->itk::ProcessObject::SetNthOutput(0, outputRefl.GetPointer());
SpectralResponseType::Pointer outputTrans = static_cast<SpectralResponseType *>(this->MakeOutput(1).GetPointer());
this->itk::ProcessObject::SetNthOutput(1,outputTrans.GetPointer());
this->itk::ProcessObject::SetNthOutput(1, outputTrans.GetPointer());
}
/** Set Input */
......@@ -48,7 +48,7 @@ void
ProspectModel
::SetInput(const LeafParametersType * object)
{
this->itk::ProcessObject::SetNthInput(0,const_cast<LeafParametersType *>(object));
this->itk::ProcessObject::SetNthInput(0, const_cast<LeafParametersType *>(object));
}
/** Get Input */
......@@ -105,7 +105,7 @@ ProspectModel
::SetInput(const ParametersType & params)
{
// m_Parameters = params;
if(params.Size()!=6) itkExceptionMacro( << "Must have 6 parameters in that order : Cab,Car,CBrown,Cw,Cm,N" );
if(params.Size()!=6) itkExceptionMacro( << "Must have 6 parameters in that order : Cab, Car, CBrown, Cw, Cm, N" );
LeafParametersType::Pointer leafParams = LeafParametersType::New();
leafParams->SetCab(params[0]);
leafParams->SetCar(params[1]);
......@@ -114,7 +114,7 @@ ProspectModel
leafParams->SetCm(params[4]);
leafParams->SetN(params[5]);
this->itk::ProcessObject::SetNthInput(0,leafParams);
this->itk::ProcessObject::SetNthInput(0, leafParams);
}
......@@ -141,7 +141,7 @@ ProspectModel
Cm = leafParameters->GetCm();
int nbdata = sizeof(dataSpecP5B) / sizeof(dataSpec);
for (int i = 0 ; i < nbdata ; i++)
for (int i = 0; i < nbdata; i++)
{
lambda = dataSpecP5B[i].lambda;
n = dataSpecP5B[i].refLeafMatInd;
......@@ -151,10 +151,10 @@ ProspectModel
k = k / N;
if(k == itk::NumericTraits<double>::ZeroValue() ) k=EPSILON;
trans=(1.-k)*exp(-k)+k*k*boost::math::expint(1,k);
trans=(1.-k)*exp(-k)+k*k*boost::math::expint(1, k);
t12 = this->Tav(alpha,n);
temp = this->Tav(90,n);
t12 = this->Tav(alpha, n);
temp = this->Tav(90, n);
t21 = temp/(n*n);
......@@ -179,7 +179,7 @@ ProspectModel
else
vb=vcl_sqrt(beta*(va-r90)/(va*(beta-r90)));
vbNN = vcl_pow(vb,N-1.);
vbNN = vcl_pow(vb, N-1.);
vbNNinv = 1./vbNN;
vainv = 1./va;
s1=ta*t90*(vbNN-vbNNinv);
......@@ -209,7 +209,7 @@ ProspectModel
double theta_rad = theta*CONST_PI/180;
double r2, rp, rm, a, k, ds, k2, rm2, res, b1, b2, b;
double ts, tp1, tp2, tp3, tp4, tp5, tp;
double ts, tp1, tp2, tp3, tp4, tp5, tp;
r2=ref*ref;
rp=r2+1;
......@@ -229,12 +229,12 @@ ProspectModel
b2=ds*ds-rp/2;
b=b1-b2;
ts=(k2/(6*vcl_pow(b,3))+k/b-b/2)-(k2/(6*vcl_pow(a,3))+k/a-a/2);
ts=(k2/(6*vcl_pow(b, 3))+k/b-b/2)-(k2/(6*vcl_pow(a, 3))+k/a-a/2);
tp1=-2*r2*(b-a)/(rp*rp);
tp2=-2*r2*rp*log(b/a)/rm2;
tp3=r2*(1./b-1./a)/2;
tp4=16*r2*r2*(r2*r2+1)*log((2*rp*b-rm2)/(2*rp*a-rm2))/(vcl_pow(rp,3)*rm2);
tp5=16*vcl_pow(r2,3)*(1./(2*rp*b-rm2)-1./(2*rp*a-rm2))/vcl_pow(rp,3);
tp4=16*r2*r2*(r2*r2+1)*log((2*rp*b-rm2)/(2*rp*a-rm2))/(vcl_pow(rp, 3)*rm2);
tp5=16*vcl_pow(r2, 3)*(1./(2*rp*b-rm2)-1./(2*rp*a-rm2))/vcl_pow(rp, 3);
tp=tp1+tp2+tp3+tp4+tp5;
res=(ts+tp)/(2*ds*ds);
}
......@@ -247,7 +247,7 @@ void
ProspectModel
::PrintSelf(std::ostream& os, itk::Indent indent) const
{
Superclass::PrintSelf(os,indent);
Superclass::PrintSelf(os, indent);
}
} // end namespace otb
......
......@@ -52,7 +52,7 @@ class ITK_EXPORT ProspectModel : public SimulationStep1Base
/** Standard macros */
itkNewMacro(Self);
itkTypeMacro(ProspectModel,SpectrumGeneratorBase);
itkTypeMacro(ProspectModel, SpectrumGeneratorBase);
/** Set/Get Input */
virtual void SetInput(const ParametersType &);
......
......@@ -29,14 +29,14 @@
namespace otb
{
/** \class ReduceSpectralResponse
* \brief This class computes the reduced spectral response of each band of a sensor
* \brief This class computes the reduced spectral response of each band of a sensor
*
* It takes the spectral response of an object and the relative spectral
* response of a satellite (one response per band) to compute the satellite spectral bands.
*
* The two templates indicate:
* - the SpectralResponse input (from the JPL ASTER spectral library for example)
* - the relative s spectral response of a sensor
* - the relative s spectral response of a sensor
*
* The method CalculateResponse must be called.
*
......@@ -46,7 +46,7 @@ namespace otb
* \sa SatelliteRSR
*
*/
template <class TSpectralResponse ,class TRSR>
template <class TSpectralResponse , class TRSR>
class ReduceSpectralResponse : public itk::DataObject
{
......@@ -76,7 +76,7 @@ class ReduceSpectralResponse : public itk::DataObject
typedef typename std::vector<ValuePrecisionType> ReduceSpectralResponseVectorType;
/** Standard macros */
itkNewMacro(Self);
itkTypeMacro(ReduceSpectralResponse,DataObject);
itkTypeMacro(ReduceSpectralResponse, DataObject);
itkGetConstObjectMacro(InputSatRSR, InputRSRType);
itkSetObjectMacro(InputSatRSR, InputRSRType);
......@@ -95,7 +95,7 @@ class ReduceSpectralResponse : public itk::DataObject
void PrintSelf(std::ostream& os, itk::Indent indent) const;