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
d5e2970c
Commit
d5e2970c
authored
13 years ago
by
Cyrille Valladeau
Browse files
Options
Downloads
Patches
Plain Diff
ENH: correct error in attribut cleaning
parent
297fb2ea
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/ApplicationEngine/otbWrapperInputImageParameter.cxx
+19
-5
19 additions, 5 deletions
Code/ApplicationEngine/otbWrapperInputImageParameter.cxx
with
19 additions
and
5 deletions
Code/ApplicationEngine/otbWrapperInputImageParameter.cxx
+
19
−
5
View file @
d5e2970c
...
@@ -29,10 +29,14 @@ namespace Wrapper
...
@@ -29,10 +29,14 @@ namespace Wrapper
InputImageParameter
::
InputImageParameter
()
InputImageParameter
::
InputImageParameter
()
{
{
std
::
cout
<<
this
<<
" InputImageParameter::GetImage m_Image.IsNull() "
<<
m_Image
.
IsNull
()
<<
std
::
endl
;
this
->
SetName
(
"Input Image"
);
this
->
SetName
(
"Input Image"
);
this
->
SetKey
(
"in"
);
this
->
SetKey
(
"in"
);
m_FileName
=
""
;
m_FileName
=
""
;
this
->
ClearValue
();
this
->
ClearValue
();
std
::
cout
<<
this
<<
" InputImageParameter::GetImage m_Image.IsNull() "
<<
m_Image
.
IsNull
()
<<
std
::
endl
;
}
}
InputImageParameter
::~
InputImageParameter
()
InputImageParameter
::~
InputImageParameter
()
...
@@ -42,6 +46,7 @@ InputImageParameter::~InputImageParameter()
...
@@ -42,6 +46,7 @@ InputImageParameter::~InputImageParameter()
void
void
InputImageParameter
::
SetFromFileName
(
const
std
::
string
&
filename
)
InputImageParameter
::
SetFromFileName
(
const
std
::
string
&
filename
)
{
{
std
::
cout
<<
this
<<
" InputImageParameter::SetFromFileName"
<<
std
::
endl
;
// First clear previous file choosen
// First clear previous file choosen
this
->
ClearValue
();
this
->
ClearValue
();
...
@@ -58,7 +63,6 @@ InputImageParameter::SetFromFileName(const std::string& filename)
...
@@ -58,7 +63,6 @@ InputImageParameter::SetFromFileName(const std::string& filename)
}
}
catch
(
itk
::
ExceptionObject
&
err
)
catch
(
itk
::
ExceptionObject
&
err
)
{
{
this
->
ClearValue
();
}
}
// the specified filename is valid => store the value
// the specified filename is valid => store the value
...
@@ -71,6 +75,7 @@ InputImageParameter::SetFromFileName(const std::string& filename)
...
@@ -71,6 +75,7 @@ InputImageParameter::SetFromFileName(const std::string& filename)
FloatVectorImageType
*
FloatVectorImageType
*
InputImageParameter
::
GetImage
()
InputImageParameter
::
GetImage
()
{
{
std
::
cout
<<
this
<<
" GetImage<FloatVectorImageType>"
<<
std
::
endl
;
return
this
->
GetImage
<
FloatVectorImageType
>
();
return
this
->
GetImage
<
FloatVectorImageType
>
();
}
}
...
@@ -79,6 +84,11 @@ template <class TOutputImage>
...
@@ -79,6 +84,11 @@ template <class TOutputImage>
TOutputImage
*
TOutputImage
*
InputImageParameter
::
GetImage
()
InputImageParameter
::
GetImage
()
{
{
std
::
cout
<<
this
<<
" InputImageParameter::GetImage inside"
<<
std
::
endl
;
std
::
cout
<<
this
<<
" InputImageParameter::GetImage m_FileName "
<<
m_FileName
<<
std
::
endl
;
std
::
cout
<<
this
<<
" InputImageParameter::GetImage m_FileName.empty() "
<<
m_FileName
.
empty
()
<<
std
::
endl
;
std
::
cout
<<
this
<<
" InputImageParameter::GetImage m_Image.IsNull() "
<<
m_Image
.
IsNull
()
<<
std
::
endl
;
// 2 cases : the user set a filename vs. the user set an image
// 2 cases : the user set a filename vs. the user set an image
//////////////////////// Filename case:
//////////////////////// Filename case:
if
(
!
m_FileName
.
empty
()
)
if
(
!
m_FileName
.
empty
()
)
...
@@ -104,7 +114,8 @@ InputImageParameter::GetImage()
...
@@ -104,7 +114,8 @@ InputImageParameter::GetImage()
//////////////////////// Image case:
//////////////////////// Image case:
else
else
{
{
if
(
m_Image
.
IsNull
())
std
::
cout
<<
this
<<
" GetImage<FloatVectorImageType>"
<<
std
::
endl
;
if
(
m_Image
.
IsNull
()
)
{
{
itkExceptionMacro
(
"No input image or filename detected..."
);
itkExceptionMacro
(
"No input image or filename detected..."
);
}
}
...
@@ -213,6 +224,7 @@ InputImageParameter::GetImage()
...
@@ -213,6 +224,7 @@ InputImageParameter::GetImage()
}
}
}
}
std
::
cout
<<
this
<<
" InputImageParameter::GetImage outside"
<<
std
::
endl
;
}
}
...
@@ -1632,6 +1644,7 @@ template <class TInputImage>
...
@@ -1632,6 +1644,7 @@ template <class TInputImage>
void
void
InputImageParameter
::
SetImage
(
TInputImage
*
image
)
InputImageParameter
::
SetImage
(
TInputImage
*
image
)
{
{
std
::
cout
<<
this
<<
" InputImageParameter::SetImage"
<<
std
::
endl
;
m_Image
=
image
;
m_Image
=
image
;
}
}
...
@@ -1648,9 +1661,10 @@ InputImageParameter::HasValue() const
...
@@ -1648,9 +1661,10 @@ InputImageParameter::HasValue() const
void
void
InputImageParameter
::
ClearValue
()
InputImageParameter
::
ClearValue
()
{
{
m_Image
=
ImageBaseType
::
New
();
std
::
cout
<<
this
<<
" InputImageParameter::ClearValue"
<<
std
::
endl
;
m_Reader
=
NULL
;
m_Image
=
NULL
;
m_Caster
=
NULL
;
m_Reader
=
NULL
;
m_Caster
=
NULL
;
}
}
...
...
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