当前位置: 首页>>代码示例>>C++>>正文


C++ PipelineManager类代码示例

本文整理汇总了C++中PipelineManager的典型用法代码示例。如果您正苦于以下问题:C++ PipelineManager类的具体用法?C++ PipelineManager怎么用?C++ PipelineManager使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了PipelineManager类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: initWidget

void GlyphCustom::initWidget() {
	PipelineManager* pm = m_mainWnd->getPipelineManager();
	Pipeline* pl = pm->getPipeline(m_pipelineID);

	// Get the instance of OkcVisualMap
	VisualMap* visMap = pl->getVisualMap();
	assert( typeid(*visMap)==typeid(OkcVisualMap) );
	OkcVisualMap* okcVisMap = dynamic_cast<OkcVisualMap*>(visMap);

	// Get the instance of GlyphPlace
	GlyphPlace* place = okcVisMap->getGlyphPlace();
	XmdvTool::GLYPHPLACE_MODE mode = place->getGlyphPlaceMode();

	// Check one radio button about sorting mode in terms of
	// the OkcVisualMap configuration
	switch (mode) {
	case XmdvTool::GLYPHPLACE_ORIGINAL :
		ui.radioButton_orig->setChecked(true);
		changeToOriginal();
		break;
	case XmdvTool::GLYPHPLACE_ORDERED :
		ui.radioButton_order->setChecked(true);
		changeToOrdered();
		break;
	case XmdvTool::GLYPHPLACE_DATA_DRIVEN	:
		ui.radioButton_datadriven->setChecked(true);
		changeToDatadriven();
		break;
	case XmdvTool::GLYPHPLACE_DERIVED :
		ui.radioButton_derived->setChecked(true);
		changeToDerived();
		break;
	}

}
开发者ID:63n,项目名称:XmdvTool,代码行数:35,代码来源:GlyphCustom.cpp

示例2: getOkcVisualMapResult

void OkcViewDisplay::refreshBrush() {
	OkcVisualMapResult* okvVMR = getOkcVisualMapResult();
	Operator* brushQ = (Operator*)(okvVMR->getBrushOperator());
	PipelineManager* pm = getPipelineManager();
	Brush *brush = okvVMR->getBrush();

	//If the maximum and minimum values for one dimension has the exact same value,
	//they should be adjusted to a little different values,
	//otherwise, some records having the same value as this max/min value
	//cannot be highlighted.

	int i;
	for (i=0; i<brush->getDimSize(); i++) {
		brush->max[i] += XMDV_DBL_EPSILON;
		brush->min[i] -= XMDV_DBL_EPSILON;
	}

	OkcData* brushStorage = brush->toOkcDataStorage();
	std::vector<double> buf;
	brushStorage->getData(buf, 3);
	int pID = getPipelineID();
	// update the assistant input by the reverse pipeline
	pm->updateAssisInput(pID, brushStorage, XmdvTool::ASSISDATA_BRUSH);

	delete brushStorage;
	pm->assemble(pID, brushQ);
	getViewManager()->refreshDisplayByPID(pID);
}
开发者ID:63n,项目名称:XmdvTool,代码行数:28,代码来源:OkcViewDisplay.cpp

示例3: TEST

TEST(FerryFilterTest, test_ferry_copy_xml)
{
    PipelineManager mgr;
    mgr.readPipeline(Support::configuredpath("filters/ferry.xml"));

    mgr.execute();
    ConstPointTableRef table(mgr.pointTable());

    PointViewSet viewSet = mgr.views();

    EXPECT_EQ(viewSet.size(), 1u);
    PointViewPtr view = *viewSet.begin();
    EXPECT_EQ(view->size(), 1065u);

    Dimension::Id::Enum state_plane_x = table.layout()->findDim("StatePlaneX");
    Dimension::Id::Enum state_plane_y = table.layout()->findDim("StatePlaneY");

    double lon = view->getFieldAs<double>(Dimension::Id::X, 0);
    double lat = view->getFieldAs<double>(Dimension::Id::Y, 0);

    double x = view->getFieldAs<double>(state_plane_x, 0);
    double y = view->getFieldAs<double>(state_plane_y, 0);

    EXPECT_DOUBLE_EQ(-117.2501328350574, lon);
    EXPECT_DOUBLE_EQ(49.341077824192915, lat);
    EXPECT_DOUBLE_EQ(637012.24, x);
    EXPECT_DOUBLE_EQ(849028.31, y);
}
开发者ID:EricAlex,项目名称:PDAL,代码行数:28,代码来源:FerryFilterTest.cpp

示例4: TEST_F

TEST_F(PredicateFilterTest, PredicateFilterTest_EmbedJSON)
{
    PipelineManager mgr;

    mgr.readPipeline(Support::configuredpath("plang/predicate-embed.json"));
    point_count_t cnt = mgr.execute();
    EXPECT_EQ(cnt, 1u);
}
开发者ID:connormanning,项目名称:PDAL,代码行数:8,代码来源:PythonFilterTest.cpp

示例5: TEST

TEST(PredicateFilterTest, PredicateFilterTest_Embed)
{
    PipelineManager mgr;
    PipelineReader reader(mgr);

    reader.readPipeline(Support::configuredpath("plang/predicate-embed.xml"));
    point_count_t cnt = mgr.execute();
    EXPECT_EQ(cnt, 1u);
}
开发者ID:jwend,项目名称:PDAL,代码行数:9,代码来源:PredicateFilterTest.cpp

示例6: TEST

TEST(SbetReaderTest, testPipeline)
{
    PipelineManager manager;
    PipelineReader reader(manager);
    reader.readPipeline(Support::configuredpath("sbet/pipeline.xml"));

    point_count_t numPoints = manager.execute();
    EXPECT_EQ(numPoints, 2u);
    FileUtils::deleteFile(Support::datapath("sbet/outfile.txt"));
}
开发者ID:boundlessgeo,项目名称:PDAL,代码行数:10,代码来源:SbetReaderTest.cpp

示例7: TEST

TEST(IcebridgeReaderTest, testPipeline)
{
    PipelineManager manager;

    manager.readPipeline(Support::configuredpath("icebridge/pipeline.xml"));

    point_count_t numPoints = manager.execute();
    EXPECT_EQ(numPoints, 2u);
    FileUtils::deleteFile(Support::datapath("icebridge/outfile.txt"));
}
开发者ID:OldMogy,项目名称:PDAL,代码行数:10,代码来源:IcebridgeReaderTest.cpp

示例8: readerStage

int SmoothKernel::execute()
{
    PointTable table;

    Stage& readerStage(makeReader(m_inputFile, ""));

    // go ahead and prepare/execute on reader stage only to grab input
    // PointViewSet, this makes the input PointView available to both the
    // processing pipeline and the visualizer
    readerStage.prepare(table);
    PointViewSet viewSetIn = readerStage.execute(table);

    // the input PointViewSet will be used to populate a BufferReader that is
    // consumed by the processing pipeline
    PointViewPtr input_view = *viewSetIn.begin();

    PipelineManager manager;
    manager.commonOptions() = m_manager.commonOptions();
    manager.stageOptions() = m_manager.stageOptions();

    BufferReader& bufferReader =
        static_cast<BufferReader&>(manager.makeReader("", "readers.buffer"));
    bufferReader.addView(input_view);

    std::ostringstream ss;
    ss << "{";
    ss << "  \"pipeline\": {";
    ss << "    \"filters\": [{";
    ss << "      \"name\": \"MovingLeastSquares\"";
    ss << "      }]";
    ss << "    }";
    ss << "}";

    Options smoothOptions;
    smoothOptions.add("json", ss.str());

    Stage& smoothStage = manager.makeFilter("filters.pclblock", bufferReader);
    smoothStage.addOptions(smoothOptions);

    Stage& writer(Kernel::makeWriter(m_outputFile, smoothStage, ""));

    writer.prepare(table);

    // process the data, grabbing the PointViewSet for visualization of the
    // resulting PointView
    PointViewSet viewSetOut = writer.execute(table);

    if (isVisualize())
        visualize(*viewSetOut.begin());
    //visualize(*viewSetIn.begin(), *viewSetOut.begin());

    return 0;
}
开发者ID:EricAlex,项目名称:PDAL,代码行数:53,代码来源:SmoothKernel.cpp

示例9: getFileInfo

TIndexKernel::FileInfo TIndexKernel::getFileInfo(KernelFactory& factory,
    const std::string& filename)
{
    FileInfo fileInfo;

    PipelineManager manager;
    manager.commonOptions() = m_manager.commonOptions();
    manager.stageOptions() = m_manager.stageOptions();

    // Need to make sure options get set.
    Stage& reader = manager.makeReader(filename, "");

    if (m_fastBoundary)
    {
        QuickInfo qi = reader.preview();

        std::stringstream polygon;
        polygon << "POLYGON ((";

        polygon <<         qi.m_bounds.minx << " " << qi.m_bounds.miny;
        polygon << ", " << qi.m_bounds.maxx << " " << qi.m_bounds.miny;
        polygon << ", " << qi.m_bounds.maxx << " " << qi.m_bounds.maxy;
        polygon << ", " << qi.m_bounds.minx << " " << qi.m_bounds.maxy;
        polygon << ", " << qi.m_bounds.minx << " " << qi.m_bounds.miny;
        polygon << "))";
        fileInfo.m_boundary = polygon.str();
        if (!qi.m_srs.empty())
            fileInfo.m_srs = qi.m_srs.getWKT();
    }
    else
    {
        Stage& hexer = manager.makeFilter("filters.hexbin", reader);

        PointTable table;
        hexer.prepare(table);
        PointViewSet set = hexer.execute(table);

        MetadataNode m = table.metadata();
        m = m.findChild("filters.hexbin:boundary");
        fileInfo.m_boundary = m.value();

        PointViewPtr v = *set.begin();
        if (!v->spatialReference().empty())
            fileInfo.m_srs = v->spatialReference().getWKT();
    }

    FileUtils::fileTimes(filename, &fileInfo.m_ctime, &fileInfo.m_mtime);
    fileInfo.m_filename = filename;

    return fileInfo;
}
开发者ID:jasonoverland,项目名称:PDAL,代码行数:51,代码来源:TIndexKernel.cpp

示例10: TEST

TEST(MergeTest, test4)
{
    using namespace pdal;

    PipelineManager mgr;
    mgr.readPipeline(Support::configuredpath("filters/merge.json"));
    mgr.execute();

    PointViewSet viewSet = mgr.views();

    EXPECT_EQ(1u, viewSet.size());
    PointViewPtr view = *viewSet.begin();
    EXPECT_EQ(2130u, view->size());
}
开发者ID:EricAlex,项目名称:PDAL,代码行数:14,代码来源:MergeTest.cpp

示例11: TEST

TEST(MergeTest, test2)
{
    using namespace pdal;

    PipelineManager mgr;
    PipelineReader specReader(mgr);
    specReader.readPipeline(Support::configuredpath("filters/merge2.xml"));
    mgr.execute();

    PointViewSet viewSet = mgr.views();

    EXPECT_EQ(viewSet.size(), 1u);
    PointViewPtr view = *viewSet.begin();
    EXPECT_EQ(view->size(), 2130u);
}
开发者ID:cugwhp,项目名称:PDAL,代码行数:15,代码来源:MergeTest.cpp

示例12: visualize

void Kernel::visualize(PointViewPtr view)
{
    PipelineManager manager;

    manager.commonOptions() = m_manager.commonOptions();
    manager.stageOptions() = m_manager.stageOptions();

    BufferReader& reader =
        static_cast<BufferReader&>(manager.makeReader("", "readers.buffer"));
    reader.addView(view);

    Stage& writer = manager.makeWriter("", "writers.pclvisualizer", reader);

    PointTable table;
    writer.prepare(table);
    writer.execute(table);
}
开发者ID:OldMogy,项目名称:PDAL,代码行数:17,代码来源:Kernel.cpp

示例13: TEST

TEST(SortFilterTest, pipeline)
{
    PipelineManager mgr;
    PipelineReader reader(mgr);

    reader.readPipeline(Support::configuredpath("filters/sort.xml"));
    mgr.execute();

    PointBufferSet pbSet = mgr.buffers();

    EXPECT_EQ(pbSet.size(), 1u);
    PointBufferPtr buf = *pbSet.begin();

    for (PointId i = 1; i < buf->size(); ++i)
    {
        double d1 = buf->getFieldAs<double>(Dimension::Id::X, i - 1);
        double d2 = buf->getFieldAs<double>(Dimension::Id::X, i);
        EXPECT_TRUE(d1 <= d2);
    }
}
开发者ID:rskelly,项目名称:PDAL,代码行数:20,代码来源:SortFilterTest.cpp

示例14: TEST

// Make sure we handle repeated options properly
TEST(json, issue_1941)
{
    PipelineManager manager;
    std::string file;

    file = Support::configuredpath("pipeline/range_multi_limits.json");
    manager.readPipeline(file);
    EXPECT_EQ(manager.execute(), (point_count_t)5);
    const PointViewSet& s = manager.views();
    EXPECT_EQ(s.size(), 1U);
    PointViewPtr view = *s.begin();
    EXPECT_EQ(view->getFieldAs<int>(Dimension::Id::X, 0), 3);
    EXPECT_EQ(view->getFieldAs<int>(Dimension::Id::X, 1), 4);
    EXPECT_EQ(view->getFieldAs<int>(Dimension::Id::X, 2), 5);
    EXPECT_EQ(view->getFieldAs<int>(Dimension::Id::X, 3), 8);
    EXPECT_EQ(view->getFieldAs<int>(Dimension::Id::X, 4), 9);

    PipelineManager manager2;

    file = Support::configuredpath("pipeline/range_bad_limits.json");
    EXPECT_THROW(manager2.readPipeline(file), pdal_error);
}
开发者ID:chambbj,项目名称:PDAL,代码行数:23,代码来源:pcpipelineTestJSON.cpp

示例15: getPipelineManager

bool Pipeline::willOuputToVis(XmdvTool::VISTYPE visType) {
	PipelineManager* pm = getPipelineManager();
	ViewManager* vm = pm->getViewManager();
	return vm->willOuputToVis(getPipelineID(), visType);
}
开发者ID:63n,项目名称:XmdvTool,代码行数:5,代码来源:Pipeline.cpp


注:本文中的PipelineManager类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。