21 #ifndef otbVariableLengthVectorConverter_h
22 #define otbVariableLengthVectorConverter_h
24 #include "itkProcessObject.h"
25 #include "itkVariableLengthVector.h"
26 #include "itkFixedArray.h"
27 #include "itkHistogram.h"
28 #include "itkSmartPointer.h"
45 template <
class TInputType,
class TPrecisionType =
double>
62 typedef typename itk::VariableLengthVector<OutputPrecisionType>
OutputType;
80 void PrintSelf(std::ostream& os, itk::Indent indent)
const override
82 Superclass::PrintSelf(os, indent);
83 os <<
"Attempt to use inexistent implementation of the converter!" << std::endl;
92 template <
class TInternalInputType,
class TPrecisionType>
109 typedef typename itk::VariableLengthVector<OutputPrecisionType>
OutputType;
110 typedef itk::VariableLengthVector<TInternalInputType>
InputType;
124 void PrintSelf(std::ostream& os, itk::Indent indent)
const override
126 Superclass::PrintSelf(os, indent);
127 os <<
"Attempt to use inexistent implementation of the converter!" << std::endl;
137 template <
class TInternalInputType,
class TPrecisionType>
154 typedef typename itk::VariableLengthVector<OutputPrecisionType>
OutputType;
155 typedef typename std::vector<std::vector<TInternalInputType>>
InputType;
166 void PrintSelf(std::ostream& os, itk::Indent indent)
const override
168 Superclass::PrintSelf(os, indent);
169 os <<
"Converter: std::vector<std::vector<RealType>> => VariableLengthVector<RealType>" << std::endl;
179 template <
class TInternalInputType,
class TPrecisionType>
196 typedef typename itk::VariableLengthVector<OutputPrecisionType>
OutputType;
197 typedef typename std::vector<std::vector<std::complex<TInternalInputType>>>
InputType;
208 void PrintSelf(std::ostream& os, itk::Indent indent)
const override
210 Superclass::PrintSelf(os, indent);
211 os <<
"Converter: std::vector<std::vector<std::complex<RealType>>> => VariableLengthVector<RealType>" << std::endl;
221 template <
class TInternalInputType,
unsigned int VArrayDimension,
class TPrecisionType>
238 typedef typename itk::VariableLengthVector<OutputPrecisionType>
OutputType;
239 typedef typename itk::FixedArray<TInternalInputType, VArrayDimension>
InputType;
250 void PrintSelf(std::ostream& os, itk::Indent indent)
const override
252 Superclass::PrintSelf(os, indent);
253 os <<
"Converter: itk::FixedArray<RealType, VArrayDimension> => VariableLengthVector<RealType>" << std::endl;
262 template <
class TPixel,
class TPrecisionType>
279 typedef typename itk::VariableLengthVector<OutputPrecisionType>
OutputType;
280 typedef typename itk::SmartPointer<itk::Statistics::Histogram<TPixel>>
InputType;
291 void PrintSelf(std::ostream& os, itk::Indent indent)
const override
293 Superclass::PrintSelf(os, indent);
294 os <<
"Converter: itk::Statistics::Histogram<RealType, VMeasurementVectorSize, TFrequencyContainer> => VariableLengthVector<RealType>" << std::endl;
304 #ifndef OTB_MANUAL_INSTANTIATION
itk::SmartPointer< itk::Statistics::Histogram< TPixel > > InputType
VariableLengthVectorConverter()
TPrecisionType OutputPrecisionType
itk::SmartPointer< Self > Pointer
VariableLengthVectorConverter(const Self &)=delete
itk::SmartPointer< const Self > ConstPointer
itk::VariableLengthVector< OutputPrecisionType > OutputType
itk::ProcessObject Superclass
VariableLengthVectorConverter Self
void PrintSelf(std::ostream &os, itk::Indent indent) const override
~VariableLengthVectorConverter() override
void operator=(const Self &)=delete
VariableLengthVectorConverter Self
itk::ProcessObject Superclass
std::vector< std::vector< std::complex< TInternalInputType > > > InputType
void operator=(const Self &)=delete
~VariableLengthVectorConverter() override
itk::SmartPointer< Self > Pointer
itk::VariableLengthVector< OutputPrecisionType > OutputType
TPrecisionType OutputPrecisionType
VariableLengthVectorConverter(const Self &)=delete
void PrintSelf(std::ostream &os, itk::Indent indent) const override
VariableLengthVectorConverter()
itk::SmartPointer< const Self > ConstPointer
Convert any data container type into a VariableLengthVector.
itk::SmartPointer< Self > Pointer
itk::ProcessObject Superclass
void operator=(const Self &)=delete
itk::SmartPointer< const Self > ConstPointer
void PrintSelf(std::ostream &os, itk::Indent indent) const override
VariableLengthVectorConverter(const Self &)=delete
itk::VariableLengthVector< OutputPrecisionType > OutputType
TPrecisionType OutputPrecisionType
VariableLengthVectorConverter()
OutputType Convert(InputType input)
VariableLengthVectorConverter Self
~VariableLengthVectorConverter() override
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.