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
93bef540
Commit
93bef540
authored
14 years ago
by
Emmanuel Christophe
Browse files
Options
Downloads
Patches
Plain Diff
ENH: generalization of the Fine registration with any transform as a first guess
parent
8f8ef0ae
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Code/DisparityMap/otbFineRegistrationImageFilter.h
+11
-5
11 additions, 5 deletions
Code/DisparityMap/otbFineRegistrationImageFilter.h
Code/DisparityMap/otbFineRegistrationImageFilter.txx
+4
-4
4 additions, 4 deletions
Code/DisparityMap/otbFineRegistrationImageFilter.txx
with
15 additions
and
9 deletions
Code/DisparityMap/otbFineRegistrationImageFilter.h
+
11
−
5
View file @
93bef540
...
@@ -22,6 +22,7 @@
...
@@ -22,6 +22,7 @@
#include
"itkInterpolateImageFunction.h"
#include
"itkInterpolateImageFunction.h"
#include
"itkContinuousIndex.h"
#include
"itkContinuousIndex.h"
#include
"itkTransform.h"
#include
"itkTranslationTransform.h"
#include
"itkTranslationTransform.h"
#include
"itkImageToImageMetric.txx"
#include
"itkImageToImageMetric.txx"
...
@@ -51,8 +52,8 @@ namespace otb
...
@@ -51,8 +52,8 @@ namespace otb
* This filter accepts fixed and moving images with different sizes and spacing. Metric and search windows radius
* This filter accepts fixed and moving images with different sizes and spacing. Metric and search windows radius
* are expressed in terms of number of pixels in the fixed image.
* are expressed in terms of number of pixels in the fixed image.
*
*
* An initial
offset
can be used to reduce computation time in case of input and moving images with a significant
* An initial
transform
can be used to reduce computation time in case of input and moving images with a significant
* offset. This
offset
is taken into account in the output deformation field.
* offset. This
transform
is taken into account in the output deformation field.
*
*
* It is possible to generate an output metric map and deformation field at a coarser resolution by setting
* It is possible to generate an output metric map and deformation field at a coarser resolution by setting
* grid step to value higher than 1 (grid step is expressed in terms of number of fixed image pixels).
* grid step to value higher than 1 (grid step is expressed in terms of number of fixed image pixels).
...
@@ -98,8 +99,9 @@ public:
...
@@ -98,8 +99,9 @@ public:
typedef
typename
itk
::
ImageToImageMetric
<
TInputImage
,
typedef
typename
itk
::
ImageToImageMetric
<
TInputImage
,
TInputImage
>
MetricType
;
TInputImage
>
MetricType
;
typedef
typename
MetricType
::
Pointer
MetricPointerType
;
typedef
typename
MetricType
::
Pointer
MetricPointerType
;
typedef
typename
itk
::
TranslationTransform
<
double
,
2
>
TranslationType
;
typedef
typename
itk
::
Transform
<
double
,
2
,
2
>
TransformType
;
typedef
typename
TranslationType
::
Pointer
TranslationPointerType
;
typedef
typename
TransformType
::
Pointer
TransformPointerType
;
typedef
typename
itk
::
TranslationTransform
<
double
,
2
>
TranslationTransformType
;
/** Set/Get the Metric used to compare images */
/** Set/Get the Metric used to compare images */
itkSetObjectMacro
(
Metric
,
MetricType
);
itkSetObjectMacro
(
Metric
,
MetricType
);
...
@@ -142,6 +144,10 @@ public:
...
@@ -142,6 +144,10 @@ public:
itkSetMacro
(
UseSpacing
,
bool
);
itkSetMacro
(
UseSpacing
,
bool
);
itkBooleanMacro
(
UseSpacing
);
itkBooleanMacro
(
UseSpacing
);
/** Set default transform between the two images */
itkSetObjectMacro
(
Transform
,
TransformType
);
itkGetConstObjectMacro
(
Transform
,
TransformType
);
/** Set default offset between the two images */
/** Set default offset between the two images */
itkSetMacro
(
InitialOffset
,
SpacingType
);
itkSetMacro
(
InitialOffset
,
SpacingType
);
itkGetConstReferenceMacro
(
InitialOffset
,
SpacingType
);
itkGetConstReferenceMacro
(
InitialOffset
,
SpacingType
);
...
@@ -209,7 +215,7 @@ private:
...
@@ -209,7 +215,7 @@ private:
MetricPointerType
m_Metric
;
MetricPointerType
m_Metric
;
/** The translation */
/** The translation */
Trans
lation
PointerType
m_Trans
lation
;
Trans
form
PointerType
m_Trans
form
;
/** Default offset */
/** Default offset */
SpacingType
m_InitialOffset
;
SpacingType
m_InitialOffset
;
...
...
This diff is collapsed.
Click to expand it.
Code/DisparityMap/otbFineRegistrationImageFilter.txx
+
4
−
4
View file @
93bef540
...
@@ -57,8 +57,8 @@ FineRegistrationImageFilter<TInputImage,T0utputCorrelation,TOutputDeformationFie
...
@@ -57,8 +57,8 @@ FineRegistrationImageFilter<TInputImage,T0utputCorrelation,TOutputDeformationFie
// Default interpolator
// Default interpolator
m_Interpolator = itk::LinearInterpolateImageFunction<TInputImage,double>::New();
m_Interpolator = itk::LinearInterpolateImageFunction<TInputImage,double>::New();
// Translation
// Trans
form: default on a trans
lation
m_Trans
lation
= TranslationType::New();
m_Trans
form
= TranslationT
ransformT
ype::New();
// Grid Step
// Grid Step
m_GridStep.Fill(1);
m_GridStep.Fill(1);
...
@@ -297,7 +297,7 @@ FineRegistrationImageFilter<TInputImage,TOutputCorrelation,TOutputDeformationFie
...
@@ -297,7 +297,7 @@ FineRegistrationImageFilter<TInputImage,TOutputCorrelation,TOutputDeformationFie
// Wire currentMetric
// Wire currentMetric
m_Interpolator->SetInputImage(this->GetMovingInput());
m_Interpolator->SetInputImage(this->GetMovingInput());
m_Metric->SetTransform(m_Trans
lation
);
m_Metric->SetTransform(m_Trans
form
);
m_Metric->SetInterpolator(m_Interpolator);
m_Metric->SetInterpolator(m_Interpolator);
m_Metric->SetFixedImage(fixedPtr);
m_Metric->SetFixedImage(fixedPtr);
m_Metric->SetMovingImage(movingPtr);
m_Metric->SetMovingImage(movingPtr);
...
@@ -320,7 +320,7 @@ FineRegistrationImageFilter<TInputImage,TOutputCorrelation,TOutputDeformationFie
...
@@ -320,7 +320,7 @@ FineRegistrationImageFilter<TInputImage,TOutputCorrelation,TOutputDeformationFie
double currentMetric, optMetric;
double currentMetric, optMetric;
// Optimal translation parameters
// Optimal translation parameters
typename Trans
lation
Type::ParametersType params(2), optParams(2), tmpOptParams(2);
typename Trans
form
Type::ParametersType params(2), optParams(2), tmpOptParams(2);
// Final deformation value
// Final deformation value
DeformationValueType deformationValue;
DeformationValueType deformationValue;
...
...
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