41 wxXmlResource::Get()->LoadDialog(
this, parent, wxT(
"pano_output_dialog"));
44 wxConfigBase * cfg = wxConfigBase::Get();
46 int x = cfg->Read(wxT(
"/PanoOutputDialog/positionX"),-1l);
47 int y = cfg->Read(wxT(
"/PanoOutputDialog/positionY"),-1l);
48 if ( y >= 0 && x >= 0)
63 wxConfigBase* config = wxConfigBase::Get();
64 if (m_newOpt.fovCalcSupported(m_newOpt.getProjection()))
75 m_aspect=(double)m_newOpt.getROI().height()/m_newOpt.getROI().width();
83 XRCCTRL(*
this,
"output_jpeg_quality", wxSpinCtrl)->SetValue(i);
85 XRCCTRL(*
this,
"output_tiff_compression", wxChoice)->SetSelection(i);
87 XRCCTRL(*
this,
"output_ldr_format", wxChoice)->SetSelection(i);
89 if (m_newOpt.outputImageTypeHDR ==
"exr")
91 XRCCTRL(*
this,
"output_hdr_format", wxChoice)->SetSelection(0);
92 XRCCTRL(*
this,
"output_hdr_tiff_compression", wxChoice)->SetSelection(2);
96 XRCCTRL(*
this,
"output_hdr_format", wxChoice)->SetSelection(1);
97 if (m_newOpt.outputImageTypeHDRCompression ==
"PACKBITS")
99 XRCCTRL(*
this,
"output_hdr_tiff_compression", wxChoice)->SetSelection(1);
103 if (m_newOpt.outputImageTypeHDRCompression ==
"LZW")
105 XRCCTRL(*
this,
"output_hdr_tiff_compression", wxChoice)->SetSelection(2);
109 if (m_newOpt.outputImageTypeHDRCompression ==
"DEFLATE")
111 XRCCTRL(*
this,
"output_hdr_tiff_compression", wxChoice)->SetSelection(3);
115 XRCCTRL(*
this,
"output_hdr_tiff_compression", wxChoice)->SetSelection(0);
121 wxCommandEvent dummy;
140 wxConfigBase * cfg = wxConfigBase::Get();
141 wxPoint ps = this->GetPosition();
142 cfg->Write(wxT(
"/PanoOutputDialog/positionX"), ps.x);
143 cfg->Write(wxT(
"/PanoOutputDialog/positionY"), ps.y);
151 wxString ext1=file1.GetExt().Lower();
152 if(ext1 == wxT(
".hdr") || ext1 == wxT(
".exr") || ext1==wxT(
"hdr") || ext1==wxT(
"exr"))
154 XRCCTRL(*
this,
"output_normal", wxCheckBox)->SetValue(
true);
155 XRCCTRL(*
this,
"output_normal", wxCheckBox)->Enable(
true);
156 XRCCTRL(*
this,
"output_normal_bitmap", wxStaticBitmap)->Enable(
true);
162 XRCCTRL(*
this,
"output_hdr", wxCheckBox)->Hide();
163 XRCCTRL(*
this,
"output_hdr_bitmap", wxStaticBitmap)->Hide();
164 XRCCTRL(*
this,
"output_hdr_format_label", wxStaticText)->Hide();
165 XRCCTRL(*
this,
"output_hdr_format", wxChoice)->Hide();
166 XRCCTRL(*
this,
"output_hdr_compression_label", wxStaticText)->Hide();
167 XRCCTRL(*
this,
"output_hdr_tiff_compression", wxChoice)->Hide();
169 GetSizer()->Fit(
this);
174 XRCCTRL(*
this,
"output_normal", wxCheckBox)->SetValue(
true);
175 XRCCTRL(*
this,
"output_normal", wxCheckBox)->Enable(
true);
176 XRCCTRL(*
this,
"output_normal_bitmap", wxStaticBitmap)->Enable(
true);
182 XRCCTRL(*
this,
"output_fused_blended", wxCheckBox)->Enable(
true);
183 XRCCTRL(*
this,
"output_fused_blended_bitmap", wxStaticBitmap)->Enable(
true);
184 XRCCTRL(*
this,
"output_blended_fused", wxCheckBox)->Enable(
true);
185 XRCCTRL(*
this,
"output_blended_fused_bitmap", wxStaticBitmap)->Enable(
true);
188 XRCCTRL(*
this,
"output_hdr", wxCheckBox)->Enable(
true);
189 XRCCTRL(*
this,
"output_hdr_bitmap", wxStaticBitmap)->Enable(
true);
193 XRCCTRL(*
this,
"output_fused_blended", wxCheckBox)->SetValue(
true);
199 XRCCTRL(*
this,
"output_normal", wxCheckBox)->SetValue(
true);
200 XRCCTRL(*
this,
"output_normal", wxCheckBox)->Enable(
true);
201 XRCCTRL(*
this,
"output_normal_bitmap", wxStaticBitmap)->Enable(
true);
205 XRCCTRL(*
this,
"output_blended_fused", wxCheckBox)->SetValue(
true);
212 bool output_normal=XRCCTRL(*
this,
"output_normal", wxCheckBox)->GetValue();
213 bool output_fused_blended=XRCCTRL(*
this,
"output_fused_blended", wxCheckBox)->GetValue();
214 bool output_blended_fused=XRCCTRL(*
this,
"output_blended_fused", wxCheckBox)->GetValue();
215 bool output_hdr=XRCCTRL(*
this,
"output_hdr", wxCheckBox)->GetValue();
216 bool keep_intermediate=XRCCTRL(*
this,
"output_keep_intermediate", wxCheckBox)->GetValue();
232 if(output_normal || output_fused_blended || output_blended_fused)
236 m_newOpt.
quality=XRCCTRL(*
this,
"output_jpeg_quality", wxSpinCtrl)->GetValue();
242 switch(XRCCTRL(*
this,
"output_tiff_compression", wxChoice)->GetSelection())
270 switch(XRCCTRL(*
this,
"output_hdr_tiff_compression", wxChoice)->GetSelection())
311 bool output_normal=XRCCTRL(*
this,
"output_normal", wxCheckBox)->GetValue();
312 bool output_fused_blended=XRCCTRL(*
this,
"output_fused_blended", wxCheckBox)->GetValue();
313 bool output_blended_fused=XRCCTRL(*
this,
"output_blended_fused", wxCheckBox)->GetValue();
314 bool output_hdr=XRCCTRL(*
this,
"output_hdr", wxCheckBox)->GetValue();
316 XRCCTRL(*
this,
"wxID_OK", wxButton)->Enable(output_normal || output_fused_blended || output_blended_fused || output_hdr);
317 XRCCTRL(*
this,
"output_ldr_format_label", wxStaticText)->Enable(output_normal || output_fused_blended || output_blended_fused);
318 XRCCTRL(*
this,
"output_ldr_format", wxChoice)->Enable(output_normal || output_fused_blended || output_blended_fused);
319 XRCCTRL(*
this,
"output_ldr_compression_label", wxStaticText)->Enable(output_normal || output_fused_blended || output_blended_fused);
320 XRCCTRL(*
this,
"output_jpeg_quality", wxSpinCtrl)->Enable(output_normal || output_fused_blended || output_blended_fused);
321 XRCCTRL(*
this,
"output_tiff_compression", wxChoice)->Enable(output_normal || output_fused_blended || output_blended_fused);
322 XRCCTRL(*
this,
"output_hdr_format_label", wxStaticText)->Enable(output_hdr);
323 XRCCTRL(*
this,
"output_hdr_format", wxChoice)->Enable(output_hdr);
324 XRCCTRL(*
this,
"output_hdr_compression_label", wxStaticText)->Enable(output_hdr);
325 XRCCTRL(*
this,
"output_hdr_tiff_compression", wxChoice)->Enable(output_hdr);
326 GetSizer()->Layout();
331 int sel = XRCCTRL(*
this,
"output_ldr_format", wxChoice)->GetSelection();
336 XRCCTRL(*
this,
"output_ldr_compression_label", wxStaticText)->Show();
337 XRCCTRL(*
this,
"output_ldr_compression_label", wxStaticText)->SetLabel(_(
"Quality:"));
338 XRCCTRL(*
this,
"output_jpeg_quality", wxSpinCtrl)->Show();
339 XRCCTRL(*
this,
"output_tiff_compression", wxChoice)->Hide();
343 XRCCTRL(*
this,
"output_ldr_compression_label", wxStaticText)->Hide();
344 XRCCTRL(*
this,
"output_jpeg_quality", wxSpinCtrl)->Hide();
345 XRCCTRL(*
this,
"output_tiff_compression", wxChoice)->Hide();
350 XRCCTRL(*
this,
"output_ldr_compression_label", wxStaticText)->Show();
351 XRCCTRL(*
this,
"output_ldr_compression_label", wxStaticText)->SetLabel(_(
"Compression:"));
352 XRCCTRL(*
this,
"output_jpeg_quality", wxSpinCtrl)->Hide();
353 XRCCTRL(*
this,
"output_tiff_compression", wxChoice)->Show();
356 GetSizer()->Layout();
362 int sel = XRCCTRL(*
this,
"output_hdr_format", wxChoice)->GetSelection();
367 XRCCTRL(*
this,
"output_hdr_compression_label", wxStaticText)->Show();
368 XRCCTRL(*
this,
"output_hdr_tiff_compression", wxChoice)->Show();
373 XRCCTRL(*
this,
"output_hdr_compression_label", wxStaticText)->Hide();
374 XRCCTRL(*
this,
"output_hdr_tiff_compression", wxChoice)->Hide();
377 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 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