52 #ifndef __PCL_LocalNormalizationData_h 53 #define __PCL_LocalNormalizationData_h 69 class PCL_CLASS XMLDocument;
70 class PCL_CLASS XMLElement;
171 Parse( filePath, ignoreNormalizationData );
195 Parse( xml, ignoreNormalizationData );
219 Parse( element, ignoreNormalizationData );
238 return m_referenceFilePath;
268 return m_targetFilePath;
314 return m_referenceWidth;
325 return m_referenceHeight;
336 m_referenceWidth = width;
337 m_referenceHeight = height;
347 return m_A.NumberOfChannels();
373 const normalization_matrices&
Scale()
const 394 if ( A.Bounds() != B.Bounds() || A.NumberOfChannels() != B.NumberOfChannels() )
395 throw Error(
"LocalNormalizationData::SetNormalizationMatrices(): Incompatible matrix dimensions." );
418 void InitInterpolations();
426 return !m_UA.IsEmpty() && !m_UB.IsEmpty();
455 return m_UA[c]( sx, sy )*z + m_UB[c]( sx, sy );
464 return m_creationTime;
493 void Parse(
const String& filePath,
bool ignoreNormalizationData =
false );
516 void Parse(
const XMLDocument& xml,
bool ignoreNormalizationData =
false );
539 void Parse(
const XMLElement& element,
bool ignoreNormalizationData =
false );
553 return m_compressionEnabled;
563 m_compressionEnabled = enable;
573 EnableCompression( !disable );
593 void SerializeToFile(
const String& path )
const;
597 String m_referenceFilePath;
600 int m_referenceWidth = -1;
601 int m_referenceHeight = -1;
602 normalization_matrices m_A;
603 normalization_matrices m_B;
604 matrix_interpolations m_UA;
605 matrix_interpolations m_UB;
609 bool m_compressionEnabled =
true;
611 void ParseNormalizationMatrices( normalization_matrices&,
const XMLElement& )
const;
612 void SerializeNormalizationMatrices(
XMLElement*,
const normalization_matrices& )
const;
619 #endif // __PCL_LocalNormalizationData_h const normalization_matrices & Scale() const
LocalNormalizationData(const XMLElement &element, bool ignoreNormalizationData=false)
An instant in any timescale.
double operator()(double z, int x, int y, int c=0) const
LocalNormalizationData(const XMLDocument &xml, bool ignoreNormalizationData=false)
Array< matrix_interpolation > matrix_interpolations
DImage normalization_matrices
int NormalizationScale() const
XML document parsing and generation
void SetReferenceDimensions(int width, int height)
virtual ~LocalNormalizationData()
int ReferenceHeight() const
bool IsCompressionEnabled() const
Bicubic B-Spline Interpolation Algorithm.
TimePoint CreationTime() const
const normalization_matrices & ZeroOffset() const
const String & ReferenceFilePath() const
int ReferenceWidth() const
64-bit floating point real image.
LocalNormalizationData(const String &filePath, bool ignoreNormalizationData=false)
BicubicBSplineInterpolation< normalization_coefficient > matrix_interpolation
void SetReferenceFilePath(const String &filePath)
void SetTargetFilePath(const String &filePath)
void SetNormalizationScale(int scale)
A simple exception with an associated error message.
void EnableCompression(bool enable=true)
Normalization data parser and generator.
normalization_matrices::sample normalization_coefficient
int NumberOfChannels() const
bool HasInterpolations() const
static String FullPath(const String &path)
void DisableCompression(bool disable=true)
const String & TargetFilePath() const
void SetNormalizationMatrices(const normalization_matrices &A, const normalization_matrices &B)