jfjoch_viewer: Read image scale factor
This commit is contained in:
@@ -307,6 +307,8 @@ void JFJochHDF5Reader::ReadFile(const std::string& filename) {
|
||||
dataset->experiment.IndexingAlgorithm(IndexingAlgorithmEnum::FFT);
|
||||
else if (indexing == "ffbidx")
|
||||
dataset->experiment.IndexingAlgorithm(IndexingAlgorithmEnum::FFBIDX);
|
||||
|
||||
dataset->scale_factor = master_file->ReadOptVector<float>("/entry/MX/imageScaleFactor");
|
||||
}
|
||||
|
||||
auto ring_current_A = master_file->GetOptFloat("/entry/source/current");
|
||||
|
||||
@@ -41,6 +41,8 @@ struct JFJochReaderDataset {
|
||||
std::vector<float> mosaicity_deg;
|
||||
std::vector<float> b_factor;
|
||||
|
||||
std::vector<float> scale_factor;
|
||||
|
||||
std::vector<int64_t> max_value;
|
||||
|
||||
std::vector<std::string> roi;
|
||||
|
||||
@@ -90,6 +90,10 @@ void JFJochViewerDatasetInfo::UpdateLabels() {
|
||||
combo_box->addItem("Mosaicity", 9);
|
||||
}
|
||||
|
||||
if (!dataset->scale_factor.empty()) {
|
||||
combo_box->insertSeparator(1000);
|
||||
combo_box->addItem("Scale factor", 10);
|
||||
}
|
||||
for (int i = 0; i < this->dataset->roi.size(); i++) {
|
||||
std::string name = std::string("ROI ") + this->dataset->roi[i];
|
||||
combo_box->insertSeparator(1000);
|
||||
@@ -167,6 +171,8 @@ void JFJochViewerDatasetInfo::UpdatePlot() {
|
||||
data = dataset->b_factor;
|
||||
} else if (val == 9) {
|
||||
data = dataset->mosaicity_deg;
|
||||
} else if (val == 10) {
|
||||
data = dataset->scale_factor;
|
||||
} else if (val >= 100) {
|
||||
int roi_index = (val - 100) / 4;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user