Пример #1
0
void ZFlyEmDataInfo::configure(const ZDvidInfo &info)
{
  m_stackSize = info.getStackSize();
  m_voxelResolution[0] = info.getVoxelResolution().voxelSizeX();
  m_voxelResolution[1] = info.getVoxelResolution().voxelSizeY();
  m_voxelResolution[2] = info.getVoxelResolution().voxelSizeZ();
  m_startCoordinates[0] = info.getStartCoordinates().getX();
  m_startCoordinates[1] = info.getStartCoordinates().getY();
  m_startCoordinates[2] = info.getStartCoordinates().getZ();
}
Пример #2
0
void DvidImageDialog::setSinglePlane()
{
  if (m_singlePlaneDialog->exec()) {
    ZDvidReader reader;
    if (reader.open(m_dvidTarget)) {
      QString infoString = reader.readInfo("grayscale");

      qDebug() << infoString;

      ZDvidInfo dvidInfo;
      dvidInfo.setFromJsonString(infoString.toStdString());

      int z = m_singlePlaneDialog->getValue();

      ui->xSpinBox->setValue(dvidInfo.getStartCoordinates().getX());
      ui->ySpinBox->setValue(dvidInfo.getStartCoordinates().getY());
      ui->zSpinBox->setValue(z);

      ui->widthSpinBox->setValue(dvidInfo.getStackSize()[0]);
      ui->heightSpinBox->setValue(dvidInfo.getStackSize()[1]);
      ui->depthSpinBox->setValue(1);
    }
  }
}