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
d76258da
Commit
d76258da
authored
7 years ago
by
Guillaume Pasero
Browse files
Options
Downloads
Patches
Plain Diff
REFAC: use improved itkWarpImageFilter rather than otb clone
parent
16b22cbf
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
Modules/Core/Transform/include/otbStreamingWarpImageFilter.h
+4
-4
4 additions, 4 deletions
Modules/Core/Transform/include/otbStreamingWarpImageFilter.h
Modules/Core/Transform/include/otbStreamingWarpImageFilter.txx
+7
-0
7 additions, 0 deletions
...es/Core/Transform/include/otbStreamingWarpImageFilter.txx
with
11 additions
and
4 deletions
Modules/Core/Transform/include/otbStreamingWarpImageFilter.h
+
4
−
4
View file @
d76258da
...
...
@@ -21,14 +21,14 @@
#ifndef otbStreamingWarpImageFilter_h
#define otbStreamingWarpImageFilter_h
#include
"
otb
WarpImageFilter.h"
#include
"
itk
WarpImageFilter.h"
#include
"otbStreamingTraits.h"
namespace
otb
{
/** \class StreamingWarpImageFilter
* \brief This class acts like the
otb
::WarpImageFilter, but it does not request the largest possible region of the image to warp.
* \brief This class acts like the
itk
::WarpImageFilter, but it does not request the largest possible region of the image to warp.
*
* Instead, the user should assess the maximum displacement in the displacement field and set it via the SetMaximumDisplacement() method.
*
...
...
@@ -50,12 +50,12 @@ namespace otb
template
<
class
TInputImage
,
class
TOutputImage
,
class
TDisplacementField
>
class
ITK_EXPORT
StreamingWarpImageFilter
:
public
otb
::
WarpImageFilter
<
TInputImage
,
TOutputImage
,
TDisplacementField
>
:
public
itk
::
WarpImageFilter
<
TInputImage
,
TOutputImage
,
TDisplacementField
>
{
public:
/** Standard class typedefs. */
typedef
StreamingWarpImageFilter
Self
;
typedef
otb
::
WarpImageFilter
<
TInputImage
,
TOutputImage
,
TDisplacementField
>
Superclass
;
typedef
itk
::
WarpImageFilter
<
TInputImage
,
TOutputImage
,
TDisplacementField
>
Superclass
;
typedef
itk
::
SmartPointer
<
Self
>
Pointer
;
typedef
itk
::
SmartPointer
<
const
Self
>
ConstPointer
;
...
...
This diff is collapsed.
Click to expand it.
Modules/Core/Transform/include/otbStreamingWarpImageFilter.txx
+
7
−
0
View file @
d76258da
...
...
@@ -44,6 +44,8 @@ void
StreamingWarpImageFilter<TInputImage, TOutputImage, TDisplacementField>
::GenerateInputRequestedRegion()
{
Superclass::GenerateInputRequestedRegion();
// Get the input and displacement field pointers
InputImageType * inputPtr
= const_cast<InputImageType *>(this->GetInput());
...
...
@@ -228,6 +230,11 @@ StreamingWarpImageFilter<TInputImage, TOutputImage, TDisplacementField>
noDataValue.resize(this->GetOutput()->GetNumberOfComponentsPerPixel(),0.0);
}
PixelType edgePadding = this->GetEdgePaddingValue();
if (itk::NumericTraits<PixelType>::GetLength(edgePadding) != this->GetOutput()->GetNumberOfComponentsPerPixel())
{
itk::NumericTraits<PixelType>::SetLength(edgePadding,this->GetOutput()->GetNumberOfComponentsPerPixel());
this->SetEdgePaddingValue(edgePadding);
}
for (unsigned int i=0; i<noDataValueAvailable.size() ; ++i)
{
if (!noDataValueAvailable[i])
...
...
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