42 wxXmlResource::Get()->LoadDialog(
this, parent,
"pano_output_dialog");
45 wxConfigBase * cfg = wxConfigBase::Get();
55 wxConfigBase* config = wxConfigBase::Get();
56 if (m_newOpt.fovCalcSupported(m_newOpt.getProjection()))
67 m_aspect=(double)m_newOpt.getROI().height()/m_newOpt.getROI().width();
75 XRCCTRL(*
this,
"output_jpeg_quality", wxSpinCtrl)->SetValue(i);
77 XRCCTRL(*
this,
"output_tiff_compression", wxChoice)->SetSelection(i);
79 XRCCTRL(*
this,
"output_ldr_format", wxChoice)->SetSelection(i);
81 if (m_newOpt.outputImageTypeHDR ==
"exr")
83 XRCCTRL(*
this,
"output_hdr_format", wxChoice)->SetSelection(0);
84 XRCCTRL(*
this,
"output_hdr_tiff_compression", wxChoice)->SetSelection(2);
88 XRCCTRL(*
this,
"output_hdr_format", wxChoice)->SetSelection(1);
89 if (m_newOpt.outputImageTypeHDRCompression ==
"PACKBITS")
91 XRCCTRL(*
this,
"output_hdr_tiff_compression", wxChoice)->SetSelection(1);
95 if (m_newOpt.outputImageTypeHDRCompression ==
"LZW")
97 XRCCTRL(*
this,
"output_hdr_tiff_compression", wxChoice)->SetSelection(2);
101 if (m_newOpt.outputImageTypeHDRCompression ==
"DEFLATE")
103 XRCCTRL(*
this,
"output_hdr_tiff_compression", wxChoice)->SetSelection(3);
107 XRCCTRL(*
this,
"output_hdr_tiff_compression", wxChoice)->SetSelection(0);
113 wxCommandEvent dummy;
133 wxConfigBase::Get()->Flush();
140 wxString ext1=file1.GetExt().Lower();
141 if(ext1 ==
".hdr" || ext1 ==
".exr" || ext1==
"hdr" || ext1==
"exr")
143 XRCCTRL(*
this,
"output_normal", wxCheckBox)->SetValue(
true);
144 XRCCTRL(*
this,
"output_normal", wxCheckBox)->Enable(
true);
145 XRCCTRL(*
this,
"output_normal_bitmap", wxStaticBitmap)->Enable(
true);
151 XRCCTRL(*
this,
"output_hdr", wxCheckBox)->Hide();
152 XRCCTRL(*
this,
"output_hdr_bitmap", wxStaticBitmap)->Hide();
153 XRCCTRL(*
this,
"output_hdr_format_label", wxStaticText)->Hide();
154 XRCCTRL(*
this,
"output_hdr_format", wxChoice)->Hide();
155 XRCCTRL(*
this,
"output_hdr_compression_label", wxStaticText)->Hide();
156 XRCCTRL(*
this,
"output_hdr_tiff_compression", wxChoice)->Hide();
158 GetSizer()->Fit(
this);
163 XRCCTRL(*
this,
"output_normal", wxCheckBox)->SetValue(
true);
164 XRCCTRL(*
this,
"output_normal", wxCheckBox)->Enable(
true);
165 XRCCTRL(*
this,
"output_normal_bitmap", wxStaticBitmap)->Enable(
true);
171 XRCCTRL(*
this,
"output_fused_blended", wxCheckBox)->Enable(
true);
172 XRCCTRL(*
this,
"output_fused_blended_bitmap", wxStaticBitmap)->Enable(
true);
173 XRCCTRL(*
this,
"output_blended_fused", wxCheckBox)->Enable(
true);
174 XRCCTRL(*
this,
"output_blended_fused_bitmap", wxStaticBitmap)->Enable(
true);
177 XRCCTRL(*
this,
"output_hdr", wxCheckBox)->Enable(
true);
178 XRCCTRL(*
this,
"output_hdr_bitmap", wxStaticBitmap)->Enable(
true);
182 XRCCTRL(*
this,
"output_fused_blended", wxCheckBox)->SetValue(
true);
188 XRCCTRL(*
this,
"output_normal", wxCheckBox)->SetValue(
true);
189 XRCCTRL(*
this,
"output_normal", wxCheckBox)->Enable(
true);
190 XRCCTRL(*
this,
"output_normal_bitmap", wxStaticBitmap)->Enable(
true);
194 XRCCTRL(*
this,
"output_blended_fused", wxCheckBox)->SetValue(
true);
201 bool output_normal=XRCCTRL(*
this,
"output_normal", wxCheckBox)->GetValue();
202 bool output_fused_blended=XRCCTRL(*
this,
"output_fused_blended", wxCheckBox)->GetValue();
203 bool output_blended_fused=XRCCTRL(*
this,
"output_blended_fused", wxCheckBox)->GetValue();
204 bool output_hdr=XRCCTRL(*
this,
"output_hdr", wxCheckBox)->GetValue();
205 bool keep_intermediate=XRCCTRL(*
this,
"output_keep_intermediate", wxCheckBox)->GetValue();
221 if(output_normal || output_fused_blended || output_blended_fused)
225 m_newOpt.
quality=XRCCTRL(*
this,
"output_jpeg_quality", wxSpinCtrl)->GetValue();
231 switch(XRCCTRL(*
this,
"output_tiff_compression", wxChoice)->GetSelection())
259 switch(XRCCTRL(*
this,
"output_hdr_tiff_compression", wxChoice)->GetSelection())
300 bool output_normal=XRCCTRL(*
this,
"output_normal", wxCheckBox)->GetValue();
301 bool output_fused_blended=XRCCTRL(*
this,
"output_fused_blended", wxCheckBox)->GetValue();
302 bool output_blended_fused=XRCCTRL(*
this,
"output_blended_fused", wxCheckBox)->GetValue();
303 bool output_hdr=XRCCTRL(*
this,
"output_hdr", wxCheckBox)->GetValue();
305 XRCCTRL(*
this,
"wxID_OK", wxButton)->Enable(output_normal || output_fused_blended || output_blended_fused || output_hdr);
306 XRCCTRL(*
this,
"output_ldr_format_label", wxStaticText)->Enable(output_normal || output_fused_blended || output_blended_fused);
307 XRCCTRL(*
this,
"output_ldr_format", wxChoice)->Enable(output_normal || output_fused_blended || output_blended_fused);
308 XRCCTRL(*
this,
"output_ldr_compression_label", wxStaticText)->Enable(output_normal || output_fused_blended || output_blended_fused);
309 XRCCTRL(*
this,
"output_jpeg_quality", wxSpinCtrl)->Enable(output_normal || output_fused_blended || output_blended_fused);
310 XRCCTRL(*
this,
"output_tiff_compression", wxChoice)->Enable(output_normal || output_fused_blended || output_blended_fused);
311 XRCCTRL(*
this,
"output_hdr_format_label", wxStaticText)->Enable(output_hdr);
312 XRCCTRL(*
this,
"output_hdr_format", wxChoice)->Enable(output_hdr);
313 XRCCTRL(*
this,
"output_hdr_compression_label", wxStaticText)->Enable(output_hdr);
314 XRCCTRL(*
this,
"output_hdr_tiff_compression", wxChoice)->Enable(output_hdr);
315 GetSizer()->Layout();
320 int sel = XRCCTRL(*
this,
"output_ldr_format", wxChoice)->GetSelection();
325 XRCCTRL(*
this,
"output_ldr_compression_label", wxStaticText)->Show();
326 XRCCTRL(*
this,
"output_ldr_compression_label", wxStaticText)->SetLabel(_(
"Quality:"));
327 XRCCTRL(*
this,
"output_jpeg_quality", wxSpinCtrl)->Show();
328 XRCCTRL(*
this,
"output_tiff_compression", wxChoice)->Hide();
332 XRCCTRL(*
this,
"output_ldr_compression_label", wxStaticText)->Hide();
333 XRCCTRL(*
this,
"output_jpeg_quality", wxSpinCtrl)->Hide();
334 XRCCTRL(*
this,
"output_tiff_compression", wxChoice)->Hide();
339 XRCCTRL(*
this,
"output_ldr_compression_label", wxStaticText)->Show();
340 XRCCTRL(*
this,
"output_ldr_compression_label", wxStaticText)->SetLabel(_(
"Compression:"));
341 XRCCTRL(*
this,
"output_jpeg_quality", wxSpinCtrl)->Hide();
342 XRCCTRL(*
this,
"output_tiff_compression", wxChoice)->Show();
345 GetSizer()->Layout();
351 int sel = XRCCTRL(*
this,
"output_hdr_format", wxChoice)->GetSelection();
356 XRCCTRL(*
this,
"output_hdr_compression_label", wxStaticText)->Show();
357 XRCCTRL(*
this,
"output_hdr_tiff_compression", wxChoice)->Show();
362 XRCCTRL(*
this,
"output_hdr_compression_label", wxStaticText)->Hide();
363 XRCCTRL(*
this,
"output_hdr_tiff_compression", wxChoice)->Hide();
366 GetSizer()->Layout();
std::vector< UIntSet > getHDRStacks(const PanoramaData &pano, UIntSet allImgs, PanoramaOptions opts)
returns vector of set of output stacks
declaration of functions to handle stacks and layers
std::vector< UIntSet > getExposureLayers(const PanoramaData &pano, UIntSet allImgs, PanoramaOptions opts)
returns vector of set of output exposure layers
~PanoOutputDialog()
destructor, save position
bool outputLDRLayers
save remapped layers (LDR)
void OnHeightChanged(wxSpinEvent &e)
height changed
#define HUGIN_JPEG_QUALITY
std::string outputImageTypeHDRCompression
bool outputHDRLayers
save remapped layers (HDR)
UIntSet getImagesinROI(const PanoramaData &pano, const UIntSet activeImages)
returns set of images which are visible in output ROI
include file for the hugin project
wxSpinCtrl * m_edit_height
void OnOk(wxCommandEvent &e)
Saves current state of all checkboxes when closing dialog with Ok.
std::string outputImageTypeCompression
bool outputLDRExposureBlended
< save exposure fused stacks (no exposure adjustment)
HuginBase::Panorama & m_pano
std::set< unsigned int > UIntSet
const vigra::Rect2D & getROI() const
bool outputLDRBlended
save blended panorama (LDR)
std::size_t getNrOfImages() const
number of images.
Definition of PanoOutputDialog class.
static double calcOptimalScale(PanoramaData &panorama)
bool outputHDRBlended
save blended panorama (HDR)
std::vector< HuginBase::UIntSet > m_exposureLayers
#define HUGIN_TIFF_COMPRESSION
wxSpinCtrl * m_edit_width
void setROI(const vigra::Rect2D &val)
#define HUGIN_LDR_OUTPUT_FORMAT
UIntSet getActiveImages() const
get active images
std::string tiffCompression
std::vector< HuginBase::UIntSet > m_stacks
bool outputLDRExposureLayers
save blended exposure layers, do not perform fusion (no exposure adjustment)
unsigned int getWidth() const
const PanoramaOptions & getOptions() const
returns the options for this panorama
bool outputLDRExposureRemapped
save remapped layers (no exposure adjustment)
bool outputLDRExposureLayersFused
save blended exposure layers which are then fused (no exposure adjustment)
void OnHDRFormatChanged(wxCommandEvent &e)
HDR format changed.
HuginBase::PanoramaOptions m_newOpt
std::string outputImageType
#define HUGIN_ASS_PANO_DOWNSIZE_FACTOR
std::string outputImageTypeHDR
PanoOutputDialog(wxWindow *parent, HuginBase::Panorama &pano, GuiLevel guiLevel)
Constructor, read from xrc ressource; restore last uses settings, size and position.
const SrcPanoImage & getImage(std::size_t nr) const
get a panorama image, counting starts with 0
void EnableOutputOptions()
bool outputHDRStacks
save image stacks (HDR)
void OnLDRFormatChanged(wxCommandEvent &e)
LDR format changed.
void StoreFramePositionOnly(wxTopLevelWindow *frame, const wxString &basename)
void OnWidthChanged(wxSpinEvent &e)
width changed
void OnOutputChanged(wxCommandEvent &e)
enabled Ok button and LDR/HDR format settings depeding on selected output settings ...
void setWidth(unsigned int w, bool keepView=true)
set panorama width keep the HFOV, if keepView=true
void RestoreFramePositionOnly(wxTopLevelWindow *frame, const wxString &basename)