示例#1
0
void ImageSliceIO::load ( UcharGridData& data )
{
    QDir sliceDataDir ( QString::fromStdString ( _dirPath ) );

    QStringList filters;
    filters << "*.bmp" << "*.dib" << "*.jpeg" << "*.jpg" << "*.jpe" << "*.jp2" <<
            "*.png" << "*.pbm" << "*.pgm" << "*.ppm" << "*.sr" << "*.ras" <<
            "*.tiff" << "*.tif";

    sliceDataDir.setFilter ( QDir::Files );
    sliceDataDir.setNameFilters ( filters );
    QStringList imageNames = sliceDataDir.entryList();

    qDebug() << imageNames;

    QStringList imageFiles;
    int depth =  imageNames.length();
    for ( int z = 0; z < depth; z++ )
    {
        QString imageFile = sliceDataDir.absoluteFilePath ( imageNames[z] );
        imageFiles << imageFile;
    }


    initialLoad ( depth, imageFiles[0].toStdString(), data );

    for ( int z = 0; z < depth; z++ )
    {
        QString imageFile = imageFiles[z];
        loadDepth ( z, imageFile.toStdString(), data );
    }
}
示例#2
0
文件: xgui.cpp 项目: q5sys/pcbsd
void XGUI::ProgramInit()
{
    
    //gridLayout_4->setMargin(0);
    //gridLayout_4->setSpacing(0);
    
    // Load the screen resolutions
    loadResolutions();

    // Load the drivers
    loadDrivers();

    // Load the Depth
    loadDepth();

    // Load the Device Information
    loadDeviceInformation();
   
    // Disable the monitor advanced group box
    monitorChangedSlot();

    // Check for an unprobed monitor
    checkUnprobedMonitor(); 

    // Connect our Dual-head checkbox / slot
    connect(checkDualHead, SIGNAL( clicked() ), this, SLOT( dualChangedSlot() ) );
    connect(checkMonitorSync, SIGNAL( clicked() ), this, SLOT( monitorChangedSlot() ) );
    connect(pushApply, SIGNAL( clicked() ), this, SLOT( applySlot() ) );
    connect(pushClose, SIGNAL( clicked() ), this, SLOT( closeSlot() ) );

    // Check out dualChangedSlot to ensure we disable the box by default
    dualChangedSlot();
}
示例#3
0
game::game()
{
    Json::Value matroot = jsonParseFile("data/materials.json");
    for (unsigned int i = 0; i < matroot.size(); i++)
        materials.push_back(new material(matroot[i]));
    wld = new phys::world();
    loadDepth("data/depth.png");
    buoyancy = 4.0;
    strength = 0.01;
    waveheight = 1.0;
    waterpressure = 0.3;
    seadepth = 150;
    showstress = false;
    quickwaterfix = false;
    assertSettings();
}