52 #ifndef __PCL_LocalNormalizationData_h
53 #define __PCL_LocalNormalizationData_h
69 class PCL_CLASS XMLDocument;
70 class PCL_CLASS XMLElement;
181 Parse( filePath, ignoreNormalizationData );
205 Parse( xml, ignoreNormalizationData );
229 Parse( element, ignoreNormalizationData );
248 return m_referenceFilePath;
278 return m_targetFilePath;
324 return m_referenceWidth;
335 return m_referenceHeight;
346 m_referenceWidth = width;
347 m_referenceHeight = height;
357 return m_A.NumberOfChannels();
426 if ( A.Bounds() != B.Bounds() )
427 throw Error(
"LocalNormalizationData::SetLocalNormalizationParameters(): Incompatible matrix dimensions." );
428 if ( A.NumberOfChannels() != B.NumberOfChannels() )
429 throw Error(
"LocalNormalizationData::SetLocalNormalizationParameters(): Incompatible number of normalization matrices." );
434 if ( C.Length() != A.NumberOfChannels() )
435 throw Error(
"LocalNormalizationData::SetLocalNormalizationParameters(): Incompatible bias vector length." );
499 throw Error(
"LocalNormalizationData::SetGlobalNormalizationParameters(): No zero offset coefficient matrix has been defined." );
500 if ( Rc.
Length() != m_B.NumberOfChannels() || Tc.
Length() != m_B.NumberOfChannels() || S.Length() != m_B.NumberOfChannels() )
501 throw Error(
"LocalNormalizationData::SetGlobalNormalizationParameters(): Incompatible vector lengths." );
529 throw Error(
"LocalNormalizationData::SetRelativeScaleFactors(): No zero offset coefficient matrix has been defined." );
530 if ( s.
Length() != m_B.NumberOfChannels() )
531 throw Error(
"LocalNormalizationData::SetRelativeScaleFactors(): Incompatible vector lengths." );
561 return !m_UA.IsEmpty() && !m_UB.IsEmpty();
591 if ( likely( m_S.IsEmpty() ) )
592 return m_UA[c]( sx, sy )*(z - m_C[c]) + m_UB[c]( sx, sy );
593 return (m_UA[c]( sx, sy )*(z - m_C[c]) + m_UB[c]( sx, sy ) - m_Tc[c])*m_S[c] + m_Rc[c];
602 return m_creationTime;
631 void Parse(
const String& filePath,
bool ignoreNormalizationData =
false );
691 return m_compressionEnabled;
701 m_compressionEnabled = enable;
711 EnableCompression( !disable );
781 String m_referenceFilePath;
784 int m_referenceWidth = -1;
785 int m_referenceHeight = -1;
798 bool m_compressionEnabled =
true;
800 bool m_invalid =
false;
Bicubic B-Spline Interpolation Algorithm.
A simple exception with an associated error message.
static String FullPath(const String &path)
Implements a generic, two-dimensional, shared or local image.
typename pixel_traits::sample sample
Generic vector of arbitrary length.
int Length() const noexcept
Normalization data parser and generator.
int ReferenceWidth() const
LocalNormalizationData(const LocalNormalizationData &)=default
void SetReferenceDimensions(int width, int height)
const normalization_matrices & ZeroOffset() const
void SetRelativeScaleFactors(const Vector &s)
void EnableCompression(bool enable=true)
void SetGlobalNormalizationParameters(const Vector &Rc, const Vector &Tc, const Vector &S)
XMLDocument * Serialize() const
void SetReferenceFilePath(const String &filePath)
int NormalizationScale() const
LocalNormalizationData(const XMLElement &element, bool ignoreNormalizationData=false)
const Vector & RelativeScaleFactors() const
void SetNormalizationScale(int scale)
int NumberOfChannels() const
void SetTargetFilePath(const String &filePath)
LocalNormalizationData()=default
void DisableCompression(bool disable=true)
const Vector & GlobalTargetLocation() const
void Parse(const XMLDocument &xml, bool ignoreNormalizationData=false)
void Parse(const XMLElement &element, bool ignoreNormalizationData=false)
void SetLocalNormalizationParameters(const normalization_matrices &A, const normalization_matrices &B, const Vector &C=Vector())
void InitInterpolations()
void SetVersion(int version)
const String & ReferenceFilePath() const
const normalization_matrices & Scale() const
const String & TargetFilePath() const
virtual ~LocalNormalizationData()
const Vector & GlobalScalingFactors() const
LocalNormalizationData(const String &filePath, bool ignoreNormalizationData=false)
void Parse(const String &filePath, bool ignoreNormalizationData=false)
LocalNormalizationData(LocalNormalizationData &&)=default
bool IsTaggedAsInvalid() const
TimePoint CreationTime() const
const Vector & Bias() const
double operator()(double z, int x, int y, int c=0) const
bool IsCompressionEnabled() const
normalization_matrices::sample normalization_coefficient
const Vector & GlobalReferenceLocation() const
LocalNormalizationData(const XMLDocument &xml, bool ignoreNormalizationData=false)
void SerializeToFile(const String &path) const
int ReferenceHeight() const
bool HasInterpolations() const
An instant in any timescale.
XML document parsing and generation