1 #ifndef __ScaledImageCanvas_hh__
2 #define __ScaledImageCanvas_hh__
4 #include <bias_config.h>
6 #ifndef BIAS_HAVE_WXWIDGETS
7 # error BIAS_HAVE_WXWIDGETS not defined but required by ScaledImageCanvas. Please enable BIAS_HAVE_WXWIDGETS in CMake configure step.
10 #include <Base/Common/BIASpragmaStart.hh>
12 #include <wx/spinctrl.h>
13 #include <Base/Common/BIASpragmaEnd.hh>
15 #include <Base/Image/Image.hh>
16 #include <Gui/ImageCanvas.hh>
21 template <
class T>
class PyramidImage;
33 int sbarid=0, wxWindowID
id = -1,
34 const wxPoint& pos = wxDefaultPosition,
35 const wxSize& size = wxDefaultSize,
36 long style = wxTAB_TRAVERSAL,
37 const wxString& name = wxT(
"ScaledScrolledWindow"));
45 virtual bool Show(
bool show=
true) {
return MiaScWi_->Show(show);};
48 { BIASASSERT(max>min); MinScale_=min; MaxScale_=max; }
51 { BIASASSERT(max>min); MinOffSet_=min; MaxOffSet_=max; }
53 int SetScale(
double scale);
54 int SetScale(
double scale,
bool update);
56 int SetOffset(
double offset);
57 int SetOffset(
double offset,
bool update);
60 { MiaScWi_->SetDefaultZoom(z); }
71 MiaScWi_->SetHighScaleQuality(on);
84 void SetStatusBarPtr(wxStatusBar* p_sbar);
87 void SetStatusText(
const std::string & s);
93 void SetNiceRanges(
double scale_factor,
94 double offset_factor);
97 void SetRanges(
double value_sc_double_l,
98 double value_sc_double_r,
99 double value_of_double_l,
100 double value_of_double_r);
102 void GetScaleParameters(
bool &Auto,
103 double &value_sc_double_l,
104 double &value_sc_double_r,
105 double &value_of_double_l,
106 double &value_of_double_r,
110 int &value_of_steps);
112 void SetScaleParameters(
bool Auto,
113 double value_sc_double_l,
114 double value_sc_double_r,
115 double value_of_double_l,
116 double value_of_double_r,
125 void KeepScrollPosition(
bool flag);
127 void RaiseZoomWindow(
const bool raise_or_lower);
131 void OnScaleOffset (wxScrollEvent & event);
132 void OnScaleOffsetSteps (wxSpinEvent & event);
133 void OnScaleOffsetBorders(wxCommandEvent & event);
135 void OnAutoScaleOffset (wxCommandEvent& event);
136 void OnHisto (wxCommandEvent& event);
137 void OnMouseWheel(wxMouseEvent &event);
139 void UpdateScaleOffset();
140 void UpdateScaleOffsetBorders();
199 DECLARE_EVENT_TABLE()
205 #endif // __ScaledImageCanvas_hh__
wxCheckBox * Check_Histo_
wxString scale_border_r_value
wxSpinCtrl * Scale_Steps_
wxString offset_border_l_value
display image in wx application, provides zoom and investigation functionality
BIAS::Image< float > scaledf_
wxString offset_border_r_value
void SetDefaultZoom(unsigned z)
void SetHighScaleQuality(bool on)
Set the quality used for image size rescaling false: Uses the normal default scaling method of pixel ...
void SetScaleRange(double min, double max)
void SetOffsetRange(double min, double max)
virtual bool Show(bool show=true)
BIAS::Image< unsigned char > ucim_
wxCheckBox * Check_Auto_Sc_Of_
wxStaticText * Offset_Text_
wxSpinCtrl * Offset_Steps_
wxString scale_border_l_value
void SetAutoadaptScale(const bool b)
recalculate scale and shift for each new frame or not ?
display float images in wx application, provides zoom, scale, shift and investigation functionality ...
wxStaticText * Scale_Text_
This is the base class for images in BIAS.