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
dc784f1c
There was an error fetching the commit references. Please try again later.
Commit
dc784f1c
authored
14 years ago
by
Otmane Lahlou
Browse files
Options
Downloads
Patches
Plain Diff
ENH: initialize the deformation field in the GenericRSResample instead in StreamingResamplefilter
parent
ff7cd271
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Code/BasicFilters/otbStreamingResampleImageFilter.txx
+0
-13
0 additions, 13 deletions
Code/BasicFilters/otbStreamingResampleImageFilter.txx
Code/Projections/otbGenericRSResampleImageFilter.txx
+10
-0
10 additions, 0 deletions
Code/Projections/otbGenericRSResampleImageFilter.txx
with
10 additions
and
13 deletions
Code/BasicFilters/otbStreamingResampleImageFilter.txx
+
0
−
13
View file @
dc784f1c
...
...
@@ -19,8 +19,6 @@
#ifndef __otbStreamingResampleImageFilter_txx
#define __otbStreamingResampleImageFilter_txx
#include "itkNumericTraits.h"
namespace otb
{
...
...
@@ -32,12 +30,6 @@ StreamingResampleImageFilter<TInputImage, TOutputImage, TInterpolatorPrecisionTy
m_DeformationFilter = DeformationFieldGeneratorType::New();
m_WarpFilter = WarpImageFilterType::New();
// Initialize the deformation field spacing to zero : inconsistant
// value
SpacingType nullDeformationFieldSpacing;
nullDeformationFieldSpacing.Fill(0.);
m_DeformationFilter->SetOutputSpacing(nullDeformationFieldSpacing);
// Wire minipipeline
m_WarpFilter->SetDeformationField(m_DeformationFilter->GetOutput());
}
...
...
@@ -73,11 +65,6 @@ StreamingResampleImageFilter<TInputImage, TOutputImage, TInterpolatorPrecisionTy
region.SetIndex(this->GetOutputStartIndex() );
outputPtr->SetLargestPossibleRegion(region);
// check the output spacing of the deformation field
// if 0 put an initial value
if(m_DeformationFilter->GetOutputSpacing() == itk::NumericTraits<SpacingType>::Zero )
m_DeformationFilter->SetOutputSpacing(2.*this->GetOutputSpacing());
}
template <class TInputImage, class TOutputImage, class TInterpolatorPrecisionType>
...
...
This diff is collapsed.
Click to expand it.
Code/Projections/otbGenericRSResampleImageFilter.txx
+
10
−
0
View file @
dc784f1c
...
...
@@ -24,6 +24,7 @@
#include "projection/ossimUtmProjection.h"
#include "itkPoint.h"
#include "itkNumericTraits.h"
namespace otb
{
...
...
@@ -42,6 +43,10 @@ GenericRSResampleImageFilter<TInputImage, TOutputImage>
m_InputRpcEstimator = InputRpcModelEstimatorType::New();
m_OutputRpcEstimator= OutputRpcModelEstimatorType::New();
m_Transform = GenericRSTransformType::New();
// Initialize the deformation field spacing to zero : inconsistant
// value
this->SetDeformationFieldSpacing(itk::NumericTraits<SpacingType>::Zero);
}
template <class TInputImage, class TOutputImage>
...
...
@@ -49,6 +54,11 @@ void
GenericRSResampleImageFilter<TInputImage, TOutputImage>
::GenerateData()
{
// check the output spacing of the deformation field
// if 0 put an initial value
if(this->GetDeformationFieldSpacing() == itk::NumericTraits<SpacingType>::Zero )
this->SetDeformationFieldSpacing(2.*this->GetOutputSpacing());
m_Resampler->GraftOutput(this->GetOutput());
m_Resampler->Update();
this->GraftOutput(m_Resampler->GetOutput());
...
...
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