Skip to content
Snippets Groups Projects
Commit 91aea1b7 authored by Manuel Grizonnet's avatar Manuel Grizonnet
Browse files

STYLE: start white list for codespell

parent 6fdc06fc
Branches
Tags
No related merge requests found
/*=========================================================================
Program: ORFEO Toolbox
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
See OTBCopyright.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef otbAsymmetricFusionOfLineDetectorImageFilter_h
#define otbAsymmetricFusionOfLineDetectorImageFilter_h
#include "itkImageToImageFilter.h"
#include "otbLineRatioDetectorImageFilter.h"
#include "otbLineCorrelationDetectorImageFilter.h"
#include "otbAssociativeSymmetricalSumImageFilter.h"
namespace otb
{
/** \class AsymmetricFusionOfLineDetectorImageFilter
*
* This class implements a composite filter that combines three filters:
* two filters of line detector ( a line detector by ratio and a line
* detector by croos-correlation) and a filter that produces a fusion of
* those two line detector filters.
*
*
* \ingroup OTBEdge
*/
template <class TInputImage,
class TOutputImage,
class TOutputImageDirection = TOutputImage,
class TInterpolator = itk::LinearInterpolateImageFunction<TInputImage> >
class ITK_EXPORT AsymmetricFusionOfLineDetectorImageFilter :
public LineDetectorImageFilterBase<TInputImage, TOutputImage, TOutputImageDirection, TInterpolator>
{
public:
itkStaticConstMacro(InputImageDimension,
unsigned int,
TInputImage::ImageDimension);
itkStaticConstMacro(OutputImageDimension,
unsigned int,
TOutputImage::ImageDimension);
typedef AsymmetricFusionOfLineDetectorImageFilter Self;
typedef LineDetectorImageFilterBase<TInputImage, TOutputImage, TOutputImageDirection, TInterpolator> Superclass;
typedef itk::SmartPointer<Self> Pointer;
typedef itk::SmartPointer<const Self> ConstPointer;
itkNewMacro(Self);
itkTypeMacro(AsymmetricFusionOfLineDetectorImageFilter, LineDetectorImageFilterBase);
typedef typename Superclass::InputImageType InputImageType;
typedef typename Superclass::OutputImageType OutputImageType;
typedef typename Superclass::OutputImageDirectionType OutputImageDirectionType;
typedef typename Superclass::InterpolatorType InterpolatorType;
typedef OutputImageType InputImageType1;
typedef OutputImageType InputImageType2;
typedef typename InputImageType::PixelType InputPixelType;
typedef typename InputImageType::SizeType SizeType;
typedef typename OutputImageType::PixelType OutputPixelType;
protected:
AsymmetricFusionOfLineDetectorImageFilter();
~AsymmetricFusionOfLineDetectorImageFilter() ITK_OVERRIDE {}
typedef otb::LineRatioDetectorImageFilter<InputImageType, OutputImageType, OutputImageDirectionType,
InterpolatorType> LineRatioType;
typedef otb::LineCorrelationDetectorImageFilter<InputImageType, OutputImageType, OutputImageDirectionType,
InterpolatorType> LineCorrelationType;
typedef otb::AssociativeSymmetricalSumImageFilter<InputImageType1, InputImageType2,
OutputImageType> AssSymSumType;
void GenerateData() ITK_OVERRIDE;
void PrintSelf(std::ostream& os, itk::Indent indent) const ITK_OVERRIDE;
private:
AsymmetricFusionOfLineDetectorImageFilter(const Self &); //purposely not implemented
void operator =(const Self&); //purposely not implemented
typename LineRatioType::Pointer m_LineRatio;
typename LineCorrelationType::Pointer m_LineCorrelation;
typename AssSymSumType::Pointer m_AssSymSum;
};
} // end namespace otb
#ifndef OTB_MANUAL_INSTANTIATION
#include "otbAsymmetricFusionOfLineDetectorImageFilter.txx"
#endif
#endif
/*=========================================================================
Program: ORFEO Toolbox
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
See OTBCopyright.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef otbAsymmetricFusionOfLineDetectorImageFilter_txx
#define otbAsymmetricFusionOfLineDetectorImageFilter_txx
#include "otbAsymmetricFusionOfLineDetectorImageFilter.h"
namespace otb
{
/**
*
*/
template <class TInputImage, class TOutputImage, class TOutputImageDirection, class TInterpolator>
AsymmetricFusionOfLineDetectorImageFilter<TInputImage, TOutputImage, TOutputImageDirection, TInterpolator>
::AsymmetricFusionOfLineDetectorImageFilter()
{
this->m_Radius.Fill(1);
this->m_LengthLine = 1;
this->m_WidthLine = 0;
this->m_NumberOfDirections = 8;
m_LineRatio = LineRatioType::New();
m_LineCorrelation = LineCorrelationType::New();
m_AssSymSum = AssSymSumType::New();
}
template <class TInputImage, class TOutputImage, class TOutputImageDirection, class TInterpolator>
void
AsymmetricFusionOfLineDetectorImageFilter<TInputImage, TOutputImage, TOutputImageDirection, TInterpolator>
::GenerateData()
{
m_LineRatio->SetInput( this->GetInput() );
m_LineRatio->SetLengthLine( this->m_LengthLine );
m_LineRatio->SetWidthLine( this->m_WidthLine );
m_LineRatio->SetNumberOfDirections( this->m_NumberOfDirections );
m_LineCorrelation->SetInput( this->GetInput() );
m_LineCorrelation->SetLengthLine( this->m_LengthLine );
m_LineCorrelation->SetWidthLine( this->m_WidthLine );
m_LineCorrelation->SetNumberOfDirections( this->m_NumberOfDirections );
m_AssSymSum->SetInput1( m_LineRatio->GetOutput() );
m_AssSymSum->SetInput2( m_LineCorrelation->GetOutput() );
m_AssSymSum->GraftOutput(this->GetOutput() );
m_AssSymSum->Update();
this->GraftOutput(m_AssSymSum->GetOutput() );
}
/**
* Standard "PrintSelf" method
*/
template <class TInputImage, class TOutputImage, class TOutputImageDirection, class TInterpolator>
void
AsymmetricFusionOfLineDetectorImageFilter<TInputImage, TOutputImage, TOutputImageDirection, TInterpolator>
::PrintSelf(std::ostream& os, itk::Indent indent) const
{
Superclass::PrintSelf(os, indent);
}
} //namespace otb
#endif
......@@ -44,9 +44,6 @@ if ! test -d fix_typos; then
curl https://raw.githubusercontent.com/qgis/QGIS/master/scripts/spelling.dat | sed "s/:/->/" | grep -v "colour->" | grep -v "colours->" > qgis.txt
curl https://anonscm.debian.org/cgit/lintian/lintian.git/plain/data/spelling/corrections| grep "||" | grep -v "#" | sed "s/||/->/" > debian.txt
cat codespell/data/dictionary.txt qgis.txt debian.txt | awk 'NF' > otb_dict.txt
#echo "difered->deferred" >> gdal_dict.txt
#echo "differed->deferred" >> gdal_dict.txt
cd ..
fi
......@@ -59,5 +56,16 @@ EXCLUDED_FILES="$EXCLUDED_FILES,*/Documentation/*"
#Exclude also Copyright folder for now
EXCLUDED_FILES="$EXCLUDED_FILES,*/Copyright/*,*/SuperBuild/Copyright/*,*/Utilities/Maintenance/*,LICENSE,*/i18n/*"
#We use also words white list to
#This list should be updated after each release when deprecated classes/methods are removed
# use with --words-white-list=$WORDS_WHITE_LIST
# WORDS_WHITE_LIST="Assymmetric"
# WORDS_WHITE_LIST="$WORDS_WHITE_LIST,Instanciate"
# WORDS_WHITE_LIST="$WORDS_WHITE_LIST,Initialisation"
#FIXME need to add all deprecated classes and methods with typos in the white list
python3 fix_typos/codespell/codespell.py codespell.py -w -i 3 -q 2 -S $EXCLUDED_FILES -D fix_typos/otb_dict.txt ../..
python3 fix_typos/codespell/codespell.py codespell.py -w -i 3 -q 2 -S $EXCLUDED_FILES -D fix_typos/otb_dict.txt ../..
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment