Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Main Repositories
otb
Commits
db990d66
Commit
db990d66
authored
Nov 08, 2013
by
Julien Malik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ENH: predict deformation grid size and error out in degenrated case
parent
e6f49914
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
Applications/Projections/otbOrthoRectification.cxx
Applications/Projections/otbOrthoRectification.cxx
+15
-0
No files found.
Applications/Projections/otbOrthoRectification.cxx
View file @
db990d66
...
...
@@ -636,6 +636,21 @@ private:
{
gridSpacing
[
0
]
=
GetParameterFloat
(
"opt.gridspacing"
);
gridSpacing
[
1
]
=
-
GetParameterFloat
(
"opt.gridspacing"
);
otbAppLogINFO
(
"Using a deformation grid with a physical spacing of "
<<
GetParameterFloat
(
"opt.gridspacing"
));
// Predict size of deformation grid
ResampleFilterType
::
SizeType
deformationGridSize
;
deformationGridSize
[
0
]
=
GetParameterInt
(
"outputs.sizex"
)
*
GetParameterFloat
(
"outputs.spacingx"
)
/
GetParameterFloat
(
"opt.gridspacing"
);
deformationGridSize
[
1
]
=
GetParameterInt
(
"outputs.sizey"
)
*
GetParameterFloat
(
"outputs.spacingy"
)
/
GetParameterFloat
(
"opt.gridspacing"
);
otbAppLogINFO
(
"Using a deformation grid with a size of "
<<
deformationGridSize
);
if
(
deformationGridSize
[
0
]
*
deformationGridSize
[
1
]
==
0
)
{
otbAppLogFATAL
(
"Deformation grid degenerated (size of 0). You shall set opt.gridspacing appropriately"
);
}
//otb::GeoInformationConversion::ToWKT(4326)
m_ResampleFilter
->
SetDeformationFieldSpacing
(
gridSpacing
);
}
...
...
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