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
ad5a183b
Commit
ad5a183b
authored
14 years ago
by
Patrick Imbo
Browse files
Options
Downloads
Patches
Plain Diff
ENH: template the SetOutputParametersFromImage method for GenericRSResampleImageFilter
parent
3e569b4f
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/Projections/otbGenericRSResampleImageFilter.h
+10
-1
10 additions, 1 deletion
Code/Projections/otbGenericRSResampleImageFilter.h
Code/Projections/otbGenericRSResampleImageFilter.txx
+0
-18
0 additions, 18 deletions
Code/Projections/otbGenericRSResampleImageFilter.txx
with
10 additions
and
19 deletions
Code/Projections/otbGenericRSResampleImageFilter.h
+
10
−
1
View file @
ad5a183b
...
...
@@ -213,7 +213,16 @@ public:
otbGetObjectMemberConstMacro
(
Transform
,
AverageElevation
,
double
);
/** Useful to set the output parameters from an existing image*/
void
SetOutputParametersFromImage
(
const
ImageBaseType
*
image
);
template
<
class
TImageType
>
void
SetOutputParametersFromImage
(
const
TImageType
*
image
)
{
this
->
SetOutputOrigin
(
image
->
GetOrigin
()
);
this
->
SetOutputSpacing
(
image
->
GetSpacing
()
);
this
->
SetOutputStartIndex
(
image
->
GetLargestPossibleRegion
().
GetIndex
()
);
this
->
SetOutputSize
(
image
->
GetLargestPossibleRegion
().
GetSize
()
);
this
->
SetOutputProjectionRef
(
image
->
GetProjectionRef
());
this
->
SetOutputKeywordList
(
image
->
GetImageKeywordlist
());
}
/** Useful to set the output parameters from an existing image*/
void
SetOutputParametersFromMap
(
const
std
::
string
map
,
const
SpacingType
&
spacing
);
...
...
This diff is collapsed.
Click to expand it.
Code/Projections/otbGenericRSResampleImageFilter.txx
+
0
−
18
View file @
ad5a183b
...
...
@@ -222,24 +222,6 @@ GenericRSResampleImageFilter<TInputImage, TOutputImage>
m_RpcEstimationUpdated = true;
}
/**
* Method used to copy the parameters of the input image
*
*/
template <class TInputImage, class TOutputImage>
void
GenericRSResampleImageFilter<TInputImage, TOutputImage>
::SetOutputParametersFromImage(const ImageBaseType * image)
{
const InputImageType * src = dynamic_cast<const InputImageType*>(image);
this->SetOutputOrigin ( src->GetOrigin() );
this->SetOutputSpacing ( src->GetSpacing() );
this->SetOutputStartIndex ( src->GetLargestPossibleRegion().GetIndex() );
this->SetOutputSize ( src->GetLargestPossibleRegion().GetSize() );
this->SetOutputProjectionRef(src->GetProjectionRef());
this->SetOutputKeywordList(src->GetImageKeywordlist());
}
/**
* Method used to copy the parameters of the input image
*
...
...
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