21 #ifndef otbImageToVectorImageCastFilter_h
22 #define otbImageToVectorImageCastFilter_h
24 #include "itkUnaryFunctorImageFilter.h"
25 #include "itkVariableLengthVector.h"
40 template <
class TInput,
class TOutput>
59 return (*
this != other);
78 template <
class TInputImage,
class TOutputVectorImage>
80 :
public itk::UnaryFunctorImageFilter<TInputImage, TOutputVectorImage,
81 Functor::VectorCast<typename TInputImage::PixelType, typename TOutputVectorImage::PixelType>>
86 typedef itk::UnaryFunctorImageFilter<TInputImage, TOutputVectorImage,
110 Superclass::GenerateOutputInformation();
111 this->GetOutput()->SetNumberOfComponentsPerPixel(1);
116 if (this->GetInput())
118 typename TInputImage::Pointer input =
const_cast<TInputImage*
>(this->GetInput());
119 typename TInputImage::RegionType inputRegion;
120 this->CallCopyOutputRegionToInputRegion(inputRegion, this->GetOutput()->GetRequestedRegion());
121 input->SetRequestedRegion(inputRegion);
This functor can be used to convert scalar value to VariableLengthVector with another precision a siz...
bool operator!=(const VectorCast &) const
TOutput::ValueType OutputValueType
bool operator==(const VectorCast &other) const
TOutput operator()(const TInput &A)
This is a helper class that convert an otb::Image into a single-channel otb::VectorImage.
itk::UnaryFunctorImageFilter< TInputImage, TOutputVectorImage, Functor::VectorCast< typename TInputImage::PixelType, typename TOutputVectorImage::PixelType > > Superclass
itk::SmartPointer< const Self > ConstPointer
~ImageToVectorImageCastFilter() override
Detructor.
ImageToVectorImageCastFilter()
Constructor.
ImageToVectorImageCastFilter Self
Standard class typedefs.
void operator=(const Self &)=delete
void GenerateInputRequestedRegion(void) override
Copy output requested region to input requested region.
ImageToVectorImageCastFilter(const Self &)=delete
void GenerateOutputInformation(void) override
Additional output information for allocation.
itk::SmartPointer< Self > Pointer
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.