Skip to content
Snippets Groups Projects
Commit e1251890 authored by Caroline Ruffel's avatar Caroline Ruffel
Browse files

nomsg

parent d0d86a0c
No related branches found
No related tags found
No related merge requests found
......@@ -18,6 +18,7 @@
#include "itkProcessObject.h"
#include "otbLineSpatialObjectList.h"
#include "itkLineSpatialObject.h"
namespace otb
{
......@@ -58,7 +59,7 @@ public:
/** Some convenient typedefs. */
typedef LineSpatialObjectList LinesListType;
typedef LinesListType::LineType LineType;
typedef typename LinesListType::LineType LineType;
/** Definition of the input and output images */
typedef typename InputImageType::PixelType InputPixelType;
......@@ -66,22 +67,22 @@ public:
/** Definition of the size of the images. */
typedef typename InputImageType::SizeType SizeType;
/** Get the list of LineSpatialObject of this process object. */
LinesListType & GetOutput(void);
/** Get the input image */
/** Set/Get the input image */
void SetInput(const InputImageType *image);
const InputImageType * GetInput(void);
/** Set/Get the list of LineSpatialObject of this process object. */
void SetOutput(const LinesListType *list);
LinesListType * GetOutput(void);
protected:
ImageToLineSpatialObjectListFilter();
virtual ~ImageToLineSpatialObjectListFilter() {}
void PrintSelf(std::ostream& os, itk::Indent indent) const;
LinesListType m_OutputLinesList;
private:
......
......@@ -25,7 +25,10 @@ ImageToLineSpatialObjectListFilter<TInputImage>::ImageToLineSpatialObjectListFil
{
this->SetNumberOfRequiredInputs(1);
this->SetNumberOfRequiredOutputs(1);
m_OutputLinesList.clear();
typename LinesListType::Pointer list = LinesListType::New();
this->SetOutput( list );
}
template <class TInputImage>
......@@ -46,15 +49,28 @@ ImageToLineSpatialObjectListFilter<TInputImage>
return static_cast<const InputImageType *>
(this->itk::ProcessObject::GetInput(0) );
}
template<class TInputImage>
typename ImageToLineSpatialObjectListFilter<TInputImage>::LinesListType &
ImageToLineSpatialObjectListFilter<TInputImage>::GetOutput(void)
{
return(m_OutputLinesList);
template <class TInputImage>
void
ImageToLineSpatialObjectListFilter<TInputImage>
::SetOutput(const LinesListType *list)
{
this->itk::ProcessObject::SetNthOutput(0,
const_cast< LinesListType * >( list ) );
}
template <class TInputImage>
typename ImageToLineSpatialObjectListFilter<TInputImage>::LinesListType *
ImageToLineSpatialObjectListFilter<TInputImage>
::GetOutput(void)
{
return static_cast<LinesListType *>
(this->itk::ProcessObject::GetOutput(0) );
}
/**
*
*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment