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
52008d27
Commit
52008d27
authored
12 years ago
by
Julien Malik
Browse files
Options
Downloads
Patches
Plain Diff
BUG: StreamingImageFileWriter - make sure we can use SetImageIO with a GDALImageIO instance
parent
099b14cf
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Code/IO/otbStreamingImageFileWriter.txx
+18
-6
18 additions, 6 deletions
Code/IO/otbStreamingImageFileWriter.txx
with
18 additions
and
6 deletions
Code/IO/otbStreamingImageFileWriter.txx
+
18
−
6
View file @
52008d27
...
...
@@ -424,6 +424,13 @@ StreamingImageFileWriter<TInputImage>
itkExceptionMacro(<< "No filename was specified");
}
// Make sure CanWriteFile is called
// either from ImageIOFactory::CreateImageIO or directly in this file
// GDALImageIO uses it to store the filename
// and later answer to CanStreamWrite()
// This is a needed workaround to a defect in the itk::ImageIO interface
if (m_ImageIO.IsNull()) //try creating via factory
{
itkDebugMacro(<< "Attempting factory creation of ImageIO for file: "
...
...
@@ -435,16 +442,21 @@ StreamingImageFileWriter<TInputImage>
}
else
{
if (
m_FactorySpecifiedImageIO &&
!m_ImageIO->CanWriteFile(m_FileName.c_str()))
if (!m_ImageIO->CanWriteFile(m_FileName.c_str()))
{
itkDebugMacro(<< "ImageIO exists but doesn't know how to write file:"
<< m_FileName);
itkDebugMacro(<< "Attempting creation of ImageIO with a factory for file:"
<< m_FileName);
m_ImageIO = ImageIOFactory::CreateImageIO(m_FileName.c_str(),
itk::ImageIOFactory::WriteMode);
m_FactorySpecifiedImageIO = true;
if (m_FactorySpecifiedImageIO)
{
itkDebugMacro(<< "Attempting creation of ImageIO with a factory for file:"
<< m_FileName);
m_ImageIO = ImageIOFactory::CreateImageIO(m_FileName.c_str(),
itk::ImageIOFactory::WriteMode);
m_FactorySpecifiedImageIO = true;
}
}
}
if (m_ImageIO.IsNull())
...
...
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