v1.0.0-rc.50
This commit is contained in:
@@ -18,18 +18,30 @@ void JFJochReader::LoadImage(int64_t image_number, int64_t summation_factor) {
|
||||
image->AddImage(*tmp);
|
||||
}
|
||||
}
|
||||
if (roi)
|
||||
image->CalcROI(roi.get());
|
||||
image->BraggIntegrate(bragg_integration_settings);
|
||||
current_image = image;
|
||||
CalcROI();
|
||||
}
|
||||
|
||||
std::shared_ptr<JFJochReaderImage> JFJochReader::CopyImage() {
|
||||
std::shared_ptr<const JFJochReaderImage> JFJochReader::CopyImage() {
|
||||
return current_image;
|
||||
}
|
||||
|
||||
void JFJochReader::CalcROI() {
|
||||
if (!current_image)
|
||||
return;
|
||||
current_image->CalcROI(roi.get());
|
||||
if (roi && current_image) {
|
||||
auto image = std::make_shared<JFJochReaderImage>(*current_image);
|
||||
image->CalcROI(roi.get());
|
||||
current_image = image;
|
||||
}
|
||||
}
|
||||
|
||||
void JFJochReader::BraggIntegrate() {
|
||||
if (roi && current_image) {
|
||||
auto image = std::make_shared<JFJochReaderImage>(*current_image);
|
||||
image->BraggIntegrate(bragg_integration_settings);
|
||||
current_image = image;
|
||||
}
|
||||
}
|
||||
|
||||
void JFJochReader::ClearROI() {
|
||||
@@ -53,11 +65,32 @@ void JFJochReader::SetROI(const ROICircle &input) {
|
||||
void JFJochReader::SetStartMessage(const std::shared_ptr<JFJochReaderDataset> &val) {
|
||||
std::unique_lock ul(start_message_mutex);
|
||||
start_message = val;
|
||||
if (start_message)
|
||||
start_message->experiment.ImportBraggIntegrationSettings(bragg_integration_settings);
|
||||
}
|
||||
|
||||
std::shared_ptr<JFJochReaderDataset> JFJochReader::GetStartMessage() const {
|
||||
std::shared_ptr<const JFJochReaderDataset> JFJochReader::GetStartMessage() const {
|
||||
std::unique_lock ul(start_message_mutex);
|
||||
if (!start_message)
|
||||
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid, "File not loaded");
|
||||
return start_message;
|
||||
}
|
||||
|
||||
void JFJochReader::SetBraggIntegrationSettings(const BraggIntegrationSettings &settings) {
|
||||
std::unique_lock lg(current_image_mutex);
|
||||
bragg_integration_settings = settings;
|
||||
BraggIntegrate();
|
||||
}
|
||||
|
||||
BraggIntegrationSettings JFJochReader::GetBraggIntegrationSettings() const {
|
||||
std::unique_lock lg(current_image_mutex);
|
||||
return bragg_integration_settings;
|
||||
}
|
||||
|
||||
void JFJochReader::UpdateExperiment(const DiffractionExperiment &experiment) {
|
||||
std::scoped_lock lock(current_image_mutex, start_message_mutex);
|
||||
|
||||
// auto new_dataset = std::make_shared<JFJochReaderDataset>(current_image.get());
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user