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
2cec7867
Commit
2cec7867
authored
14 years ago
by
Emmanuel Christophe
Browse files
Options
Downloads
Patches
Plain Diff
BUG: handle exception in reader + fix typo
parent
a00adfcf
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/IO/otbImageFileReader.h
+2
-0
2 additions, 0 deletions
Code/IO/otbImageFileReader.h
Code/IO/otbImageFileReader.txx
+16
-6
16 additions, 6 deletions
Code/IO/otbImageFileReader.txx
with
18 additions
and
6 deletions
Code/IO/otbImageFileReader.h
+
2
−
0
View file @
2cec7867
...
...
@@ -93,6 +93,8 @@ private:
ImageFileReader
(
const
Self
&
);
//purposely not implemented
void
operator
=
(
const
Self
&
);
//purposely not implemented
std
::
string
m_ExceptionMessage
;
};
}
//namespace otb
...
...
This diff is collapsed.
Click to expand it.
Code/IO/otbImageFileReader.txx
+
16
−
6
View file @
2cec7867
...
...
@@ -227,17 +227,27 @@ ImageFileReader<TOutputImage>
bool found = GetGdalReadImageFileName(this->m_FileName, lFileName);
if (found == false)
{
otbMsgDebugMacro(<< "Filename was NOT unknow
ed
. May be reconize by a Image factory ! ");
otbMsgDebugMacro(<< "Filename was NOT unknow
n
. May be reco
g
nize
d
by a Image factory ! ");
}
// Update FileName
this->m_FileName = lFileName;
std::string lFileNameOssimKeywordlist = this->m_FileName;
// Test if the file exist and if it can be open.
// and exception will be thrown otherwise.
//
this->TestFileExistanceAndReadability();
// Test if the file exists and if it can be opened.
// An exception will be thrown otherwise.
// We catch the exception because some ImageIO's may not actually
// open a file. Still reports file error if no ImageIO is loaded.
try
{
m_ExceptionMessage = "";
this->TestFileExistanceAndReadability();
}
catch (itk::ExceptionObject &err)
{
m_ExceptionMessage = err.GetDescription();
}
if (this->m_UserSpecifiedImageIO == false) //try creating via factory
{
...
...
@@ -511,7 +521,7 @@ ImageFileReader<TOutputImage>
listFileSearch.push_back("dat_01.001"); // RADARSAT or SAR_ERS2
listFileSearch.push_back("IMAGERY.TIF");
listFileSearch.push_back("imagery.tif"); //For format SPOT5TIF
// Not recogni
s
ed as a supported file format by GDAL.
// Not recogni
z
ed as a supported file format by GDAL.
// listFileSearch.push_back("IMAGERY.BIL");listFileSearch.push_back("imagery.bil");//For format SPOT5BIL
listFileSearch.push_back("IMAG_01.DAT");
listFileSearch.push_back("imag_01.dat"); //For format SPOT4
...
...
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