mirror of
https://github.com/lucaspalomodevelop/meshlab.git
synced 2026-03-20 11:26:11 +00:00
filter mls and quality mapper python rename
This commit is contained in:
parent
3a2745e39d
commit
1285e72a41
@ -46,11 +46,6 @@ using namespace vcg;
|
||||
|
||||
typedef Histogram<Scalarm> Histogramm;
|
||||
|
||||
// Constructor usually performs only two simple tasks of filling the two lists
|
||||
// - typeList: with all the possible id of the filtering actions
|
||||
// - actionList with the corresponding actions. If you want to add icons to your filtering actions
|
||||
// you can do here by construction the QActions accordingly
|
||||
|
||||
enum { CT_MEAN = 0, CT_GAUSS = 1, CT_K1 = 2, CT_K2 = 3, CT_APSS = 4 };
|
||||
|
||||
MlsPlugin::MlsPlugin()
|
||||
@ -75,8 +70,6 @@ QString MlsPlugin::pluginName() const
|
||||
return "FilterMLS";
|
||||
}
|
||||
|
||||
// ST() must return the very short string describing each filtering action
|
||||
// (this string is used also to define the menu entry)
|
||||
QString MlsPlugin::filterName(ActionIDType filterId) const
|
||||
{
|
||||
switch (filterId) {
|
||||
@ -88,9 +81,23 @@ QString MlsPlugin::filterName(ActionIDType filterId) const
|
||||
case FP_RIMLS_COLORIZE: return QString("Colorize curvature (RIMLS)");
|
||||
case FP_RADIUS_FROM_DENSITY: return QString("Estimate radius from density");
|
||||
case FP_SELECT_SMALL_COMPONENTS: return QString("Select small disconnected component");
|
||||
default: assert(0);
|
||||
default: assert(0); return QString();
|
||||
}
|
||||
}
|
||||
|
||||
QString MlsPlugin::pythonFilterName(ActionIDType f) const
|
||||
{
|
||||
switch (f) {
|
||||
case FP_APSS_PROJECTION: return QString("compute_mls_projection_apss");
|
||||
case FP_RIMLS_PROJECTION: return QString("compute_mls_projection_rimls");
|
||||
case FP_APSS_MCUBE: return QString("generate_marching_cubes_apss");
|
||||
case FP_RIMLS_MCUBE: return QString("generate_marching_cubes_rimls");
|
||||
case FP_APSS_COLORIZE: return QString("compute_curvature_and_color_apss_per_vertex");
|
||||
case FP_RIMLS_COLORIZE: return QString("compute_curvature_and_color_rimls_per_vertex");
|
||||
case FP_RADIUS_FROM_DENSITY: return QString("compute_custom_radius_scalar_attribute_per_vertex");
|
||||
case FP_SELECT_SMALL_COMPONENTS: return QString("compute_selection_by_small_disconnected_components_per_face");
|
||||
default: assert(0); return QString();
|
||||
}
|
||||
return QString("Filter Unknown");
|
||||
}
|
||||
|
||||
FilterPlugin::FilterClass MlsPlugin::getClass(const QAction* a) const
|
||||
@ -112,8 +119,6 @@ FilterPlugin::FilterClass MlsPlugin::getClass(const QAction* a) const
|
||||
return FilterPlugin::Generic;
|
||||
}
|
||||
|
||||
// Info() must return the longer string describing each filtering action
|
||||
// (this string is used in the About plugin dialog)
|
||||
QString MlsPlugin::filterInfo(ActionIDType filterId) const
|
||||
{
|
||||
QString str = "";
|
||||
|
||||
@ -49,12 +49,15 @@ public:
|
||||
|
||||
MlsPlugin();
|
||||
|
||||
QString pluginName() const;
|
||||
QString filterName(ActionIDType filter) const;
|
||||
QString filterInfo(ActionIDType filter) const;
|
||||
FilterClass getClass(const QAction* a) const;
|
||||
RichParameterList initParameterList(const QAction*, const MeshDocument& md);
|
||||
int getRequirements(const QAction* action);
|
||||
QString pluginName() const;
|
||||
QString filterName(ActionIDType filter) const;
|
||||
QString pythonFilterName(ActionIDType f) const;
|
||||
QString filterInfo(ActionIDType filter) const;
|
||||
FilterClass getClass(const QAction* a) const;
|
||||
int getRequirements(const QAction* action);
|
||||
|
||||
RichParameterList initParameterList(const QAction*, const MeshDocument& md);
|
||||
|
||||
std::map<std::string, QVariant> applyFilter(
|
||||
const QAction* action,
|
||||
const RichParameterList& parameters,
|
||||
|
||||
@ -30,10 +30,6 @@ FIRST RELEASE
|
||||
#include <stdlib.h>
|
||||
#include "filterqualitymapper.h"
|
||||
|
||||
// Constructor usually performs only two simple tasks of filling the two lists
|
||||
// - typeList: with all the possible id of the filtering actions
|
||||
// - actionList with the corresponding actions. If you want to add icons to your filtering actions you can do here by construction the QActions accordingly
|
||||
|
||||
QualityMapperFilter::QualityMapperFilter()
|
||||
{
|
||||
typeList = {FP_QUALITY_MAPPER};
|
||||
@ -47,19 +43,24 @@ QString QualityMapperFilter::pluginName() const
|
||||
return "FilterQuality";
|
||||
}
|
||||
|
||||
// ST() must return the very short string describing each filtering action
|
||||
// (this string is used also to define the menu entry)
|
||||
QString QualityMapperFilter::filterName(ActionIDType filterId) const
|
||||
{
|
||||
switch(filterId) {
|
||||
case FP_QUALITY_MAPPER : return QString("Quality Mapper applier");
|
||||
default : assert(0);
|
||||
default : assert(0); return QString();
|
||||
}
|
||||
return QString("");
|
||||
}
|
||||
|
||||
// Info() must return the longer string describing each filtering action
|
||||
// (this string is used in the About plugin dialog)
|
||||
QString QualityMapperFilter::pythonFilterName(ActionIDType f) const
|
||||
{
|
||||
switch(f) {
|
||||
case FP_QUALITY_MAPPER :
|
||||
return QString("compute_color_from_scalar_using_transfer_function_per_vertex");
|
||||
default : assert(0); return QString();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
QString QualityMapperFilter::filterInfo(ActionIDType filterId) const
|
||||
{
|
||||
switch(filterId) {
|
||||
@ -84,14 +85,6 @@ FilterPlugin::FilterClass QualityMapperFilter::getClass(const QAction *a) const
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// This function define the needed parameters for each filter. Return true if the filter has some parameters
|
||||
// it is called every time, so you can set the default value of parameters according to the mesh
|
||||
// For each parameter you need to define,
|
||||
// - the name of the parameter,
|
||||
// - the string shown in the dialog
|
||||
// - the default value
|
||||
// - a possibly long string describing the meaning of that parameter (shown as a popup help in the dialog)
|
||||
RichParameterList QualityMapperFilter::initParameterList(const QAction *action,const MeshModel &m)
|
||||
{
|
||||
RichParameterList parlst;
|
||||
@ -131,8 +124,6 @@ RichParameterList QualityMapperFilter::initParameterList(const QAction *action,c
|
||||
return parlst;
|
||||
}
|
||||
|
||||
// The Real Core Function doing the actual mesh processing.
|
||||
// Apply color to mesh vertices
|
||||
std::map<std::string, QVariant> QualityMapperFilter::applyFilter(
|
||||
const QAction *filter,
|
||||
const RichParameterList & par,
|
||||
|
||||
@ -71,6 +71,7 @@ public:
|
||||
|
||||
QString pluginName() const;
|
||||
QString filterName(ActionIDType filter) const;
|
||||
QString pythonFilterName(ActionIDType f) const;
|
||||
QString filterInfo(ActionIDType filter) const;
|
||||
int getPreConditions(const QAction *) const;
|
||||
int postCondition(const QAction* ) const;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user