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
7d2a9c76
Commit
7d2a9c76
authored
17 years ago
by
Julien Michel
Browse files
Options
Downloads
Patches
Plain Diff
Correction d'une erreur dans un test de draw
parent
c3a45ba4
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/Common/otbPolyLineImageConstIterator.txx
+3
-0
3 additions, 0 deletions
Code/Common/otbPolyLineImageConstIterator.txx
Testing/Code/FeatureExtraction/otbDrawPathAlign.cxx
+8
-30
8 additions, 30 deletions
Testing/Code/FeatureExtraction/otbDrawPathAlign.cxx
with
11 additions
and
30 deletions
Code/Common/otbPolyLineImageConstIterator.txx
+
3
−
0
View file @
7d2a9c76
...
@@ -103,6 +103,7 @@ void
...
@@ -103,6 +103,7 @@ void
PolyLineImageConstIterator<TImage,TPath>
PolyLineImageConstIterator<TImage,TPath>
::operator++()
::operator++()
{
{
// otbMsgDebugMacro(<<this->GetIndex());
++m_InternalImageIterator;
++m_InternalImageIterator;
if(m_InternalImageIterator.IsAtEnd())
if(m_InternalImageIterator.IsAtEnd())
{
{
...
@@ -113,6 +114,7 @@ PolyLineImageConstIterator<TImage,TPath>
...
@@ -113,6 +114,7 @@ PolyLineImageConstIterator<TImage,TPath>
{
{
source[i] = static_cast<unsigned int>(m_InternalVertexIterator.Value()[i]);
source[i] = static_cast<unsigned int>(m_InternalVertexIterator.Value()[i]);
}
}
// otbMsgDebugMacro(<<"Source: "<<source);
++m_InternalVertexIterator;
++m_InternalVertexIterator;
if(m_InternalVertexIterator!=m_Path->GetVertexList()->End())
if(m_InternalVertexIterator!=m_Path->GetVertexList()->End())
{
{
...
@@ -121,6 +123,7 @@ PolyLineImageConstIterator<TImage,TPath>
...
@@ -121,6 +123,7 @@ PolyLineImageConstIterator<TImage,TPath>
{
{
target[i] = static_cast<unsigned int>(m_InternalVertexIterator.Value()[i]);
target[i] = static_cast<unsigned int>(m_InternalVertexIterator.Value()[i]);
}
}
// otbMsgDebugMacro(<<"Target: "<<target);
m_InternalImageIterator = InternalImageIteratorType(const_cast<ImageType *>(m_Image.GetPointer()),source,target);
m_InternalImageIterator = InternalImageIteratorType(const_cast<ImageType *>(m_Image.GetPointer()),source,target);
++m_InternalImageIterator;
++m_InternalImageIterator;
}
}
...
...
This diff is collapsed.
Click to expand it.
Testing/Code/FeatureExtraction/otbDrawPathAlign.cxx
+
8
−
30
View file @
7d2a9c76
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
#include
"otbImageFileReader.h"
#include
"otbImageFileReader.h"
#include
"otbPathListSource.h"
#include
"otbPathListSource.h"
#include
"otbImageToPathListAlignFilter.h"
#include
"otbImageToPathListAlignFilter.h"
#include
"otbDrawPathFilter.h"
#include
"otbDrawPath
List
Filter.h"
#include
"otbImageFileWriter.h"
#include
"otbImageFileWriter.h"
...
@@ -56,12 +56,10 @@ int otbDrawPathAlign( int argc, char * argv[] )
...
@@ -56,12 +56,10 @@ int otbDrawPathAlign( int argc, char * argv[] )
typedef
otb
::
ImageToPathListAlignFilter
<
InputImageType
,
PathType
>
PathListType
;
typedef
otb
::
ImageToPathListAlignFilter
<
InputImageType
,
PathType
>
PathListType
;
typedef
PathListType
::
OutputPathListType
OutputPathListType
;
typedef
PathListType
::
OutputPathListType
OutputPathListType
;
typedef
otb
::
DrawPathFilter
<
InputImageType
,
PathType
,
OutputImageType
>
DrawPathFilterType
;
typedef
otb
::
DrawPath
List
Filter
<
InputImageType
,
PathType
,
OutputImageType
>
DrawPathFilterType
;
ReaderType
::
Pointer
reader
=
ReaderType
::
New
();
ReaderType
::
Pointer
reader
=
ReaderType
::
New
();
WriterType
::
Pointer
writer
=
WriterType
::
New
();
WriterType
::
Pointer
writer
=
WriterType
::
New
();
// InputImageType::Pointer ImageIn = InputImageType::New();
// OutputImageType::Pointer ImageOut = OutputImageType::New();
DrawPathFilterType
::
Pointer
DrawPath
=
DrawPathFilterType
::
New
();
DrawPathFilterType
::
Pointer
DrawPath
=
DrawPathFilterType
::
New
();
PathType
::
Pointer
VertexList
=
PathType
::
New
();
PathType
::
Pointer
VertexList
=
PathType
::
New
();
...
@@ -81,32 +79,12 @@ int otbDrawPathAlign( int argc, char * argv[] )
...
@@ -81,32 +79,12 @@ int otbDrawPathAlign( int argc, char * argv[] )
std
::
cout
<<
"NbPath: "
<<
nbPath
<<
std
::
endl
;
std
::
cout
<<
"NbPath: "
<<
nbPath
<<
std
::
endl
;
InputImageType
::
ConstPointer
imageIn
=
reader
->
GetOutput
();
InputImageType
::
ConstPointer
imageIn
=
reader
->
GetOutput
();
for
(
int
i
=
0
;
i
<
nbPath
;
i
++
)
DrawPath
->
SetInput
(
imageIn
);
{
DrawPath
->
SetInputPath
(
sortiePath
);
std
::
cout
<<
"Path No: "
<<
i
<<
std
::
endl
;
writer
->
SetInput
(
DrawPath
->
GetOutput
());
OutputImageType
::
Pointer
imageOut
=
OutputImageType
::
New
();
writer
->
Update
();
DrawPath
->
SetImageInput
(
imageIn
);
DrawPath
->
SetPathInput
(
sortiePath
->
GetNthElement
(
i
));
imageOut
=
DrawPath
->
GetOutput
();
imageOut
->
Update
();
imageIn
=
imageOut
;
#if 0
OutputImageType::Pointer imageOut = OutputImageType::New();
DrawPath->SetImageInput( reader->GetOutput() );
DrawPath->SetPathInput( VertexList );
writer->SetInput(DrawPath->GetOutput());
writer->Update();
#endif
}
writer
->
SetInput
(
imageIn
);
writer
->
Update
();
}
}
catch
(
itk
::
ExceptionObject
&
err
)
catch
(
itk
::
ExceptionObject
&
err
)
{
{
...
...
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