9 class ImageProductSource_Node :
public NodeInternal
12 std::string product_path;
15 ImageProductSource_Node()
16 : NodeInternal(
"Image Product Source")
18 outputs.push_back({
"Product"});
23 outputs[0].ptr = products::loadProduct(product_path);
30 ImGui::SetNextItemWidth(200 * ui_scale);
31 ImGui::InputText(
"Path", &product_path);
34 nlohmann::json to_json()
37 j[
"path"] = product_path;
41 void from_json(nlohmann::json j)
43 product_path = j[
"path"];
47 class ImageProductExpression_Node :
public NodeInternal
50 std::string expression;
52 bool processing =
false;
56 ImageProductExpression_Node()
57 : NodeInternal(
"Image Product Expression")
59 inputs.push_back({
"Product"});
60 outputs.push_back({
"Image"});
66 std::shared_ptr<satdump::products::ImageProduct> img_pro = std::static_pointer_cast<satdump::products::ImageProduct>(inputs[0].ptr);
68 std::shared_ptr<image::Image> img_out = std::make_shared<image::Image>();
69 *img_out = products::generate_expression_product_composite(img_pro.get(), expression, &progress);
71 outputs[0].ptr = img_out;
79 ImGui::SetNextItemWidth(200 * ui_scale);
80 ImGui::InputTextMultiline(
"Expression", &expression);
83 ImGui::ProgressBar(progress, {200 * ui_scale, 0});
86 nlohmann::json to_json()
89 j[
"expression"] = expression;
93 void from_json(nlohmann::json j)
95 expression = j[
"expression"];