jfjoch_viewer: opens the serial XFEL inputs, and the files of one dataset together
The viewer reads what rugnux reads: HDF5 files with a /metadata panel table, Cheetah CXI single-panel stacks and LCLS-I XTC streams, by their content as the raw sweeps are. The open dialog takes several files; they are one dataset (as on rugnux's command line), and a CrystFEL geometry file among them is their module geometry. The images are shown in detector units, at the geometry the files state. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015CeEGgpKdfkCTJb3YNMJcu
This commit is contained in:
1 parent
ebce906025
commit
f2e93d847c
5 files changed
+62
-6
No files matched your search
@@ -290,8 +290,34 @@ void JFJochImageReadingWorker::LoadFile_i(const QString &filename, qint64 image_
|
||||
raw_runs_.clear();
|
||||
raw_active_ = "Original";
|
||||
const std::string path = filename.toStdString();
|
||||
// The files of one serial XFEL dataset, where the open dialog gave several: this one and
|
||||
// the rest, a CrystFEL geometry file among them taken as their module geometry.
|
||||
std::vector<std::string> files;
|
||||
std::string geometry;
|
||||
if (pending_files_.contains(filename))
|
||||
for (const auto &f: pending_files_) {
|
||||
if (f.endsWith(".geom"))
|
||||
geometry = f.toStdString();
|
||||
else
|
||||
files.push_back(f.toStdString());
|
||||
}
|
||||
else
|
||||
files.push_back(path);
|
||||
pending_files_.clear();
|
||||
cbf_mode = true;
|
||||
if (JFJochCBFReader::CanRead(path)) {
|
||||
if (!geometry.empty()) {
|
||||
file_reader = &xfel_reader;
|
||||
xfel_reader.ReadFiles(files, geometry);
|
||||
} else if (JFJochXFELReader::CanReadPanelTable(path)) {
|
||||
file_reader = &xfel_reader;
|
||||
xfel_reader.ReadPanelTable(files);
|
||||
} else if (JFJochXFELReader::CanReadCXI(path)) {
|
||||
file_reader = &xfel_reader;
|
||||
xfel_reader.ReadCXI(files);
|
||||
} else if (JFJochXTCReader::CanRead(path)) {
|
||||
file_reader = &xtc_reader;
|
||||
xtc_reader.ReadFiles(files);
|
||||
} else if (JFJochCBFReader::CanRead(path)) {
|
||||
file_reader = &cbf_reader;
|
||||
cbf_reader.ReadFiles(path);
|
||||
} else if (JFJochMarCCDReader::CanRead(path)) {
|
||||
@@ -365,6 +391,11 @@ void JFJochImageReadingWorker::LoadFile_i(const QString &filename, qint64 image_
|
||||
}
|
||||
}
|
||||
|
||||
void JFJochImageReadingWorker::SetFileList(const QStringList &files) {
|
||||
QMutexLocker ul(&m);
|
||||
pending_files_ = files;
|
||||
}
|
||||
|
||||
void JFJochImageReadingWorker::LoadFile(const QString &filename, qint64 image_number, qint64 summation, bool retry) {
|
||||
QMutexLocker ul(&m);
|
||||
|
||||
|
||||
Reference in new issue
Block a user