<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.40.0 

Copyright (C) The free-astro development team, 2019-2023

This file is part of Siril.

Siril is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Siril is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Siril.  If not, see <http://www.gnu.org/licenses/>.

-->
<interface>
  <requires lib="gtk+" version="3.22"/>
  <!-- interface-local-resource-path ../.. -->
  <!-- interface-css-provider-path siril.css -->
  <!-- interface-license-type gplv3 -->
  <!-- interface-name Siril -->
  <!-- interface-description Tool for astronomy image processing -->
  <!-- interface-copyright The free-astro development team, 2023 -->
  <object class="GtkDialog" id="merge_cfa_dialog">
    <property name="width-request">500</property>
    <property name="height-request">1</property>
    <property name="can-focus">False</property>
    <property name="title" translatable="yes">Merge CFA Elements</property>
    <property name="type-hint">dialog</property>
    <signal name="delete-event" handler="merge_cfa_hide_on_delete" swapped="no"/>
    <signal name="show" handler="on_merge_cfa_show" swapped="no"/>
    <child internal-child="vbox">
      <object class="GtkBox">
        <property name="can-focus">False</property>
        <property name="orientation">vertical</property>
        <property name="spacing">2</property>
        <child internal-child="action_area">
          <object class="GtkButtonBox">
            <property name="can-focus">False</property>
            <property name="layout-style">end</property>
            <child>
              <object class="GtkButton" id="merge_cfa_cancel">
                <property name="label" translatable="yes">Cancel</property>
                <property name="visible">True</property>
                <property name="can-focus">True</property>
                <property name="receives-default">True</property>
                <signal name="clicked" handler="on_merge_cfa_close_clicked" swapped="no"/>
              </object>
              <packing>
                <property name="expand">True</property>
                <property name="fill">True</property>
                <property name="position">0</property>
              </packing>
            </child>
            <child>
              <object class="GtkButton" id="merge_cfa_reset">
                <property name="label" translatable="yes">Reset</property>
                <property name="visible">True</property>
                <property name="can-focus">True</property>
                <property name="receives-default">True</property>
                <signal name="clicked" handler="on_merge_cfa_reset_clicked" swapped="no"/>
              </object>
              <packing>
                <property name="expand">True</property>
                <property name="fill">True</property>
                <property name="position">1</property>
              </packing>
            </child>
            <child>
              <object class="GtkButton" id="merge_cfa_apply">
                <property name="label" translatable="yes">Apply</property>
                <property name="visible">True</property>
                <property name="can-focus">True</property>
                <property name="receives-default">True</property>
                <signal name="clicked" handler="on_merge_cfa_apply_clicked" swapped="no"/>
                <style>
                  <class name="suggested-action"/>
                </style>
              </object>
              <packing>
                <property name="expand">True</property>
                <property name="fill">True</property>
                <property name="position">2</property>
              </packing>
            </child>
          </object>
          <packing>
            <property name="expand">False</property>
            <property name="fill">False</property>
            <property name="position">0</property>
          </packing>
        </child>
        <child>
          <object class="GtkFrame">
            <property name="visible">True</property>
            <property name="can-focus">False</property>
            <property name="label-xalign">0</property>
            <property name="shadow-type">none</property>
            <child>
              <object class="GtkAlignment">
                <property name="visible">True</property>
                <property name="can-focus">False</property>
                <property name="left-padding">12</property>
                <child>
                  <!-- n-columns=2 n-rows=4 -->
                  <object class="GtkGrid">
                    <property name="visible">True</property>
                    <property name="can-focus">False</property>
                    <property name="row-spacing">10</property>
                    <property name="column-spacing">10</property>
                    <child>
                      <object class="GtkLabel">
                        <property name="visible">True</property>
                        <property name="can-focus">False</property>
                        <property name="label" translatable="yes">CFA0</property>
                      </object>
                      <packing>
                        <property name="left-attach">0</property>
                        <property name="top-attach">0</property>
                      </packing>
                    </child>
                    <child>
                      <object class="GtkLabel">
                        <property name="visible">True</property>
                        <property name="can-focus">False</property>
                        <property name="label" translatable="yes">CFA1</property>
                      </object>
                      <packing>
                        <property name="left-attach">0</property>
                        <property name="top-attach">1</property>
                      </packing>
                    </child>
                    <child>
                      <object class="GtkLabel">
                        <property name="visible">True</property>
                        <property name="can-focus">False</property>
                        <property name="label" translatable="yes">CFA2</property>
                      </object>
                      <packing>
                        <property name="left-attach">0</property>
                        <property name="top-attach">2</property>
                      </packing>
                    </child>
                    <child>
                      <object class="GtkLabel">
                        <property name="visible">True</property>
                        <property name="can-focus">False</property>
                        <property name="label" translatable="yes">CFA3</property>
                      </object>
                      <packing>
                        <property name="left-attach">0</property>
                        <property name="top-attach">3</property>
                      </packing>
                    </child>
                    <child>
                      <object class="GtkFileChooserButton" id="filechooser_cfa0">
                        <property name="width-request">256</property>
                        <property name="visible">True</property>
                        <property name="can-focus">False</property>
                        <property name="tooltip-text" translatable="yes">Select the image containing the CFA0 Bayer subpattern. If this has been produced using Siril's Split CFA function it will have the CFA0 prefix.</property>
                        <property name="local-only">False</property>
                        <property name="title" translatable="yes"/>
                        <signal name="file-set" handler="on_merge_cfa_filechooser_CFA0_file_set" swapped="no"/>
                      </object>
                      <packing>
                        <property name="left-attach">1</property>
                        <property name="top-attach">0</property>
                      </packing>
                    </child>
                    <child>
                      <object class="GtkFileChooserButton" id="filechooser_cfa1">
                        <property name="width-request">256</property>
                        <property name="visible">True</property>
                        <property name="can-focus">False</property>
                        <property name="tooltip-text" translatable="yes">Select the image containing the CFA1 Bayer subpattern. If this has been produced using Siril's Split CFA function it will have the CFA1 prefix.</property>
                        <property name="local-only">False</property>
                        <property name="title" translatable="yes"/>
                        <signal name="file-set" handler="on_merge_cfa_filechooser_CFA1_file_set" swapped="no"/>
                      </object>
                      <packing>
                        <property name="left-attach">1</property>
                        <property name="top-attach">1</property>
                      </packing>
                    </child>
                    <child>
                      <object class="GtkFileChooserButton" id="filechooser_cfa2">
                        <property name="width-request">256</property>
                        <property name="visible">True</property>
                        <property name="can-focus">False</property>
                        <property name="tooltip-text" translatable="yes">Select the image containing the CFA2 Bayer subpattern. If this has been produced using Siril's Split CFA function it will have the CFA2 prefix.</property>
                        <property name="local-only">False</property>
                        <property name="title" translatable="yes"/>
                        <signal name="file-set" handler="on_merge_cfa_filechooser_CFA2_file_set" swapped="no"/>
                      </object>
                      <packing>
                        <property name="left-attach">1</property>
                        <property name="top-attach">2</property>
                      </packing>
                    </child>
                    <child>
                      <object class="GtkFileChooserButton" id="filechooser_cfa3">
                        <property name="width-request">256</property>
                        <property name="visible">True</property>
                        <property name="can-focus">False</property>
                        <property name="tooltip-text" translatable="yes">Select the image containing the CFA3 Bayer subpattern. If this has been produced using Siril's Split CFA function it will have the CFA3 prefix.</property>
                        <property name="local-only">False</property>
                        <property name="title" translatable="yes"/>
                        <signal name="file-set" handler="on_merge_cfa_filechooser_CFA3_file_set" swapped="no"/>
                      </object>
                      <packing>
                        <property name="left-attach">1</property>
                        <property name="top-attach">3</property>
                      </packing>
                    </child>
                  </object>
                </child>
              </object>
            </child>
            <child type="label">
              <object class="GtkLabel">
                <property name="visible">True</property>
                <property name="can-focus">False</property>
                <property name="label" translatable="yes">Input Files</property>
                <attributes>
                  <attribute name="weight" value="bold"/>
                </attributes>
              </object>
            </child>
          </object>
          <packing>
            <property name="expand">False</property>
            <property name="fill">True</property>
            <property name="position">0</property>
          </packing>
        </child>
        <child>
          <object class="GtkFrame">
            <property name="visible">True</property>
            <property name="can-focus">False</property>
            <property name="margin-top">10</property>
            <property name="label-xalign">0</property>
            <property name="shadow-type">none</property>
            <child>
              <object class="GtkAlignment">
                <property name="visible">True</property>
                <property name="can-focus">False</property>
                <property name="left-padding">12</property>
                <child>
                  <object class="GtkComboBoxText" id="merge_cfa_pattern">
                    <property name="visible">True</property>
                    <property name="can-focus">False</property>
                    <property name="tooltip-text" translatable="yes">Sets the Bayer pattern header to be applied to the result. This must match the Bayer pattern of the image that the original Bayer subchannels were split from.</property>
                    <property name="halign">start</property>
                    <property name="active">0</property>
                    <items>
                      <item translatable="yes">RGGB</item>
                      <item translatable="yes">BGGR</item>
                      <item translatable="yes">GBRG</item>
                      <item translatable="yes">GRBG</item>
                    </items>
                  </object>
                </child>
              </object>
            </child>
            <child type="label">
              <object class="GtkLabel">
                <property name="visible">True</property>
                <property name="can-focus">False</property>
                <property name="label" translatable="yes">Bayer Pattern</property>
                <attributes>
                  <attribute name="weight" value="bold"/>
                </attributes>
              </object>
            </child>
          </object>
          <packing>
            <property name="expand">False</property>
            <property name="fill">True</property>
            <property name="position">1</property>
          </packing>
        </child>
        <child>
          <object class="GtkCheckButton" id="merge_cfa_seqapply">
            <property name="label" translatable="yes">Apply to sequence</property>
            <property name="visible">True</property>
            <property name="can-focus">True</property>
            <property name="receives-default">False</property>
            <property name="tooltip-text" translatable="yes">Merges separated CFA images for a sequence. You should have the sequence for CFA0 loaded to start with, and ensure filenames are consistent across images for all CFA channels.</property>
            <property name="halign">start</property>
            <property name="margin-top">10</property>
            <property name="draw-indicator">True</property>
            <signal name="toggled" handler="on_merge_cfa_seqapply_toggled" swapped="no"/>
          </object>
          <packing>
            <property name="expand">False</property>
            <property name="fill">True</property>
            <property name="position">2</property>
          </packing>
        </child>
        <child>
          <object class="GtkBox">
            <property name="width-request">500</property>
            <property name="visible">True</property>
            <property name="can-focus">False</property>
            <property name="orientation">vertical</property>
            <child>
              <!-- n-columns=2 n-rows=2 -->
              <object class="GtkGrid" id="grid_merge_cfa_prefixes">
                <property name="visible">True</property>
                <property name="can-focus">False</property>
                <property name="halign">start</property>
                <property name="hexpand">True</property>
                <property name="row-spacing">5</property>
                <property name="column-spacing">10</property>
                <child>
                  <object class="GtkLabel">
                    <property name="visible">True</property>
                    <property name="can-focus">False</property>
                    <property name="halign">start</property>
                    <property name="label" translatable="yes">CFA marker string</property>
                  </object>
                  <packing>
                    <property name="left-attach">0</property>
                    <property name="top-attach">0</property>
                  </packing>
                </child>
                <child>
                  <object class="GtkLabel">
                    <property name="visible">True</property>
                    <property name="can-focus">False</property>
                    <property name="label" translatable="yes">Sequence output prefix</property>
                  </object>
                  <packing>
                    <property name="left-attach">0</property>
                    <property name="top-attach">1</property>
                  </packing>
                </child>
                <child>
                  <object class="GtkEntry" id="entryMergeCFAin">
                    <property name="visible">True</property>
                    <property name="can-focus">True</property>
                    <property name="tooltip-text" translatable="yes">Identifier prefix used to denote CFA number in the separate CFA channel images. This should be set to whatever sequence prefix was used when the split_cfa process was run (default: CFA).</property>
                    <property name="hexpand">True</property>
                    <property name="max-length">10</property>
                    <property name="width-chars">10</property>
                    <property name="max-width-chars">10</property>
                    <property name="text">CFA</property>
                    <property name="input-hints">GTK_INPUT_HINT_NO_EMOJI | GTK_INPUT_HINT_NONE</property>
                  </object>
                  <packing>
                    <property name="left-attach">1</property>
                    <property name="top-attach">0</property>
                  </packing>
                </child>
                <child>
                  <object class="GtkEntry" id="entryMergeCFAout">
                    <property name="visible">True</property>
                    <property name="can-focus">True</property>
                    <property name="tooltip-text" translatable="yes">Prefix of the image names resulting from the merge CFA process.</property>
                    <property name="hexpand">True</property>
                    <property name="max-length">10</property>
                    <property name="width-chars">10</property>
                    <property name="max-width-chars">10</property>
                    <property name="text">mCFA_</property>
                    <property name="input-hints">GTK_INPUT_HINT_NO_EMOJI | GTK_INPUT_HINT_NONE</property>
                  </object>
                  <packing>
                    <property name="left-attach">1</property>
                    <property name="top-attach">1</property>
                  </packing>
                </child>
              </object>
              <packing>
                <property name="expand">False</property>
                <property name="fill">True</property>
                <property name="position">0</property>
              </packing>
            </child>
            <child>
              <object class="GtkFrame" id="merge_cfa_seq_controls">
                <property name="can-focus">False</property>
                <property name="margin-top">10</property>
                <property name="label-xalign">0</property>
                <property name="shadow-type">none</property>
                <child>
                  <object class="GtkAlignment">
                    <property name="visible">True</property>
                    <property name="can-focus">False</property>
                    <property name="left-padding">12</property>
                    <child>
                      <object class="GtkBox">
                        <property name="visible">True</property>
                        <property name="can-focus">False</property>
                        <property name="orientation">vertical</property>
                        <child>
                          <object class="GtkLabel">
                            <property name="width-request">500</property>
                            <property name="visible">True</property>
                            <property name="can-focus">False</property>
                            <property name="margin-end">8</property>
                            <property name="label" translatable="yes">You must have one of the CFA sequences selected in the main window sequence tab. Siril will autodetect which CFA channel it corresponds to from the CFA marker string. All 4 sequences must have the same name format and CFA marker string, differing only by the number following the string (e.g. CFA0, CFA1, CFA2 and CFA3).

Each image in the sequence will only be processed if the corresponding images for the other 3 CFA channels can be found. Both G1 and G2 files are required. Note this means that if you discard an image containing one CFA channel of an image between split_cfa and merge_cfa, merge_cfa will be unable to merge the remaining CFA channels for that image. All sequence filtering should be done either before split_cfa or after merge_cfa.

Note that CFA merge does not work for X-Trans files.</property>
                            <property name="use-markup">True</property>
                            <property name="wrap">True</property>
                            <property name="max-width-chars">80</property>
                          </object>
                          <packing>
                            <property name="expand">False</property>
                            <property name="fill">True</property>
                            <property name="position">2</property>
                          </packing>
                        </child>
                      </object>
                    </child>
                  </object>
                </child>
                <child type="label">
                  <object class="GtkLabel">
                    <property name="visible">True</property>
                    <property name="can-focus">False</property>
                    <property name="label" translatable="yes">Sequences</property>
                    <attributes>
                      <attribute name="weight" value="bold"/>
                    </attributes>
                  </object>
                </child>
              </object>
              <packing>
                <property name="expand">False</property>
                <property name="fill">True</property>
                <property name="position">1</property>
              </packing>
            </child>
          </object>
          <packing>
            <property name="expand">False</property>
            <property name="fill">True</property>
            <property name="position">3</property>
          </packing>
        </child>
      </object>
    </child>
  </object>
</interface>
