Commit 98b73271 authored by remi cresson's avatar remi cresson
Browse files

REFAC: Rename files + replace 'Luminance' with 'Radiance' in all files except RELEASE_NOTES.txt

parent ac618685
......@@ -68,8 +68,8 @@
// Software Guide : EndLatex
// Software Guide : BeginCodeSnippet
#include "otbImageToLuminanceImageFilter.h"
#include "otbLuminanceToReflectanceImageFilter.h"
#include "otbImageToRadianceImageFilter.h"
#include "otbRadianceToReflectanceImageFilter.h"
#include "otbReflectanceToSurfaceReflectanceImageFilter.h"
#include "otbSurfaceAdjacencyEffectCorrectionSchemeFilter.h"
// Software Guide : EndCodeSnippet
......@@ -178,7 +178,7 @@ int main(int argc, char *argv[])
//-------------------------------
// Software Guide : BeginLatex
//
// The \doxygen{otb}{ImageToLuminanceImageFilter}
// The \doxygen{otb}{ImageToRadianceImageFilter}
// type is defined and instancied. This class uses a functor applied
// to each component of each pixel ($\mathbf{X^{k}}$) whose formula is:
//
......@@ -198,13 +198,13 @@ int main(int argc, char *argv[])
// Software Guide : EndLatex
// Software Guide : BeginCodeSnippet
typedef otb::ImageToLuminanceImageFilter<ImageType, ImageType>
ImageToLuminanceImageFilterType;
typedef otb::ImageToRadianceImageFilter<ImageType, ImageType>
ImageToRadianceImageFilterType;
ImageToLuminanceImageFilterType::Pointer filterImageToLuminance
= ImageToLuminanceImageFilterType::New();
ImageToRadianceImageFilterType::Pointer filterImageToRadiance
= ImageToRadianceImageFilterType::New();
// Software Guide : EndCodeSnippet
typedef ImageToLuminanceImageFilterType::VectorType VectorType;
typedef ImageToRadianceImageFilterType::VectorType VectorType;
VectorType alpha(nbOfComponent);
VectorType beta(nbOfComponent);
alpha.Fill(0);
......@@ -227,14 +227,14 @@ int main(int argc, char *argv[])
// Software Guide : EndLatex
// Software Guide : BeginCodeSnippet
filterImageToLuminance->SetAlpha(alpha);
filterImageToLuminance->SetBeta(beta);
filterImageToRadiance->SetAlpha(alpha);
filterImageToRadiance->SetBeta(beta);
// Software Guide : EndCodeSnippet
//-------------------------------
// Software Guide : BeginLatex
//
// The \doxygen{otb}{LuminanceToReflectanceImageFilter}
// The \doxygen{otb}{RadianceToReflectanceImageFilter}
// type is defined and instancied.
// This class used a functor applied to each component of each pixel
// of the luminance filter output ($\mathbf{L_{TOA}^{k}}$):
......@@ -259,13 +259,13 @@ int main(int argc, char *argv[])
// Software Guide : EndLatex
// Software Guide : BeginCodeSnippet
typedef otb::LuminanceToReflectanceImageFilter<ImageType, ImageType>
LuminanceToReflectanceImageFilterType;
LuminanceToReflectanceImageFilterType::Pointer filterLuminanceToReflectance
= LuminanceToReflectanceImageFilterType::New();
typedef otb::RadianceToReflectanceImageFilter<ImageType, ImageType>
RadianceToReflectanceImageFilterType;
RadianceToReflectanceImageFilterType::Pointer filterRadianceToReflectance
= RadianceToReflectanceImageFilterType::New();
// Software Guide : EndCodeSnippet
typedef LuminanceToReflectanceImageFilterType::VectorType VectorType;
typedef RadianceToReflectanceImageFilterType::VectorType VectorType;
VectorType solarIllumination(nbOfComponent);
solarIllumination.Fill(0);
......@@ -287,11 +287,11 @@ int main(int argc, char *argv[])
// Software Guide : EndLatex
// Software Guide : BeginCodeSnippet
filterLuminanceToReflectance->SetZenithalSolarAngle(
filterRadianceToReflectance->SetZenithalSolarAngle(
static_cast<double>(atof(argv[6])));
filterLuminanceToReflectance->SetDay(atoi(argv[7]));
filterLuminanceToReflectance->SetMonth(atoi(argv[8]));
filterLuminanceToReflectance->SetSolarIllumination(solarIllumination);
filterRadianceToReflectance->SetDay(atoi(argv[7]));
filterRadianceToReflectance->SetMonth(atoi(argv[8]));
filterRadianceToReflectance->SetSolarIllumination(solarIllumination);
// Software Guide : EndCodeSnippet
//-------------------------------
......@@ -635,10 +635,10 @@ int main(int argc, char *argv[])
// Software Guide : BeginCodeSnippet
writer->SetFileName(argv[2]);
filterImageToLuminance->SetInput(reader->GetOutput());
filterLuminanceToReflectance->SetInput(filterImageToLuminance->GetOutput());
filterImageToRadiance->SetInput(reader->GetOutput());
filterRadianceToReflectance->SetInput(filterImageToRadiance->GetOutput());
filterReflectanceToSurfaceReflectanceImageFilter->SetInput(
filterLuminanceToReflectance->GetOutput());
filterRadianceToReflectance->GetOutput());
filterSurfaceAdjacencyEffectCorrectionSchemeFilter->SetInput(
filterReflectanceToSurfaceReflectanceImageFilter->GetOutput());
......
......@@ -84,8 +84,8 @@ otb_add_test(NAME raTeAtmosphericCorrectionSequencementTest COMMAND ${OTB_TEST_D
${INPUTDATA}/atmosphericCorrectionSequencement_solar_illumination.txt
${INPUTDATA}/atmosphericCorrectionSequencement_wavelength_spectral_bands_spot4_1.txt
# ImageToLuminance parameters
# LuminanceToReflectance parameters
# ImageToRadiance parameters
# RadianceToReflectance parameters
27.3 #solar azimuthal elevation
4 #day
12 #month
......
......@@ -23,10 +23,10 @@
#include "otbWrapperApplication.h"
#include "otbWrapperApplicationFactory.h"
#include "otbImageToLuminanceImageFilter.h"
#include "otbLuminanceToReflectanceImageFilter.h"
#include "otbLuminanceToImageImageFilter.h"
#include "otbReflectanceToLuminanceImageFilter.h"
#include "otbImageToRadianceImageFilter.h"
#include "otbRadianceToReflectanceImageFilter.h"
#include "otbRadianceToImageImageFilter.h"
#include "otbReflectanceToRadianceImageFilter.h"
#include "otbReflectanceToSurfaceReflectanceImageFilter.h"
#include "itkMultiplyImageFilter.h"
#include "otbClampVectorImageFilter.h"
......@@ -78,17 +78,17 @@ public:
itkTypeMacro(OpticalCalibration, Application);
typedef ImageToLuminanceImageFilter<FloatVectorImageType,
DoubleVectorImageType> ImageToLuminanceImageFilterType;
typedef ImageToRadianceImageFilter<FloatVectorImageType,
DoubleVectorImageType> ImageToRadianceImageFilterType;
typedef LuminanceToReflectanceImageFilter<DoubleVectorImageType,
DoubleVectorImageType> LuminanceToReflectanceImageFilterType;
typedef RadianceToReflectanceImageFilter<DoubleVectorImageType,
DoubleVectorImageType> RadianceToReflectanceImageFilterType;
typedef LuminanceToImageImageFilter<DoubleVectorImageType,
DoubleVectorImageType> LuminanceToImageImageFilterType;
typedef RadianceToImageImageFilter<DoubleVectorImageType,
DoubleVectorImageType> RadianceToImageImageFilterType;
typedef ReflectanceToLuminanceImageFilter<FloatVectorImageType,
DoubleVectorImageType> ReflectanceToLuminanceImageFilterType;
typedef ReflectanceToRadianceImageFilter<FloatVectorImageType,
DoubleVectorImageType> ReflectanceToRadianceImageFilterType;
typedef itk::MultiplyImageFilter<DoubleVectorImageType,DoubleImageType,DoubleVectorImageType> ScaleFilterOutDoubleType;
......@@ -381,7 +381,7 @@ private:
{
ossOutput << std::endl << "File: " << m_inImageName << std::endl;
//Check if valid metadata information are available to compute ImageToLuminance and LuminanceToReflectance
//Check if valid metadata information are available to compute ImageToRadiance and RadianceToReflectance
FloatVectorImageType::Pointer inImage = GetParameterFloatVectorImage("in");
itk::MetaDataDictionary dict = inImage->GetMetaDataDictionary();
OpticalImageMetadataInterface::Pointer lImageMetadataInterface = OpticalImageMetadataInterfaceFactory::CreateIMI(dict);
......@@ -566,11 +566,11 @@ private:
void DoExecute() ITK_OVERRIDE
{
//Main filters instantiations
m_ImageToLuminanceFilter = ImageToLuminanceImageFilterType::New();
m_LuminanceToReflectanceFilter = LuminanceToReflectanceImageFilterType::New();
m_ImageToRadianceFilter = ImageToRadianceImageFilterType::New();
m_RadianceToReflectanceFilter = RadianceToReflectanceImageFilterType::New();
m_ReflectanceToSurfaceReflectanceFilter = ReflectanceToSurfaceReflectanceImageFilterType::New();
m_ReflectanceToLuminanceFilter = ReflectanceToLuminanceImageFilterType::New();
m_LuminanceToImageFilter = LuminanceToImageImageFilterType::New();
m_ReflectanceToRadianceFilter = ReflectanceToRadianceImageFilterType::New();
m_RadianceToImageFilter = RadianceToImageImageFilterType::New();
//Other instantiations
m_ScaleFilter = ScaleFilterOutDoubleType::New();
......@@ -590,22 +590,22 @@ private:
// Set (Date and Day) OR FluxNormalizationCoef to corresponding filters
if ( !IsParameterEnabled("acqui.fluxnormcoeff") )
{
m_LuminanceToReflectanceFilter->SetDay(GetParameterInt("acqui.day"));
m_LuminanceToReflectanceFilter->SetMonth(GetParameterInt("acqui.month"));
m_RadianceToReflectanceFilter->SetDay(GetParameterInt("acqui.day"));
m_RadianceToReflectanceFilter->SetMonth(GetParameterInt("acqui.month"));
m_ReflectanceToLuminanceFilter->SetDay(GetParameterInt("acqui.day"));
m_ReflectanceToLuminanceFilter->SetMonth(GetParameterInt("acqui.month"));
m_ReflectanceToRadianceFilter->SetDay(GetParameterInt("acqui.day"));
m_ReflectanceToRadianceFilter->SetMonth(GetParameterInt("acqui.month"));
}
else
{
m_LuminanceToReflectanceFilter->SetFluxNormalizationCoefficient(GetParameterFloat("acqui.fluxnormcoeff"));
m_RadianceToReflectanceFilter->SetFluxNormalizationCoefficient(GetParameterFloat("acqui.fluxnormcoeff"));
m_ReflectanceToLuminanceFilter->SetFluxNormalizationCoefficient(GetParameterFloat("acqui.fluxnormcoeff"));
m_ReflectanceToRadianceFilter->SetFluxNormalizationCoefficient(GetParameterFloat("acqui.fluxnormcoeff"));
}
// Set Sun Elevation Angle to corresponding filters
m_LuminanceToReflectanceFilter->SetElevationSolarAngle(GetParameterFloat("acqui.sun.elev"));
m_ReflectanceToLuminanceFilter->SetElevationSolarAngle(GetParameterFloat("acqui.sun.elev"));
m_RadianceToReflectanceFilter->SetElevationSolarAngle(GetParameterFloat("acqui.sun.elev"));
m_ReflectanceToRadianceFilter->SetElevationSolarAngle(GetParameterFloat("acqui.sun.elev"));
// Set Gain and Bias to corresponding filters
if (IsParameterEnabled("acqui.gainbias") && HasValue("acqui.gainbias"))
......@@ -644,14 +644,14 @@ private:
switch (numLine)
{
case 1 :
m_ImageToLuminanceFilter->SetAlpha(vlvector);
m_LuminanceToImageFilter->SetAlpha(vlvector);
m_ImageToRadianceFilter->SetAlpha(vlvector);
m_RadianceToImageFilter->SetAlpha(vlvector);
GetLogger()->Info("Trying to get gains/biases information... OK (1/2)\n");
break;
case 2 :
m_ImageToLuminanceFilter->SetBeta(vlvector);
m_LuminanceToImageFilter->SetBeta(vlvector);
m_ImageToRadianceFilter->SetBeta(vlvector);
m_RadianceToImageFilter->SetBeta(vlvector);
GetLogger()->Info("Trying to get gains/biases information... OK (2/2)\n");
break;
......@@ -669,11 +669,11 @@ private:
//Try to retrieve information from image metadata
if (IMIName != IMIOptDfltName)
{
m_ImageToLuminanceFilter->SetAlpha(lImageMetadataInterface->GetPhysicalGain());
m_LuminanceToImageFilter->SetAlpha(lImageMetadataInterface->GetPhysicalGain());
m_ImageToRadianceFilter->SetAlpha(lImageMetadataInterface->GetPhysicalGain());
m_RadianceToImageFilter->SetAlpha(lImageMetadataInterface->GetPhysicalGain());
m_ImageToLuminanceFilter->SetBeta(lImageMetadataInterface->GetPhysicalBias());
m_LuminanceToImageFilter->SetBeta(lImageMetadataInterface->GetPhysicalBias());
m_ImageToRadianceFilter->SetBeta(lImageMetadataInterface->GetPhysicalBias());
m_RadianceToImageFilter->SetBeta(lImageMetadataInterface->GetPhysicalBias());
}
else
itkExceptionMacro(<< "Please, provide a type of sensor supported by OTB for automatic metadata extraction! ");
......@@ -711,8 +711,8 @@ private:
itk::VariableLengthVector<double> vlvector;
vlvector.SetData(values.data(),values.size(),false);
m_LuminanceToReflectanceFilter->SetSolarIllumination(vlvector);
m_ReflectanceToLuminanceFilter->SetSolarIllumination(vlvector);
m_RadianceToReflectanceFilter->SetSolarIllumination(vlvector);
m_ReflectanceToRadianceFilter->SetSolarIllumination(vlvector);
}
}
file.close();
......@@ -725,8 +725,8 @@ private:
//Try to retrieve information from image metadata
if (IMIName != IMIOptDfltName)
{
m_LuminanceToReflectanceFilter->SetSolarIllumination(lImageMetadataInterface->GetSolarIrradiance());
m_ReflectanceToLuminanceFilter->SetSolarIllumination(lImageMetadataInterface->GetSolarIrradiance());
m_RadianceToReflectanceFilter->SetSolarIllumination(lImageMetadataInterface->GetSolarIrradiance());
m_ReflectanceToRadianceFilter->SetSolarIllumination(lImageMetadataInterface->GetSolarIrradiance());
}
else
itkExceptionMacro(<< "Please, provide a type of sensor supported by OTB for automatic metadata extraction! ");
......@@ -748,17 +748,17 @@ private:
GetLogger()->Info("Compute Top of Atmosphere reflectance\n");
//Pipeline
m_ImageToLuminanceFilter->SetInput(inImage);
m_LuminanceToReflectanceFilter->SetInput(m_ImageToLuminanceFilter->GetOutput());
m_ImageToRadianceFilter->SetInput(inImage);
m_RadianceToReflectanceFilter->SetInput(m_ImageToRadianceFilter->GetOutput());
if (IsParameterEnabled("clamp"))
{
GetLogger()->Info("Clamp values between [0, 100]\n");
}
m_LuminanceToReflectanceFilter->SetUseClamp(IsParameterEnabled("clamp"));
m_LuminanceToReflectanceFilter->UpdateOutputInformation();
m_ScaleFilter->SetInput(m_LuminanceToReflectanceFilter->GetOutput());
m_RadianceToReflectanceFilter->SetUseClamp(IsParameterEnabled("clamp"));
m_RadianceToReflectanceFilter->UpdateOutputInformation();
m_ScaleFilter->SetInput(m_RadianceToReflectanceFilter->GetOutput());
}
break;
case Level_TOA_IM:
......@@ -766,10 +766,10 @@ private:
GetLogger()->Info("Convert Top of Atmosphere reflectance to image DN\n");
//Pipeline
m_ReflectanceToLuminanceFilter->SetInput(inImage);
m_LuminanceToImageFilter->SetInput(m_ReflectanceToLuminanceFilter->GetOutput());
m_LuminanceToImageFilter->UpdateOutputInformation();
m_ScaleFilter->SetInput(m_LuminanceToImageFilter->GetOutput());
m_ReflectanceToRadianceFilter->SetInput(inImage);
m_RadianceToImageFilter->SetInput(m_ReflectanceToRadianceFilter->GetOutput());
m_RadianceToImageFilter->UpdateOutputInformation();
m_ScaleFilter->SetInput(m_RadianceToImageFilter->GetOutput());
}
break;
case Level_TOC:
......@@ -777,9 +777,9 @@ private:
GetLogger()->Info("Compute Top of Canopy reflectance\n");
//Pipeline
m_ImageToLuminanceFilter->SetInput(inImage);
m_LuminanceToReflectanceFilter->SetInput(m_ImageToLuminanceFilter->GetOutput());
m_ReflectanceToSurfaceReflectanceFilter->SetInput(m_LuminanceToReflectanceFilter->GetOutput());
m_ImageToRadianceFilter->SetInput(inImage);
m_RadianceToReflectanceFilter->SetInput(m_ImageToRadianceFilter->GetOutput());
m_ReflectanceToSurfaceReflectanceFilter->SetInput(m_RadianceToReflectanceFilter->GetOutput());
m_ReflectanceToSurfaceReflectanceFilter->SetAcquiCorrectionParameters(m_paramAcqui);
m_ReflectanceToSurfaceReflectanceFilter->SetAtmoCorrectionParameters(m_paramAtmo);
......@@ -934,10 +934,10 @@ private:
}
//Keep object references as a members of the class, else the pipeline will be broken after exiting DoExecute().
ImageToLuminanceImageFilterType ::Pointer m_ImageToLuminanceFilter;
LuminanceToReflectanceImageFilterType::Pointer m_LuminanceToReflectanceFilter;
ReflectanceToLuminanceImageFilterType::Pointer m_ReflectanceToLuminanceFilter;
LuminanceToImageImageFilterType::Pointer m_LuminanceToImageFilter;
ImageToRadianceImageFilterType ::Pointer m_ImageToRadianceFilter;
RadianceToReflectanceImageFilterType::Pointer m_RadianceToReflectanceFilter;
ReflectanceToRadianceImageFilterType::Pointer m_ReflectanceToRadianceFilter;
RadianceToImageImageFilterType::Pointer m_RadianceToImageFilter;
ReflectanceToSurfaceReflectanceImageFilterType::Pointer m_ReflectanceToSurfaceReflectanceFilter;
ScaleFilterOutDoubleType::Pointer m_ScaleFilter;
AtmoCorrectionParametersPointerType m_paramAtmo;
......
......@@ -27,7 +27,7 @@ otb_test_application(NAME apTvRaOpticalCalibration_QuickbirdXS
-clamp false
-out ${TEMP}/apTvRaOpticalCalibration_QuickbirdXS.tif
VALID --compare-image ${EPSILON_7}
${BASELINE}/raTvLuminanceToReflectanceImageFilterAutoQuickbirdXS.tif
${BASELINE}/raTvRadianceToReflectanceImageFilterAutoQuickbirdXS.tif
${TEMP}/apTvRaOpticalCalibration_QuickbirdXS.tif )
otb_test_application(NAME apTvRaOpticalCalibration_WV2PAN
......@@ -36,7 +36,7 @@ otb_test_application(NAME apTvRaOpticalCalibration_WV2PAN
-level toa
-out ${TEMP}/apTvRaOpticalCalibration_WV2PAN.tif
VALID --compare-image ${EPSILON_7}
${BASELINE}/raTvLuminanceToReflectanceImageFilterAutoWV2PAN.tif
${BASELINE}/raTvRadianceToReflectanceImageFilterAutoWV2PAN.tif
${TEMP}/apTvRaOpticalCalibration_WV2PAN.tif )
otb_test_application(NAME apTvRaOpticalCalibration_WV2Multi
......@@ -45,7 +45,7 @@ otb_test_application(NAME apTvRaOpticalCalibration_WV2Multi
-level toa
-out ${TEMP}/apTvRaOpticalCalibration_WV2Multi.tif
VALID --compare-image ${EPSILON_7}
${BASELINE}/raTvLuminanceToReflectanceImageFilterAutoWV2Multi.tif
${BASELINE}/raTvRadianceToReflectanceImageFilterAutoWV2Multi.tif
${TEMP}/apTvRaOpticalCalibration_WV2Multi.tif )
otb_test_application(NAME apTvRaOpticalCalibration_Formosat
......@@ -54,7 +54,7 @@ otb_test_application(NAME apTvRaOpticalCalibration_Formosat
-level toa
-out ${TEMP}/apTvRaOpticalCalibration_Formosat.img
VALID --compare-image ${EPSILON_7}
${BASELINE}/raTvLuminanceToReflectanceImageFilterAutoFormosat.tif
${BASELINE}/raTvRadianceToReflectanceImageFilterAutoFormosat.tif
${TEMP}/apTvRaOpticalCalibration_Formosat.img )
otb_test_application(NAME apTvRaOpticalCalibration_QuickbirdPAN
......@@ -63,7 +63,7 @@ otb_test_application(NAME apTvRaOpticalCalibration_QuickbirdPAN
-level toa
-out ${TEMP}/apTvRaOpticalCalibration_QuickbirdPAN.tif
VALID --compare-image ${EPSILON_7}
${BASELINE}/raTvLuminanceToReflectanceImageFilterAutoQuickbirdPAN.tif
${BASELINE}/raTvRadianceToReflectanceImageFilterAutoQuickbirdPAN.tif
${TEMP}/apTvRaOpticalCalibration_QuickbirdPAN.tif )
otb_test_application(NAME apTvRaOpticalCalibration_Spot5
......@@ -72,7 +72,7 @@ otb_test_application(NAME apTvRaOpticalCalibration_Spot5
-level toa
-out ${TEMP}/apTvRaOpticalCalibration_Spot5.img
VALID --compare-image ${EPSILON_7}
${BASELINE}/raTvLuminanceToReflectanceImageFilterAutoSpot5.tif
${BASELINE}/raTvRadianceToReflectanceImageFilterAutoSpot5.tif
${TEMP}/apTvRaOpticalCalibration_Spot5.img )
otb_test_application(NAME apTvRaOpticalCalibration_UnknownSensor
......@@ -106,7 +106,7 @@ otb_test_application(NAME apTvRaOpticalCalibration_UnknownSensor
otb_test_application(NAME apTvRaOpticalCalibration_Reverse_UnknownSensor
APP OpticalCalibration
OPTIONS
-in ${BASELINE}/raTvLuminanceToReflectanceImageFilterAutoQuickbirdXS.tif
-in ${BASELINE}/raTvRadianceToReflectanceImageFilterAutoQuickbirdXS.tif
-out ${TEMP}/apTvRaOpticalCalibration_Rev_QB-XS_UnknownSensor_test.tif
-level toatoim
-acqui.gainbias ${INPUTDATA}/apTvRaOpticalCalibrationUnknownSensorGainsBiases.txt
......@@ -126,6 +126,6 @@ otb_test_application(NAME apTvRaOpticalCalibration_Ikonos
-level toa
-out ${TEMP}/apTvRaOpticalCalibration_Ikonos.tif
VALID --compare-image ${EPSILON_7}
${BASELINE}/raTvLuminanceToReflectanceImageFilterAutoIkonos.tif
${BASELINE}/raTvRadianceToReflectanceImageFilterAutoIkonos.tif
${TEMP}/apTvRaOpticalCalibration_Ikonos.tif )
......@@ -19,8 +19,8 @@
* limitations under the License.
*/
#ifndef otbImageToLuminanceImageFilter_h
#define otbImageToLuminanceImageFilter_h
#ifndef otbImageToRadianceImageFilter_h
#define otbImageToRadianceImageFilter_h
#include "otbUnaryImageFunctorWithVectorImageFilter.h"
#include "itkNumericTraits.h"
......@@ -34,10 +34,10 @@ namespace otb
namespace Functor
{
/**
* \class ImageToLuminanceImageFunctor
* \class ImageToRadianceImageFunctor
* \brief Add beta to the quotient Input over alpha.
*
* \sa ImageToLuminanceImageFilter
* \sa ImageToRadianceImageFilter
* \ingroup Functor
* \ingroup Radiometry
*
......@@ -45,15 +45,15 @@ namespace Functor
*/
template <class TInput, class TOutput>
class ImageToLuminanceImageFunctor
class ImageToRadianceImageFunctor
{
public:
ImageToLuminanceImageFunctor() :
ImageToRadianceImageFunctor() :
m_Alpha(1.),
m_Beta(0.)
{}
virtual ~ImageToLuminanceImageFunctor() {}
virtual ~ImageToRadianceImageFunctor() {}
void SetAlpha(double alpha)
{
......@@ -87,17 +87,17 @@ private:
};
}
/** \class ImageToLuminanceImageFilter
/** \class ImageToRadianceImageFilter
* \brief Convert a raw value into a luminance value
*
* Transform a classical image into the luminance image. For this it
* uses the functor ImageToLuminanceImageFunctor calling for each component of each pixel.
* uses the functor ImageToRadianceImageFunctor calling for each component of each pixel.
*
*
* For Spot image in the dimap format, the correction parameters are
* retrieved automatically from the metadata
*
* \ingroup ImageToLuminanceImageFunctor
* \ingroup ImageToRadianceImageFunctor
* \ingroup Radiometry
*
* \example Radiometry/AtmosphericCorrectionSequencement.cxx
......@@ -105,10 +105,10 @@ private:
* \ingroup OTBOpticalCalibration
*/
template <class TInputImage, class TOutputImage>
class ITK_EXPORT ImageToLuminanceImageFilter :
class ITK_EXPORT ImageToRadianceImageFilter :
public UnaryImageFunctorWithVectorImageFilter<TInputImage,
TOutputImage,
typename Functor::ImageToLuminanceImageFunctor<typename
typename Functor::ImageToRadianceImageFunctor<typename
TInputImage::
InternalPixelType,
typename
......@@ -123,11 +123,11 @@ public:
/** "typedef" to simplify the variables definition and the declaration. */
typedef TInputImage InputImageType;
typedef TOutputImage OutputImageType;
typedef typename Functor::ImageToLuminanceImageFunctor<typename InputImageType::InternalPixelType,
typedef typename Functor::ImageToRadianceImageFunctor<typename InputImageType::InternalPixelType,
typename OutputImageType::InternalPixelType> FunctorType;
/** "typedef" for standard classes. */
typedef ImageToLuminanceImageFilter Self;
typedef ImageToRadianceImageFilter Self;
typedef UnaryImageFunctorWithVectorImageFilter<InputImageType, OutputImageType, FunctorType> Superclass;
typedef itk::SmartPointer<Self> Pointer;
typedef itk::SmartPointer<const Self> ConstPointer;
......@@ -136,7 +136,7 @@ public:
itkNewMacro(Self);
/** return class name. */
itkTypeMacro(ImageToLuminanceImageFilter, UnaryImageFunctorWithVectorImageFiltermageFilter);
itkTypeMacro(ImageToRadianceImageFilter, UnaryImageFunctorWithVectorImageFiltermageFilter);
/** Supported images definition. */
typedef typename InputImageType::PixelType InputPixelType;
......@@ -164,14 +164,14 @@ public:
protected:
/** Constructor */
ImageToLuminanceImageFilter()
ImageToRadianceImageFilter()
{
m_Alpha.SetSize(0);
m_Beta.SetSize(0);
};
/** Destructor */
~ImageToLuminanceImageFilter() ITK_OVERRIDE {}
~ImageToRadianceImageFilter() ITK_OVERRIDE {}
/** Update the functor list and input parameters */
void BeforeThreadedGenerateData(void) ITK_OVERRIDE
......
......@@ -22,22 +22,22 @@
#ifndef otbImageToReflectanceImageFilter_h
#define otbImageToReflectanceImageFilter_h
#include "otbImageToLuminanceImageFilter.h"
#include "otbLuminanceToReflectanceImageFilter.h"
#include "otbImageToRadianceImageFilter.h"
#include "otbRadianceToReflectanceImageFilter.h"
namespace otb
{
namespace Functor
{
/** \class ImageToReflectanceImageFunctor
* \brief Call the ImageToLuminanceFunctor over the input and the LuminanceToReflectanceFunctor to this result.
* \brief Call the ImageToRadianceFunctor over the input and the RadianceToReflectanceFunctor to this result.
*
*
* \sa ImageToReflectanceImageFilter
*
* \ingroup Functor
* \ingroup ImageToLuminanceFunctor
* \ingroup LuminanceToReflectanceFunctor
* \ingroup ImageToRadianceFunctor
* \ingroup RadianceToReflectanceFunctor
* \ingroup Radiometry
*
* \ingroup OTBOpticalCalibration
......@@ -49,8 +49,8 @@ public:
ImageToReflectanceImageFunctor() {}
virtual ~ImageToReflectanceImageFunctor() {}
typedef Functor::ImageToLuminanceImageFunctor<TInput, TOutput> ImToLumFunctorType;
typedef Functor::LuminanceToReflectanceImageFunctor<TInput, TOutput> LumToReflecFunctorType;
typedef Functor::ImageToRadianceImageFunctor<TInput, TOutput> ImToLumFunctorType;
typedef Functor::RadianceToReflectanceImageFunctor<TInput, TOutput> LumToReflecFunctorType;
void SetAlpha(double alpha)
{
......@@ -124,8 +124,8 @@ private:
* retrieved automatically from the metadata
*
* \ingroup ImageToReflectanceImageFunctor
* \ingroup ImageToLuminanceImageFilter
* \ingroup ReflectanceToLuminanceImageFilter
* \ingroup ImageToRadianceImageFilter
* \ingroup ReflectanceToRadianceImageFilter
* \ingroup Radiometry
*
* \ingroup OTBOpticalCalibration
......
......@@ -19,8 +19,8 @@
* limitations under the License.
*/
#ifndef otbLuminanceToImageImageFilter_h
#define otbLuminanceToImageImageFilter_h
#ifndef otbRadianceToImageImageFilter_h
#define otbRadianceToImageImageFilter_h
#include "otb_6S.h"
#include "otbUnaryImageFunctorWithVectorImageFilter.h"
......@@ -35,10 +35,10 @@ namespace otb
namespace Functor
{
/**
* \class LuminanceToImageImageFunctor
* \class RadianceToImageImageFunctor
* \brief Subtract beta to the Input and multiply by alpha.
*
* \sa LuminanceToImageImageFilter
* \sa RadianceToImageImageFilter
* \ingroup Functor
* \ingroup Radiometry
*
......@@ -46,15 +46,15 @@ namespace Functor
*/
template <class TInput, class TOutput>
class LuminanceToImageImageFunctor