Basic Image AlgorithmS Library
2.8.0
|
display float images in wx application, provides zoom, scale, shift and investigation functionality More...
#include <Gui/ScaledImageCanvas.hh>
Public Member Functions | |
ImageCanvas * | GetImageCanvas () |
BIAS::ImageBase & | GetOrigimg () |
void | GetScaleParameters (bool &Auto, double &value_sc_double_l, double &value_sc_double_r, double &value_of_double_l, double &value_of_double_r, double &scale, double &offset, int &value_sc_steps, int &value_of_steps) |
BIAS::ImageBase & | GetShownImage () |
void | KeepScrollPosition (bool flag) |
void | RaiseZoomWindow (const bool raise_or_lower) |
ScaledImageCanvas (wxWindow *parent, wxStatusBar *sbar=NULL, int sbarid=0, wxWindowID id=-1, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL, const wxString &name=wxT("ScaledScrolledWindow")) | |
void | SetAutoadaptScale (const bool b) |
recalculate scale and shift for each new frame or not ? More... | |
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 replication true: Uses bicubic (SLOW!!) and box averaging resampling methods for upsampling and downsampling respectively. More... | |
void | SetNiceRanges (double scale_factor, double offset_factor) |
set ranges so that they would look beautiful More... | |
int | SetOffset (double offset) |
int | SetOffset (double offset, bool update) |
void | SetOffsetRange (double min, double max) |
void | SetRanges (double value_sc_double_l, double value_sc_double_r, double value_of_double_l, double value_of_double_r) |
set ranges of sliders More... | |
int | SetScale (double scale) |
int | SetScale (double scale, bool update) |
void | SetScaleParameters (bool Auto, double value_sc_double_l, double value_sc_double_r, double value_of_double_l, double value_of_double_r, double scale, double offset, int value_sc_steps, int value_of_steps) |
void | SetScaleRange (double min, double max) |
void | SetStatusBarPtr (wxStatusBar *p_sbar) |
pointer to sbar to be used JW More... | |
void | SetStatusText (const std::string &s) |
display text to sbar if one is assigned More... | |
void | Show (BIAS::ImageBase &im, std::string name) |
void | Show (BIAS::PyramidImage< float > &pim, std::string name) |
virtual bool | Show (bool show=true) |
void | UpdateHistogramm (ImageBase image) |
~ScaledImageCanvas () | |
Protected Member Functions | |
void | AutoScale_ () |
void | OnAutoScaleOffset (wxCommandEvent &event) |
void | OnHisto (wxCommandEvent &event) |
void | OnMouseWheel (wxMouseEvent &event) |
void | OnScaleOffset (wxScrollEvent &event) |
void | OnScaleOffsetBorders (wxCommandEvent &event) |
void | OnScaleOffsetSteps (wxSpinEvent &event) |
void | UpdateScaleOffset () |
void | UpdateScaleOffsetBorders () |
Protected Attributes | |
bool | AutoadaptScale_ |
wxSize | box_size |
wxSize | box_size_checks |
wxSize | box_size_steps |
wxCheckBox * | Check_Auto_Sc_Of_ |
wxCheckBox * | Check_Histo_ |
bool | DrawRoi_ |
std::string | ImageName_ |
double | MaxOffSet_ |
double | MaxScale_ |
ImageCanvas * | MiaScWi_ |
double | MinOffSet_ |
double | MinScale_ |
wxString | offset_border_l_value |
wxString | offset_border_r_value |
wxTextCtrl * | Offset_L_ |
double | offset_l_old |
int | offset_old |
wxTextCtrl * | Offset_R_ |
double | offset_r_old |
wxSpinCtrl * | Offset_Steps_ |
wxStaticText * | Offset_Text_ |
wxSlider * | OffsSL_ |
BIAS::ImageBase | origim_ |
wxStatusBar * | p_StatBar |
BIAS::Image< unsigned char > | rgbim_ |
wxString | scale_border_l_value |
wxString | scale_border_r_value |
wxTextCtrl * | Scale_L_ |
double | scale_l_old |
int | scale_old |
wxTextCtrl * | Scale_R_ |
double | scale_r_old |
wxSpinCtrl * | Scale_Steps_ |
wxStaticText * | Scale_Text_ |
BIAS::Image< float > | scaledf_ |
wxSlider * | ScaleSL_ |
int | slider_of_digits |
int | slider_sc_digits |
wxString | string_base |
BIAS::Image< unsigned char > | ucim_ |
display float images in wx application, provides zoom, scale, shift and investigation functionality
Definition at line 28 of file ScaledImageCanvas.hh.
ScaledImageCanvas::ScaledImageCanvas | ( | wxWindow * | parent, |
wxStatusBar * | sbar = NULL , |
||
int | sbarid = 0 , |
||
wxWindowID | id = -1 , |
||
const wxPoint & | pos = wxDefaultPosition , |
||
const wxSize & | size = wxDefaultSize , |
||
long | style = wxTAB_TRAVERSAL , |
||
const wxString & | name = wxT("ScaledScrolledWindow") |
||
) |
-————SIZES—————
—HISTO/AUTOSCALE CHECK BOXES—
—SCALE SLIDER—
—OFFSET SLIDER—
Definition at line 31 of file ScaledImageCanvas.cpp.
References BIAS::AsciiToWx(), AutoadaptScale_, box_size, box_size_checks, box_size_steps, Check_Auto_Sc_Of_, DrawRoi_, BIAS::ID_Check_Auto_Sc_Of, BIAS::ID_Offset, BIAS::ID_Offset_L, BIAS::ID_Offset_R, BIAS::ID_Offset_Steps, BIAS::ID_Scale, BIAS::ID_Scale_L, BIAS::ID_Scale_R, BIAS::ID_Scale_Steps, MaxOffSet_, MaxScale_, MiaScWi_, MinOffSet_, MinScale_, Offset_L_, offset_old, Offset_R_, Offset_Steps_, Offset_Text_, OffsSL_, p_StatBar, Scale_L_, scale_old, Scale_R_, Scale_Steps_, Scale_Text_, ScaleSL_, SetRanges(), slider_of_digits, and slider_sc_digits.
ScaledImageCanvas::~ScaledImageCanvas | ( | ) |
Definition at line 178 of file ScaledImageCanvas.cpp.
|
protected |
Definition at line 737 of file ScaledImageCanvas.cpp.
References AutoadaptScale_, BIAS::Image< StorageType >::CalcScaleShift(), origim_, scaledf_, SetOffset(), SetRanges(), and SetScale().
Referenced by OnAutoScaleOffset(), and SetScaleParameters().
ImageCanvas * ScaledImageCanvas::GetImageCanvas | ( | ) |
Definition at line 499 of file ScaledImageCanvas.cpp.
References MiaScWi_.
BIAS::ImageBase & ScaledImageCanvas::GetOrigimg | ( | ) |
Definition at line 506 of file ScaledImageCanvas.cpp.
References origim_.
void ScaledImageCanvas::GetScaleParameters | ( | bool & | Auto, |
double & | value_sc_double_l, | ||
double & | value_sc_double_r, | ||
double & | value_of_double_l, | ||
double & | value_of_double_r, | ||
double & | scale, | ||
double & | offset, | ||
int & | value_sc_steps, | ||
int & | value_of_steps | ||
) |
Definition at line 553 of file ScaledImageCanvas.cpp.
References AutoadaptScale_, MaxOffSet_, MaxScale_, MinOffSet_, MinScale_, Offset_L_, Offset_R_, Offset_Steps_, OffsSL_, Scale_L_, Scale_R_, Scale_Steps_, ScaleSL_, slider_of_digits, and slider_sc_digits.
BIAS::ImageBase & ScaledImageCanvas::GetShownImage | ( | ) |
Definition at line 511 of file ScaledImageCanvas.cpp.
References scaledf_.
void ScaledImageCanvas::KeepScrollPosition | ( | bool | flag | ) |
Definition at line 192 of file ScaledImageCanvas.cpp.
References BIAS::ImageCanvas::KeepScrollPosition(), and MiaScWi_.
|
protected |
Definition at line 720 of file ScaledImageCanvas.cpp.
References AutoadaptScale_, AutoScale_(), BIAS::ImageBase::GetStorageType(), origim_, BIAS::ImageBase::ST_float, and UpdateScaleOffset().
|
protected |
Definition at line 774 of file ScaledImageCanvas.cpp.
|
protected |
Definition at line 730 of file ScaledImageCanvas.cpp.
|
protected |
Definition at line 657 of file ScaledImageCanvas.cpp.
References AutoadaptScale_, Check_Auto_Sc_Of_, offset_old, OffsSL_, scale_old, ScaleSL_, and UpdateScaleOffset().
|
protected |
cout << MinScale_ << " to " << MaxScale_ << " - Scale Bord" << endl; cout << MinOffSet_ << " to " << MaxOffSet_ << " - Offset Bord" << endl;
cout << MinScale_ << " to " << MaxScale_ << " - Scale Update" << endl; cout << MinOffSet_ << " to " << MaxOffSet_ << " - Offset Update" << endl;
Definition at line 669 of file ScaledImageCanvas.cpp.
References offset_border_l_value, offset_border_r_value, Offset_L_, Offset_R_, scale_border_l_value, scale_border_r_value, Scale_L_, Scale_R_, UpdateScaleOffset(), and UpdateScaleOffsetBorders().
|
protected |
Definition at line 690 of file ScaledImageCanvas.cpp.
References Offset_Steps_, OffsSL_, Scale_Steps_, ScaleSL_, slider_of_digits, slider_sc_digits, and UpdateScaleOffset().
void ScaledImageCanvas::RaiseZoomWindow | ( | const bool | raise_or_lower | ) |
Definition at line 209 of file ScaledImageCanvas.cpp.
References MiaScWi_, and BIAS::ImageCanvas::RaiseZoomWindow().
|
inline |
recalculate scale and shift for each new frame or not ?
Definition at line 90 of file ScaledImageCanvas.hh.
Referenced by SetScaleParameters().
|
inline |
Definition at line 59 of file ScaledImageCanvas.hh.
|
inline |
Set the quality used for image size rescaling false: Uses the normal default scaling method of pixel replication true: Uses bicubic (SLOW!!) and box averaging resampling methods for upsampling and downsampling respectively.
Definition at line 68 of file ScaledImageCanvas.hh.
void ScaledImageCanvas::SetNiceRanges | ( | double | scale_factor, |
double | offset_factor | ||
) |
set ranges so that they would look beautiful
Definition at line 615 of file ScaledImageCanvas.cpp.
References BIAS::AsciiToWx(), MaxOffSet_, MaxScale_, MinOffSet_, MinScale_, Offset_L_, Offset_R_, OffsSL_, Scale_L_, Scale_R_, ScaleSL_, slider_of_digits, slider_sc_digits, UpdateScaleOffset(), and UpdateScaleOffsetBorders().
int ScaledImageCanvas::SetOffset | ( | double | offset | ) |
Definition at line 306 of file ScaledImageCanvas.cpp.
Referenced by AutoScale_(), SetScaleParameters(), and Show().
int ScaledImageCanvas::SetOffset | ( | double | offset, |
bool | update | ||
) |
Definition at line 313 of file ScaledImageCanvas.cpp.
References MaxOffSet_, MinOffSet_, OffsSL_, slider_of_digits, and UpdateScaleOffset().
|
inline |
Definition at line 50 of file ScaledImageCanvas.hh.
Referenced by SetScaleParameters().
void ScaledImageCanvas::SetRanges | ( | double | value_sc_double_l, |
double | value_sc_double_r, | ||
double | value_of_double_l, | ||
double | value_of_double_r | ||
) |
set ranges of sliders
Definition at line 533 of file ScaledImageCanvas.cpp.
References BIAS::AsciiToWx().
Referenced by AutoScale_(), ScaledImageCanvas(), SetScaleParameters(), and Show().
int ScaledImageCanvas::SetScale | ( | double | scale | ) |
Definition at line 274 of file ScaledImageCanvas.cpp.
Referenced by AutoScale_(), SetScaleParameters(), and Show().
int ScaledImageCanvas::SetScale | ( | double | scale, |
bool | update | ||
) |
Definition at line 281 of file ScaledImageCanvas.cpp.
References MaxScale_, MinScale_, ScaleSL_, slider_sc_digits, and UpdateScaleOffset().
void ScaledImageCanvas::SetScaleParameters | ( | bool | Auto, |
double | value_sc_double_l, | ||
double | value_sc_double_r, | ||
double | value_of_double_l, | ||
double | value_of_double_r, | ||
double | scale, | ||
double | offset, | ||
int | value_sc_steps, | ||
int | value_of_steps | ||
) |
Definition at line 581 of file ScaledImageCanvas.cpp.
References AutoScale_(), Check_Auto_Sc_Of_, Offset_Steps_, Scale_Steps_, SetAutoadaptScale(), SetOffset(), SetOffsetRange(), SetRanges(), SetScale(), and SetScaleRange().
|
inline |
Definition at line 47 of file ScaledImageCanvas.hh.
Referenced by SetScaleParameters().
void ScaledImageCanvas::SetStatusBarPtr | ( | wxStatusBar * | p_sbar | ) |
pointer to sbar to be used JW
Definition at line 187 of file ScaledImageCanvas.cpp.
References p_StatBar.
void ScaledImageCanvas::SetStatusText | ( | const std::string & | s | ) |
display text to sbar if one is assigned
Definition at line 198 of file ScaledImageCanvas.cpp.
References BIAS::AsciiToWx(), and p_StatBar.
void ScaledImageCanvas::Show | ( | BIAS::ImageBase & | im, |
std::string | name | ||
) |
Definition at line 217 of file ScaledImageCanvas.cpp.
References AutoadaptScale_, BIAS::Image< StorageType >::CalcScaleShift(), BIAS::ImageConvert::ConvertST(), BIAS::ImageBase::GetStorageType(), ImageName_, origim_, scaledf_, SetOffset(), SetRanges(), SetScale(), BIAS::ImageBase::ST_float, and UpdateScaleOffset().
Referenced by BIAS::FilterDialogPreviewWindow< StorageType >::FilterDialogPreviewWindow(), and Show().
void ScaledImageCanvas::Show | ( | BIAS::PyramidImage< float > & | pim, |
std::string | name | ||
) |
Definition at line 265 of file ScaledImageCanvas.cpp.
References BIAS::PyramidImage< T >::GetSingleImage(), and Show().
|
inlinevirtual |
Definition at line 45 of file ScaledImageCanvas.hh.
void BIAS::ScaledImageCanvas::UpdateHistogramm | ( | ImageBase | image | ) |
|
protected |
Definition at line 337 of file ScaledImageCanvas.cpp.
References BIAS::Image< StorageType >::AboveThresholdToValue(), BIAS::AsciiToWx(), BIAS::Image< StorageType >::BelowThresholdToValue(), BIAS::ImageBase::CM_RGB, BIAS::ImageConvert::Convert(), BIAS::ImageConvert::ConvertST(), BIAS::ImageBase::GetColorModel(), ImageName_, BIAS::ImageBase::IsEmpty(), MaxOffSet_, MaxScale_, MiaScWi_, MinOffSet_, MinScale_, offset_border_l_value, offset_border_r_value, Offset_L_, offset_old, Offset_R_, Offset_Text_, OffsSL_, origim_, rgbim_, scale_border_l_value, scale_border_r_value, Scale_L_, scale_old, Scale_R_, Scale_Text_, scaledf_, BIAS::Image< StorageType >::ScaleShift(), ScaleSL_, BIAS::ImageCanvas::Show(), slider_of_digits, slider_sc_digits, BIAS::ImageBase::ST_unsignedchar, and ucim_.
Referenced by OnAutoScaleOffset(), OnScaleOffset(), OnScaleOffsetBorders(), OnScaleOffsetSteps(), SetNiceRanges(), SetOffset(), SetScale(), and Show().
|
protected |
Definition at line 411 of file ScaledImageCanvas.cpp.
References BIAS::AsciiToWx(), MaxOffSet_, MaxScale_, MinOffSet_, MinScale_, Offset_L_, offset_l_old, Offset_R_, offset_r_old, OffsSL_, Scale_L_, scale_l_old, Scale_R_, scale_r_old, ScaleSL_, slider_of_digits, and slider_sc_digits.
Referenced by OnScaleOffsetBorders(), and SetNiceRanges().
|
protected |
Definition at line 198 of file ScaledImageCanvas.hh.
Referenced by AutoScale_(), GetScaleParameters(), OnAutoScaleOffset(), OnScaleOffset(), ScaledImageCanvas(), and Show().
|
protected |
Definition at line 169 of file ScaledImageCanvas.hh.
Referenced by ScaledImageCanvas().
|
protected |
Definition at line 171 of file ScaledImageCanvas.hh.
Referenced by ScaledImageCanvas().
|
protected |
Definition at line 170 of file ScaledImageCanvas.hh.
Referenced by ScaledImageCanvas().
|
protected |
Definition at line 143 of file ScaledImageCanvas.hh.
Referenced by OnScaleOffset(), ScaledImageCanvas(), and SetScaleParameters().
|
protected |
Definition at line 144 of file ScaledImageCanvas.hh.
|
protected |
Definition at line 195 of file ScaledImageCanvas.hh.
Referenced by ScaledImageCanvas().
|
protected |
Definition at line 193 of file ScaledImageCanvas.hh.
Referenced by Show(), and UpdateScaleOffset().
|
protected |
Definition at line 194 of file ScaledImageCanvas.hh.
Referenced by GetScaleParameters(), ScaledImageCanvas(), SetNiceRanges(), SetOffset(), UpdateScaleOffset(), and UpdateScaleOffsetBorders().
|
protected |
Definition at line 194 of file ScaledImageCanvas.hh.
Referenced by GetScaleParameters(), ScaledImageCanvas(), SetNiceRanges(), SetScale(), UpdateScaleOffset(), and UpdateScaleOffsetBorders().
|
protected |
Definition at line 188 of file ScaledImageCanvas.hh.
Referenced by GetImageCanvas(), KeepScrollPosition(), RaiseZoomWindow(), ScaledImageCanvas(), UpdateScaleOffset(), and ~ScaledImageCanvas().
|
protected |
Definition at line 194 of file ScaledImageCanvas.hh.
Referenced by GetScaleParameters(), ScaledImageCanvas(), SetNiceRanges(), SetOffset(), UpdateScaleOffset(), and UpdateScaleOffsetBorders().
|
protected |
Definition at line 194 of file ScaledImageCanvas.hh.
Referenced by GetScaleParameters(), ScaledImageCanvas(), SetNiceRanges(), SetScale(), UpdateScaleOffset(), and UpdateScaleOffsetBorders().
|
protected |
Definition at line 181 of file ScaledImageCanvas.hh.
Referenced by OnScaleOffsetBorders(), and UpdateScaleOffset().
|
protected |
Definition at line 182 of file ScaledImageCanvas.hh.
Referenced by OnScaleOffsetBorders(), and UpdateScaleOffset().
|
protected |
Definition at line 160 of file ScaledImageCanvas.hh.
Referenced by GetScaleParameters(), OnScaleOffsetBorders(), ScaledImageCanvas(), SetNiceRanges(), UpdateScaleOffset(), and UpdateScaleOffsetBorders().
|
protected |
Definition at line 164 of file ScaledImageCanvas.hh.
Referenced by UpdateScaleOffsetBorders().
|
protected |
Definition at line 165 of file ScaledImageCanvas.hh.
Referenced by OnScaleOffset(), ScaledImageCanvas(), and UpdateScaleOffset().
|
protected |
Definition at line 161 of file ScaledImageCanvas.hh.
Referenced by GetScaleParameters(), OnScaleOffsetBorders(), ScaledImageCanvas(), SetNiceRanges(), UpdateScaleOffset(), and UpdateScaleOffsetBorders().
|
protected |
Definition at line 166 of file ScaledImageCanvas.hh.
Referenced by UpdateScaleOffsetBorders().
|
protected |
Definition at line 162 of file ScaledImageCanvas.hh.
Referenced by GetScaleParameters(), OnScaleOffsetSteps(), ScaledImageCanvas(), and SetScaleParameters().
|
protected |
Definition at line 158 of file ScaledImageCanvas.hh.
Referenced by ScaledImageCanvas(), and UpdateScaleOffset().
|
protected |
Definition at line 189 of file ScaledImageCanvas.hh.
Referenced by GetScaleParameters(), OnScaleOffset(), OnScaleOffsetSteps(), ScaledImageCanvas(), SetNiceRanges(), SetOffset(), UpdateScaleOffset(), UpdateScaleOffsetBorders(), and ~ScaledImageCanvas().
|
protected |
Definition at line 190 of file ScaledImageCanvas.hh.
Referenced by AutoScale_(), GetOrigimg(), OnAutoScaleOffset(), Show(), and UpdateScaleOffset().
|
protected |
Definition at line 197 of file ScaledImageCanvas.hh.
Referenced by ScaledImageCanvas(), SetStatusBarPtr(), and SetStatusText().
|
protected |
Definition at line 192 of file ScaledImageCanvas.hh.
Referenced by UpdateScaleOffset().
|
protected |
Definition at line 178 of file ScaledImageCanvas.hh.
Referenced by OnScaleOffsetBorders(), and UpdateScaleOffset().
|
protected |
Definition at line 179 of file ScaledImageCanvas.hh.
Referenced by OnScaleOffsetBorders(), and UpdateScaleOffset().
|
protected |
Definition at line 149 of file ScaledImageCanvas.hh.
Referenced by GetScaleParameters(), OnScaleOffsetBorders(), ScaledImageCanvas(), SetNiceRanges(), UpdateScaleOffset(), and UpdateScaleOffsetBorders().
|
protected |
Definition at line 153 of file ScaledImageCanvas.hh.
Referenced by UpdateScaleOffsetBorders().
|
protected |
Definition at line 154 of file ScaledImageCanvas.hh.
Referenced by OnScaleOffset(), ScaledImageCanvas(), and UpdateScaleOffset().
|
protected |
Definition at line 150 of file ScaledImageCanvas.hh.
Referenced by GetScaleParameters(), OnScaleOffsetBorders(), ScaledImageCanvas(), SetNiceRanges(), UpdateScaleOffset(), and UpdateScaleOffsetBorders().
|
protected |
Definition at line 155 of file ScaledImageCanvas.hh.
Referenced by UpdateScaleOffsetBorders().
|
protected |
Definition at line 151 of file ScaledImageCanvas.hh.
Referenced by GetScaleParameters(), OnScaleOffsetSteps(), ScaledImageCanvas(), and SetScaleParameters().
|
protected |
Definition at line 147 of file ScaledImageCanvas.hh.
Referenced by ScaledImageCanvas(), and UpdateScaleOffset().
|
protected |
Definition at line 191 of file ScaledImageCanvas.hh.
Referenced by AutoScale_(), GetShownImage(), Show(), and UpdateScaleOffset().
|
protected |
Definition at line 189 of file ScaledImageCanvas.hh.
Referenced by GetScaleParameters(), OnScaleOffset(), OnScaleOffsetSteps(), ScaledImageCanvas(), SetNiceRanges(), SetScale(), UpdateScaleOffset(), UpdateScaleOffsetBorders(), and ~ScaledImageCanvas().
|
protected |
Definition at line 175 of file ScaledImageCanvas.hh.
Referenced by GetScaleParameters(), OnScaleOffsetSteps(), ScaledImageCanvas(), SetNiceRanges(), SetOffset(), UpdateScaleOffset(), and UpdateScaleOffsetBorders().
|
protected |
Definition at line 174 of file ScaledImageCanvas.hh.
Referenced by GetScaleParameters(), OnScaleOffsetSteps(), ScaledImageCanvas(), SetNiceRanges(), SetScale(), UpdateScaleOffset(), and UpdateScaleOffsetBorders().
|
protected |
Definition at line 185 of file ScaledImageCanvas.hh.
|
protected |
Definition at line 192 of file ScaledImageCanvas.hh.
Referenced by UpdateScaleOffset().