• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ dtkWarn函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: dtkDebug

void medJobRunner::run()
{
    emit m_job->running(true);
    medAbstractJob::medJobExitStatus jobExitStatus = medAbstractJob::MED_JOB_EXIT_FAILURE;
    try
    {
        jobExitStatus = m_job->run();
        if(jobExitStatus == medAbstractJob::MED_JOB_EXIT_CANCELLED)
        {
            dtkDebug() << "job aborted (cancelled)"
                       << m_job->caption() << m_job;
        }
    }
    catch(std::exception &err)
    {
        QString errorMessage = QString::fromLatin1(err.what());
        dtkWarn() << "Error occured while runing job"
                  << m_job->caption() << m_job
                  << "\n\t" <<errorMessage;

        emit exceptionCaught(errorMessage);
    }
    catch(...)
    {
        dtkWarn() << "Error occured while runing job"
                  << m_job->caption() << m_job;
    }
    emit m_job->finished(jobExitStatus);
    emit m_job->running(false);
}
开发者ID:medInria,项目名称:medInria-public,代码行数:30,代码来源:medJobManager.cpp


示例2: dtkError

void dtkComposerNodeVectorRealExtractor::run(void)
{
    if (!d->receiver_vector.isEmpty() && !d->receiver_index.isEmpty()) {

        dtkVectorReal *vector = d->receiver_vector.data();
        qlonglong index = *d->receiver_index.data();

        if (!vector) {
            dtkError() << "Input vector is not defined.";
            return;
        }

        if (index >= vector->size()) {
            dtkWarn() << "index > size of the input vector. Zero is returned.";
            d->value = 0;

        } else {
            d->value = (*vector)[index];

        }

    } else {
        dtkWarn() << "Inputs not specified. Zero is returned.";
        d->value = 0;
    }        
}
开发者ID:NicolasSchnitzler,项目名称:dtk,代码行数:26,代码来源:dtkComposerNodeVectorRealExtractor.cpp


示例3: dtkError

void dtkComposerNodeArrayScalarOperatorDivide::run(void)
{
    if (!d->receiver_array.isEmpty() && !d->receiver_index.isEmpty() && !d->receiver_value.isEmpty() ) {

        dtkContainerVectorReal *array = d->receiver_array.data();

        if (!array) {
            dtkError() << "Input array is not defined.";
            d->emitter_array.clearData();
            return;
        }

        qlonglong index = *d->receiver_index.data<qlonglong>();
        qreal value = *d->receiver_value.data<qreal>();

        if (index >= array->count()) {
            dtkWarn() << "index > size of the vector. Same array is returned.";

        } else {
            if (value == 0)
                dtkWarn() << "Value is zero. Same array is returned." ;

            else
                (*array)[index] /= value;

        }

        d->emitter_array.setData(array);

    } else {
        dtkWarn() << "Inputs not specified. Nothing is done";
        d->emitter_array.clearData();
    }
}
开发者ID:NicolasSchnitzler,项目名称:dtk,代码行数:34,代码来源:dtkComposerNodeArrayScalarOperatorModifier.cpp


示例4: dtkTrace

void dtkComposerGraphView::update(void)
{
    if (!d->graphviz_avail)
        return;

    QByteArray content = d->graph->toString().append("\n").toLocal8Bit() ;
    // run dot
    QStringList arglist;
    arglist << "-Tsvg";
    QString command = "dot";
    QProcess cmd;
    QStringList PATH =  QProcessEnvironment::systemEnvironment().value("PATH").split(":") ;
    QDir::setSearchPaths("bin",PATH);
    if(QFile("bin:"+command).exists()) {

        dtkTrace() << "run graphviz dot" ;
        cmd.start(command, arglist, QProcess::Unbuffered | QProcess::ReadWrite);
        cmd.write(content);
        cmd.closeWriteChannel();
        cmd.waitForBytesWritten();
        qlonglong timeout = 3000;
        QString stdout_data;
        if (cmd.waitForFinished(timeout)) {
            QByteArray svg = cmd.readAllStandardOutput();
            this->load(svg);
        } else {
            dtkWarn() << "graphviz timeout !";
        }
    } else {
        d->graphviz_avail = false;
        dtkWarn() << "can't find 'dot' binary in PATH, graphviz probably not installed";
    }
}
开发者ID:drescherjm,项目名称:dtk,代码行数:33,代码来源:dtkComposerGraphView.cpp


示例5: initialize

bool undoRedoRegistrationPlugin::initialize(void)
{
    if (!undoRedoRegistration::registered())        { dtkWarn() << "Unable to register undoRedoRegistration type";    }
    if (!undoRedoRegistrationToolBox::registered()) { dtkWarn() << "Unable to register undoRedoRegistration toolbox"; }
    
    return true;
}
开发者ID:Inria-Asclepios,项目名称:medInria-public,代码行数:7,代码来源:undoRedoRegistrationPlugin.cpp


示例6: dtkWarn

QByteArray dtkDistributedServerDaemon::waitForData(int rank, QString jobid)
{
    dtkDistributedSocket *socket = d->sockets.value(qMakePair(rank, jobid), NULL);

    if(!socket) {
        dtkWarn() << "No socket found for rank " << rank;
        return QByteArray();
    }

    socket->blockSignals(true);

    dtkDistributedMessage *data = NULL;

    if (socket->waitForReadyRead(30000))
        data = socket->parseRequest();
    else
        dtkWarn() << "Data not ready for rank " << rank;

    socket->blockSignals(false);

    if (data) {
        return data->content();
    } else {
        dtkWarn() << "Message not allocated - return void QByteArray";
        return QByteArray();
    }
}
开发者ID:papadop,项目名称:dtk,代码行数:27,代码来源:dtkDistributedServerDaemon.cpp


示例7: dtkWarn

bool itkN4BiasCorrectionPlugin::initialize()
{
    if(!itkN4BiasCorrection::registered())
    {
        dtkWarn() << "Unable to register itkN4BiasCorrection type";
    }

    if ( !itkN4BiasCorrectionToolBox::registered() )
    {
        dtkWarn() << "Unable to register itkN4BiasCorrection toolbox";
    }
    return true;
}
开发者ID:fcollot,项目名称:medInria-public,代码行数:13,代码来源:itkN4BiasCorrectionPlugin.cpp


示例8: dtkWarn

bool iterativeClosestPointPlugin::initialize()
{
    if(!iterativeClosestPointProcess::registered())
    {
        dtkWarn() << "Unable to register iterativeClosestPoint type";
    }
    
    if(!iterativeClosestPointToolBox::registered())
    {
        dtkWarn() << "Unable to register iterativeClosestPoint toolbox";
    }
    
    return true;
}
开发者ID:fcollot,项目名称:medInria-public,代码行数:14,代码来源:iterativeClosestPointPlugin.cpp


示例9: dtkWarn

bool manualRegistrationPlugin::initialize()
{
    if(!manualRegistration::registered())
    {
        dtkWarn() << "Unable to register manualRegistration type";
    }
    
    if ( !manualRegistrationToolBox::registered() )
    {
        dtkWarn() << "Unable to register manualRegistration toolbox";
    }
    
    return true;
}
开发者ID:Inria-Asclepios,项目名称:medInria-public,代码行数:14,代码来源:manualRegistrationPlugin.cpp


示例10: dtkWarn

bool MyPluginPlugin::initialize(void)
{
    MyPluginPlugin::dataFactSingleton = dtkAbstractDataFactory::instance();
    //dataFactorySingleton();
    MyPluginPlugin::processFactSingleton = dtkAbstractProcessFactory::instance();
    //processFactorySingleton();
    
    if(!MyPluginDefaultProcess::registered())
        dtkWarn() << "Unable to register MyPluginProcess type";
    
    if(!MyPluginDefaultProcessDialog::registered())
        dtkWarn() << "Unable to register MyPluginProcessDialog type";
    
    if(!MyPluginDefaultData::registered())
        dtkWarn() << "Unable to register MyPluginData type";
    
    if(!MyPluginDefaultDataDialog::registered())
        dtkWarn() << "Unable to register MyPluginDataDialog type";
    
    if(!MyPluginDefaultDataReader::registered())
        dtkWarn() << "Unable to register MyPluginDataReader type";
    
    if(!MyPluginDefaultDataWriter::registered())
        dtkWarn() << "Unable to register MyPluginDataWriter type";
    
    if(!MyPluginDefaultDataConverter::registered())
        dtkWarn() << "Unable to register MyPluginDataConverter type";
    
    if(!MyPluginDefaultDataCreatorProcessDialog::registered())
        dtkWarn() << "Unable to register MyPluginDataCreatorProcessDialog type";
    
    return true;
}
开发者ID:peterpans01,项目名称:MeshOffsetProcess_Axel,代码行数:33,代码来源:MyPluginPlugin.cpp


示例11: dtkWarn

void dtkComposerNodeStringListSet::run(void)
{
    if (!d->receiver_list.isEmpty() && !d->receiver_value.isEmpty()&& !d->receiver_index.isEmpty()  ) {
        d->list = *(d->receiver_list.data());
        qlonglong index = d->receiver_index.data();
         if (index >= 0 && index < d->list.size())
             d->list.replace(index, d->receiver_value.data());
         else
             dtkWarn() << "bad index value in set string list" << index;
    } else {
        dtkWarn() << "Inputs not specified. Nothing is done";
        d->emitter.clearData();
    }

}
开发者ID:NicolasSchnitzler,项目名称:dtk,代码行数:15,代码来源:dtkComposerNodeStringOperator.cpp


示例12: dtkWarn

bool itkDataSHImageWriterPlugin::initialize()
{
    if(!itkMetaDataSHImageWriter::registered())
    {
        dtkWarn() << "Unable to register itkMetaDataSHImageWriter type";
    }

    return true;
}
开发者ID:Hakim-F,项目名称:medInria-public,代码行数:9,代码来源:itkDataSHImageWriterPlugin.cpp


示例13: dtkWarn

void dtkComposerNodeMetaContainerAt::run(void)
{
    if(!d->receiver_container.isEmpty()) {
        QVariant var_container = d->receiver_container.data();
        dtkMetaContainerSequential m_c = var_container.value<dtkMetaContainerSequential>();
        if(!d->receiver_index.isEmpty()) {
            d->emitter_value.setData(m_c.at(d->receiver_index.data()));

        } else {
            dtkWarn() << "No input index for the at operation. First item of the container is returned.";
            d->emitter_value.setData(m_c.at(0));
        }

    } else {
        dtkWarn() << "No input container for at operation. Nothing is emitted.";
        d->emitter_value.clearData();
    }
}
开发者ID:NicolasSchnitzler,项目名称:dtk,代码行数:18,代码来源:dtkComposerNodeMetaContainer.cpp


示例14: deref

inline void deref(int index, QString & s, const QRegExp & regex, const QHash<QString, QString> & vars, int lineCount) {
    QString varName = regex.cap(1).isEmpty() ? regex.cap(2) : regex.cap(1);
    if (vars.contains(varName)) {
        s.replace(index, regex.matchedLength(), vars[varName]);
    } else {
        s.replace(index, regex.matchedLength(), "");
        dtkWarn() << "Unknown variable name line " << lineCount << " :" << varName;
    }
}
开发者ID:medInria,项目名称:medInria-public,代码行数:9,代码来源:medStyleSheetParser.cpp


示例15: QString

// set method, and also, if necessary, jobid and rank
void dtkDistributedMessage::setMethod(QString method)
{
    QStringList tokens = QString(method).split(QRegExp("/"));
    if (method.startsWith("GET /status")) {
        d->method = STATUS;
    } else if (method.startsWith("PUT /job HTTP")) {
        d->method = NEWJOB;
    } else if (method.startsWith("DELETE /job")) {
        d->jobid  = tokens[2].remove("HTTP").trimmed();
        if (d->headers.contains("x-dtk-finished")) {
            d->method = ENDJOB;
        } else {
            d->method = DELJOB;
        }
    } else if (method.startsWith("DELETE /")) {
        d->method = STOP;
    } else if (method.startsWith("POST /data")) {
        d->method = DATA;
        d->jobid  = tokens[2];
        if (tokens.size() > 2)
            d->rank  = tokens[3].remove("HTTP").toInt();
    } else if (method.startsWith("PUT /rank")) {
        d->method = SETRANK;
        d->jobid  = tokens[2];
        d->rank   = tokens[3].remove("HTTP").toInt();
    } else if (method.startsWith("HTTP/1.1 200 OK")) {
        if (d->headers.contains("x-dtk-status")) {
            d->method = OKSTATUS;
        } else {
            dtkWarn() << "Unsupported method " << method;
        }
    } else if (method.startsWith("HTTP/1.1 201 OK")) {
        d->method = OKJOB;
    } else if (method.startsWith("HTTP/1.1 204 OK")) {
        d->method = OKDEL;
    } else if (method.startsWith("HTTP/1.1 400 OK")) {
        d->method = ERRORJOB;
    } else if (method.startsWith("HTTP/1.1 410 OK")) {
        d->method = ERRORDEL;
    } else {
        dtkWarn() << "Unsupported method " << method;
    }

}
开发者ID:NicolasSchnitzler,项目名称:dtk,代码行数:45,代码来源:dtkDistributedMessage.cpp


示例16: dtkWarn

bool exampleProcessImageFilterPlugin::initialize() {

    //  Register the process

    if (!exampleProcessImageFilter::registered())
        dtkWarn() << "Unable to register exampleProcessImageFilter type";
    else
        dtkWarn() << "ABLE to register exampleProcessImageFilter type";

    //  Register the toolbox of the process with the Custon diffusionToolBox

    if (!medToolBoxFactory::instance()->registerToolBox
            <exampleProcessImageFilterToolBox>("exampleProcessImageFilter", name(), description(), QStringList()<<"diffusion"))
        qDebug() << "Unable to register exampleProcessImageFilter toolbox";
    else
        qDebug() << "ABLE to register exampleProcessImageFilter toolbox";

    return true;
}
开发者ID:Hakim-F,项目名称:medInria-public,代码行数:19,代码来源:exampleProcessImageFilterPlugin.cpp


示例17: initialize

bool itkDataTensorImagePlugin::initialize()
{
    if (!itkDataTensorImageDouble3::registered()) { dtkWarn() << "Unable to register itkDataTensorImageDouble3 type"; }
    if (!itkDataTensorImageFloat3::registered())  { dtkWarn() << "Unable to register itkDataTensorImageFloat3 type";  }
    if (!itkDataTensorImageVtkViewInteractor::registered())  { dtkWarn() << "Unable to register itkDataTensorImageVtkViewInteractor type";  }

    if (!itkMetaDataTensorImageWriter::registered())  { dtkWarn() << "Unable to register itkMetaDataTensorImageWriter type";  }
    if (!itkNiftiDataTensorImageWriter::registered()) { dtkWarn() << "Unable to register itkNiftiDataTensorImageWriter type"; }
    if (!itkNrrdDataTensorImageWriter::registered())  { dtkWarn() << "Unable to register itkNrrdDataTensorImageWriter type";  }

    if (!itkMetaDataTensorImageReader::registered())  { dtkWarn() << "Unable to register itkMetaDataTensorImageReader type";  }
    if (!itkNiftiDataTensorImageReader::registered()) { dtkWarn() << "Unable to register itkNiftiDataTensorImageReader type"; }
    if (!itkNrrdDataTensorImageReader::registered())  { dtkWarn() << "Unable to register itkNrrdDataTensorImageReader type";  }

    return true;
}
开发者ID:Inria-Asclepios,项目名称:medInria-public,代码行数:16,代码来源:itkDataTensorImagePlugin.cpp


示例18: dtkWarn

bool medVtkFibersDataPlugin::initialize()
{
    if (!medVtkFibersData::registered()) {
        dtkWarn() << "Unable to register medVtkFibersData type";
    }

    if (!medVtkFibersDataWriter::registered()) {
        dtkWarn() << "Unable to register medVtkFibersDataWriter type";
    }

    if (!medVtkFibersDataReader::registered()) {
        dtkWarn() << "Unable to register medVtkFibersDataReader type";
    }

    if (!medVtkFibersDataInteractor::registered()) {
        dtkWarn() << "Unable to register medVtkFibersDataInteractor";
    }

    return true;
}
开发者ID:fvichot,项目名称:medInria-public,代码行数:20,代码来源:medVtkFibersDataPlugin.cpp


示例19: dtkWarn

bool reformatPlugin::initialize()
{
    if(!medReformatWorkspace::registered())
    {
        dtkWarn() << "Unable to register medReformatWorkspace type";
    }
    if (!resliceToolBox::registered())
    {
        dtkWarn() << "Unable to register resliceToolBox type";
    }
    if (!medCropToolBox::registered())
    {
        dtkWarn() << "Unable to register medCropToolBox type";
    }
    if (!resampleProcess::registered())
    {
        dtkWarn() << "Unable to register resample process";
    }
    return true;
}
开发者ID:fcollot,项目名称:medInria-public,代码行数:20,代码来源:reformatPlugin.cpp


示例20: dtkWarn

void dtkComposerNodeVectorIntegerOperatorUnaryScalarNorm::run(void)
{
    if (d->receiver_vec.isEmpty()){
        dtkWarn() << "Input not specified. Nothing is done";
        d->value = -1.;

    } else {
        d->value = d->receiver_vec.data()->norm();
    }

}
开发者ID:NicolasSchnitzler,项目名称:dtk,代码行数:11,代码来源:dtkComposerNodeVectorIntegerOperatorUnary.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ dtoh32函数代码示例发布时间:2022-05-30
下一篇:
C++ dtinsert函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap