Skip to content
Snippets Groups Projects
Commit 42ac5893 authored by Cyrille Valladeau's avatar Cyrille Valladeau
Browse files

ENH : add accessors to bool + correct condotion in SIXTraits (size-1)

parent d4385b78
Branches
Tags
No related merge requests found
......@@ -21,6 +21,22 @@ PURPOSE. See the above copyright notices for more information.
namespace otb
{
/*********************************** AtmosphericRadiativeTermsSingleChannel***********************************************/
/** Constructor */
AtmosphericRadiativeTermsSingleChannel
::AtmosphericRadiativeTermsSingleChannel()
{
m_IntrinsicAtmosphericReflectance = 0.04;
m_SphericalAlbedo = 0.09;
m_TotalGaseousTransmission = 0.95;
m_DownwardTransmittance = 0.91;
m_UpwardTransmittance = 0.94;
m_UpwardDiffuseTransmittance = 0.09;
m_UpwardDirectTransmittance = 0.85;
m_UpwardDiffuseTransmittanceForRayleigh = 0.05;
m_UpwardDiffuseTransmittanceForAerosol = 0.04;
}
/**PrintSelf method */
void
AtmosphericRadiativeTermsSingleChannel
......@@ -39,8 +55,6 @@ AtmosphericRadiativeTermsSingleChannel
}
/*********************************** AtmosphericRadiativeTerms **********************************************************/
/**CONSTRUCTOR. */
AtmosphericRadiativeTerms
......
......@@ -107,7 +107,7 @@ public:
protected:
/** Constructor */
AtmosphericRadiativeTermsSingleChannel() {};
AtmosphericRadiativeTermsSingleChannel();
/** Destructor */
~AtmosphericRadiativeTermsSingleChannel() {};
/**PrintSelf method */
......
......@@ -205,6 +205,11 @@ public:
itkSetMacro(UseGenerateParameters, bool);
itkGetMacro(UseGenerateParameters, bool);
/** Set/Get IsSetAtmosphericRadiativeTerms */
itkSetMacro(IsSetAtmosphericRadiativeTerms, bool);
itkGetMacro(IsSetAtmosphericRadiativeTerms, bool);
protected:
/** Constructor */
ReflectanceToSurfaceReflectanceImageFilter();
......
......@@ -171,9 +171,9 @@ SIXSTraits::ComputeWavelenghtSpectralBandValuesFor6S(
{
itkGenericExceptionMacro(<<"The FilterFunctionValues vector must have more than 1 values !");
}
if( vcl_abs((static_cast<double>(FilterFunctionValues.size())*L_userStep)-(L_max-L_min) ) > .000001 )
if( vcl_abs((static_cast<double>(FilterFunctionValues.size()-1)*L_userStep)-(L_max-L_min) ) > .000001 )
{
itkGenericExceptionMacro(<<"The FilterFunctionValues vector size ("<<FilterFunctionValues.size()<<") x userstep ("<<L_userStep<<") must be less than the Max spectral value ("<< L_max<<") !");
itkGenericExceptionMacro(<<"The FilterFunctionValues vector size ( ("<<FilterFunctionValues.size()<<"-1) x userstep ("<<L_userStep<<") must be less than the Max spectral value ("<< L_max-L_min<<") !");
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment