![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
#include <Annotaion.h>
Public Member Functions | |
| Annotation (const std::vector< int > &slice, std::string type_) | |
| Annotation construct from slice which load from label file. More... | |
| Annotation (const BoxLabel &label, bool visible_=true, bool lock_=false) | |
| Annotation construct from boxlabel which load from label file. More... | |
| Annotation (const PointCloudI::Ptr cloud, std::vector< int > &slice, std::string type_) | |
| Annotation construct from part of cloud points. More... | |
| ~Annotation () | |
| BoxLabel | getBoxLabel () |
| getBoxLabel get boxLabel from annotaion tranformation More... | |
| void | applyTransform (vtkSmartPointer< vtkTransform > t) |
| apply transform to annotation More... | |
| void | picked (vtkRenderWindowInteractor *interactor) |
| enter picked state, show boxwidget which allow to adjust annotation More... | |
| void | unpicked () |
| disable boxWidget More... | |
| void | adjustToAnchor () |
| keep current orientation, re-compute the center and scale to make annotation fit to selected point well enough More... | |
| void | setType (const std::string value) |
| change the type of annotation, and color too More... | |
| vtkSmartPointer< vtkActor > | getActor () const |
| std::string | getType () const |
| const std::vector< int > & | getSlice () const |
Static Public Member Functions | |
| static std::vector< std::string > * | GetTypes () |
| get types vector pointer More... | |
| static std::size_t | GetTypeIndex (std::string type_) |
| GetTypeIndex auto add to vector map if has not. More... | |
| static std::string | GetTypeByIndex (size_t index) |
| GetTypeByIndex auto add to vector map if has not. More... | |
| static void | ComputeOBB (const PointCloudI::Ptr cloud, std::vector< int > &slice, double p1[3], double p2[3]) |
| ComputeOBB compute max,min [x,y,z] aligned to xyz axis. More... | |
Protected Member Functions | |
| void | initial () |
| void | colorAnnotation (int color_index=-1) |
| color the annotation with given color More... | |
| void | setAnchorPoint (const PointCloudI::Ptr cloud, const std::vector< int > &slice) |
| copy selected points as anchor to current annotation More... | |
| double | computeScaleAndCenterShift (double o[3], double scs[2]) |
| computeScaleAndCenterShift More... | |
Static Protected Attributes | |
| static std::vector< std::string > * | types = nullptr |
| types all annotation type here More... | |
Definition at line 68 of file Annotaion.h.
| Annotation::Annotation | ( | const std::vector< int > & | slice, |
| std::string | type_ | ||
| ) |
Annotation construct from slice which load from label file.
| slice | |
| type_ |
Definition at line 43 of file Annotaion.cpp.
References type.
| Annotation::Annotation | ( | const BoxLabel & | label, |
| bool | visible_ = true, |
||
| bool | lock_ = false |
||
| ) |
Annotation construct from boxlabel which load from label file.
| label | |
| visible_ | |
| lock_ |
Definition at line 52 of file Annotaion.cpp.
References applyTransform(), BoxLabel::detail, initial(), Pi, and BoxLabel::type.
| Annotation::Annotation | ( | const PointCloudI::Ptr | cloud, |
| std::vector< int > & | slice, | ||
| std::string | type_ | ||
| ) |
Annotation construct from part of cloud points.
| cloud | |
| slice | |
| type_ |
Definition at line 73 of file Annotaion.cpp.
References applyTransform(), ComputeOBB(), BoxLabel::detail, initial(), Pi, and setAnchorPoint().
| Annotation::~Annotation | ( | ) |
Definition at line 104 of file Annotaion.cpp.
| void Annotation::adjustToAnchor | ( | ) |
keep current orientation, re-compute the center and scale to make annotation fit to selected point well enough
Definition at line 283 of file Annotaion.cpp.
References applyTransform(), computeScaleAndCenterShift(), cloudViewer::ml::contrib::Cross(), x, y, and z.
Referenced by vtkBoxWidgetCallback1::Execute().
| void Annotation::applyTransform | ( | vtkSmartPointer< vtkTransform > | t | ) |
apply transform to annotation
| t |
Definition at line 231 of file Annotaion.cpp.
Referenced by adjustToAnchor(), Annotation(), and vtkBoxWidgetCallback0::Execute().
|
protected |
color the annotation with given color
| color_index | if color_index>=0,refer to pcl::GlasbeyLUT otherwise use color already mapped by type |
Definition at line 123 of file Annotaion.cpp.
References ecvColor::LookUpTable::at(), ecvColor::RgbTpl< Type >::b, color_index, ecvColor::RgbTpl< Type >::g, GetTypeIndex(), and ecvColor::RgbTpl< Type >::r.
|
static |
ComputeOBB compute max,min [x,y,z] aligned to xyz axis.
| cloud | |
| slice | |
| p1 | min [x,y,z] |
| p2 | max [x,y,z] |
Definition at line 381 of file Annotaion.cpp.
Referenced by Annotation().
|
protected |
computeScaleAndCenterShift
| o | direction |
| scs | ["scale", "center shift"] |
Definition at line 335 of file Annotaion.cpp.
Referenced by adjustToAnchor().
| vtkSmartPointer< vtkActor > Annotation::getActor | ( | ) | const |
Definition at line 333 of file Annotaion.cpp.
Referenced by Annotaions::add(), Annotaions::getAnnotationIndex(), Annotaions::remove(), and Annotaions::updateBalloonByAnno().
| BoxLabel Annotation::getBoxLabel | ( | ) |
getBoxLabel get boxLabel from annotaion tranformation
Definition at line 215 of file Annotaion.cpp.
References BoxLabel::data, BoxLabel::detail, Pi, and BoxLabel::type.
| const std::vector< int > & Annotation::getSlice | ( | ) | const |
Definition at line 322 of file Annotaion.cpp.
Referenced by PclAnnotationTool::keyboardEventProcess(), and Annotaions::updateLabels().
| std::string Annotation::getType | ( | ) | const |
Definition at line 320 of file Annotaion.cpp.
Referenced by Annotaions::add(), PclAnnotationTool::changeAnnotationType(), PclAnnotationTool::keyboardEventProcess(), and Annotaions::updateLabels().
|
static |
GetTypeByIndex auto add to vector map if has not.
| index |
Definition at line 372 of file Annotaion.cpp.
References types.
Referenced by Annotaions::loadAnnotations().
|
static |
GetTypeIndex auto add to vector map if has not.
| type_ |
Definition at line 362 of file Annotaion.cpp.
References types.
Referenced by colorAnnotation(), PclAnnotationTool::initAnnotationLabels(), and Annotaions::updateLabels().
|
static |
get types vector pointer
Definition at line 354 of file Annotaion.cpp.
References types.
Referenced by PclAnnotationTool::getAnnotationLabels(), PclAnnotationTool::initAnnotationLabels(), and Annotaions::release().
|
protected |
Definition at line 112 of file Annotaion.cpp.
References colorAnnotation().
Referenced by Annotation().
| void Annotation::picked | ( | vtkRenderWindowInteractor * | interactor | ) |
enter picked state, show boxwidget which allow to adjust annotation
| interactor |
Definition at line 240 of file Annotaion.cpp.
Referenced by PclAnnotationTool::pickedEventProcess().
|
protected |
copy selected points as anchor to current annotation
| cloud | |
| slice |
Definition at line 167 of file Annotaion.cpp.
Referenced by Annotation().
| void Annotation::setType | ( | const std::string | value | ) |
change the type of annotation, and color too
| value |
Definition at line 324 of file Annotaion.cpp.
References colorAnnotation().
| void Annotation::unpicked | ( | ) |
disable boxWidget
Definition at line 277 of file Annotaion.cpp.
Referenced by PclAnnotationTool::pickedEventProcess().
|
staticprotected |
types all annotation type here
Definition at line 224 of file Annotaion.h.
Referenced by GetTypeByIndex(), GetTypeIndex(), GetTypes(), and Annotaions::release().