ArtContourFx()
     : m_colorIndex(L"1,2,3")
     , m_keepColor(false)
     , m_keepLine(false)
     , m_includeAlpha(true)
     , m_density(0.0)
     , m_distance(DoublePair(30.0, 30.0))
     , m_randomness(true)
     , m_orientation(DoublePair(0.0, 180.0))
     , m_size(DoublePair(30.0, 30.0)) {
   bindParam(this, "Color_Index", m_colorIndex);
   bindParam(this, "Keep_color", m_keepColor);
   bindParam(this, "Keep_Line", m_keepLine);
   bindParam(this, "Include_Alpha", m_includeAlpha);
   bindParam(this, "Density", m_density);
   bindParam(this, "Distance", m_distance);
   bindParam(this, "Randomness", m_randomness);
   bindParam(this, "Orientation", m_orientation);
   bindParam(this, "Size", m_size);
   addInputPort("Source", m_input);
   addInputPort("Controller", m_controller);
   m_density->setValueRange(0.0, 100.0);
   m_distance->getMin()->setValueRange(0.0, 1000.0);
   m_distance->getMax()->setValueRange(0.0, 1000.0);
   m_orientation->getMin()->setValueRange(-180.0, 180.0);
   m_orientation->getMax()->setValueRange(-180.0, 180.0);
   m_orientation->getMin()->setMeasureName("angle");
   m_orientation->getMax()->setMeasureName("angle");
   m_size->getMin()->setValueRange(0.0, 1000.0);
   m_size->getMax()->setValueRange(0.0, 1000.0);
 }
DirectoryIterator::DirectoryIterator()
    : mIter(mFileList)
{
    setName("DirectoryIterator");
    setDesc(QObject::tr("Iterates through a directory and outputs all files that fit the filter"));
    setGroup("input");

    mNameOut.setName("fileName");
    mNameOut.setDesc(QObject::tr("The file name only, without the path"));
    addOutputPort(mNameOut);

    mOut.setName("filePath");
    mOut.setDesc(QObject::tr("The full file path"));

    addOutputPort(mOut);
    mFilter.setName("nameFilter");
    mFilter.setMode(OptionalPortMode);
    mFilter.setDesc(QObject::tr("File extension filter, separated by space. example: *.png *.jpg *.xpm"));
    addInputPort(mFilter);

    mIn.setName("dir");
    mIn.setDesc(QObject::tr("Directory to iterate"));
    addInputPort(mIn);

    mRepeat.setName("repeat");
    mRepeat.setDefault(false);
    mRepeat.setDesc(QObject::tr("Repeat from beginning of the list if finished"));
    mRepeat.setIcon(QImage(":/SimpleNodes/repeat.png"));
    addInputPort(mRepeat);
}
Example #3
0
Threshold::Threshold()
{
    setName("Threshold");
    setDesc(QObject::tr("Thresholds an image"));
    setGroup("image/color");

    mOut.setName("imageOut");
    mOut.setDesc(QObject::tr("Image output"));
    addOutputPort(mOut);

    mIn.setName("imageIn");
    mIn.setDesc(QObject::tr("Image input"));
    addInputPort(mIn);

    mThreshold.setName("threshold");
    mThreshold.setDesc(QObject::tr("Threshold value"));
    mThreshold.setDefault(128);
    mThreshold.setRange(0, 255);
    addInputPort(mThreshold);

    mMode.setName("mode");
    mMode.setDesc(QObject::tr("Thresholding mode"));
    mMode.addChoice(cv::THRESH_BINARY, tr("Binary (value = value > threshold ? max_value : 0 )"));
    mMode.addChoice(cv::THRESH_BINARY_INV, tr("Binary inverted (value = value > threshold ? 0 : max_value)"));
    mMode.addChoice(cv::THRESH_TOZERO, tr("To zero (value = value > threshold ? value : 0)"));
    mMode.addChoice(cv::THRESH_TOZERO_INV, tr("To zero inverted (value = value > threshold ? 0 : value)"));
    mMode.addChoice(cv::THRESH_TRUNC, tr("Truncate (value = value > threshold ? threshold : value)"));
    mMode.addChoice(cv::THRESH_OTSU, tr("Otsu’s Algorithm (threshold automatically determined)"));
    mMode.addChoice(cv::THRESH_OTSU+1, tr("Otsu’s Algorithm inverted (threshold automatically determined)"));
    mMode.addChoice(cv::THRESH_TRIANGLE, tr("Triangle algorithm (threshold automatically determined)"));
    mMode.addChoice(cv::THRESH_TRIANGLE+1, tr("Triangle algorithm inverted (threshold automatically determined)"));
    mMode.setDefault(cv::THRESH_BINARY);
    addInputPort(mMode);
}
Example #4
0
/*******************************************************************
* Function Name: Demux
* Description: constructor
********************************************************************/
Server::Server( const string &name )
: Atomic( name )
, query_in( addInputPort( "query_in" ) )
, peer_in( addInputPort( "peer_in" ) )
//, publish( addInputPort( "publish"))
, queryhit( addOutputPort( "queryhit" ) )


{
	//initialising these values... not indispensable but always safer


	serverdoc = new SGraph();
	datadoc = new SGraph();

	string datafile = MainSimulator::Instance().getParameter( description(), "datafile" );

	ifstream fis;
	fis.open(datafile.c_str()); // open stream to file


	serverdoc->read(fis); //reading serverdoc from file!
	fis.close();


	if(VERBOSE) {
		cout<<"data file read"<<endl;
		//querydoc->write(cout);
	}





}
Example #5
0
BrighnessContrast::BrighnessContrast()
{
    setName("BrightnessContrast");
    setDesc(QObject::tr("Adjusts brightness and contrast"));
    setGroup("image/color");

    mIn.setName("imageIn");
    mIn.setDesc(QObject::tr("Image input"));
    addInputPort(mIn);

    mOut.setName("imageOut");
    mOut.setDesc(QObject::tr("Image output"));
    addOutputPort(mOut);

    mBrighness.setName("brightnessFactor");
    mBrighness.setDesc(QObject::tr("Adjust the brightness"));
    mBrighness.setDefault(0);
    mBrighness.setRange(-100, 100);
    addInputPort(mBrighness);

    mContrast.setName("contrastFactor");
    mContrast.setDesc(QObject::tr("Adjust the contrast"));
    mContrast.setDefault(0);
    mContrast.setRange(-100, 100);
    addInputPort(mContrast);
}
Example #6
0
	ExternalPaletteFx()

	{

		addInputPort("Source", m_input);
		addInputPort("Palette", m_expalette);
	}
 ino_blend_cross_dissolve()
     : m_opacity(1.0 * ino::param_range()), m_clipping_mask(false) {
   addInputPort("Fore", this->m_up);
   addInputPort("Back", this->m_down);
   bindParam(this, "opacity", this->m_opacity);
   bindParam(this, "clipping_mask", this->m_clipping_mask);
   this->m_opacity->setValueRange(0, 1.0 * ino::param_range());
 }
 ino_blend_hard_light()
     : m_opacity(1.0 * ino::param_range()), m_clipping_mask(true) {
   addInputPort("Fore", this->m_up);
   addInputPort("Back", this->m_down);
   bindParam(this, "opacity", this->m_opacity);
   bindParam(this, "clipping_mask", this->m_clipping_mask);
   this->m_opacity->setValueRange(0, 1.0 * ino::param_range());
 }
Example #9
0
ReadStarDrop::ReadStarDrop(int argc, char *argv[])
    : coModule(argc, argv, "Star Droplet file reader")
{
#ifdef VERBOSE
    debug = fopen("DEBUG", "w");
#endif

    // the LoopThrough data
    p_grid_out = addOutputPort("grid_out", "UnstructuredGrid", "multiplexed grid");
    p_grid_in = addInputPort("grid_in", "UnstructuredGrid", "grid set with REALTIME attribute");

    int i;
    char buf[16];
    for (i = 0; i < NUM_DATA_PORTS; i++)
    {
        sprintf(buf, "dataOut_%d", i);
        p_dataOut[i] = addOutputPort(buf, "Vec3|Float|Polygons|Lines|IntArr|Geometry", "data set to multiplex");
        sprintf(buf, "dataIn_%d", i);
        p_dataIn[i] = addInputPort(buf, "Vec3|Float|Polygons|Lines|IntArr|Geometry", "data set to multiplex");
        p_dataIn[i]->setRequired(0);
        p_dataOut[i]->setDependencyPort(p_dataIn[i]);
    }

    // the output ports
    p_dropOut[LOCA] = addOutputPort("location", "Points", "Droplet Location");
    p_dropOut[VELO] = addOutputPort("velocity", "Vec3", "Droplet velocity");
    p_dropOut[TEMP] = addOutputPort("temp", "Float", "Droplet Temperature");
    p_dropOut[DIAM] = addOutputPort("diameter", "Float", "Droplet Diameter");
    p_dropOut[MASS] = addOutputPort("mass", "Float", "Droplet Mass");
    p_dropOut[COUN] = addOutputPort("count", "Float", "Droplet Count");

    // hand out the mapping for additional loop-thru multiplier modules
    p_mapping = addOutputPort("mapping", "IntArr", "Grid multiplication mapping");

    // select the Droplet file name with a file browser
    p_filename = addFileBrowserParam("filename", "Droplet File");
    p_filename->setValue("data/track.trk", "*.trk;*.33");

    // how often to multiply the input data
    p_maxDrops = addInt32Param("maxPart", "Max. no. of Particles to show, 0=all");
    p_maxDrops->setValue(0);

    // how often to multiply the input data
    p_numSteps = addInt32Param("numSteps", "Number of steps to use, 0=auto");
    p_numSteps->setValue(0);

    // whether to do artificial termination or not
    p_stickHandling = addChoiceParam("stickHandling", "How to handle sticked droplets");
    static const char *labels[] = { "No stuck Droplets", "Both", "Only stuck" };
    p_stickHandling->setValue(3, labels, 0);

    // init local data
    d_lastFileName = NULL;
    d_dropArr = NULL;
    d_numDrops = 0;
}
Example #10
0
GateOr::GateOr(QWidget *parent, bool inversedOut) : UmElement("OR", parent)
{
    this->inversedOut = inversedOut;
    this->setGeometry(this->x(),this->y(), 80 , 65);

    addInputPort("A");
    addInputPort("B");

    addOutputPort("F", false);
}
Example #11
0
MergeAndNormals::MergeAndNormals(int argc, char *argv[])
    : coSimpleModule(argc, argv, "partial node merging and normal generation")
{
    p_inGeom_ = addInputPort("InGeometry", "coDoPolygons|coDoLines", "input geometry");
    p_inNormals_ = addInputPort("InNormals", "coDoVec3", "input normals");
    p_inNormals_->setRequired(0);
    p_text_ = addInputPort("Text", "coDoText", "where to merge");
    p_outGeom_ = addOutputPort("OutGeometry", "coDoPolygons|coDoLines", "output geometry");
    p_Normals_ = addOutputPort("OutNormals", "coDoVec3|DO_Unstructured_V3D_Normals", "output normals");
}
  ino_hls_noise()
      : m_hue(0.025 * ino::param_range())
      , m_lig(0.035 * ino::param_range())
      , m_sat(0.0 * ino::param_range())
      , m_mat(0.0 * ino::param_range())
      , m_random_seed(1)
      , m_near_blur(1.0 * ino::param_range())
      , m_term_effective(0.0 * ino::param_range())
      , m_term_center(ino::param_range() / 2.0)
      , m_term_type(new TIntEnumParam(0, "Keep Noise"))

      , m_anti_alias(true)
      , m_ref_mode(new TIntEnumParam(0, "Red")) {
    addInputPort("Source", this->m_input);
    addInputPort("Reference", this->m_refer);

    bindParam(this, "hue", this->m_hue);
    bindParam(this, "lightness", this->m_lig);
    bindParam(this, "saturation", this->m_sat);
    bindParam(this, "alpha", this->m_mat);
    bindParam(this, "seed", this->m_random_seed);
    bindParam(this, "nblur", this->m_near_blur);
    bindParam(this, "effective", this->m_term_effective);
    bindParam(this, "center", this->m_term_center);
    bindParam(this, "type", this->m_term_type);

    bindParam(this, "anti_alias", this->m_anti_alias);
    bindParam(this, "reference", this->m_ref_mode);

    this->m_hue->setValueRange(0.0 * ino::param_range(),
                               1.0 * ino::param_range());
    this->m_lig->setValueRange(0.0 * ino::param_range(),
                               1.0 * ino::param_range());
    this->m_sat->setValueRange(0.0 * ino::param_range(),
                               1.0 * ino::param_range());
    this->m_mat->setValueRange(0.0 * ino::param_range(),
                               1.0 * ino::param_range());

    this->m_random_seed->setValueRange(
        0, std::numeric_limits<unsigned long>::max());
    this->m_near_blur->setValueRange(0.0 * ino::param_range(),
                                     1.0 * ino::param_range());
    this->m_term_effective->setValueRange(0.0 * ino::param_range(),
                                          1.0 * ino::param_range());
    this->m_term_center->setValueRange(0.0 * ino::param_range(),
                                       1.0 * ino::param_range());
    this->m_term_type->addItem(1, "Keep Contrast");

    this->m_ref_mode->addItem(1, "Green");
    this->m_ref_mode->addItem(2, "Blue");
    this->m_ref_mode->addItem(3, "Alpha");
    this->m_ref_mode->addItem(4, "Luminance");
    this->m_ref_mode->addItem(-1, "Nothing");
  }
Example #13
0
MeanValues::MeanValues(int argc, char *argv[])
    : coSimpleModule(argc, argv, "Calculate Mean Values of scalor or vector data data")
{
    p_data = addInputPort("data", "Float|Vec3", "dataValues");
    p_mesh = addInputPort("mesh", "Polygons", "surface mesh");
    p_mesh->setRequired(0);
    p_solution = addOutputPort("meanValues", "Float|Vec3", "meanValues");

    const char *types[] = { "Simple", "Weighted" };
    p_calctype = addChoiceParam("calctype", "how should the mean values be computed");
    p_calctype->setValue(2, types, 0);
}
Example #14
0
ComputeTrace::ComputeTrace(int argc, char *argv[])
    : coSimpleModule(argc, argv, "Creates traces from points timestep dependent")
    , m_firsttime(true)
{
    //the timesteps shall NOT be handled automatically by the coSimpleModule class
    setComputeTimesteps(1);

    /*Fed in points*/
    p_pointsIn = addInputPort("GridIn0", "Points|Spheres", "a set of points or spheres containing the particle/s to be traced over time");
    p_dataIn = addInputPort("DataIn0", "Float|Byte|Int|Vec2|Vec3|RGBA|Mat3|Tensor", "data mapped associated with spheres");
    p_dataIn->setRequired(false);
    p_IDIn = addInputPort("IDIn0", "Int", "ID of each atom");
    p_IDIn->setRequired(false);
    /*Boolean that specifies if a particle should be traced or not*/
    p_traceParticle = addBooleanParam("traceParticle", "set if particle should be traced");
    p_traceParticle->setValue(1);
    /*Integer that specifies the particle to be traced in Module Parameter window*/
    p_particle = addStringParam("selection", "ranges of selected set elements");
    p_particle->setValue("1-1");
    p_maxParticleNumber = addInt32Param("maxParticleNum", "maximum number of particles to trace");
    p_maxParticleNumber->setValue(100);
    /*Integer that specifies the starting point*/
    p_start = addIntSliderParam("start", "Timestep at which the tracing should be started");
    p_start->setValue(0, 0, 0);
    /*Integer that specifies the ending point*/
    p_stop = addIntSliderParam("stop", "Timestep at which the tracing should be stopped");
    p_stop->setValue(0, 0, 0);
    /* Boolean that specifies if the bounding box leaving should be regarded */
    p_regardInterrupt = addBooleanParam("LeavingBoundingBox", "set if leaving bounding box should be taken into account");
    p_regardInterrupt->setValue(0);
    p_animate = addBooleanParam("animate", "disable for static trace");
    p_animate->setValue(1);
    /* 3 values specifying the x, y and z dimension of the bounding box */
    p_boundingBoxDimensions = addFloatVectorParam("BoundingBoxDimensions", "x, y, z dimensions of the bounding box");
    p_boundingBoxDimensions->setValue(0, 0, 0);
    /*Output should be a line*/
    p_traceOut = addOutputPort("GridOut0", "Lines", "Trace of a specified particle");
    /*unique index per line mappable as color attribute*/
    p_indexOut = addOutputPort("DataOut0", "Float", "unique index for every specified particle");
    /*fade out value per timestep mappable as color attribute*/
    p_fadingOut = addOutputPort("DataOut1", "Float", "fade out value for per vertex coloring of lines over time");
    p_dataOut = addOutputPort("DataOut2", "Float|Byte|Int|Vec2|Vec3|RGBA|Mat3|Tensor", "data mapped to lines");

    p_dataOut->setDependencyPort(p_dataIn);
    IDs = NULL;

    assert(sizeof(animValues) / sizeof(animValues[0]) == AnimNumValues);
    p_animateViewer = addChoiceParam("animateViewer", "Animate Viewer");
    p_animateViewer->setValue(AnimNumValues, animValues, AnimOff);

    p_animLookAt = addFloatVectorParam("animLookAt", "Animated viewer looks at this point");
    p_animLookAt->setValue(0., 0., 0.);
}
Example #15
0
Gen3D::Gen3D()
:coModule("Make a 3D grid out of a 2")
{
   p_inPoly = addInputPort("2D_Grid","Polygons","2D grid polygons");
   p_inVelo = addInputPort("velocity","Vec3","velocity");
   p_inPoly->setRequired(1);
   p_inVelo->setRequired(0);
   p_outGrid = addOutputPort("outGrid","UnstructuredGrid","unstructured Grid");
                                                  // 0 is as many as velocities set
   p_outVelo = addOutputPort("outVelo","Vec3","velocity");
   p_thick = addFloatParam("thick","thickness of 3D-grid");
   p_thick->setValue(0.05);
};
Example #16
0
/* constructor */
writeToCgns::writeToCgns(int argc, char *argv[])
:coModule(argc, argv, "writeToCgns") {
   //input ports
   p_inputPort_grid = addInputPort("in_grid", "UnstructuredGrid", "computational grid");  
   p_inputPort_boundaryElementFaces = addInputPort("boundary_element_faces","coDoSet","boundary element faces");
   //decide if ports are required and initialize
   p_inputPort_grid->setRequired(1);
   p_inputPort_boundaryElementFaces->setRequired(1);

   //specify filename of cgns file with browser
   cgns_filebrowser = addFileBrowserParam("path_to_file", "filename of cgns file");
   cgns_filebrowser->setValue(".", "*.cgns/*");
}
Example #17
0
FlipImage::FlipImage()
{
    setName("Flip");
    setDesc(QObject::tr("Flips an image horizontal, vertical or both"));
    setGroup("image/reshape");
    addInputPort(mImageIn);
    addOutputPort(mImageOut);
    mFlipModeIn.setName("flipMode");
    mFlipModeIn.addChoice(0, tr("Vertical"));
    mFlipModeIn.addChoice(1, tr("Horizontal"));
    mFlipModeIn.addChoice(-1, tr("Both"));
    mFlipModeIn.setDefault(0);
    addInputPort(mFlipModeIn);
}
Example #18
0
/*******************************************************************
* Function Name: Gnutella
* Description: constructor
********************************************************************/
Gnutella::Gnutella( const string &name )
: Atomic( name )
, route_in( addInputPort( "route_in" ) )
, route_out( addOutputPort( "route_out" ) )
, in_n( addInputPort( "in_n" ) )
, out_n( addOutputPort( "out_n" ) )

{
	//initialising these values... not indispensable but always useful
	routing = false;
	hitting = false;
	nextOutputDB = 0.0f;
	nextOutputR= 0.0f;
}
Example #19
0
ContourWriter::ContourWriter()
{
    setName("ContourWriter");
    setDesc(QObject::tr("Writes a extracted contour to disc"));
    setGroup("image/contour");
    mFile.setName("fileName");
    mOffsetIn.setName("offset");
    mOffsetIn.setDesc(QObject::tr("Offset that will be added to all calculated positions"));
    mOffsetIn.setDefault(QPointF(0.0, 0.0));
    mContour.setName("contour");
    mContour.setDesc(QObject::tr("A list of the calculated outer contours"));
    addInputPort(mFile);
    addInputPort(mOffsetIn);
    addInputListPort(mContour);
}
Example #20
0
 LinearWaveFx()
     : m_intensity(20)
     , m_gridStep(2)
     , m_period(100)
     , m_count(20)
     , m_cycle(0.0)
     , m_amplitude(50.0)
     , m_frequency(200.0)
     , m_phase(0.0)
     , m_angle(0.0)
     , m_sharpen(false) {
   addInputPort("Source", m_warped);
   bindParam(this, "intensity", m_intensity);
   bindParam(this, "sensitivity", m_gridStep);
   bindParam(this, "period", m_period);
   bindParam(this, "count", m_count);
   bindParam(this, "cycle", m_cycle);
   bindParam(this, "amplitude", m_amplitude);
   bindParam(this, "frequency", m_frequency);
   bindParam(this, "phase", m_phase);
   bindParam(this, "angle", m_angle);
   bindParam(this, "sharpen", m_sharpen);
   m_intensity->setValueRange(-1000, 1000);
   m_gridStep->setValueRange(2, 20);
   m_period->setValueRange(0, (std::numeric_limits<double>::max)());
   m_cycle->setValueRange(0, (std::numeric_limits<double>::max)());
   m_count->setValueRange(0, (std::numeric_limits<double>::max)());
   m_period->setMeasureName("fxLength");
   m_amplitude->setMeasureName("fxLength");
 }
Example #21
0
ShowFaceNormal::ShowFaceNormal(int argc, char *argv[]) // this info appears in the module setup window
    : coSimpleModule(argc, argv, "Show the normals of surfaces")
{
    port_inPort = addInputPort("inPort", "Polygons|TriangleStrips", "surface consisting of polygons or triangle strips");
    point_outport = addOutputPort("points", "Points", "startpoints for normals (typically polygon center)");
    normal_outport = addOutputPort("vectors", "Vec3", "normals of the polygon or of the first triangle in tristrip");
}
Example #22
0
  ino_blur() : m_radius(1.0), m_ref_mode(new TIntEnumParam(0, "Red")) {
    addInputPort("Source", this->m_input);
    addInputPort("Reference", this->m_refer);

    bindParam(this, "radius", this->m_radius);
    bindParam(this, "reference", this->m_ref_mode);

    this->m_radius->setMeasureName("fxLength");
    this->m_radius->setValueRange(0.0, 1000.0);

    this->m_ref_mode->addItem(1, "Green");
    this->m_ref_mode->addItem(2, "Blue");
    this->m_ref_mode->addItem(3, "Alpha");
    this->m_ref_mode->addItem(4, "Luminance");
    this->m_ref_mode->addItem(-1, "Nothing");
  }
	MagicWandFx()
		: m_tolerance(15.0), m_blurRadius(0.0), m_point(TPointD(0, 0))

	{
		m_contiguous = TBoolParamP(true);
		m_antialiased = TBoolParamP(true);
		m_euclideanD = TBoolParamP(true);
		m_preMolt = TBoolParamP(true);
		m_isShiftPressed = TBoolParamP(false);
		m_isAltPressed = TBoolParamP(false);

		addParam("Tolerance", m_tolerance);
		addParam("Feather", m_blurRadius);
		addParam("Point", m_point);
		addParam("Contiguous", m_contiguous);
		addParam("Antialias", m_antialiased);
		addParam("EuclideanD", m_euclideanD);
		addParam("PreMultiply", m_preMolt);
		addParam("isShiftPressed", m_isShiftPressed);
		addParam("isAltPressed", m_isAltPressed);
		addInputPort("Source", m_input);

		m_tolerance->setValueRange(0, 255);
		m_blurRadius->setValueRange(0, 100);
	}
Example #24
0
PlaneBorder::PlaneBorder()
    : coModule("cut something out of an object")
{
    // ports
    p_geo_in = addInputPort("geo_in", "Set_Polygons|Set_TriangleStrips", "geometry");
    p_geo_out = addOutputPort("geo_out", "Set_Points", "geometry");
}
Example #25
0
	FadeFx() : m_value(50)
	{
		m_value->setValueRange(0, 100);
		bindParam(this, "value", m_value);

		addInputPort("Source", m_input);
	};
Example #26
0
Summator::Summator(QString name, QWidget *parent) : UmElement(name, parent)
{
    this->setGeometry(this->x(),this->y(), 80 , 110);

    label = new QLabel(this);
    label->setText(name);
    label->setAlignment(Qt::AlignCenter);
    label->setGeometry(2, 2, this->width()-4, 16);

    addInputPort("A");
    addInputPort("B");
    addInputPort("P");

    addOutputPort("S", false);
    addOutputPort("P+", true);
}
Example #27
0
  RippleFx()
      : m_intensity(20)
      , m_gridStep(2)
      , m_center(TPointD(0.0, 0.0))
      , m_period(100)  // args, "Period")
      , m_count(2)     // args, "Count")
      , m_cycle(0.0)
      , m_scaleX(100.0)
      , m_scaleY(100.0)
      , m_angle(0.0)
      , m_sharpen(false) {
    m_center->getX()->setMeasureName("fxLength");
    m_center->getY()->setMeasureName("fxLength");
    m_period->setMeasureName("fxLength");

    addInputPort("Source", m_warped);
    bindParam(this, "period", m_period);
    bindParam(this, "count", m_count);
    bindParam(this, "cycle", m_cycle);
    bindParam(this, "center", m_center);
    bindParam(this, "scalex", m_scaleX);
    bindParam(this, "scaley", m_scaleY);
    bindParam(this, "angle", m_angle);
    bindParam(this, "intensity", m_intensity);
    bindParam(this, "sensitivity", m_gridStep);
    bindParam(this, "sharpen", m_sharpen);
    m_intensity->setValueRange(-1000, 1000);
    m_gridStep->setValueRange(2, 20);
    m_period->setValueRange(0, (std::numeric_limits<double>::max)());
    m_cycle->setValueRange(0, (std::numeric_limits<double>::max)());
    m_count->setValueRange(0, (std::numeric_limits<double>::max)());
    m_angle->setMeasureName("angle");
  }
Example #28
0
  BodyHighLightFx()
      : m_point(TPointD(10.0, 10.0))
      , m_mode(new TIntEnumParam(OVER, "Over"))
      , m_transparency(0.5)
      , m_blur(2.0)
      , m_color(TPixel32::White)
      , m_invert(false) {
    m_point->getX()->setMeasureName("fxLength");
    m_point->getY()->setMeasureName("fxLength");
    m_blur->setMeasureName("fxLength");
    bindParam(this, "mode", m_mode);
    bindParam(this, "point", m_point);
    bindParam(this, "transparency", m_transparency);
    bindParam(this, "blur", m_blur);
    bindParam(this, "color", m_color);
    bindParam(this, "invert", m_invert);
    addInputPort("Source", m_input);
    m_transparency->setValueRange(0.0, 1.0);
    m_blur->setValueRange(0, (std::numeric_limits<double>::max)());
    m_color->enableMatte(false);

    m_mode->addItem(ADD, "Add");
    m_mode->addItem(SUBTRACT, "Subtract");
    m_mode->addItem(MULTIPLY, "Multiply");
    m_mode->addItem(LIGHTEN, "Lighten");
    m_mode->addItem(DARKEN, "Darken");
  }
Example #29
0
JKTrigger::JKTrigger(QString name, QWidget *parent) : UmElement(name, parent)
{
    this->setGeometry(this->x(),this->y(), 80 , 110);

    label = new QLabel(this);
    label->setText(name);
    label->setAlignment(Qt::AlignCenter);
    label->setGeometry(2, 2, this->width()-4, 16);

    addInputPort("J");
    addInputPort("CLK");
    addInputPort("K");

    addOutputPort("Q", false);
    addOutputPort("!Q", true);
}
Example #30
0
DataHeight::DataHeight(int argc, char *argv[])
    : coModule(argc, argv, "display scalar data as height map")
{

    // input ports
    p_polyIn = addInputPort("poly", "Polygons", "input polygons");
    p_dataIn = addInputPort("data", "Float", "input data");
    p_normalsIn = addInputPort("normals", "Vec3", "input data");

    // output port
    p_polyOut = addOutputPort("polyIn", "Polygons", "polygons displaced due to data");

    // parameters:
    p_scale = addFloatParam("scale", "data scale");
    p_scale->setValue(1.);
}