Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
otb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
David Youssefi
otb
Commits
7add1dd7
Commit
7add1dd7
authored
16 years ago
by
Julien Michel
Browse files
Options
Downloads
Plain Diff
MRG
parents
73d76e1d
6281a99f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Code/FeatureExtraction/otbTextureFunctorBase.h
+1
-1
1 addition, 1 deletion
Code/FeatureExtraction/otbTextureFunctorBase.h
Testing/Code/BasicFilters/otbFunctionWithNeighborhoodToImageFilterNew.cxx
+45
-3
45 additions, 3 deletions
...icFilters/otbFunctionWithNeighborhoodToImageFilterNew.cxx
with
46 additions
and
4 deletions
Code/FeatureExtraction/otbTextureFunctorBase.h
+
1
−
1
View file @
7add1dd7
...
...
@@ -31,7 +31,7 @@ namespace Functor
/** \class TextureFunctorBase
* \brief This functor ius the base for all texture functors.
*
* It uses a neighborhood
(radius : m_Radius)
and an offset (m_Offset) to compute texture.
* It uses a neighborhood and an offset (m_Offset) to compute texture.
* It computes the mean, standard deviation of the two areas and the joint histogram using
* Scott formula for the bins lengths computation.
* TIterInput is an iterator, TOutput is a PixelType.
...
...
This diff is collapsed.
Click to expand it.
Testing/Code/BasicFilters/otbFunctionWithNeighborhoodToImageFilterNew.cxx
+
45
−
3
View file @
7add1dd7
...
...
@@ -16,17 +16,59 @@
=========================================================================*/
#include
"itkExceptionObject.h"
#include
"itkNeighborhood.h"
#include
"otbImage.h"
#include
"itkVariableLengthVector.h"
#include
"itkConstNeighborhoodIterator.h"
#include
"otbTextureImageFunction.h"
#include
"otbFunctionWithNeighborhoodToImageFilter.h"
#include
"otbEnergyTextureImageFunction.h"
#include
"otbTextureFunctorBase.h"
template
<
class
TIterInput1
,
class
TIterInput2
,
class
TOutput
>
class
TextureFunctorTest
{
public:
TextureFunctorTest
()
{
m_Offset
.
Fill
(
1
);
};
~
TextureFunctorTest
()
{};
typedef
TIterInput1
IterType1
;
typedef
TIterInput2
IterType2
;
typedef
TOutput
OutputType
;
typedef
typename
IterType1
::
OffsetType
OffsetType
;
typedef
typename
IterType1
::
InternalPixelType
InternalPixelType
;
typedef
typename
IterType1
::
ImageType
ImageType
;
typedef
itk
::
Neighborhood
<
InternalPixelType
,
::
itk
::
GetImageDimension
<
ImageType
>::
ImageDimension
>
NeighborhoodType
;
void
SetOffset
(
OffsetType
off
){
m_Offset
=
off
;
};
inline
TOutput
operator
()(
const
IterType1
&
it
,
const
IterType2
&
itOff
)
{
return
static_cast
<
OutputType
>
(
it
.
GetCenterPixel
()[
0
]);
}
double
ComputeOverSingleChannel
(
const
NeighborhoodType
&
neigh
,
const
NeighborhoodType
&
neighOff
)
{
return
0.
;
}
private
:
OffsetType
m_Offset
;
};
int
otbFunctionWithNeighborhoodToImageFilterNew
(
int
argc
,
char
*
argv
[])
{
const
unsigned
int
Dimension
=
2
;
typedef
double
PixelType
;
typedef
otb
::
Image
<
PixelType
,
Dimension
>
ImageType
;
typedef
otb
::
EnergyTextureImageFunction
<
ImageType
>
FunctionType
;
typedef
otb
::
Image
<
PixelType
,
Dimension
>
ImageType
;
typedef
itk
::
VariableLengthVector
<
double
>
VectorType
;
typedef
itk
::
ConstNeighborhoodIterator
<
ImageType
>
IteratorType
;
typedef
TextureFunctorTest
<
IteratorType
,
IteratorType
,
VectorType
>
FunctorType
;
typedef
otb
::
TextureImageFunction
<
ImageType
,
FunctorType
>
FunctionType
;
typedef
otb
::
FunctionWithNeighborhoodToImageFilter
<
ImageType
,
ImageType
,
FunctionType
>
FilterType
;
// Instantiating object
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment