ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
ExtractSIFT Class Reference

SIFT keypoints extraction. More...

#include <ExtractSIFT.h>

Inheritance diagram for ExtractSIFT:
Collaboration diagram for ExtractSIFT:

Public Member Functions

 ExtractSIFT ()
 
virtual ~ExtractSIFT ()
 
virtual int compute ()
 Performs the actual filter job. More...
 
- Public Member Functions inherited from BasePclModule
 BasePclModule (PclModuleDescription desc=PclModuleDescription(), ccPluginInterface *parent_plugin=0)
 Default constructor. More...
 
QAction * getAction ()
 Get the action associated with the button used in menu and toolbar creation. More...
 
QString getStatusTip () const
 Returns the status tip. More...
 
QString getModuleName () const
 Returns the name of the filter. More...
 
QString getEntryName () const
 Returns the entry name. More...
 
QIcon getIcon () const
 Returns the icon associated with the button. More...
 
void setShowProgressBar (bool status)
 Sets whether to show a progressbar while computing or not. More...
 
std::vector< std::string > getSelectedAvailableScalarFields ()
 
ccPointCloudgetSelectedEntityAsCCPointCloud () const
 Returns the first selected entity as a ccPointCloud. More...
 
ccHObjectgetSelectedEntityAsCCHObject () const
 Returns the first selected entity as a ccHObject. More...
 
ccHObject::Container getSelectedThatHaveMetaData (const QString key) const
 Get selected object that also have the provided metadata key. More...
 
void getAllEntitiesOfType (CV_CLASS_ENUM type, ccHObject::Container &entities)
 Returns all the objects in db tree of type "type". More...
 
void getAllEntitiesThatHaveMetaData (QString key, ccHObject::Container &entities)
 
void getSelectedEntitiesThatAreCCPointCloud (ccHObject::Container &entities)
 get all entities that are selected and that also are cc_point_cloud More...
 
void getSelectedEntitiesThatAre (CV_CLASS_ENUM kind, ccHObject::Container &entities)
 
int hasSelectedRGB ()
 Returns 1 if the first selected entity has RGB info. More...
 
int hasSelectedScalarField ()
 Returns 1 if the first selected entity has at least one scalar field. More...
 
int hasSelectedScalarField (std::string field_name)
 
int isFirstSelectedCcPointCloud ()
 Returns 1 if the first selected object is a ccPointCloud. More...
 
virtual void updateSelectedEntities (const ccHObject::Container &selectedEntities)
 Updates the internal copy of selected entities. More...
 
void setMainAppInterface (ecvMainAppInterface *app)
 Sets associated CC application interface (to access DB) More...
 
ecvMainAppInterfacegetMainAppInterface ()
 
ccPluginInterfacegetParentPlugin () const
 Returns the associated parent plugin interface. More...
 

Protected Types

enum  Modes { RGB , SCALAR_FIELD }
 

Protected Member Functions

virtual int checkSelected ()
 Checks if current selection is compliant with the filter. More...
 
virtual int openInputDialog ()
 
virtual void getParametersFromDialog ()
 Collects parameters from the filter dialog (if openDialog is successful) More...
 
virtual int checkParameters ()
 
virtual QString getErrorMessage (int errorCode)
 Returns the error message corresponding to a given error code. More...
 
- Protected Member Functions inherited from BasePclModule
virtual int openOutputDialog ()
 
virtual int start ()
 Starts computation. More...
 
virtual void initAction ()
 Initializes the corresponding action. More...
 
void throwError (int errCode)
 

Protected Attributes

SIFTExtractDlgm_dialog
 
int m_nr_octaves
 
float m_min_scale
 
int m_nr_scales_per_octave
 
float m_min_contrast
 
bool m_use_min_contrast
 
QString m_field_to_use
 
std::string m_field_to_use_no_space
 
Modes m_mode
 
- Protected Attributes inherited from BasePclModule
QAction * m_action
 Forces the Ui to be updated. More...
 
ccHObject::Container m_selected
 Pointer to the main window. More...
 
PclModuleDescription m_desc
 Associated dialog. More...
 
ecvMainAppInterfacem_app
 Associated application interface. More...
 
ccPluginInterfacem_parent_plugin
 associated parent plugin of the filter More...
 
bool m_show_progress
 Do we want to show a progress bar when the filter works? More...
 

Additional Inherited Members

- Signals inherited from BasePclModule
void entityHasChanged (ccHObject *)
 Signal emitted when an entity is (visually) modified. More...
 
void newEntity (ccHObject *)
 Signal emitted when a new entity is created by the filter. More...
 
void newErrorMessage (QString)
 Signal emitted when a new error message is produced. More...
 
- Protected Slots inherited from BasePclModule
int performAction ()
 Returns is called when the dialog window is accepted. More...
 

Detailed Description

SIFT keypoints extraction.

Definition at line 18 of file ExtractSIFT.h.

Member Enumeration Documentation

◆ Modes

enum ExtractSIFT::Modes
protected
Enumerator
RGB 
SCALAR_FIELD 

Definition at line 43 of file ExtractSIFT.h.

Constructor & Destructor Documentation

◆ ExtractSIFT()

ExtractSIFT::ExtractSIFT ( )

Definition at line 29 of file ExtractSIFT.cpp.

◆ ~ExtractSIFT()

ExtractSIFT::~ExtractSIFT ( )
virtual

Definition at line 44 of file ExtractSIFT.cpp.

References m_dialog.

Member Function Documentation

◆ checkParameters()

int ExtractSIFT::checkParameters ( )
protectedvirtual

Checks that the parameters retrieved by getParametersFromDialog are valid Automatically called by performAction. Does nothing by default. Must be overridden if necessary.

Returns
1 if parameters are valid (error code otherwise)

Reimplemented from BasePclModule.

Definition at line 117 of file ExtractSIFT.cpp.

References m_min_contrast, m_min_scale, m_nr_octaves, m_nr_scales_per_octave, and m_use_min_contrast.

◆ checkSelected()

int ExtractSIFT::checkSelected ( )
protectedvirtual

Checks if current selection is compliant with the filter.

If not, an error is returned and computation stops. By default, baseclass method simply checks that selection is composed of one and only one ccPointCloud. This method should be overridden if necessary.

Returns
1 if selection is compliant (error code otherwise)

Reimplemented from BasePclModule.

Definition at line 49 of file ExtractSIFT.cpp.

References BasePclModule::hasSelectedRGB(), BasePclModule::hasSelectedScalarField(), and BasePclModule::isFirstSelectedCcPointCloud().

◆ compute()

◆ getErrorMessage()

QString ExtractSIFT::getErrorMessage ( int  errorCode)
protectedvirtual

Returns the error message corresponding to a given error code.

Each filter have a set of possible error message to be used given bt getFilterErrorMessage() Baseclass implementation provides some generic messages.

Note
These messages can be replaced by re-implementing this method and handling the same codes BEFORE calling the baseclass method

Reimplemented from BasePclModule.

Definition at line 239 of file ExtractSIFT.cpp.

References BasePclModule::getErrorMessage().

◆ getParametersFromDialog()

void ExtractSIFT::getParametersFromDialog ( )
protectedvirtual

Collects parameters from the filter dialog (if openDialog is successful)

Automatically called by performAction. Does nothing by default. Must be overridden if necessary.

Reimplemented from BasePclModule.

Definition at line 90 of file ExtractSIFT.cpp.

References m_dialog, m_field_to_use, m_field_to_use_no_space, m_min_contrast, m_min_scale, m_mode, m_nr_octaves, m_nr_scales_per_octave, m_use_min_contrast, RGB, and SCALAR_FIELD.

◆ openInputDialog()

int ExtractSIFT::openInputDialog ( )
protectedvirtual

Opens the input dialog window. Where the user can supply parameters for the computation Automatically called by performAction. Does nothing by default. Must be overridden if a dialog must be displayed.

Returns
1 if dialog has been successfully executed, 0 if canceled, negative error code otherwise

Reimplemented from BasePclModule.

Definition at line 64 of file ExtractSIFT.cpp.

References fields, ecvMainAppInterface::getActiveWindow(), BasePclModule::getSelectedAvailableScalarFields(), BasePclModule::hasSelectedRGB(), BasePclModule::m_app, m_dialog, and SIFTExtractDlg::updateComboBox().

Member Data Documentation

◆ m_dialog

SIFTExtractDlg* ExtractSIFT::m_dialog
protected

Definition at line 34 of file ExtractSIFT.h.

Referenced by getParametersFromDialog(), openInputDialog(), and ~ExtractSIFT().

◆ m_field_to_use

QString ExtractSIFT::m_field_to_use
protected

Definition at line 40 of file ExtractSIFT.h.

Referenced by compute(), and getParametersFromDialog().

◆ m_field_to_use_no_space

std::string ExtractSIFT::m_field_to_use_no_space
protected

Definition at line 41 of file ExtractSIFT.h.

Referenced by compute(), and getParametersFromDialog().

◆ m_min_contrast

float ExtractSIFT::m_min_contrast
protected

Definition at line 38 of file ExtractSIFT.h.

Referenced by checkParameters(), compute(), and getParametersFromDialog().

◆ m_min_scale

float ExtractSIFT::m_min_scale
protected

Definition at line 36 of file ExtractSIFT.h.

Referenced by checkParameters(), compute(), and getParametersFromDialog().

◆ m_mode

Modes ExtractSIFT::m_mode
protected

Definition at line 44 of file ExtractSIFT.h.

Referenced by compute(), and getParametersFromDialog().

◆ m_nr_octaves

int ExtractSIFT::m_nr_octaves
protected

Definition at line 35 of file ExtractSIFT.h.

Referenced by checkParameters(), compute(), and getParametersFromDialog().

◆ m_nr_scales_per_octave

int ExtractSIFT::m_nr_scales_per_octave
protected

Definition at line 37 of file ExtractSIFT.h.

Referenced by checkParameters(), compute(), and getParametersFromDialog().

◆ m_use_min_contrast

bool ExtractSIFT::m_use_min_contrast
protected

Definition at line 39 of file ExtractSIFT.h.

Referenced by checkParameters(), and getParametersFromDialog().


The documentation for this class was generated from the following files: