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
b3d519db
Commit
b3d519db
authored
Jul 20, 2011
by
OTB Bot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
STYLE
parent
f5725948
Changes
63
Hide whitespace changes
Inline
Side-by-side
Showing
63 changed files
with
816 additions
and
826 deletions
+816
-826
Code/BasicFilters/otbAngularProjectionBinaryImageFilter.h
Code/BasicFilters/otbAngularProjectionBinaryImageFilter.h
+2
-2
Code/BasicFilters/otbAngularProjectionBinaryImageFilter.txx
Code/BasicFilters/otbAngularProjectionBinaryImageFilter.txx
+7
-7
Code/BasicFilters/otbBinaryFunctorImageListToSampleListFilter.h
...asicFilters/otbBinaryFunctorImageListToSampleListFilter.h
+5
-5
Code/BasicFilters/otbBinaryFunctorImageListToSampleListFilter.txx
...icFilters/otbBinaryFunctorImageListToSampleListFilter.txx
+2
-3
Code/BasicFilters/otbFastICAInternalOptimizerVectorImageFilter.h
...sicFilters/otbFastICAInternalOptimizerVectorImageFilter.h
+9
-9
Code/BasicFilters/otbFastICAInternalOptimizerVectorImageFilter.txx
...cFilters/otbFastICAInternalOptimizerVectorImageFilter.txx
+1
-2
Code/BasicFilters/otbHorizontalSobelVectorImageFilter.h
Code/BasicFilters/otbHorizontalSobelVectorImageFilter.h
+4
-4
Code/BasicFilters/otbLocalActivityVectorImageFilter.h
Code/BasicFilters/otbLocalActivityVectorImageFilter.h
+5
-5
Code/BasicFilters/otbLocalGradientVectorImageFilter.h
Code/BasicFilters/otbLocalGradientVectorImageFilter.h
+7
-7
Code/BasicFilters/otbMNFImageFilter.h
Code/BasicFilters/otbMNFImageFilter.h
+20
-21
Code/BasicFilters/otbMNFImageFilter.txx
Code/BasicFilters/otbMNFImageFilter.txx
+23
-23
Code/BasicFilters/otbMatrixImageFilter.h
Code/BasicFilters/otbMatrixImageFilter.h
+2
-2
Code/BasicFilters/otbNAPCAImageFilter.h
Code/BasicFilters/otbNAPCAImageFilter.h
+7
-7
Code/BasicFilters/otbNAPCAImageFilter.txx
Code/BasicFilters/otbNAPCAImageFilter.txx
+5
-5
Code/BasicFilters/otbNormalizeVectorImageFilter.h
Code/BasicFilters/otbNormalizeVectorImageFilter.h
+14
-14
Code/BasicFilters/otbNormalizeVectorImageFilter.txx
Code/BasicFilters/otbNormalizeVectorImageFilter.txx
+2
-2
Code/BasicFilters/otbPCAImageFilter.h
Code/BasicFilters/otbPCAImageFilter.h
+18
-18
Code/BasicFilters/otbPCAImageFilter.txx
Code/BasicFilters/otbPCAImageFilter.txx
+21
-22
Code/BasicFilters/otbSobelVectorImageFilter.h
Code/BasicFilters/otbSobelVectorImageFilter.h
+4
-4
Code/BasicFilters/otbSparseWvltToAngleMapperListFilter.h
Code/BasicFilters/otbSparseWvltToAngleMapperListFilter.h
+5
-5
Code/BasicFilters/otbUnaryFunctorNeighborhoodVectorImageFilter.h
...sicFilters/otbUnaryFunctorNeighborhoodVectorImageFilter.h
+2
-4
Code/BasicFilters/otbUnaryFunctorVectorImageFilter.h
Code/BasicFilters/otbUnaryFunctorVectorImageFilter.h
+1
-3
Code/BasicFilters/otbVerticalSobelVectorImageFilter.h
Code/BasicFilters/otbVerticalSobelVectorImageFilter.h
+4
-4
Code/Hyperspectral/otbFCLSUnmixingImageFilter.txx
Code/Hyperspectral/otbFCLSUnmixingImageFilter.txx
+1
-1
Code/Hyperspectral/otbFastICAImageFilter.h
Code/Hyperspectral/otbFastICAImageFilter.h
+26
-26
Code/Hyperspectral/otbFastICAImageFilter.txx
Code/Hyperspectral/otbFastICAImageFilter.txx
+21
-21
Code/Hyperspectral/otbISRAUnmixingImageFilter.txx
Code/Hyperspectral/otbISRAUnmixingImageFilter.txx
+1
-1
Code/Hyperspectral/otbLocalRxDetectorFilter.h
Code/Hyperspectral/otbLocalRxDetectorFilter.h
+50
-50
Code/Hyperspectral/otbLocalRxDetectorFilter.txx
Code/Hyperspectral/otbLocalRxDetectorFilter.txx
+131
-131
Code/Hyperspectral/otbLocalRxDetectorNonThreadFilter.h
Code/Hyperspectral/otbLocalRxDetectorNonThreadFilter.h
+50
-50
Code/Hyperspectral/otbLocalRxDetectorNonThreadFilter.txx
Code/Hyperspectral/otbLocalRxDetectorNonThreadFilter.txx
+130
-130
Code/Hyperspectral/otbNCLSUnmixingImageFilter.txx
Code/Hyperspectral/otbNCLSUnmixingImageFilter.txx
+1
-1
Code/Hyperspectral/otbSparseUnmixingImageFilter.h
Code/Hyperspectral/otbSparseUnmixingImageFilter.h
+12
-12
Code/Hyperspectral/otbSparseUnmixingImageFilter.txx
Code/Hyperspectral/otbSparseUnmixingImageFilter.txx
+16
-18
Code/Hyperspectral/otbVcaImageFilter.h
Code/Hyperspectral/otbVcaImageFilter.h
+4
-4
Code/Hyperspectral/otbVcaImageFilter.txx
Code/Hyperspectral/otbVcaImageFilter.txx
+14
-14
Code/IO/otbBSQImageIO.cxx
Code/IO/otbBSQImageIO.cxx
+1
-1
Code/IO/otbLUMImageIO.cxx
Code/IO/otbLUMImageIO.cxx
+1
-1
Code/IO/otbMWImageIO.cxx
Code/IO/otbMWImageIO.cxx
+1
-1
Code/Simulation/otbImageSimulationMethod.h
Code/Simulation/otbImageSimulationMethod.h
+17
-17
Code/Simulation/otbVectorDataToLabelMapWithAttributesFilter.h
.../Simulation/otbVectorDataToLabelMapWithAttributesFilter.h
+15
-15
Testing/Code/BasicFilters/otbAngularProjectionBinaryImageFilter.cxx
...de/BasicFilters/otbAngularProjectionBinaryImageFilter.cxx
+7
-7
Testing/Code/BasicFilters/otbFastICAImageFilter.cxx
Testing/Code/BasicFilters/otbFastICAImageFilter.cxx
+4
-4
Testing/Code/BasicFilters/otbHorizontalSobelVectorImageFilter.cxx
...Code/BasicFilters/otbHorizontalSobelVectorImageFilter.cxx
+5
-5
Testing/Code/BasicFilters/otbLocalActivityVectorImageFilter.cxx
...g/Code/BasicFilters/otbLocalActivityVectorImageFilter.cxx
+7
-7
Testing/Code/BasicFilters/otbLocalGradientVectorImageFilter.cxx
...g/Code/BasicFilters/otbLocalGradientVectorImageFilter.cxx
+5
-5
Testing/Code/BasicFilters/otbMNFImageFilter.cxx
Testing/Code/BasicFilters/otbMNFImageFilter.cxx
+2
-2
Testing/Code/BasicFilters/otbNAPCAImageFilter.cxx
Testing/Code/BasicFilters/otbNAPCAImageFilter.cxx
+8
-8
Testing/Code/BasicFilters/otbNormalizeVectorImageFilter.cxx
Testing/Code/BasicFilters/otbNormalizeVectorImageFilter.cxx
+2
-2
Testing/Code/BasicFilters/otbPCAImageFilter.cxx
Testing/Code/BasicFilters/otbPCAImageFilter.cxx
+2
-2
Testing/Code/BasicFilters/otbProjectiveProjection.cxx
Testing/Code/BasicFilters/otbProjectiveProjection.cxx
+5
-5
Testing/Code/BasicFilters/otbSobelVectorImageFilter.cxx
Testing/Code/BasicFilters/otbSobelVectorImageFilter.cxx
+5
-5
Testing/Code/BasicFilters/otbVectorImageToMatrixImageFilter.cxx
...g/Code/BasicFilters/otbVectorImageToMatrixImageFilter.cxx
+1
-1
Testing/Code/BasicFilters/otbVerticalSobelVectorImageFilter.cxx
...g/Code/BasicFilters/otbVerticalSobelVectorImageFilter.cxx
+5
-5
Testing/Code/Hyperspectral/otbCLSPSTOUnmixingImageFilter.cxx
Testing/Code/Hyperspectral/otbCLSPSTOUnmixingImageFilter.cxx
+2
-2
Testing/Code/Hyperspectral/otbFCLSUnmixingImageFilter.cxx
Testing/Code/Hyperspectral/otbFCLSUnmixingImageFilter.cxx
+2
-2
Testing/Code/Hyperspectral/otbFullyConstrainedLeastSquareImageFilter.cxx
...perspectral/otbFullyConstrainedLeastSquareImageFilter.cxx
+2
-2
Testing/Code/Hyperspectral/otbISRAUnmixingImageFilter.cxx
Testing/Code/Hyperspectral/otbISRAUnmixingImageFilter.cxx
+2
-2
Testing/Code/Hyperspectral/otbLocalRxDetectorRoiTest.cxx
Testing/Code/Hyperspectral/otbLocalRxDetectorRoiTest.cxx
+42
-42
Testing/Code/Hyperspectral/otbLocalRxDetectorTest.cxx
Testing/Code/Hyperspectral/otbLocalRxDetectorTest.cxx
+35
-35
Testing/Code/Hyperspectral/otbNCLSUnmixingImageFilter.cxx
Testing/Code/Hyperspectral/otbNCLSUnmixingImageFilter.cxx
+2
-2
Testing/Code/Hyperspectral/otbSparseUnmixingImageFilter.cxx
Testing/Code/Hyperspectral/otbSparseUnmixingImageFilter.cxx
+7
-7
Testing/Code/Hyperspectral/otbUnConstrainedLeastSquareImageFilter.cxx
.../Hyperspectral/otbUnConstrainedLeastSquareImageFilter.cxx
+2
-2
No files found.
Code/BasicFilters/otbAngularProjectionBinaryImageFilter.h
View file @
b3d519db
...
...
@@ -27,12 +27,12 @@ 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
* 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
class
ITK_EXPORT
AngularProjectionBinaryImageFilter
:
public
itk
::
ImageToImageFilter
<
TInputImage
,
TOutputImage
>
{
public:
...
...
Code/BasicFilters/otbAngularProjectionBinaryImageFilter.txx
View file @
b3d519db
...
...
@@ -38,7 +38,7 @@ void
AngularProjectionBinaryImageFilter< TInputImage, TOutputImage, TPrecision >
::SetInput1 ( const InputImageType * inputPtr )
{
this->SetNthInput(0,const_cast<InputImageType*>( inputPtr ));
this->SetNthInput(0,
const_cast<InputImageType*>( inputPtr ));
}
template < class TInputImage, class TOutputImage, class TPrecision >
...
...
@@ -46,7 +46,7 @@ void
AngularProjectionBinaryImageFilter< TInputImage, TOutputImage, TPrecision >
::SetInput2 ( const InputImageType * inputPtr )
{
this->SetNthInput(1,const_cast<InputImageType*>( inputPtr ));
this->SetNthInput(1,
const_cast<InputImageType*>( inputPtr ));
}
template < class TInputImage, class TOutputImage, class TPrecision >
...
...
@@ -105,7 +105,7 @@ AngularProjectionBinaryImageFilter< TInputImage, TOutputImage, TPrecision >
template < class TInputImage, class TOutputImage, class TPrecision >
void
AngularProjectionBinaryImageFilter< TInputImage, TOutputImage, TPrecision >
::ThreadedGenerateData
::ThreadedGenerateData
( const OutputImageRegionType & outputRegionForThread, int threadId )
{
itk::ProgressReporter reporter(this, threadId,
...
...
@@ -122,11 +122,11 @@ AngularProjectionBinaryImageFilter< TInputImage, TOutputImage, TPrecision >
( this->GetInput2(), inputRegionForThread );
iter2.GoToBegin();
std::vector< itk::ImageRegionIterator<OutputImageType> > outIter
( this->GetNumberOfOutputs() );
std::vector< itk::ImageRegionIterator<OutputImageType> > outIter
( this->GetNumberOfOutputs() );
for ( unsigned int i = 0; i < outIter.size(); i++ )
{
outIter[i] = itk::ImageRegionIterator<OutputImageType>
outIter[i] = itk::ImageRegionIterator<OutputImageType>
( this->GetOutput(i), outputRegionForThread );
outIter[i].GoToBegin();
}
...
...
@@ -147,7 +147,7 @@ AngularProjectionBinaryImageFilter< TInputImage, TOutputImage, TPrecision >
}
}
} // end of namespace otb
} // end of namespace otb
#endif
...
...
Code/BasicFilters/otbBinaryFunctorImageListToSampleListFilter.h
View file @
b3d519db
...
...
@@ -31,11 +31,11 @@ namespace otb {
* \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
* 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
* 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
...
...
@@ -140,7 +140,7 @@ private:
void
operator
=
(
const
Self
&
);
// not implemeted
FunctorType
m_Functor
;
};
// end of class
};
// end of class
}
// end of namespace otb
...
...
@@ -148,5 +148,5 @@ private:
#include "otbBinaryFunctorImageListToSampleListFilter.txx"
#endif
#endif
#endif
Code/BasicFilters/otbBinaryFunctorImageListToSampleListFilter.txx
View file @
b3d519db
...
...
@@ -54,7 +54,7 @@ typename BinaryFunctorImageListToSampleListFilter< TInputImageList, TOutputSampl
BinaryFunctorImageListToSampleListFilter< TInputImageList, TOutputSampleList, TFunction >
::GetOutputSampleList()
{
typename OutputSampleListObjectType::Pointer dataObjectPointer
typename OutputSampleListObjectType::Pointer dataObjectPointer
= static_cast<OutputSampleListObjectType * > (this->ProcessObject::GetOutput(0) );
return const_cast<OutputSampleListType *>(dataObjectPointer->Get());
}
...
...
@@ -142,7 +142,7 @@ BinaryFunctorImageListToSampleListFilter< TInputImageList, TOutputSampleList, TF
// Set-up progress reporting
itk::ProgressReporter progress(this, 0, list1->Size());
while ( listIterator1 != list1->End()
while ( listIterator1 != list1->End()
&& listIterator2 != list2->End() )
{
InputImageType * img1 = listIterator1.Get();
...
...
@@ -177,4 +177,3 @@ BinaryFunctorImageListToSampleListFilter< TInputImageList, TOutputSampleList, TF
Code/BasicFilters/otbFastICAInternalOptimizerVectorImageFilter.h
View file @
b3d519db
...
...
@@ -23,7 +23,7 @@
#include "otbMatrixImageFilter.h"
#include "otbStreamingStatisticsVectorImageFilter.h"
namespace
otb
namespace
otb
{
/** \class FastICAInternalOptimizerVectorImageFilter
* \brief Internal optimisation of the FastICA unmixing filter
...
...
@@ -31,7 +31,7 @@ namespace otb
* This class implements the internal search for the unmixing matrix W
* in the FastICA technique.
*
* The class takes 2 inputs (initial image and its projection with the W matrix).
* The class takes 2 inputs (initial image and its projection with the W matrix).
*
* \ingroup Multithreaded
* \sa FastICAImageFilter
...
...
@@ -80,15 +80,15 @@ public:
typedef
double
(
*
ContrastFunctionType
)
(
double
);
itkSetMacro
(
CurrentBandForLoop
,
unsigned
int
);
itkGetMacro
(
CurrentBandForLoop
,
unsigned
int
);
itkSetMacro
(
CurrentBandForLoop
,
unsigned
int
);
itkGetMacro
(
CurrentBandForLoop
,
unsigned
int
);
itkGetMacro
(
W
,
InternalMatrixType
);
itkSetMacro
(
W
,
InternalMatrixType
);
itkGetMacro
(
W
,
InternalMatrixType
);
itkSetMacro
(
W
,
InternalMatrixType
);
itkSetMacro
(
ContrastFunction
,
ContrastFunctionType
);
itkGetMacro
(
Beta
,
double
);
itkGetMacro
(
Den
,
double
);
itkSetMacro
(
ContrastFunction
,
ContrastFunctionType
);
itkGetMacro
(
Beta
,
double
);
itkGetMacro
(
Den
,
double
);
protected:
FastICAInternalOptimizerVectorImageFilter
();
...
...
Code/BasicFilters/otbFastICAInternalOptimizerVectorImageFilter.txx
View file @
b3d519db
...
...
@@ -79,7 +79,7 @@ FastICAInternalOptimizerVectorImageFilter< TInputImage, TOutputImage >
InputRegionType inputRegion;
this->CallCopyOutputRegionToInputRegion( inputRegion, outputRegionForThread );
itk::ImageRegionConstIterator< InputImageType > input0It
itk::ImageRegionConstIterator< InputImageType > input0It
( this->GetInput(0), inputRegion );
itk::ImageRegionConstIterator< InputImageType > input1It
( this->GetInput(1), inputRegion );
...
...
@@ -148,4 +148,3 @@ FastICAInternalOptimizerVectorImageFilter< TInputImage, TOutputImage >
#endif
Code/BasicFilters/otbHorizontalSobelVectorImageFilter.h
View file @
b3d519db
...
...
@@ -58,15 +58,15 @@ public:
template
<
class
TInputImage
,
class
TOutputImage
>
class
ITK_EXPORT
HorizontalSobelVectorImageFilter
:
public
UnaryFunctorNeighborhoodVectorImageFilter
<
TInputImage
,
TOutputImage
,
Functor
::
HorizontalSobelOperator
<
Functor
::
HorizontalSobelOperator
<
typename
itk
::
ConstNeighborhoodIterator
<
TInputImage
>
,
typename
TOutputImage
::
PixelType
>
>
typename
TOutputImage
::
PixelType
>
>
{
public:
/** Standart class typedefs */
typedef
HorizontalSobelVectorImageFilter
Self
;
typedef
UnaryFunctorNeighborhoodVectorImageFilter
<
TInputImage
,
TOutputImage
,
Functor
::
HorizontalSobelOperator
<
Functor
::
HorizontalSobelOperator
<
typename
itk
::
ConstNeighborhoodIterator
<
TInputImage
>
,
typename
TOutputImage
::
PixelType
>
>
Superclass
;
typedef
itk
::
SmartPointer
<
Self
>
Pointer
;
...
...
@@ -81,7 +81,7 @@ public:
protected:
HorizontalSobelVectorImageFilter
()
{
typename
Superclass
::
RadiusType
radius
=
{{
1
,
1
}};
typename
Superclass
::
RadiusType
radius
=
{{
1
,
1
}};
SetRadius
(
radius
);
}
virtual
~
HorizontalSobelVectorImageFilter
()
{
}
...
...
Code/BasicFilters/otbLocalActivityVectorImageFilter.h
View file @
b3d519db
...
...
@@ -47,14 +47,14 @@ public:
unsigned
int
neighborSize
=
input
.
Size
();
unsigned
int
vectorSize
=
centerPixel
.
Size
();
if
(
neighborSize
==
1
)
if
(
neighborSize
==
1
)
return
centerPixel
;
TOutput
output
(
vectorSize
);
for
(
unsigned
int
i
=
0
;
i
<
vectorSize
;
i
++
)
{
typename
TOutput
::
ValueType
out
typename
TOutput
::
ValueType
out
=
itk
::
NumericTraits
<
typename
TOutput
::
ValueType
>::
Zero
;
for
(
unsigned
int
j
=
0
;
j
<
neighborSize
/
2
;
j
++
)
{
...
...
@@ -80,15 +80,15 @@ public:
template
<
class
TInputImage
,
class
TOutputImage
>
class
ITK_EXPORT
LocalActivityVectorImageFilter
:
public
UnaryFunctorNeighborhoodVectorImageFilter
<
TInputImage
,
TOutputImage
,
Functor
::
LocalActivityOperator
<
Functor
::
LocalActivityOperator
<
typename
itk
::
ConstNeighborhoodIterator
<
TInputImage
>
,
typename
TOutputImage
::
PixelType
>
>
typename
TOutputImage
::
PixelType
>
>
{
public:
/** Standart class typedefs */
typedef
LocalActivityVectorImageFilter
Self
;
typedef
UnaryFunctorNeighborhoodVectorImageFilter
<
TInputImage
,
TOutputImage
,
Functor
::
LocalActivityOperator
<
Functor
::
LocalActivityOperator
<
typename
itk
::
ConstNeighborhoodIterator
<
TInputImage
>
,
typename
TOutputImage
::
PixelType
>
>
Superclass
;
typedef
itk
::
SmartPointer
<
Self
>
Pointer
;
...
...
Code/BasicFilters/otbLocalGradientVectorImageFilter.h
View file @
b3d519db
...
...
@@ -47,7 +47,7 @@ public:
for
(
unsigned
int
i
=
0
;
i
<
length
;
i
++
)
{
output
[
i
]
=
static_cast
<
typename
TOutput
::
ValueType
>
(
input
.
GetCenterPixel
()[
i
]
input
.
GetCenterPixel
()[
i
]
-
input
.
GetPixel
(
5
)[
i
]
/
2.
-
input
.
GetPixel
(
7
)[
i
]
/
2.
);
}
...
...
@@ -63,15 +63,15 @@ public:
template
<
class
TInputImage
,
class
TOutputImage
>
class
ITK_EXPORT
LocalGradientVectorImageFilter
:
public
UnaryFunctorNeighborhoodVectorImageFilter
<
TInputImage
,
TOutputImage
,
Functor
::
LocalGradientOperator
<
Functor
::
LocalGradientOperator
<
typename
itk
::
ConstNeighborhoodIterator
<
TInputImage
>
,
typename
TOutputImage
::
PixelType
>
>
typename
TOutputImage
::
PixelType
>
>
{
public:
/** Standart class typedefs */
typedef
LocalGradientVectorImageFilter
Self
;
typedef
UnaryFunctorNeighborhoodVectorImageFilter
<
TInputImage
,
TOutputImage
,
Functor
::
LocalGradientOperator
<
Functor
::
LocalGradientOperator
<
typename
itk
::
ConstNeighborhoodIterator
<
TInputImage
>
,
typename
TOutputImage
::
PixelType
>
>
Superclass
;
typedef
itk
::
SmartPointer
<
Self
>
Pointer
;
...
...
@@ -84,10 +84,10 @@ public:
itkTypeMacro
(
LocalGradientVectorImageFilter
,
ImageToImageFilter
);
protected:
LocalGradientVectorImageFilter
()
LocalGradientVectorImageFilter
()
{
typename
Superclass
::
RadiusType
radius
=
{{
1
,
1
}};
SetRadius
(
radius
);
typename
Superclass
::
RadiusType
radius
=
{{
1
,
1
}};
SetRadius
(
radius
);
}
virtual
~
LocalGradientVectorImageFilter
()
{
}
...
...
Code/BasicFilters/otbMNFImageFilter.h
View file @
b3d519db
...
...
@@ -31,7 +31,7 @@ namespace otb {
/** \class MNFImageFilter
* \brief Performs a Minimum Noise Fraction analysis of a vector image.
*
* The internal structure of this filter is a filter-to-filter like structure.
* The internal structure of this filter is a filter-to-filter like structure.
* The estimation of the covariance matrix has persistent capabilities...
*
* The high pass filter which has to be used for the noise estimation is templated
...
...
@@ -42,10 +42,10 @@ namespace otb {
* \sa otbStreamingStatisticsVectorImageFilter
* \sa PCAImageFiler
*/
template
<
class
TInputImage
,
class
TOutputImage
,
class
TNoiseImageFilter
,
template
<
class
TInputImage
,
class
TOutputImage
,
class
TNoiseImageFilter
,
Transform
::
TransformDirection
TDirectionOfTransformation
>
class
ITK_EXPORT
MNFImageFilter
class
ITK_EXPORT
MNFImageFilter
:
public
itk
::
ImageToImageFilter
<
TInputImage
,
TOutputImage
>
{
public:
...
...
@@ -66,7 +66,7 @@ public:
itkStaticConstMacro
(
OutputImageDimension
,
unsigned
int
,
TOutputImage
::
ImageDimension
);
typedef
Transform
::
TransformDirection
TransformDirectionEnumType
;
itkStaticConstMacro
(
DirectionOfTransformation
,
TransformDirectionEnumType
,
TDirectionOfTransformation
);
itkStaticConstMacro
(
DirectionOfTransformation
,
TransformDirectionEnumType
,
TDirectionOfTransformation
);
/** Template parameters typedefs */
typedef
TInputImage
InputImageType
;
...
...
@@ -92,30 +92,30 @@ public:
typedef
NormalizeVectorImageFilter
<
InputImageType
,
OutputImageType
>
NormalizeFilterType
;
typedef
typename
NormalizeFilterType
::
Pointer
NormalizeFilterPointerType
;
/**
* Set/Get the number of required largest principal components.
/**
* Set/Get the number of required largest principal components.
*/
itkGetMacro
(
NumberOfPrincipalComponentsRequired
,
unsigned
int
);
itkSetMacro
(
NumberOfPrincipalComponentsRequired
,
unsigned
int
);
itkGetMacro
(
NumberOfPrincipalComponentsRequired
,
unsigned
int
);
itkSetMacro
(
NumberOfPrincipalComponentsRequired
,
unsigned
int
);
itkGetConstMacro
(
Normalizer
,
NormalizeFilterType
*
);
itkGetMacro
(
Normalizer
,
NormalizeFilterType
*
);
itkGetConstMacro
(
Normalizer
,
NormalizeFilterType
*
);
itkGetMacro
(
Normalizer
,
NormalizeFilterType
*
);
itkGetMacro
(
NoiseCovarianceEstimator
,
CovarianceEstimatorFilterType
*
);
itkGetMacro
(
Transformer
,
TransformFilterType
*
);
itkGetMacro
(
NoiseImageFilter
,
NoiseImageFilterType
*
);
/** Normalization only impact the use of variance. The data is always centered */
itkGetMacro
(
UseNormalization
,
bool
);
itkSetMacro
(
UseNormalization
,
bool
);
itkGetMacro
(
UseNormalization
,
bool
);
itkSetMacro
(
UseNormalization
,
bool
);
itkGetConstMacro
(
MeanValues
,
VectorType
);
itkGetConstMacro
(
MeanValues
,
VectorType
);
void
SetMeanValues
(
const
VectorType
&
vec
)
{
m_MeanValues
=
vec
;
m_GivenMeanValues
=
true
;
}
itkGetConstMacro
(
StdDevValues
,
VectorType
);
itkGetConstMacro
(
StdDevValues
,
VectorType
);
void
SetStdDevValues
(
const
VectorType
&
vec
)
{
m_StdDevValues
=
vec
;
...
...
@@ -123,7 +123,7 @@ public:
m_GivenStdDevValues
=
true
;
}
itkGetConstMacro
(
CovarianceMatrix
,
MatrixType
);
itkGetConstMacro
(
CovarianceMatrix
,
MatrixType
);
void
SetCovarianceMatrix
(
const
MatrixType
&
cov
)
{
m_CovarianceMatrix
=
cov
;
...
...
@@ -137,7 +137,7 @@ public:
m_GivenNoiseCovarianceMatrix
=
true
;
}
itkGetConstMacro
(
TransformationMatrix
,
MatrixType
);
itkGetConstMacro
(
TransformationMatrix
,
MatrixType
);
void
SetTransformationMatrix
(
const
MatrixType
&
transf
,
bool
isForward
=
true
)
{
m_TransformationMatrix
=
transf
;
...
...
@@ -145,17 +145,17 @@ public:
m_IsTransformationMatrixForward
=
isForward
;
}
itkGetConstMacro
(
EigenValues
,
VectorType
);
itkGetConstMacro
(
EigenValues
,
VectorType
);
protected:
MNFImageFilter
();
virtual
~
MNFImageFilter
()
{
}
/** GenerateOutputInformation
* Propagate vector length info and modify if needed
* Propagate vector length info and modify if needed
* NumberOfPrincipalComponentsRequired
*
* In REVERSE mode, the covariance matrix or the transformation matrix
* In REVERSE mode, the covariance matrix or the transformation matrix
* (which may not be square) has to be given,
* otherwize, GenerateOutputInformation throws an itk::ExceptionObject
*/
...
...
@@ -215,4 +215,3 @@ private:
#endif
Code/BasicFilters/otbMNFImageFilter.txx
View file @
b3d519db
...
...
@@ -28,8 +28,8 @@
namespace otb
{
template <class TInputImage, class TOutputImage,
class TNoiseImageFilter,
template <class TInputImage, class TOutputImage,
class TNoiseImageFilter,
Transform::TransformDirection TDirectionOfTransformation >
MNFImageFilter< TInputImage, TOutputImage, TNoiseImageFilter, TDirectionOfTransformation >
::MNFImageFilter ()
...
...
@@ -55,8 +55,8 @@ MNFImageFilter< TInputImage, TOutputImage, TNoiseImageFilter, TDirectionOfTransf
m_Transformer->MatrixByVectorOn();
}
template <class TInputImage, class TOutputImage,
class TNoiseImageFilter,
template <class TInputImage, class TOutputImage,
class TNoiseImageFilter,
Transform::TransformDirection TDirectionOfTransformation >
void
MNFImageFilter< TInputImage, TOutputImage, TNoiseImageFilter, TDirectionOfTransformation >
...
...
@@ -69,11 +69,11 @@ MNFImageFilter< TInputImage, TOutputImage, TNoiseImageFilter, TDirectionOfTransf
{
case Transform::FORWARD:
{
if ( m_NumberOfPrincipalComponentsRequired == 0
|| m_NumberOfPrincipalComponentsRequired
if ( m_NumberOfPrincipalComponentsRequired == 0
|| m_NumberOfPrincipalComponentsRequired
> this->GetInput()->GetNumberOfComponentsPerPixel() )
{
m_NumberOfPrincipalComponentsRequired =
m_NumberOfPrincipalComponentsRequired =
this->GetInput()->GetNumberOfComponentsPerPixel();
}
...
...
@@ -113,8 +113,8 @@ MNFImageFilter< TInputImage, TOutputImage, TNoiseImageFilter, TDirectionOfTransf
}
}
template <class TInputImage, class TOutputImage,
class TNoiseImageFilter,
template <class TInputImage, class TOutputImage,
class TNoiseImageFilter,
Transform::TransformDirection TDirectionOfTransformation >
void
MNFImageFilter< TInputImage, TOutputImage, TNoiseImageFilter, TDirectionOfTransformation >
...
...
@@ -133,14 +133,14 @@ MNFImageFilter< TInputImage, TOutputImage, TNoiseImageFilter, TDirectionOfTransf
}
}
template <class TInputImage, class TOutputImage,
class TNoiseImageFilter,
template <class TInputImage, class TOutputImage,
class TNoiseImageFilter,
Transform::TransformDirection TDirectionOfTransformation >
void
MNFImageFilter< TInputImage, TOutputImage, TNoiseImageFilter, TDirectionOfTransformation >
::ForwardGenerateData ()
{
typename InputImageType::Pointer inputImgPtr
typename InputImageType::Pointer inputImgPtr
= const_cast<InputImageType*>( this->GetInput() );
if ( m_GivenMeanValues )
...
...
@@ -218,8 +218,8 @@ MNFImageFilter< TInputImage, TOutputImage, TNoiseImageFilter, TDirectionOfTransf
}
template <class TInputImage, class TOutputImage,
class TNoiseImageFilter,
template <class TInputImage, class TOutputImage,
class TNoiseImageFilter,
Transform::TransformDirection TDirectionOfTransformation >
void
MNFImageFilter< TInputImage, TOutputImage, TNoiseImageFilter, TDirectionOfTransformation >
...
...
@@ -308,7 +308,7 @@ MNFImageFilter< TInputImage, TOutputImage, TNoiseImageFilter, TDirectionOfTransf
{
VectorType revMean ( m_MeanValues.Size() );
for ( unsigned int i = 0; i < m_MeanValues.Size(); i++ )
revMean[i] = - m_MeanValues[i]
;
revMean[i] = - m_MeanValues[i];
m_Normalizer->SetMean( revMean );
m_Normalizer->SetUseStdDev( false );
}
...
...
@@ -320,8 +320,8 @@ MNFImageFilter< TInputImage, TOutputImage, TNoiseImageFilter, TDirectionOfTransf
this->GraftOutput( m_Normalizer->GetOutput() );
}
template <class TInputImage, class TOutputImage,
class TNoiseImageFilter,
template <class TInputImage, class TOutputImage,
class TNoiseImageFilter,
Transform::TransformDirection TDirectionOfTransformation >
void
MNFImageFilter< TInputImage, TOutputImage, TNoiseImageFilter, TDirectionOfTransformation >
...
...
@@ -340,14 +340,14 @@ MNFImageFilter< TInputImage, TOutputImage, TNoiseImageFilter, TDirectionOfTransf
for ( unsigned int i = 0; i < transf.rows(); i++ )
{
double norm = 1. / vcl_sqrt( normMat.get(i,i) );
double norm = 1. / vcl_sqrt( normMat.get(i,
i) );
for ( unsigned int j = 0; j < transf.cols(); j++ )
transf.put( j, i, transf.get(j,i) * norm );
transf.put( j, i, transf.get(j,
i) * norm );
}
transf.inplace_transpose();
if ( m_NumberOfPrincipalComponentsRequired
if ( m_NumberOfPrincipalComponentsRequired
!= this->GetInput()->GetNumberOfComponentsPerPixel() )
m_TransformationMatrix = transf.get_n_rows( 0, m_NumberOfPrincipalComponentsRequired );
else
...
...
@@ -355,11 +355,11 @@ MNFImageFilter< TInputImage, TOutputImage, TNoiseImageFilter, TDirectionOfTransf
m_EigenValues.SetSize( m_NumberOfPrincipalComponentsRequired );
for ( unsigned int i = 0; i < m_NumberOfPrincipalComponentsRequired; i++ )
m_EigenValues[i] = static_cast< RealType >( valP(i,i) );
m_EigenValues[i] = static_cast< RealType >( valP(i,
i) );
}
template <class TInputImage, class TOutputImage,
class TNoiseImageFilter,
template <class TInputImage, class TOutputImage,
class TNoiseImageFilter,
Transform::TransformDirection TDirectionOfTransformation >
void
MNFImageFilter< TInputImage, TOutputImage, TNoiseImageFilter, TDirectionOfTransformation >
...
...
Code/BasicFilters/otbMatrixImageFilter.h
View file @
b3d519db
...
...
@@ -32,7 +32,7 @@ namespace otb
* The awaited type must be compatible with vnl_matrix<double>
*
* The multiplication can be done as \f$ p . M \f$ or \f$ M . p \f$ where \f$ p \f$ is the pixel and \f$ M \f$ is the vector.
* The behavior can be chosen with
* The behavior can be chosen with
*
* The number of rows of the matrix must be the input image number of channels, the number of columns is the number of channels of the output image.
*
...
...
@@ -132,7 +132,7 @@ private:
/** Matrix declaration */
MatrixType
m_Matrix
;
/** If set to true, the applied operation is \f$ M . p \f$ where p is the pixel represented as a column vector.
/** If set to true, the applied operation is \f$ M . p \f$ where p is the pixel represented as a column vector.
Otherwise the applied operation is \f$ p . M \f$ where p is the pixel represented as a row vector.
*/
bool
m_MatrixByVector
;
...
...
Code/BasicFilters/otbNAPCAImageFilter.h
View file @
b3d519db
...
...
@@ -25,13 +25,13 @@ namespace otb {
/** \class NAPCAImageFilter
* \brief Performs a Noise Adjusted PCA analysis of a vector image.
*
* The internal structure of this filter is a filter-to-filter like structure.
* The internal structure of this filter is a filter-to-filter like structure.
* The estimation of the covariance matrix has persistent capabilities...
*
* The high pass filter which has to be used for the noise estimation is templated
* for a better scalability...
*
* This class is very similar to the MNFImageFilter one since only the projection
* This class is very similar to the MNFImageFilter one since only the projection
* matrix definition (through GenerateTransformationMatrix function)
* differs.
*
...
...
@@ -40,15 +40,15 @@ namespace otb {
* \sa otbStreamingStatisticsVectorImageFilter
* \sa MNFImageFilter
*/
template
<
class
TInputImage
,
class
TOutputImage
,
class
TNoiseImageFilter
,
template
<
class
TInputImage
,
class
TOutputImage
,
class
TNoiseImageFilter
,
Transform
::
TransformDirection
TDirectionOfTransformation
>
class
ITK_EXPORT
NAPCAImageFilter
class
ITK_EXPORT
NAPCAImageFilter
:
public
MNFImageFilter
<
TInputImage
,
TOutputImage
,
TNoiseImageFilter
,
TDirectionOfTransformation
>
{
public:
typedef
NAPCAImageFilter
Self
;
typedef
MNFImageFilter
<
TInputImage
,
TOutputImage
,
typedef
MNFImageFilter
<
TInputImage
,
TOutputImage
,
TNoiseImageFilter
,
TDirectionOfTransformation
>
Superclass
;
typedef
itk
::
SmartPointer
<
Self
>
Pointer
;
typedef
itk
::
SmartPointer
<
const
Self
>
ConstPointer
;
...
...
@@ -57,7 +57,7 @@ public:
itkNewMacro
(
Self
);
/** Creation through object factory macro */
itkTypeMacro
(
NAPCAImageFilter
,
MNFImageFilter
);
itkTypeMacro
(
NAPCAImageFilter
,
MNFImageFilter
);
/** Template parameters typedefs */
typedef
typename
Superclass
::
InputImageType
InputImageType
;
...
...
Code/BasicFilters/otbNAPCAImageFilter.txx
View file @
b3d519db
...
...
@@ -25,11 +25,11 @@
#include <vnl/algo/vnl_matrix_inverse.h>
#include <vnl/algo/vnl_generalized_eigensystem.h>
namespace otb
namespace otb
{
template <class TInputImage, class TOutputImage,
class TNoiseImageFilter,
template <class TInputImage, class TOutputImage,
class TNoiseImageFilter,
Transform::TransformDirection TDirectionOfTransformation >
void
NAPCAImageFilter< TInputImage, TOutputImage, TNoiseImageFilter, TDirectionOfTransformation >
...
...
@@ -52,7 +52,7 @@ NAPCAImageFilter< TInputImage, TOutputImage, TNoiseImageFilter, TDirectionOfTran
transf.fliplr();
transf.inplace_transpose();