105 float l =
sqrt(d[0]*d[0]+d[1]*d[1]+d[2]*d[2]);
116 template<
class T,
int N>
118 throw utils::ICLException(
"static feature "+fname+
" is not supported by this PointCloudObjectBase instance");
124 throw utils::ICLException(
"dynamic feature "+featureName+
" is not supported by this PointCloudObjectBase instance");
129 virtual void drawNormalLines();
172 setLockingEnabled(
true);
173 m_defaultPointColor =
GeomColor(0,0.5,1,1);
174 useDrawNormalLines=
false;
176 useTriangulation=
false;
191 virtual bool supports(FeatureType t)
const = 0;
207 virtual bool isOrganized()
const = 0;
213 virtual int getDim()
const = 0;
299 return const_cast<PointCloudObjectBase*>(
this)->select(featureName);
308 void extractColorsToImage(
core::ImgBase &image,
bool withAlpha=
false)
const ;
318 return std::vector<std::string>();
328 virtual void customRender();
331 void setUseDrawNormalLines(
bool use,
float lineLength=40,
int granularity=4);
337 void setUseTriangulation(
bool use,
float maxDelta=50);
352 bool compareOnlySharedFeatures=
false,
353 bool allowDifferentColorTypes=
true,
354 float tollerance=1.0e-5)
const;
357 std::map<std::string,std::string> &getMetaData();
360 const std::map<std::string,std::string> &getMetaData()
const;
363 const std::string &getMetaData(
const std::string &key)
const ;
366 bool hasMetaData(
const std::string &key)
const;
369 bool hasAnyMetaData()
const;
372 void setMetaData(
const std::string &key,
const std::string &value);
375 void clearAllMetaData();
378 void clearMetaData(
const std::string &key);
381 std::vector<std::string> getAllMetaDataEntries()
const;
ICLQt_API ImgQ sqrt(const ImgQ &image)
calls sqrt( each pixel)
core::DataSegment< T, N > & error(const std::string &fname)
internally used utility method that throws verbose exceptions
Definition: PointCloudObjectBase.h:117
std::map< std::string, std::string > m_metaData
internal map of meta data
Definition: PointCloudObjectBase.h:113
const core::DataSegment< float, 1 > selectDepth() const
const intensity data
Definition: PointCloudObjectBase.h:277
virtual core::DataSegment< float, 4 > selectRGBA32f()
well known feature RGBA (4 float values, ordred RGBA)
Definition: PointCloudObjectBase.h:258
const core::DataSegment< icl8u, 4 > selectBGRA() const
const rgba data
Definition: PointCloudObjectBase.h:286
undocument this line if you encounter any issues!
Definition: Any.h:37
core::Img8u maskImage
Definition: PointCloudObjectBase.h:136
const core::DataSegmentBase select(const std::string &featureName) const
const dynamic/custom data
Definition: PointCloudObjectBase.h:298
Base class for point cloud data types.
Definition: PointCloudObjectBase.h:98
virtual GeomColor getDefaultVertexColor() const
implements the SceneObject's virtual getter function for this feature
Definition: PointCloudObjectBase.h:314
bool useTexturing
Definition: PointCloudObjectBase.h:139
core::DataSegmentBase & error_dyn(const std::string &featureName)
internally used utility method that throws verbose exceptions
Definition: PointCloudObjectBase.h:123
virtual const utils::Time & getTime() const
returns the current timestamp
Definition: PointCloudObjectBase.h:188
void setDim(int dim)
sets the number of contained points (and enables the unorganized mode)
Definition: PointCloudObjectBase.h:225
#define ICLGeom_API
Definition: CompatMacros.h:179
utils::Time timestamp
timestamp associated with the point cloud
Definition: PointCloudObjectBase.h:100
ICL Time class (taken from the Ice lib)
Definition: Time.h:52
virtual core::DataSegment< icl32s, 1 > selectLabel()
well known feature Intensity (single 32bit int values)
Definition: PointCloudObjectBase.h:242
virtual core::DataSegment< icl8u, 4 > selectBGRA()
well known feature Intensity (four byte vectors ordered BGRA)
Definition: PointCloudObjectBase.h:248
virtual core::DataSegmentBase select(const std::string &featureName)
dynamic feature selection function
Definition: PointCloudObjectBase.h:263
const core::DataSegment< float, 4 > selectNormal() const
const normals data
Definition: PointCloudObjectBase.h:292
PointCloudObjectBase()
Default constructor.
Definition: PointCloudObjectBase.h:171
const core::DataSegment< float, 4 > selectRGBA32f() const
const rgba32f data
Definition: PointCloudObjectBase.h:295
virtual bool canAddFeature(FeatureType t) const
interface function for dynamic Point cloud types that can dynamically add features
Definition: PointCloudObjectBase.h:195
const core::DataSegment< icl8u, 3 > selectBGR() const
const bgr data
Definition: PointCloudObjectBase.h:283
[float x,y,z, padding]
Definition: PointCloudObjectBase.h:161
[uchar b,g,r, alpha]
Definition: PointCloudObjectBase.h:157
virtual std::vector< std::string > getSupportedDynamicFeatures() const
For subclasses that provide Dynamic features, this function must be implemented.
Definition: PointCloudObjectBase.h:317
virtual core::DataSegment< icl8u, 3 > selectBGR()
well known feature Intensity (three byte vectors ordered BGR)
Definition: PointCloudObjectBase.h:245
Abstract data segment class.
Definition: DataSegmentBase.h:99
int normalLineGranularity
Definition: PointCloudObjectBase.h:133
virtual core::DataSegment< float, 3 > selectXYZ()
well know features XYZ (three floats, this feature must usually be available)
Definition: PointCloudObjectBase.h:230
virtual core::DataSegment< float, 4 > selectNormal()
well known feature Normal (4 float values)
Definition: PointCloudObjectBase.h:255
virtual void setTime(const utils::Time &t)
sets the current timestamp
Definition: PointCloudObjectBase.h:185
static float length(Vec d)
Definition: PointCloudObjectBase.h:104
FeatureType
List of well known features.
Definition: PointCloudObjectBase.h:150
virtual core::DataSegment< float, 4 > selectXYZH()
common way to store XYZ-data (4th float define homogeneous part)
Definition: PointCloudObjectBase.h:233
ICLGeom_API std::ostream & operator<<(std::ostream &os, const Camera &cam)
ostream operator (writes camera in XML core::format)
Size class of the ICL.
Definition: Size.h:61
[float nx,ny,nz,curvature]
Definition: PointCloudObjectBase.h:163
const core::DataSegment< float, 1 > selectIntensity() const
const intensity data
Definition: PointCloudObjectBase.h:274
virtual void addFeature(FeatureType t)
interface for adding a feature to an existing point cloud instance
Definition: PointCloudObjectBase.h:202
virtual core::DataSegment< float, 1 > selectIntensity()
well known feature Intensity (single float values)
Definition: PointCloudObjectBase.h:236
bool useDrawNormalLines
Definition: PointCloudObjectBase.h:131
bgra packed as one icl32s
Definition: PointCloudObjectBase.h:158
single float depth value (interpretation suggestion: dist to camera center)
Definition: PointCloudObjectBase.h:154
const core::DataSegment< float, 3 > selectXYZ() const
const xyz data
Definition: PointCloudObjectBase.h:268
GeomColor m_defaultPointColor
default color used to render points that have no color information
Definition: PointCloudObjectBase.h:110
virtual PointCloudObjectBase * copy() const
deep copy interface (needs to be implemented by subclasses)
Definition: PointCloudObjectBase.h:343
core::DataSegment< float, 2 > textureCoordinates
Definition: PointCloudObjectBase.h:141
const core::DataSegment< icl32s, 1 > selectBGRA32s() const
const bgra32s data
Definition: PointCloudObjectBase.h:289
scalar components 4 bytes each!
Definition: PointCloudObjectBase.h:152
core::Color4D32f GeomColor
color for geometry primitives
Definition: GeomDefs.h:45
ICLQt_API void color(float r, float g=-1, float b=-1, float alpha=255)
sets the current color to given r,g,b,alpha value
virtual core::DataSegment< float, 1 > selectDepth()
well known feature Depth (single float values)
Definition: PointCloudObjectBase.h:239
single int32 label
Definition: PointCloudObjectBase.h:153
Base class for Exception handling in the ICL.
Definition: Exception.h:42
[uchar b,g,r, padding]
Definition: PointCloudObjectBase.h:156
float maxDeltaValue
Definition: PointCloudObjectBase.h:138
[float r,g,b,a ]
Definition: PointCloudObjectBase.h:164
bool useMasking
Definition: PointCloudObjectBase.h:135
float normalLineLength
Definition: PointCloudObjectBase.h:132
The DataSegment class defines a strided data segment (or 1D or 2D ordred array of vectors)
Definition: DataSegment.h:147
virtual core::DataSegment< icl32s, 1 > selectBGRA32s()
well known feature Intensity (single int value encoding byte-wise BGRA)
Definition: PointCloudObjectBase.h:251
ImgBase is the Image-Interface class that provides save access to underlying Img-template .
Definition: ImgBase.h:131
const core::DataSegment< float, 4 > selectXYZH() const
const xyzh data
Definition: PointCloudObjectBase.h:271
The SceneObject class defines visible objects in scenes or scene graph nodes.
Definition: SceneObject.h:140
bool useTriangulation
Definition: PointCloudObjectBase.h:137
core::Img8u textureImage
Definition: PointCloudObjectBase.h:140
const core::DataSegment< icl32s, 1 > selectLabel() const
const label data
Definition: PointCloudObjectBase.h:280
[float x,y,z, homogenous part]
Definition: PointCloudObjectBase.h:162