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
Antoine Belvire
otb
Commits
bafd920d
Commit
bafd920d
authored
15 years ago
by
Julien Michel
Browse files
Options
Downloads
Plain Diff
MRG
parents
55373643
791a6257
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
Code/Projections/otbGenericRSTransform.h
+6
-0
6 additions, 0 deletions
Code/Projections/otbGenericRSTransform.h
Code/Projections/otbGenericRSTransform.txx
+60
-0
60 additions, 0 deletions
Code/Projections/otbGenericRSTransform.txx
with
66 additions
and
0 deletions
Code/Projections/otbGenericRSTransform.h
+
6
−
0
View file @
bafd920d
...
...
@@ -73,6 +73,8 @@ namespace otb
typedef
otb
::
CompositeTransform
<
GenericTransformType
,
GenericTransformType
>
TransformType
;
typedef
typename
TransformType
::
Pointer
TransformPointerType
;
typedef
Superclass
::
InverseTransformBasePointer
InverseTransformBasePointer
;
/** Method for creation through the object factory. */
itkNewMacro
(
Self
);
...
...
@@ -177,6 +179,10 @@ namespace otb
virtual
void
InstanciateTransform
();
// Get inverse methods
bool
GetInverse
(
Self
*
inverseTransform
)
const
;
virtual
InverseTransformBasePointer
GetInverseTransform
()
const
;
protected
:
GenericRSTransform
();
...
...
This diff is collapsed.
Click to expand it.
Code/Projections/otbGenericRSTransform.txx
+
60
−
0
View file @
bafd920d
...
...
@@ -277,6 +277,66 @@ GenericRSTransform<TScalarType, NInputDimensions, NOutputDimensions>
return outputPoint;
}
template<class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions>
bool
GenericRSTransform<TScalarType, NInputDimensions, NOutputDimensions>
::GetInverse(Self * inverseTransform)
{
// Test the inverseTransform pointer
if(inverseTransform == NULL)
{
return false;
}
// Swich projection refs
inverseTransform->SetInputProjectionRef(m_OutputProjectionRef);
inverseTransform->SetOutputProjectionRef(m_InputProjectionRef);
// Switch keywordlists
inverseTransform->SetInputKeywordList(m_OutputKeywordList);
inverseTransform->SetInputKeywordList(m_InputKeywordList);
// Switch dictionnaries
inverseTransform->SetInputDictionary(m_OutputDictionary);
inverseTransform->SetOutputDictionary(m_InputDictionary);
// Switch spacings
inverseTransform->SetInputSpacing(m_OutputSpacing);
inverseTransform->SetOutputSpacing(m_InputSpacing);
// Switch origins
inverseTransform->SetInputOrigin(m_OutputOrigin);
inverseTransform->SetOutputOrigin(m_InputSpacing);
// Copy some more parameters
inverseTransform->SetAverageElevation(m_AverageElevation);
inverseTransform->SetDEMDirectory(m_DEMDirectory);
// Instantiate transform
inverseTransform->InstanciateTransform();
return true;
}
template<class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions>
typename GenericRSTransform<TScalarType, NInputDimensions, NOutputDimensions>
::InverseTransformBasePointer
GenericRSTransform<TScalarType, NInputDimensions, NOutputDimensions>
::GetInverseTransform()
{
Self::Pointer inverseTransform = Self::New();
bool success = this->GetInverse(inverseTransform);
if(!success)
{
itkExceptionMacro(<<"Failed to create inverse transform");
}
return inverseTransform;
}
//TODO
// template<class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions>
// void
...
...
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