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
f6398bdb
Commit
f6398bdb
authored
13 years ago
by
Julien Malik
Browse files
Options
Downloads
Patches
Plain Diff
BUG: #495 also affect StreamingImageVirtualWriter - apply same fix as in a806c299f17a
parent
c060f563
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/otbStreamingImageVirtualWriter.h
+3
-0
3 additions, 0 deletions
Code/IO/otbStreamingImageVirtualWriter.h
Code/IO/otbStreamingImageVirtualWriter.txx
+13
-2
13 additions, 2 deletions
Code/IO/otbStreamingImageVirtualWriter.txx
with
16 additions
and
2 deletions
Code/IO/otbStreamingImageVirtualWriter.h
+
3
−
0
View file @
f6398bdb
...
...
@@ -174,6 +174,9 @@ private:
float
m_DivisionProgress
;
StreamingManagerPointerType
m_StreamingManager
;
bool
m_IsObserving
;
unsigned
long
m_ObserverID
;
};
}
// end namespace otb
...
...
This diff is collapsed.
Click to expand it.
Code/IO/otbStreamingImageVirtualWriter.txx
+
13
−
2
View file @
f6398bdb
...
...
@@ -39,7 +39,9 @@ StreamingImageVirtualWriter<TInputImage>
::StreamingImageVirtualWriter()
: m_NumberOfDivisions(0),
m_CurrentDivision(0),
m_DivisionProgress(0.0)
m_DivisionProgress(0.0),
m_IsObserving(true),
m_ObserverID(0)
{
// By default, we use tiled streaming, with automatic tile size
// We don't set any parameter, so the memory size is retrieved from the OTB configuration options
...
...
@@ -198,6 +200,8 @@ StreamingImageVirtualWriter<TInputImage>
*/
// Get the source process object
itk::ProcessObject* source = inputPtr->GetSource();
m_IsObserving = false;
m_ObserverID = 0;
// Check if source exists
if(source)
...
...
@@ -208,7 +212,8 @@ StreamingImageVirtualWriter<TInputImage>
CommandPointerType command = CommandType::New();
command->SetCallbackFunction(this, &Self::ObserveSourceFilterProgress);
source->AddObserver(itk::ProgressEvent(), command);
m_ObserverID = source->AddObserver(itk::ProgressEvent(), command);
m_IsObserving = true;
}
else
{
...
...
@@ -243,6 +248,12 @@ StreamingImageVirtualWriter<TInputImage>
// Notify end event observers
this->InvokeEvent(itk::EndEvent());
if (m_IsObserving)
{
m_IsObserving = false;
source->RemoveObserver(m_ObserverID);
}
/**
* Now we have to mark the data as up to data.
*/
...
...
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