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
Sébastien Peillet
otb
Commits
31232585
Commit
31232585
authored
7 years ago
by
Guillaume Pasero
Browse files
Options
Downloads
Patches
Plain Diff
ENH: allow to set a new output image from a writer
parent
a4de2332
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
Modules/IO/ImageIO/include/otbMultiImageFileWriter.h
+14
-0
14 additions, 0 deletions
Modules/IO/ImageIO/include/otbMultiImageFileWriter.h
Modules/IO/ImageIO/include/otbMultiImageFileWriter.txx
+8
-0
8 additions, 0 deletions
Modules/IO/ImageIO/include/otbMultiImageFileWriter.txx
with
22 additions
and
0 deletions
Modules/IO/ImageIO/include/otbMultiImageFileWriter.h
+
14
−
0
View file @
31232585
...
...
@@ -131,6 +131,19 @@ public:
this
->
SetNthInput
(
size
-
1
,
const_cast
<
itk
::
DataObject
*>
(
dynamic_cast
<
const
itk
::
DataObject
*>
(
inputPtr
)));
}
/** Add a new ImageFileWriter to the multi-writer. This is an alternative method
* when you already have an instanciated writer.
*/
template
<
class
TWriter
>
void
AddInputWriter
(
const
TWriter
*
writer
)
{
Sink
<
typename
TWriter
::
InputImageType
>
*
sink
=
new
Sink
<
typename
TWriter
::
InputImageType
>
(
writer
);
m_SinkList
.
push_back
(
SinkBase
::
Pointer
(
sink
));
unsigned
int
size
=
m_SinkList
.
size
();
this
->
SetNthInput
(
size
-
1
,
const_cast
<
itk
::
DataObject
*>
(
dynamic_cast
<
const
itk
::
DataObject
*>
(
writer
->
GetInput
())));
}
virtual
void
UpdateOutputInformation
();
virtual
void
Update
()
...
...
@@ -242,6 +255,7 @@ private:
Sink
()
{}
Sink
(
typename
TImage
::
ConstPointer
inputImage
,
const
std
::
string
&
filename
);
Sink
(
typename
otb
::
ImageFileWriter
<
TImage
>::
ConstPointer
writer
);
virtual
~
Sink
()
{}
...
...
This diff is collapsed.
Click to expand it.
Modules/IO/ImageIO/include/otbMultiImageFileWriter.txx
+
8
−
0
View file @
31232585
...
...
@@ -40,6 +40,14 @@ MultiImageFileWriter::Sink<TImage>
m_Writer->SetInput(inputImage);
}
template <class TImage>
MultiImageFileWriter::Sink<TImage>
::Sink(typename otb::ImageFileWriter<TImage>::ConstPointer writer):
SinkBase(dynamic_cast<const ImageBaseType*>(writer->GetInput()->GetPointer())),
m_Writer(writer),
m_ImageIO(NULL)
{
}
template <class TImage>
bool
...
...
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