40 EVT_CHECKBOX(XRCID("output_fused_blended"),
PanoOutputDialog::OnOutputChanged)
41 EVT_CHECKBOX(XRCID("output_blended_fused"),
PanoOutputDialog::OnOutputChanged)
53 wxXmlResource::Get()->LoadDialog(
this, parent, wxT(
"pano_output_dialog"));
56 wxIconBundle myIcons(
huginApp::Get()->GetXRCPath() + wxT(
"data/hugin.ico"),wxBITMAP_TYPE_ICO);
59 wxIcon myIcon(
huginApp::Get()->GetXRCPath() + wxT(
"data/hugin.png"),wxBITMAP_TYPE_PNG);
64 wxConfigBase * cfg = wxConfigBase::Get();
66 int x = cfg->Read(wxT(
"/PanoOutputDialog/positionX"),-1l);
67 int y = cfg->Read(wxT(
"/PanoOutputDialog/positionY"),-1l);
68 if ( y >= 0 && x >= 0)
79 m_stacks=
getHDRStacks(m_pano, images, m_pano.getOptions());
82 m_newOpt = m_pano.getOptions();
83 wxConfigBase* config = wxConfigBase::Get();
84 if (m_newOpt.fovCalcSupported(m_newOpt.getProjection()))
93 m_initalWidth=m_newOpt.getWidth();
94 m_initalROIWidth=m_newOpt.getROI().width();
95 m_aspect=(double)m_newOpt.getROI().height()/m_newOpt.getROI().width();
96 m_edit_width=XRCCTRL(*
this,
"output_width", wxSpinCtrl);
97 m_edit_height=XRCCTRL(*
this,
"output_height", wxSpinCtrl);
98 m_edit_width->SetValue(m_newOpt.getROI().width());
99 m_edit_height->SetValue(m_newOpt.getROI().height());
103 XRCCTRL(*
this,
"output_jpeg_quality", wxSpinCtrl)->SetValue(i);
105 XRCCTRL(*
this,
"output_tiff_compression", wxChoice)->SetSelection(i);
107 XRCCTRL(*
this,
"output_ldr_format", wxChoice)->SetSelection(i);
109 if (m_newOpt.outputImageTypeHDR ==
"exr")
111 XRCCTRL(*
this,
"output_hdr_format", wxChoice)->SetSelection(0);
112 XRCCTRL(*
this,
"output_hdr_tiff_compression", wxChoice)->SetSelection(2);
116 XRCCTRL(*
this,
"output_hdr_format", wxChoice)->SetSelection(1);
117 if (m_newOpt.outputImageTypeHDRCompression ==
"PACKBITS")
119 XRCCTRL(*
this,
"output_hdr_tiff_compression", wxChoice)->SetSelection(1);
123 if (m_newOpt.outputImageTypeHDRCompression ==
"LZW")
125 XRCCTRL(*
this,
"output_hdr_tiff_compression", wxChoice)->SetSelection(2);
129 if (m_newOpt.outputImageTypeHDRCompression ==
"DEFLATE")
131 XRCCTRL(*
this,
"output_hdr_tiff_compression", wxChoice)->SetSelection(3);
135 XRCCTRL(*
this,
"output_hdr_tiff_compression", wxChoice)->SetSelection(0);
140 EnableOutputOptions();
141 wxCommandEvent dummy;
142 OnOutputChanged(dummy);
143 OnLDRFormatChanged(dummy);
144 OnHDRFormatChanged(dummy);
149 wxConfigBase * cfg = wxConfigBase::Get();
150 wxPoint ps = this->GetPosition();
151 cfg->Write(wxT(
"/PanoOutputDialog/positionX"), ps.x);
152 cfg->Write(wxT(
"/PanoOutputDialog/positionY"), ps.y);
160 wxString ext1=file1.GetExt().Lower();
161 if(ext1 == wxT(
".hdr") || ext1 == wxT(
".exr") || ext1==wxT(
"hdr") || ext1==wxT(
"exr"))
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_hdr", wxCheckBox)->Hide();
172 XRCCTRL(*
this,
"output_hdr_bitmap", wxStaticBitmap)->Hide();
173 XRCCTRL(*
this,
"output_hdr_format_label", wxStaticText)->Hide();
174 XRCCTRL(*
this,
"output_hdr_format", wxChoice)->Hide();
175 XRCCTRL(*
this,
"output_hdr_compression_label", wxStaticText)->Hide();
176 XRCCTRL(*
this,
"output_hdr_tiff_compression", wxChoice)->Hide();
178 GetSizer()->Fit(
this);
183 XRCCTRL(*
this,
"output_normal", wxCheckBox)->SetValue(
true);
184 XRCCTRL(*
this,
"output_normal", wxCheckBox)->Enable(
true);
185 XRCCTRL(*
this,
"output_normal_bitmap", wxStaticBitmap)->Enable(
true);
191 XRCCTRL(*
this,
"output_fused_blended", wxCheckBox)->Enable(
true);
192 XRCCTRL(*
this,
"output_fused_blended_bitmap", wxStaticBitmap)->Enable(
true);
193 XRCCTRL(*
this,
"output_blended_fused", wxCheckBox)->Enable(
true);
194 XRCCTRL(*
this,
"output_blended_fused_bitmap", wxStaticBitmap)->Enable(
true);
197 XRCCTRL(*
this,
"output_hdr", wxCheckBox)->Enable(
true);
198 XRCCTRL(*
this,
"output_hdr_bitmap", wxStaticBitmap)->Enable(
true);
202 XRCCTRL(*
this,
"output_fused_blended", wxCheckBox)->SetValue(
true);
208 XRCCTRL(*
this,
"output_normal", wxCheckBox)->SetValue(
true);
209 XRCCTRL(*
this,
"output_normal", wxCheckBox)->Enable(
true);
210 XRCCTRL(*
this,
"output_normal_bitmap", wxStaticBitmap)->Enable(
true);
214 XRCCTRL(*
this,
"output_blended_fused", wxCheckBox)->SetValue(
true);
221 bool output_normal=XRCCTRL(*
this,
"output_normal", wxCheckBox)->GetValue();
222 bool output_fused_blended=XRCCTRL(*
this,
"output_fused_blended", wxCheckBox)->GetValue();
223 bool output_blended_fused=XRCCTRL(*
this,
"output_blended_fused", wxCheckBox)->GetValue();
224 bool output_hdr=XRCCTRL(*
this,
"output_hdr", wxCheckBox)->GetValue();
225 bool keep_intermediate=XRCCTRL(*
this,
"output_keep_intermediate", wxCheckBox)->GetValue();
241 if(output_normal || output_fused_blended || output_blended_fused)
245 m_newOpt.
quality=XRCCTRL(*
this,
"output_jpeg_quality", wxSpinCtrl)->GetValue();
251 switch(XRCCTRL(*
this,
"output_tiff_compression", wxChoice)->GetSelection())
279 switch(XRCCTRL(*
this,
"output_hdr_tiff_compression", wxChoice)->GetSelection())
320 bool output_normal=XRCCTRL(*
this,
"output_normal", wxCheckBox)->GetValue();
321 bool output_fused_blended=XRCCTRL(*
this,
"output_fused_blended", wxCheckBox)->GetValue();
322 bool output_blended_fused=XRCCTRL(*
this,
"output_blended_fused", wxCheckBox)->GetValue();
323 bool output_hdr=XRCCTRL(*
this,
"output_hdr", wxCheckBox)->GetValue();
325 XRCCTRL(*
this,
"wxID_OK", wxButton)->Enable(output_normal || output_fused_blended || output_blended_fused || output_hdr);
326 XRCCTRL(*
this,
"output_ldr_format_label", wxStaticText)->Enable(output_normal || output_fused_blended || output_blended_fused);
327 XRCCTRL(*
this,
"output_ldr_format", wxChoice)->Enable(output_normal || output_fused_blended || output_blended_fused);
328 XRCCTRL(*
this,
"output_ldr_compression_label", wxStaticText)->Enable(output_normal || output_fused_blended || output_blended_fused);
329 XRCCTRL(*
this,
"output_jpeg_quality", wxSpinCtrl)->Enable(output_normal || output_fused_blended || output_blended_fused);
330 XRCCTRL(*
this,
"output_tiff_compression", wxChoice)->Enable(output_normal || output_fused_blended || output_blended_fused);
331 XRCCTRL(*
this,
"output_hdr_format_label", wxStaticText)->Enable(output_hdr);
332 XRCCTRL(*
this,
"output_hdr_format", wxChoice)->Enable(output_hdr);
333 XRCCTRL(*
this,
"output_hdr_compression_label", wxStaticText)->Enable(output_hdr);
334 XRCCTRL(*
this,
"output_hdr_tiff_compression", wxChoice)->Enable(output_hdr);
335 GetSizer()->Layout();
340 int sel = XRCCTRL(*
this,
"output_ldr_format", wxChoice)->GetSelection();
345 XRCCTRL(*
this,
"output_ldr_compression_label", wxStaticText)->Show();
346 XRCCTRL(*
this,
"output_ldr_compression_label", wxStaticText)->SetLabel(_(
"Quality:"));
347 XRCCTRL(*
this,
"output_jpeg_quality", wxSpinCtrl)->Show();
348 XRCCTRL(*
this,
"output_tiff_compression", wxChoice)->Hide();
352 XRCCTRL(*
this,
"output_ldr_compression_label", wxStaticText)->Hide();
353 XRCCTRL(*
this,
"output_jpeg_quality", wxSpinCtrl)->Hide();
354 XRCCTRL(*
this,
"output_tiff_compression", wxChoice)->Hide();
359 XRCCTRL(*
this,
"output_ldr_compression_label", wxStaticText)->Show();
360 XRCCTRL(*
this,
"output_ldr_compression_label", wxStaticText)->SetLabel(_(
"Compression:"));
361 XRCCTRL(*
this,
"output_jpeg_quality", wxSpinCtrl)->Hide();
362 XRCCTRL(*
this,
"output_tiff_compression", wxChoice)->Show();
365 GetSizer()->Layout();
371 int sel = XRCCTRL(*
this,
"output_hdr_format", wxChoice)->GetSelection();
376 XRCCTRL(*
this,
"output_hdr_compression_label", wxStaticText)->Show();
377 XRCCTRL(*
this,
"output_hdr_tiff_compression", wxChoice)->Show();
382 XRCCTRL(*
this,
"output_hdr_compression_label", wxStaticText)->Hide();
383 XRCCTRL(*
this,
"output_hdr_tiff_compression", wxChoice)->Hide();
386 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
Dialog for setting output parameters for simple user interface.
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
static huginApp * Get()
hack.. kind of a pseudo singleton...
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
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
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
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