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
09e95e4d
Commit
09e95e4d
authored
12 years ago
by
Aurélien Bricier
Browse files
Options
Downloads
Patches
Plain Diff
ENH: added skip projectionRef option to the reader
parent
6c520be6
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/IO/otbImageFileReader.h
+7
-0
7 additions, 0 deletions
Code/IO/otbImageFileReader.h
Code/IO/otbImageFileReader.txx
+11
-0
11 additions, 0 deletions
Code/IO/otbImageFileReader.txx
with
18 additions
and
0 deletions
Code/IO/otbImageFileReader.h
+
7
−
0
View file @
09e95e4d
...
...
@@ -28,6 +28,12 @@ namespace otb
/** \class ImageFileReader
* \brief Resource to read an image from a file.
*
* Available options for extended file name are:
* - &geom : to specify an external geom file
* - &sdataidx : sub-dataset index for composite files
* - &resol : resolution factor for jpeg200 files
* - &skippr : switch to skip the projection referentiel in ortho-ready files
*
* \sa ImageSeriesReader
* \sa ImageIOBase
*
...
...
@@ -68,6 +74,7 @@ public:
std
::
string
extGEOMFileName
;
unsigned
int
subDatasetIndex
;
unsigned
int
resolutionFactor
;
bool
skipProjRef
;
};
/** Prepare image allocation at the first call of the pipeline processing */
...
...
This diff is collapsed.
Click to expand it.
Code/IO/otbImageFileReader.txx
+
11
−
0
View file @
09e95e4d
...
...
@@ -62,6 +62,7 @@ ImageFileReader<TOutputImage>
m_Options.extGEOMFileName = "";
m_Options.subDatasetIndex = 0;
m_Options.resolutionFactor = 0;
m_Options.skipProjRef = false;
}
template <class TOutputImage>
...
...
@@ -437,6 +438,12 @@ ImageFileReader<TOutputImage>
}
}
// If Skip ProjectionRef is activated, remove ProjRef from dict
if (m_Options.skipProjRef)
{
itk::EncapsulateMetaData<std::string>(dict, MetaDataKey::ProjectionRefKey, "");
}
//Copy MetaDataDictionary from instantiated reader to output image.
output->SetMetaDataDictionary(this->m_ImageIO->GetMetaDataDictionary());
this->SetMetaDataDictionary(this->m_ImageIO->GetMetaDataDictionary());
...
...
@@ -625,6 +632,10 @@ ImageFileReader<TOutputImage>
m_Options.extGEOMFileName = map["geom"];
m_Options.subDatasetIndex = atoi(map["sdataidx"].c_str());
m_Options.resolutionFactor = atoi(map["resol"].c_str());
if (map["skippr"] == "true")
{
m_Options.skipProjRef = true;
}
this->m_FileName = m_Options.fileName;
}
...
...
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