75 QVector<MriSlice>& slices,
95 QString fileName = QString(
"%1/COR-%2").arg(dir).arg(k + 1, 3, 10, QChar(
'0'));
98 if (!file.open(QIODevice::ReadOnly)) {
99 qCritical() <<
"MriCorIO::read - Could not open COR file" << fileName;
103 QByteArray data = file.readAll();
106 if (data.size() < nPixels) {
107 qCritical() <<
"MriCorIO::read - COR file" << fileName <<
"is too small:"
108 << data.size() <<
"bytes (expected" << nPixels <<
")";
122 slice.
pixels.resize(nPixels);
123 memcpy(slice.
pixels.data(), data.constData(), nPixels);
130 rot << -1.0f, 0.0f, 0.0f,
134 Eigen::Vector3f move;
135 move << 0.128f, -0.128f +
static_cast<float>(k) / 1000.0f, 0.128f;
141 printf(
"Read %d COR slices from %s\n",
COR_NSLICE, qPrintable(dir));