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
0294240b
Commit
0294240b
authored
Feb 29, 2008
by
Julien Michel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Supression du ChangeInformationFilter
parent
4f7df410
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
323 deletions
+0
-323
Code/Projections/otbOrthoRectificationFilter.h
Code/Projections/otbOrthoRectificationFilter.h
+0
-184
Code/Projections/otbOrthoRectificationFilter.txx
Code/Projections/otbOrthoRectificationFilter.txx
+0
-139
No files found.
Code/Projections/otbOrthoRectificationFilter.h
deleted
100644 → 0
View file @
4f7df410
/*=========================================================================
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 __otbOrthoRectificationFilter_h
#define __otbOrthoRectificationFilter_h
#include "otbOrthoRectificationFilterBase.h"
#include "itkImageToImageFilter.h"
#include "itkChangeInformationImageFilter.h"
namespace
otb
{
/** \class OrthoRectificationFilter
*
* \brief Class for Orthorectifying an image
*
* This class is used to apply map projection and sensor model transformation
* to orthorectify an image, with or without DEM.
*
*/
template
<
class
TInputImage
,
class
TOutputImage
,
class
TMapProjection
,
class
TInterpolatorPrecision
=
double
>
class
ITK_EXPORT
OrthoRectificationFilter
:
public
itk
::
ImageToImageFilter
<
TInputImage
,
TOutputImage
>
{
public
:
/** Standard class typedefs */
typedef
OrthoRectificationFilter
Self
;
typedef
itk
::
ImageToImageFilter
<
TInputImage
,
TOutputImage
>
Superclass
;
typedef
itk
::
SmartPointer
<
Self
>
Pointer
;
typedef
itk
::
SmartPointer
<
const
Self
>
ConstPointer
;
typedef
OrthoRectificationFilterBase
<
TInputImage
,
TOutputImage
,
TMapProjection
,
TInterpolatorPrecision
>
OrthoRectificationFilterBaseType
;
typedef
typename
OrthoRectificationFilterBaseType
::
Pointer
OrthoRectificationFilterBasePointer
;
typedef
itk
::
ChangeInformationImageFilter
<
TInputImage
>
ChangeInfoFilterType
;
typedef
typename
ChangeInfoFilterType
::
Pointer
ChangeInfoFilterPointer
;
typedef
typename
OrthoRectificationFilterBaseType
::
InputImageType
InputImageType
;
typedef
typename
OrthoRectificationFilterBaseType
::
OutputImageType
OutputImageType
;
typedef
typename
OrthoRectificationFilterBaseType
::
MapProjectionType
MapProjectionType
;
typedef
typename
OrthoRectificationFilterBaseType
::
InterpolatorType
InterpolatorType
;
typedef
typename
OrthoRectificationFilterBaseType
::
IndexType
IndexType
;
typedef
typename
OrthoRectificationFilterBaseType
::
SizeType
SizeType
;
typedef
typename
OrthoRectificationFilterBaseType
::
PointType
PointType
;
typedef
typename
OrthoRectificationFilterBaseType
::
RegionType
RegionType
;
typedef
typename
OrthoRectificationFilterBaseType
::
OriginPointType
OriginPointType
;
typedef
typename
OrthoRectificationFilterBaseType
::
SpacingType
SpacingType
;
/** Method for creation through the object factory. */
itkNewMacro
(
Self
);
/** Run-time type information (and related methods). */
itkTypeMacro
(
OrthoRectificationFilter
,
itk
::
ImageToImageFilter
);
/** Accessors */
virtual
void
SetMapProjection
(
MapProjectionType
*
_arg
)
{
m_OrthoRectificationFilter
->
SetMapProjection
(
_arg
);
this
->
Modified
();
}
virtual
MapProjectionType
*
GetMapProjection
()
{
return
(
m_OrthoRectificationFilter
->
GetMapProjection
());
}
/** Specify where are DEM files, and load useful ones */
virtual
void
SetDEMDirectory
(
const
std
::
string
&
directory
)
{
m_OrthoRectificationFilter
->
SetDEMDirectory
(
directory
);
this
->
Modified
();
}
/** Methods to decide to use DEM */
virtual
void
EnableDEM
()
{
m_OrthoRectificationFilter
->
EnableDEM
();
this
->
Modified
();
}
virtual
void
DisableDEM
()
{
m_OrthoRectificationFilter
->
DisableDEM
();
this
->
Modified
();
}
virtual
void
SetOutputStartIndex
(
const
IndexType
index
)
{
m_OrthoRectificationFilter
->
SetOutputStartIndex
(
index
);
this
->
Modified
();
}
virtual
const
IndexType
&
GetOutputStartIndex
()
const
{
return
(
m_OrthoRectificationFilter
->
GetOutputStartIndex
());
}
virtual
void
SetOutputSpacing
(
const
SpacingType
spacing
)
{
m_OrthoRectificationFilter
->
SetOutputSpacing
(
spacing
);
this
->
Modified
();
}
virtual
const
SpacingType
&
GetOutputSpacing
()
const
{
return
(
m_OrthoRectificationFilter
->
GetOutputSpacing
());
}
virtual
void
SetOutputOrigin
(
const
OriginPointType
origin
)
{
m_OrthoRectificationFilter
->
SetOutputOrigin
(
origin
);
this
->
Modified
();
}
virtual
const
OriginPointType
&
GetOutputOrigin
()
const
{
return
(
m_OrthoRectificationFilter
->
GetOutputOrigin
());
}
virtual
void
SetInterpolator
(
InterpolatorType
*
interpol
)
{
m_OrthoRectificationFilter
->
SetInterpolator
(
interpol
);
this
->
Modified
();
}
virtual
const
InterpolatorType
*
GetInterpolator
()
const
{
return
(
m_OrthoRectificationFilter
->
GetInterpolator
());
}
virtual
void
SetSize
(
const
SizeType
size
)
{
m_OrthoRectificationFilter
->
SetSize
(
size
);
this
->
Modified
();
}
virtual
const
SizeType
&
GetSize
()
const
{
return
(
m_OrthoRectificationFilter
->
GetSize
());
}
protected:
OrthoRectificationFilter
();
~
OrthoRectificationFilter
();
void
PrintSelf
(
std
::
ostream
&
os
,
itk
::
Indent
indent
)
const
;
/** Main computation method */
virtual
void
GenerateData
(
void
);
/** Generate Output Information */
virtual
void
GenerateOutputInformation
(
void
);
virtual
void
GenerateInputRequestedRegion
(
void
);
private:
OrthoRectificationFilter
(
const
Self
&
);
//purposely not implemented
void
operator
=
(
const
Self
&
);
//purposely not implemented
/** Orthorectification filter */
OrthoRectificationFilterBasePointer
m_OrthoRectificationFilter
;
ChangeInfoFilterPointer
m_ChangeInfoFilter
;
};
}
// namespace otb
#ifndef OTB_MANUAL_INSTANTIATION
#include "otbOrthoRectificationFilter.txx"
#endif
#endif
Code/Projections/otbOrthoRectificationFilter.txx
deleted
100644 → 0
View file @
4f7df410
/*=========================================================================
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 _otbOrthoRectificationFilter_txx
#define _otbOrthoRectificationFilter_txx
#include "otbOrthoRectificationFilter.h"
namespace otb
{
template < class TInputImage,
class TOutputImage,
class TMapProjection,
class TInterpolatorPrecision>
OrthoRectificationFilter< TInputImage,
TOutputImage,
TMapProjection,
TInterpolatorPrecision>
::OrthoRectificationFilter() : itk::ImageToImageFilter<TInputImage, TOutputImage>()
{
m_OrthoRectificationFilter=OrthoRectificationFilterBaseType::New();
m_ChangeInfoFilter = ChangeInfoFilterType::New();
m_OrthoRectificationFilter->SetInput(m_ChangeInfoFilter->GetOutput());
PointType originNull;
originNull.Fill(0);
m_ChangeInfoFilter->ChangeOriginOn();
m_ChangeInfoFilter->SetOutputOrigin(originNull);
SpacingType spacing;
spacing.Fill(1);
m_ChangeInfoFilter->SetOutputSpacing(spacing);
}
template < class TInputImage,
class TOutputImage,
class TMapProjection,
class TInterpolatorPrecision>
OrthoRectificationFilter< TInputImage,
TOutputImage,
TMapProjection,
TInterpolatorPrecision>
::~OrthoRectificationFilter()
{
}
template < class TInputImage,
class TOutputImage,
class TMapProjection,
class TInterpolatorPrecision>
void
OrthoRectificationFilter< TInputImage,
TOutputImage,
TMapProjection,
TInterpolatorPrecision>
::PrintSelf(std::ostream& os, itk::Indent indent) const
{
Superclass::PrintSelf(os, indent);
os << indent << "m_OrthoRectification:\n" << m_OrthoRectificationFilter<<"\n";
os << indent << "m_ChangeInfoFilter:\n" << m_ChangeInfoFilter <<"\n";
}
template < class TInputImage,
class TOutputImage,
class TMapProjection,
class TInterpolatorPrecision>
void
OrthoRectificationFilter< TInputImage,
TOutputImage,
TMapProjection,
TInterpolatorPrecision>
::GenerateOutputInformation()
{
// This must be done so that the orthoRectificationFilter can generate its ouptut information correctly.
m_ChangeInfoFilter->SetInput(this->GetInput());
m_OrthoRectificationFilter->GenerateOutputInformation();
this->GetOutput()->CopyInformation(m_OrthoRectificationFilter->GetOutput());
}
template < class TInputImage,
class TOutputImage,
class TMapProjection,
class TInterpolatorPrecision>
void
OrthoRectificationFilter< TInputImage,
TOutputImage,
TMapProjection,
TInterpolatorPrecision>
::GenerateInputRequestedRegion(void)
{
typename InputImageType::Pointer inputPtr = const_cast<InputImageType *>(this->GetInput());
if(!inputPtr)
{
return;
}
m_OrthoRectificationFilter->GetOutput()->UpdateOutputInformation();
m_OrthoRectificationFilter->GetOutput()->SetRequestedRegion(this->GetOutput()->GetRequestedRegion());
m_OrthoRectificationFilter->GetOutput()->PropagateRequestedRegion();
inputPtr->SetRequestedRegion(m_OrthoRectificationFilter->GetInput()->GetRequestedRegion());
}
template < class TInputImage,
class TOutputImage,
class TMapProjection,
class TInterpolatorPrecision>
void
OrthoRectificationFilter< TInputImage,
TOutputImage,
TMapProjection,
TInterpolatorPrecision>
::GenerateData(void)
{
// This is done here instead of inside the GenerateData() method so that the pipeline negociation
// use the minipipeline instead of default ITK methods.
m_OrthoRectificationFilter->GraftOutput(this->GetOutput());
m_OrthoRectificationFilter->Update();
this->GraftOutput(m_OrthoRectificationFilter->GetOutput());
}
} //namespace otb
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment