Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
otb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
273
Issues
273
List
Boards
Labels
Service Desk
Milestones
Merge Requests
8
Merge Requests
8
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Main Repositories
otb
Commits
0b95dc9c
Commit
0b95dc9c
authored
Jul 20, 2011
by
Julien Malik
Browse files
Options
Browse Files
Download
Plain Diff
MRG
parents
b679db9f
14b837a7
Changes
111
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
111 changed files
with
11381 additions
and
64 deletions
+11381
-64
CMake/otbIncludeDirectories.cmake
CMake/otbIncludeDirectories.cmake
+2
-0
Code/BasicFilters/otbAngularProjectionBinaryImageFilter.h
Code/BasicFilters/otbAngularProjectionBinaryImageFilter.h
+108
-0
Code/BasicFilters/otbAngularProjectionBinaryImageFilter.txx
Code/BasicFilters/otbAngularProjectionBinaryImageFilter.txx
+154
-0
Code/BasicFilters/otbBinaryFunctorImageFilter.h
Code/BasicFilters/otbBinaryFunctorImageFilter.h
+67
-0
Code/BasicFilters/otbBinaryFunctorImageListToSampleListFilter.h
...asicFilters/otbBinaryFunctorImageListToSampleListFilter.h
+152
-0
Code/BasicFilters/otbBinaryFunctorImageListToSampleListFilter.txx
...icFilters/otbBinaryFunctorImageListToSampleListFilter.txx
+180
-0
Code/BasicFilters/otbConcatenateScalarValueImageFilter.h
Code/BasicFilters/otbConcatenateScalarValueImageFilter.h
+157
-0
Code/BasicFilters/otbConcatenateScalarValueImageFilter.txx
Code/BasicFilters/otbConcatenateScalarValueImageFilter.txx
+53
-0
Code/BasicFilters/otbDotProductImageFilter.h
Code/BasicFilters/otbDotProductImageFilter.h
+151
-0
Code/BasicFilters/otbDotProductImageFilter.txx
Code/BasicFilters/otbDotProductImageFilter.txx
+45
-0
Code/BasicFilters/otbFastICAInternalOptimizerVectorImageFilter.h
...sicFilters/otbFastICAInternalOptimizerVectorImageFilter.h
+128
-0
Code/BasicFilters/otbFastICAInternalOptimizerVectorImageFilter.txx
...cFilters/otbFastICAInternalOptimizerVectorImageFilter.txx
+151
-0
Code/BasicFilters/otbHorizontalSobelVectorImageFilter.h
Code/BasicFilters/otbHorizontalSobelVectorImageFilter.h
+97
-0
Code/BasicFilters/otbLocalActivityVectorImageFilter.h
Code/BasicFilters/otbLocalActivityVectorImageFilter.h
+115
-0
Code/BasicFilters/otbLocalGradientVectorImageFilter.h
Code/BasicFilters/otbLocalGradientVectorImageFilter.h
+102
-0
Code/BasicFilters/otbMNFImageFilter.h
Code/BasicFilters/otbMNFImageFilter.h
+218
-0
Code/BasicFilters/otbMNFImageFilter.txx
Code/BasicFilters/otbMNFImageFilter.txx
+426
-0
Code/BasicFilters/otbMatrixImageFilter.h
Code/BasicFilters/otbMatrixImageFilter.h
+16
-4
Code/BasicFilters/otbMatrixImageFilter.txx
Code/BasicFilters/otbMatrixImageFilter.txx
+27
-11
Code/BasicFilters/otbNAPCAImageFilter.h
Code/BasicFilters/otbNAPCAImageFilter.h
+100
-0
Code/BasicFilters/otbNAPCAImageFilter.txx
Code/BasicFilters/otbNAPCAImageFilter.txx
+72
-0
Code/BasicFilters/otbNoiseEstimatorVectorImageFilter.h
Code/BasicFilters/otbNoiseEstimatorVectorImageFilter.h
+1
-0
Code/BasicFilters/otbNormalizeVectorImageFilter.h
Code/BasicFilters/otbNormalizeVectorImageFilter.h
+221
-0
Code/BasicFilters/otbNormalizeVectorImageFilter.txx
Code/BasicFilters/otbNormalizeVectorImageFilter.txx
+78
-0
Code/BasicFilters/otbPCAImageFilter.h
Code/BasicFilters/otbPCAImageFilter.h
+218
-0
Code/BasicFilters/otbPCAImageFilter.txx
Code/BasicFilters/otbPCAImageFilter.txx
+458
-0
Code/BasicFilters/otbProjectiveProjectionImageFilter.h
Code/BasicFilters/otbProjectiveProjectionImageFilter.h
+177
-0
Code/BasicFilters/otbProjectiveProjectionImageFilter.txx
Code/BasicFilters/otbProjectiveProjectionImageFilter.txx
+42
-0
Code/BasicFilters/otbSobelVectorImageFilter.h
Code/BasicFilters/otbSobelVectorImageFilter.h
+106
-0
Code/BasicFilters/otbSparseWvltToAngleMapperListFilter.h
Code/BasicFilters/otbSparseWvltToAngleMapperListFilter.h
+119
-0
Code/BasicFilters/otbUnaryFunctorNeighborhoodVectorImageFilter.h
...sicFilters/otbUnaryFunctorNeighborhoodVectorImageFilter.h
+149
-0
Code/BasicFilters/otbUnaryFunctorNeighborhoodVectorImageFilter.txx
...cFilters/otbUnaryFunctorNeighborhoodVectorImageFilter.txx
+95
-0
Code/BasicFilters/otbUnaryFunctorVectorImageFilter.h
Code/BasicFilters/otbUnaryFunctorVectorImageFilter.h
+132
-0
Code/BasicFilters/otbUnaryFunctorVectorImageFilter.txx
Code/BasicFilters/otbUnaryFunctorVectorImageFilter.txx
+88
-0
Code/BasicFilters/otbVectorImageToMatrixImageFilter.h
Code/BasicFilters/otbVectorImageToMatrixImageFilter.h
+207
-0
Code/BasicFilters/otbVectorImageToMatrixImageFilter.txx
Code/BasicFilters/otbVectorImageToMatrixImageFilter.txx
+168
-0
Code/BasicFilters/otbVerticalSobelVectorImageFilter.h
Code/BasicFilters/otbVerticalSobelVectorImageFilter.h
+97
-0
Code/CMakeLists.txt
Code/CMakeLists.txt
+1
-1
Code/ChangeDetection/otbKullbackLeiblerProfileImageFilter.txx
.../ChangeDetection/otbKullbackLeiblerProfileImageFilter.txx
+4
-4
Code/Common/otbImageOfVectorsToMonoChannelExtractROI.txx
Code/Common/otbImageOfVectorsToMonoChannelExtractROI.txx
+3
-3
Code/FeatureExtraction/otbGenericRoadExtractionFilter.h
Code/FeatureExtraction/otbGenericRoadExtractionFilter.h
+1
-1
Code/FeatureExtraction/otbParallelLinePathListFilter.h
Code/FeatureExtraction/otbParallelLinePathListFilter.h
+1
-1
Code/FeatureExtraction/otbRegionImageToRectangularPathListFilter.txx
...eExtraction/otbRegionImageToRectangularPathListFilter.txx
+1
-1
Code/Hyperspectral/CMakeLists.txt
Code/Hyperspectral/CMakeLists.txt
+24
-0
Code/Hyperspectral/foo.cxx
Code/Hyperspectral/foo.cxx
+0
-0
Code/Hyperspectral/otbEigenvalueLikelihoodMaximisation.h
Code/Hyperspectral/otbEigenvalueLikelihoodMaximisation.h
+128
-0
Code/Hyperspectral/otbEigenvalueLikelihoodMaximisation.txx
Code/Hyperspectral/otbEigenvalueLikelihoodMaximisation.txx
+109
-0
Code/Hyperspectral/otbFCLSUnmixingImageFilter.h
Code/Hyperspectral/otbFCLSUnmixingImageFilter.h
+188
-0
Code/Hyperspectral/otbFCLSUnmixingImageFilter.txx
Code/Hyperspectral/otbFCLSUnmixingImageFilter.txx
+189
-0
Code/Hyperspectral/otbFastICAImageFilter.h
Code/Hyperspectral/otbFastICAImageFilter.h
+204
-0
Code/Hyperspectral/otbFastICAImageFilter.txx
Code/Hyperspectral/otbFastICAImageFilter.txx
+300
-0
Code/Hyperspectral/otbISRAUnmixingImageFilter.h
Code/Hyperspectral/otbISRAUnmixingImageFilter.h
+185
-0
Code/Hyperspectral/otbISRAUnmixingImageFilter.txx
Code/Hyperspectral/otbISRAUnmixingImageFilter.txx
+186
-0
Code/Hyperspectral/otbLocalRxDetectorFilter.h
Code/Hyperspectral/otbLocalRxDetectorFilter.h
+119
-0
Code/Hyperspectral/otbLocalRxDetectorFilter.txx
Code/Hyperspectral/otbLocalRxDetectorFilter.txx
+230
-0
Code/Hyperspectral/otbLocalRxDetectorNonThreadFilter.h
Code/Hyperspectral/otbLocalRxDetectorNonThreadFilter.h
+119
-0
Code/Hyperspectral/otbLocalRxDetectorNonThreadFilter.txx
Code/Hyperspectral/otbLocalRxDetectorNonThreadFilter.txx
+212
-0
Code/Hyperspectral/otbNCLSUnmixingImageFilter.h
Code/Hyperspectral/otbNCLSUnmixingImageFilter.h
+187
-0
Code/Hyperspectral/otbNCLSUnmixingImageFilter.txx
Code/Hyperspectral/otbNCLSUnmixingImageFilter.txx
+171
-0
Code/Hyperspectral/otbSparseUnmixingImageFilter.h
Code/Hyperspectral/otbSparseUnmixingImageFilter.h
+169
-0
Code/Hyperspectral/otbSparseUnmixingImageFilter.txx
Code/Hyperspectral/otbSparseUnmixingImageFilter.txx
+222
-0
Code/Hyperspectral/otbUnConstrainedLeastSquareImageFilter.h
Code/Hyperspectral/otbUnConstrainedLeastSquareImageFilter.h
+186
-0
Code/Hyperspectral/otbUnConstrainedLeastSquareImageFilter.txx
.../Hyperspectral/otbUnConstrainedLeastSquareImageFilter.txx
+45
-0
Code/Hyperspectral/otbVcaImageFilter.h
Code/Hyperspectral/otbVcaImageFilter.h
+131
-0
Code/Hyperspectral/otbVcaImageFilter.txx
Code/Hyperspectral/otbVcaImageFilter.txx
+390
-0
Code/IO/otbBSQImageIO.cxx
Code/IO/otbBSQImageIO.cxx
+3
-3
Code/IO/otbLUMImageIO.cxx
Code/IO/otbLUMImageIO.cxx
+1
-3
Code/IO/otbMWImageIO.cxx
Code/IO/otbMWImageIO.cxx
+1
-3
Code/IO/otbONERAImageIO.h
Code/IO/otbONERAImageIO.h
+3
-4
Code/MultiScale/otbMorphologicalPyramidResampler.txx
Code/MultiScale/otbMorphologicalPyramidResampler.txx
+1
-2
Code/Projections/otbGroundSpacingImageFunction.h
Code/Projections/otbGroundSpacingImageFunction.h
+3
-3
Code/Radiometry/otbBandName.h
Code/Radiometry/otbBandName.h
+7
-7
Code/Radiometry/otbTerraSarBrightnessFunctor.txx
Code/Radiometry/otbTerraSarBrightnessFunctor.txx
+1
-1
Code/Visualization/otbCurves2DWidget.h
Code/Visualization/otbCurves2DWidget.h
+1
-1
Examples/ChangeDetection/KullbackLeiblerSupervizedDistanceChDet.cxx
...hangeDetection/KullbackLeiblerSupervizedDistanceChDet.cxx
+2
-2
Examples/IO/CMakeLists.txt
Examples/IO/CMakeLists.txt
+1
-1
Examples/Radiometry/ARVIMultiChannelRAndBAndNIRVegetationIndexImageFilter.cxx
...ARVIMultiChannelRAndBAndNIRVegetationIndexImageFilter.cxx
+1
-1
Testing/Code/BasicFilters/CMakeLists.txt
Testing/Code/BasicFilters/CMakeLists.txt
+99
-1
Testing/Code/BasicFilters/otbAngularProjectionBinaryImageFilter.cxx
...de/BasicFilters/otbAngularProjectionBinaryImageFilter.cxx
+125
-0
Testing/Code/BasicFilters/otbBasicFiltersTests13.cxx
Testing/Code/BasicFilters/otbBasicFiltersTests13.cxx
+25
-0
Testing/Code/BasicFilters/otbFastICAImageFilter.cxx
Testing/Code/BasicFilters/otbFastICAImageFilter.cxx
+147
-0
Testing/Code/BasicFilters/otbHorizontalSobelVectorImageFilter.cxx
...Code/BasicFilters/otbHorizontalSobelVectorImageFilter.cxx
+100
-0
Testing/Code/BasicFilters/otbLocalActivityVectorImageFilter.cxx
...g/Code/BasicFilters/otbLocalActivityVectorImageFilter.cxx
+109
-0
Testing/Code/BasicFilters/otbLocalGradientVectorImageFilter.cxx
...g/Code/BasicFilters/otbLocalGradientVectorImageFilter.cxx
+100
-0
Testing/Code/BasicFilters/otbMNFImageFilter.cxx
Testing/Code/BasicFilters/otbMNFImageFilter.cxx
+151
-0
Testing/Code/BasicFilters/otbNAPCAImageFilter.cxx
Testing/Code/BasicFilters/otbNAPCAImageFilter.cxx
+155
-0
Testing/Code/BasicFilters/otbNormalizeVectorImageFilter.cxx
Testing/Code/BasicFilters/otbNormalizeVectorImageFilter.cxx
+100
-0
Testing/Code/BasicFilters/otbPCAImageFilter.cxx
Testing/Code/BasicFilters/otbPCAImageFilter.cxx
+136
-0
Testing/Code/BasicFilters/otbProjectiveProjection.cxx
Testing/Code/BasicFilters/otbProjectiveProjection.cxx
+104
-0
Testing/Code/BasicFilters/otbSobelVectorImageFilter.cxx
Testing/Code/BasicFilters/otbSobelVectorImageFilter.cxx
+97
-0
Testing/Code/BasicFilters/otbSparseWvltToAngleMapperListFilter.cxx
...ode/BasicFilters/otbSparseWvltToAngleMapperListFilter.cxx
+41
-0
Testing/Code/BasicFilters/otbVectorImageToMatrixImageFilter.cxx
...g/Code/BasicFilters/otbVectorImageToMatrixImageFilter.cxx
+92
-0
Testing/Code/BasicFilters/otbVerticalSobelVectorImageFilter.cxx
...g/Code/BasicFilters/otbVerticalSobelVectorImageFilter.cxx
+99
-0
Testing/Code/CMakeLists.txt
Testing/Code/CMakeLists.txt
+1
-2
Testing/Code/ChangeDetection/CMakeLists.txt
Testing/Code/ChangeDetection/CMakeLists.txt
+2
-2
Testing/Code/Common/otbMultiChannelExtractROI.cxx
Testing/Code/Common/otbMultiChannelExtractROI.cxx
+1
-1
Testing/Code/Common/otbMultiToMonoChannelExtractROI.cxx
Testing/Code/Common/otbMultiToMonoChannelExtractROI.cxx
+0
-1
Testing/Code/Hyperspectral/CMakeLists.txt
Testing/Code/Hyperspectral/CMakeLists.txt
+148
-0
Testing/Code/Hyperspectral/otbCLSPSTOUnmixingImageFilter.cxx
Testing/Code/Hyperspectral/otbCLSPSTOUnmixingImageFilter.cxx
+80
-0
Testing/Code/Hyperspectral/otbEigenvalueLikelihoodMaximization.cxx
...ode/Hyperspectral/otbEigenvalueLikelihoodMaximization.cxx
+71
-0
Testing/Code/Hyperspectral/otbFCLSUnmixingImageFilter.cxx
Testing/Code/Hyperspectral/otbFCLSUnmixingImageFilter.cxx
+80
-0
Testing/Code/Hyperspectral/otbFullyConstrainedLeastSquareImageFilter.cxx
...perspectral/otbFullyConstrainedLeastSquareImageFilter.cxx
+78
-0
Testing/Code/Hyperspectral/otbHyperspectralTests1.cxx
Testing/Code/Hyperspectral/otbHyperspectralTests1.cxx
+43
-0
Testing/Code/Hyperspectral/otbHyperspectralTests2.cxx
Testing/Code/Hyperspectral/otbHyperspectralTests2.cxx
+29
-0
Testing/Code/Hyperspectral/otbISRAUnmixingImageFilter.cxx
Testing/Code/Hyperspectral/otbISRAUnmixingImageFilter.cxx
+80
-0
Testing/Code/Hyperspectral/otbLocalRxDetectorRoiTest.cxx
Testing/Code/Hyperspectral/otbLocalRxDetectorRoiTest.cxx
+78
-0
Testing/Code/Hyperspectral/otbLocalRxDetectorTest.cxx
Testing/Code/Hyperspectral/otbLocalRxDetectorTest.cxx
+66
-0
Testing/Code/Hyperspectral/otbNCLSUnmixingImageFilter.cxx
Testing/Code/Hyperspectral/otbNCLSUnmixingImageFilter.cxx
+80
-0
Testing/Code/Hyperspectral/otbSparseUnmixingImageFilter.cxx
Testing/Code/Hyperspectral/otbSparseUnmixingImageFilter.cxx
+122
-0
Testing/Code/Hyperspectral/otbUnConstrainedLeastSquareImageFilter.cxx
.../Hyperspectral/otbUnConstrainedLeastSquareImageFilter.cxx
+74
-0
Testing/Code/Hyperspectral/otbVCAImageFilter.cxx
Testing/Code/Hyperspectral/otbVCAImageFilter.cxx
+61
-0
No files found.
CMake/otbIncludeDirectories.cmake
View file @
0b95dc9c
...
...
@@ -38,6 +38,7 @@ SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE}
${
OTB_SOURCE_DIR
}
/Code/Fuzzy
${
OTB_SOURCE_DIR
}
/Code/GeospatialAnalysis
${
OTB_SOURCE_DIR
}
/Code/Gui
${
OTB_SOURCE_DIR
}
/Code/Hyperspectral
${
OTB_SOURCE_DIR
}
/Code/IO
${
OTB_SOURCE_DIR
}
/Code/Learning
${
OTB_SOURCE_DIR
}
/Code/Markov
...
...
@@ -302,6 +303,7 @@ SET(OTB_INCLUDE_RELATIVE_DIRS ${OTB_INCLUDE_RELATIVE_DIRS}
Markov
Fusion
GeospatialAnalysis
Hyperspectral
Testing
UtilitiesAdapters/CurlAdapters
UtilitiesAdapters/OssimAdapters
...
...
Code/BasicFilters/otbAngularProjectionBinaryImageFilter.h
0 → 100644
View file @
0b95dc9c
/*=========================================================================
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 __otbAngularProjectionBinaryImageFilter_h
#define __otbAngularProjectionBinaryImageFilter_h
#include <vector>
#include "itkImageToImageFilter.h"
namespace
otb
{
/** \class AngularProjectionBinaryImageFilter
* \brief Performs \f$ y_i = \cos \theta_i x_1 + \sin \theta_i x_2\f$
*
* This class performs the projections of the 2 input images to a set of N
* output images according to N angular values
*
*/
template
<
class
TInputImage
,
class
TOutputImage
,
class
TPrecision
>
class
ITK_EXPORT
AngularProjectionBinaryImageFilter
:
public
itk
::
ImageToImageFilter
<
TInputImage
,
TOutputImage
>
{
public:
/** Standard typedefs */
typedef
AngularProjectionBinaryImageFilter
Self
;
typedef
itk
::
ImageToImageFilter
<
TInputImage
,
TOutputImage
>
Superclass
;
typedef
itk
::
SmartPointer
<
Self
>
Pointer
;
typedef
itk
::
SmartPointer
<
const
Self
>
ConstPointer
;
/** Type macro */
itkNewMacro
(
Self
);
/** Creation through object factory macro */
itkTypeMacro
(
AngularProjectionBinaryImageFilter
,
ImageToImageFilter
);
/** Template parameters typedefs */
typedef
TInputImage
InputImageType
;
typedef
typename
InputImageType
::
Pointer
InputImagePointerType
;
typedef
typename
InputImageType
::
RegionType
InputImageRegionType
;
typedef
typename
InputImageType
::
SizeType
InputSizeType
;
typedef
typename
InputImageType
::
IndexType
InputIndexType
;
typedef
typename
InputImageType
::
PixelType
InputPixelType
;
typedef
TOutputImage
OutputImageType
;
typedef
typename
OutputImageType
::
Pointer
OutputImagePointerType
;
typedef
typename
OutputImageType
::
RegionType
OutputImageRegionType
;
typedef
typename
OutputImageType
::
SizeType
OutputSizeType
;
typedef
typename
OutputImageType
::
IndexType
OutputIndexType
;
typedef
typename
OutputImageType
::
PixelType
OutputPixelType
;
typedef
TPrecision
PrecisionType
;
/** Dimension */
itkStaticConstMacro
(
InputImageDimension
,
unsigned
int
,
TInputImage
::
ImageDimension
);
itkStaticConstMacro
(
OutputImageDimension
,
unsigned
int
,
TOutputImage
::
ImageDimension
);
/** Set/Get Angle set */
std
::
vector
<
PrecisionType
>
GetAngleSet
()
const
{
return
m_AngleSet
;
}
void
SetAngleSet
(
std
::
vector
<
PrecisionType
>
&
angle
);
void
SetInput1
(
const
InputImageType
*
);
const
InputImageType
*
GetInput1
()
const
;
void
SetInput2
(
const
InputImageType
*
);
const
InputImageType
*
GetInput2
()
const
;
protected:
AngularProjectionBinaryImageFilter
();
virtual
~
AngularProjectionBinaryImageFilter
()
{
}
virtual
void
GenerateOutputInformation
();
virtual
void
ThreadedGenerateData
(
const
OutputImageRegionType
&
outputRegionForThread
,
int
threadID
);
private:
AngularProjectionBinaryImageFilter
(
const
Self
&
);
// not implemented
void
operator
=
(
const
Self
&
);
// not implemented
std
::
vector
<
PrecisionType
>
m_AngleSet
;
};
// end of class
}
// end of namespace otb
#ifndef OTB_MANUAL_INSTANTIATION
#include "otbAngularProjectionBinaryImageFilter.txx"
#endif
#endif
Code/BasicFilters/otbAngularProjectionBinaryImageFilter.txx
0 → 100644
View file @
0b95dc9c
/*=========================================================================
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 __otbAngularProjectionBinaryImageFilter_txx
#define __otbAngularProjectionBinaryImageFilter_txx
#include "otbAngularProjectionBinaryImageFilter.h"
#include <vnl/vnl_math.h>
#include <itkImageRegionConstIterator.h>
#include <itkImageRegionIterator.h>
namespace otb {
template < class TInputImage, class TOutputImage, class TPrecision >
AngularProjectionBinaryImageFilter< TInputImage, TOutputImage, TPrecision >
::AngularProjectionBinaryImageFilter ()
{
this->SetNumberOfRequiredInputs(2);
}
template < class TInputImage, class TOutputImage, class TPrecision >
void
AngularProjectionBinaryImageFilter< TInputImage, TOutputImage, TPrecision >
::SetInput1 ( const InputImageType * inputPtr )
{
this->SetNthInput(0,const_cast<InputImageType*>( inputPtr ));
}
template < class TInputImage, class TOutputImage, class TPrecision >
void
AngularProjectionBinaryImageFilter< TInputImage, TOutputImage, TPrecision >
::SetInput2 ( const InputImageType * inputPtr )
{
this->SetNthInput(1,const_cast<InputImageType*>( inputPtr ));
}
template < class TInputImage, class TOutputImage, class TPrecision >
const TInputImage *
AngularProjectionBinaryImageFilter< TInputImage, TOutputImage, TPrecision >
::GetInput1() const
{
if ( this->GetNumberOfInputs() < 1 )
{
return 0;
}
return static_cast<const TInputImage * > (this->itk::ProcessObject::GetInput(0) );
}
template < class TInputImage, class TOutputImage, class TPrecision >
const TInputImage *
AngularProjectionBinaryImageFilter< TInputImage, TOutputImage, TPrecision >
::GetInput2() const
{
if ( this->GetNumberOfInputs() < 2 )
{
return 0;
}
return static_cast<const TInputImage * > (this->itk::ProcessObject::GetInput(1));
}
template < class TInputImage, class TOutputImage, class TPrecision >
void
AngularProjectionBinaryImageFilter< TInputImage, TOutputImage, TPrecision >
::SetAngleSet ( std::vector<PrecisionType> & angle )
{
m_AngleSet = angle;
this->SetNumberOfOutputs( angle.size() );
for ( unsigned int i = 0; i < this->GetNumberOfOutputs(); i++ )
{
this->SetNthOutput(i, OutputImageType::New());
}
this->Modified();
}
template < class TInputImage, class TOutputImage, class TPrecision >
void
AngularProjectionBinaryImageFilter< TInputImage, TOutputImage, TPrecision >
::GenerateOutputInformation()
{
Superclass::GenerateOutputInformation();
for (unsigned int i = 0; i < this->GetNumberOfOutputs(); i++)
{
this->GetOutput(i)->SetRegions(
this->GetInput()->GetRequestedRegion());
}
}
template < class TInputImage, class TOutputImage, class TPrecision >
void
AngularProjectionBinaryImageFilter< TInputImage, TOutputImage, TPrecision >
::ThreadedGenerateData
( const OutputImageRegionType & outputRegionForThread, int threadId )
{
itk::ProgressReporter reporter(this, threadId,
outputRegionForThread.GetNumberOfPixels() );
InputImageRegionType inputRegionForThread;
this->CallCopyOutputRegionToInputRegion( inputRegionForThread, outputRegionForThread );
itk::ImageRegionConstIterator<InputImageType> iter1
( this->GetInput1(), inputRegionForThread );
iter1.GoToBegin();
itk::ImageRegionConstIterator<InputImageType> iter2
( this->GetInput2(), inputRegionForThread );
iter2.GoToBegin();
std::vector< itk::ImageRegionIterator<OutputImageType> > outIter
( this->GetNumberOfOutputs() );
for ( unsigned int i = 0; i < outIter.size(); i++ )
{
outIter[i] = itk::ImageRegionIterator<OutputImageType>
( this->GetOutput(i), outputRegionForThread );
outIter[i].GoToBegin();
}
while ( !iter1.IsAtEnd() && !iter2.IsAtEnd() )
{
for ( unsigned int i = 0; i < outIter.size(); i++ )
{
outIter[i].Set( vcl_cos( m_AngleSet[i] ) * iter1.Get()
+ vcl_sin( m_AngleSet[i] ) * iter2.Get() );
++outIter[i];
}
++iter1;
++iter2;
reporter.CompletedPixel();
}
}
} // end of namespace otb
#endif
Code/BasicFilters/otbBinaryFunctorImageFilter.h
0 → 100644
View file @
0b95dc9c
/*=========================================================================
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 __otbBinaryFunctorImageFilter_h
#define __otbBinaryFunctorImageFilter_h
#include "otbMacro.h"
#include "itkBinaryFunctorImageFilter.h"
namespace
otb
{
/**
* \class BinaryFunctorImageFilter
* \brief Implements pixel-wise generic operation on one image.
*
* Add the capability to change the number of channel when operation on
* VectorImage compared to the itk::BinaryFunctorImageFilter
*
* The number of channel is provided by the functor: TFunction::OutputSize. If
* this number is lower or equal to zero, the behavior of the itk::BinaryFunctorImageFilter
* remains unchanged.
*
* \sa itk::BinaryFunctorImageFilter
*/
template
<
class
TInputImage1
,
class
TInputImage2
,
class
TOutputImage
,
class
TFunction
>
class
ITK_EXPORT
BinaryFunctorImageFilter
:
public
itk
::
BinaryFunctorImageFilter
<
TInputImage1
,
TInputImage2
,
TOutputImage
,
TFunction
>
{
public:
/** Standard class typedefs. */
typedef
BinaryFunctorImageFilter
Self
;
typedef
itk
::
BinaryFunctorImageFilter
<
TInputImage1
,
TInputImage2
,
TOutputImage
,
TFunction
>
Superclass
;
typedef
itk
::
SmartPointer
<
Self
>
Pointer
;
typedef
itk
::
SmartPointer
<
const
Self
>
ConstPointer
;
/** Method for creation through the object factory. */
itkNewMacro
(
Self
);
/** Run-time type information (and related methods). */
itkTypeMacro
(
BinaryFunctorImageFilter
,
itk
::
BinaryFunctorImageFilter
);
protected:
BinaryFunctorImageFilter
()
{}
virtual
~
BinaryFunctorImageFilter
()
{}
private:
BinaryFunctorImageFilter
(
const
Self
&
);
//purposely not implemented
void
operator
=
(
const
Self
&
);
//purposely not implemented
};
}
// end namespace otb
#endif
Code/BasicFilters/otbBinaryFunctorImageListToSampleListFilter.h
0 → 100644
View file @
0b95dc9c
/*=========================================================================
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 __otbBinaryFunctorImageListToSampleListFilter_h
#define __otbBinaryFunctorImageListToSampleListFilter_h
#include "itkProcessObject.h"
#include "itkDataObject.h"
#include "itkDataObjectDecorator.h"
#include "otbImageList.h"
#include "itkImageRegionConstIterator.h"
namespace
otb
{
/** \class BinaryFunctorImageListToSampleListFilter
* \brief Generate join sample from 2 set of ImageList
*
* This class transform the initial data contained in 2 imageList to
* yield a set of join sample \f$(x_i,y_i)\f$ or a set of parameters
* extracted from the 2 image lists.
*
* The Function gives the possibility to select some of the samples only
* and to transform the output data. Hence, the functor should have also a IsToGenerate
* boolean function...
*
* This filter provides pipeline support for itk::Statistics::ListSample via
* itk::DataObjectDecorator for the output sample list.
*
* \sa SparseWvltToAngleMapperListFilter
*
*/
template
<
class
TInputImageList
,
class
TOutputSampleList
,
class
TFunction
>
class
ITK_EXPORT
BinaryFunctorImageListToSampleListFilter
:
public
itk
::
ProcessObject
{
public:
/** Standard class typedefs. */
typedef
BinaryFunctorImageListToSampleListFilter
Self
;
typedef
itk
::
ProcessObject
Superclass
;
typedef
itk
::
SmartPointer
<
Self
>
Pointer
;
typedef
itk
::
SmartPointer
<
const
Self
>
ConstPointer
;
/** Run-time type information (and related methods). */
itkTypeMacro
(
BinaryFunctorImageListToSampleListFilter
,
itk
::
ProcessObject
);
/** Method for creation through the object factory. */
itkNewMacro
(
Self
);
/** InputList typedefs */
typedef
TInputImageList
InputImageListType
;
typedef
typename
InputImageListType
::
Pointer
InputImageListPointerType
;
typedef
typename
InputImageListType
::
ConstIterator
InputImageListConstIteratorType
;
typedef
typename
InputImageListType
::
ImageType
InputImageType
;
typedef
typename
InputImageType
::
Pointer
InputImagePointerType
;
typedef
typename
InputImageType
::
RegionType
InputImageRegionType
;
typedef
typename
InputImageType
::
PixelType
InputImagePixelType
;
typedef
typename
InputImageType
::
SizeType
SizeType
;
typedef
typename
InputImageType
::
ValueType
ValueType
;
/** OutputSampleList typedefs */
typedef
TOutputSampleList
OutputSampleListType
;
typedef
typename
OutputSampleListType
::
Pointer
OutputSampleListPointer
;
typedef
typename
OutputSampleListType
::
ConstPointer
OutputSampleListConstPointer
;
typedef
typename
OutputSampleListType
::
MeasurementVectorType
OutputMeasurementVectorType
;
typedef
typename
OutputMeasurementVectorType
::
ValueType
OutputValueType
;
/** Functor typedef */
typedef
TFunction
FunctorType
;
typedef
itk
::
ImageRegionConstIterator
<
InputImageType
>
ImageConstIteratorType
;
/** ListSample is not a DataObject, we need to decorate it to push it down
* a ProcessObject's pipeline */
typedef
itk
::
DataObject
::
Pointer
DataObjectPointer
;
typedef
itk
::
DataObjectDecorator
<
OutputSampleListType
>
OutputSampleListObjectType
;
/** Returns the output sample list */
OutputSampleListType
*
GetOutputSampleList
();
/** Returns the output sample list as a data object */
OutputSampleListObjectType
*
GetOutput
();
/** Get the functor object. The functor is returned by reference.
* (Functors do not have to derive from itk::LightObject, so they do
* not necessarily have a reference count. So we cannot return a
* SmartPointer.) */
FunctorType
&
GetFunctor
()
{
return
m_Functor
;
}
/** Set the functor object. This replaces the current Functor with a
* copy of the specified Functor. This allows the user to specify a
* functor that has ivars set differently than the default functor.
* This method requires an operator!=() be defined on the functor
* (or the compiler's default implementation of operator!=() being
* appropriate). */
void
SetFunctor
(
const
FunctorType
&
functor
)
{
m_Functor
=
functor
;
this
->
Modified
();
}
/** Set/Get the input imageList */
void
SetInput1
(
const
InputImageListType
*
);
const
InputImageListType
*
GetInput1
()
const
;
void
SetInput2
(
const
InputImageListType
*
);
const
InputImageListType
*
GetInput2
()
const
;
protected:
BinaryFunctorImageListToSampleListFilter
();
virtual
~
BinaryFunctorImageListToSampleListFilter
()
{
}
/** Standard itk::ProcessObject subclass method. */
virtual
DataObjectPointer
MakeOutput
(
unsigned
int
idx
);
void
PrintSelf
(
std
::
ostream
&
os
,
itk
::
Indent
indent
)
const
;
/** This method causes the filter to generate its output. */
virtual
void
GenerateData
();
private:
BinaryFunctorImageListToSampleListFilter
(
const
Self
&
);
// not implemented
void
operator
=
(
const
Self
&
);
// not implemeted
FunctorType
m_Functor
;
};
// end of class
}
// end of namespace otb
#ifndef OTB_MANUAL_INSTANTIATION
#include "otbBinaryFunctorImageListToSampleListFilter.txx"
#endif
#endif
Code/BasicFilters/otbBinaryFunctorImageListToSampleListFilter.txx
0 → 100644
View file @
0b95dc9c
/*=========================================================================
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 __otbBinaryFunctorImageListToSampleListFilter_txx
#define __otbBinaryFunctorImageListToSampleListFilter_txx
#include "otbBinaryFunctorImageListToSampleListFilter.h"
#include "itkProgressReporter.h"
namespace otb {
template < class TInputImageList, class TOutputSampleList, class TFunction >
BinaryFunctorImageListToSampleListFilter< TInputImageList, TOutputSampleList, TFunction >
::BinaryFunctorImageListToSampleListFilter()
{
this->SetNumberOfRequiredInputs(2);
// Generate the output sample list
typename OutputSampleListObjectType::Pointer outputPtr =
static_cast< OutputSampleListObjectType * >(this->MakeOutput(0).GetPointer());
this->ProcessObject::SetNthOutput(0, outputPtr.GetPointer());
}
template < class TInputImageList, class TOutputSampleList, class TFunction >
typename BinaryFunctorImageListToSampleListFilter< TInputImageList, TOutputSampleList, TFunction >
::DataObjectPointer
BinaryFunctorImageListToSampleListFilter< TInputImageList, TOutputSampleList, TFunction >
::MakeOutput(unsigned int itkNotUsed(idx))
{
typename OutputSampleListObjectType::Pointer outputPtr = OutputSampleListObjectType::New();
OutputSampleListPointer outputSampleList = OutputSampleListType::New();
outputPtr->Set(outputSampleList);
return static_cast<DataObjectPointer>(outputPtr);
}
template < class TInputImageList, class TOutputSampleList, class TFunction >
typename BinaryFunctorImageListToSampleListFilter< TInputImageList, TOutputSampleList, TFunction >
::OutputSampleListType *
BinaryFunctorImageListToSampleListFilter< TInputImageList, TOutputSampleList, TFunction >
::GetOutputSampleList()
{
typename OutputSampleListObjectType::Pointer dataObjectPointer
= static_cast<OutputSampleListObjectType * > (this->ProcessObject::GetOutput(0) );
return const_cast<OutputSampleListType *>(dataObjectPointer->Get());
}
template < class TInputImageList, class TOutputSampleList, class TFunction >
typename BinaryFunctorImageListToSampleListFilter< TInputImageList, TOutputSampleList, TFunction >
::OutputSampleListObjectType *