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
Container Registry
Model registry
Operate
Environments
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
Main Repositories
otb
Commits
0075ab88
Commit
0075ab88
authored
15 years ago
by
Jordi Inglada
Browse files
Options
Downloads
Patches
Plain Diff
ENH: base class for GISTable functions
parent
54762465
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/GISFilters/otbGISTableFunction.h
+111
-0
111 additions, 0 deletions
Code/GISFilters/otbGISTableFunction.h
Code/GISFilters/otbGISTableFunction.txx
+70
-0
70 additions, 0 deletions
Code/GISFilters/otbGISTableFunction.txx
with
181 additions
and
0 deletions
Code/GISFilters/otbGISTableFunction.h
0 → 100644
+
111
−
0
View file @
0075ab88
/*=========================================================================
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 __itkGISTableFunction_h
#define __itkGISTableFunction_h
#include
"itkFunctionBase.h"
#include
"otbGISTable.h"
namespace
otb
{
/** \class GISTableFunction
* \brief Evaluates a const transaction on a GISTable
*
* GISTableFunction is a baseclass for all objects that evaluate
* a const transaction on a GISTable.
*
* The input image is set via method SetInputTable().
*
*
* \sa GISTable
* \sa GISConnection
*
* \ingroup GISTableFunctions
*/
template
<
class
TInputTable
,
class
TOutput
>
class
ITK_EXPORT
GISTableFunction
:
public
FunctionBase
<
TInputTable
,
TOutput
>
{
public:
/** Dimension underlying input image. */
itkStaticConstMacro
(
TableDimension
,
unsigned
int
,
TInputTable
::
SpatialDimension
);
/** Standard class typedefs. */
typedef
GISTableFunction
Self
;
typedef
FunctionBase
<
TInputTable
,
TOutput
>
Superclass
;
typedef
SmartPointer
<
Self
>
Pointer
;
typedef
SmartPointer
<
const
Self
>
ConstPointer
;
/** Run-time type information (and related methods). */
itkTypeMacro
(
GISTableFunction
,
FunctionBase
);
/** InputTableType typedef support. */
typedef
TInputTable
InputTableType
;
/** Connection typedef support */
typedef
typename
InputTableType
::
ConnectionType
ConnectionType
;
/** InputImagePointer typedef support */
typedef
typename
InputTableType
::
ConstPointer
InputTableConstPointer
;
/** OutputType typedef support. */
typedef
TOutput
OutputType
;
/** Set the input table. */
virtual
void
SetInputTable
(
const
InputTableType
*
ptr
);
/** Get the input image. */
const
InputTableType
*
GetInputTable
()
const
{
return
m_Table
.
GetPointer
();
}
/** Evaluate the function.
* Subclasses must provide this method. */
virtual
TOutput
Evaluate
(
)
const
=
0
;
protected
:
GISTableFunction
();
~
GISTableFunction
()
{}
void
PrintSelf
(
std
::
ostream
&
os
,
Indent
indent
)
const
;
/** Const pointer to the input image. */
InputTableConstPointer
m_Image
;
private
:
GISTableFunction
(
const
Self
&
);
//purposely not implemented
void
operator
=
(
const
Self
&
);
//purposely not implemented
};
}
// end namespace otb
#if OTB_MANUAL_INSTANTIATION
# include "itkGISTableFunction.txx"
#endif
#endif
This diff is collapsed.
Click to expand it.
Code/GISFilters/otbGISTableFunction.txx
0 → 100644
+
70
−
0
View file @
0075ab88
/*=========================================================================
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 __otbGISTableFunction_txx
#define __otbGISTableFunction_txx
#include "otbGISTableFunction.h"
namespace otb
{
/**
* Constructor
*/
template <class TInputTable, class TOutput>
GISTableFunction<TInputTable, TOutput>
::GISTableFunction()
{
m_Table = NULL;
}
/**
* Standard "PrintSelf" method
*/
template <class TInputTable, class TOutput>
void
GISTableFunction<TInputTable, TOutput>
::PrintSelf(
std::ostream& os,
Indent indent) const
{
Superclass::PrintSelf( os, indent );
os << indent << "InputTable: " << m_Table.GetPointer() << std::endl;
}
/**
* Initialize by setting the input table
*/
template <class TInputTable, class TOutput>
void
GISTableFunction<TInputTable, TOutput>
::SetInputTable(
const InputTableType* ptr )
{
// set the input table
m_Table = ptr;
}
} // end namespace itk
#endif
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