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
a0cfcdab
Commit
a0cfcdab
authored
12 years ago
by
Aurélien Bricier
Browse files
Options
Downloads
Patches
Plain Diff
ENH: added support for &skipcarto option to teh reader
parent
8ecf8f13
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
+2
-2
2 additions, 2 deletions
Code/IO/otbImageFileReader.h
Code/IO/otbImageFileReader.txx
+13
-4
13 additions, 4 deletions
Code/IO/otbImageFileReader.txx
with
15 additions
and
6 deletions
Code/IO/otbImageFileReader.h
+
2
−
2
View file @
a0cfcdab
...
...
@@ -32,7 +32,7 @@ namespace otb
* - &geom : to specify an external geom file
* - &sdataidx : sub-dataset index for composite files
* - &resol : resolution factor for jpeg200 files
* - &skip
pr
: switch to skip the
projection referentiel
in
or
tho-ready file
s
* - &skip
carto
: switch to skip the
cartographic
in
f
or
mation
s
*
* \sa ImageSeriesReader
* \sa ImageIOBase
...
...
@@ -74,7 +74,7 @@ public:
std
::
string
extGEOMFileName
;
unsigned
int
subDatasetIndex
;
unsigned
int
resolutionFactor
;
bool
skip
ProjRef
;
bool
skip
Carto
;
};
/** Prepare image allocation at the first call of the pipeline processing */
...
...
This diff is collapsed.
Click to expand it.
Code/IO/otbImageFileReader.txx
+
13
−
4
View file @
a0cfcdab
...
...
@@ -62,7 +62,7 @@ ImageFileReader<TOutputImage>
m_Options.extGEOMFileName = "";
m_Options.subDatasetIndex = 0;
m_Options.resolutionFactor = 0;
m_Options.skip
ProjRef
= false;
m_Options.skip
Carto
= false;
}
template <class TOutputImage>
...
...
@@ -379,6 +379,15 @@ ImageFileReader<TOutputImage>
}
}
if (m_Options.skipCarto)
{
for (unsigned int i = 0; i < TOutputImage::ImageDimension; ++i)
{
origin[i] = 0.0;
spacing[i] = 1.0;
}
}
output->SetSpacing(spacing); // Set the image spacing
output->SetOrigin(origin); // Set the image origin
output->SetDirection(direction); // Set the image direction cosines
...
...
@@ -439,7 +448,7 @@ ImageFileReader<TOutputImage>
}
// If Skip ProjectionRef is activated, remove ProjRef from dict
if (m_Options.skip
ProjRef
)
if (m_Options.skip
Carto
)
{
itk::EncapsulateMetaData<std::string>(dict, MetaDataKey::ProjectionRefKey, "");
}
...
...
@@ -632,9 +641,9 @@ 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["skip
pr
"] == "true")
if (map["skip
carto
"] == "true")
{
m_Options.skip
ProjRef
= true;
m_Options.skip
Carto
= 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