Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
BIAS::ScaledImageCanvas Class Reference

display float images in wx application, provides zoom, scale, shift and investigation functionality More...

#include <Gui/ScaledImageCanvas.hh>

+ Inheritance diagram for BIAS::ScaledImageCanvas:
+ Collaboration diagram for BIAS::ScaledImageCanvas:

Public Member Functions

ImageCanvasGetImageCanvas ()
 
BIAS::ImageBaseGetOrigimg ()
 
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::ImageBaseGetShownImage ()
 
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_
 
ImageCanvasMiaScWi_
 
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_
 

Detailed Description

display float images in wx application, provides zoom, scale, shift and investigation functionality

Author
woelk
Examples:
ExampleImageCanvasFloat.cpp.

Definition at line 28 of file ScaledImageCanvas.hh.

Constructor & Destructor Documentation

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") 
)
ScaledImageCanvas::~ScaledImageCanvas ( )

Definition at line 178 of file ScaledImageCanvas.cpp.

References MiaScWi_, OffsSL_, and ScaleSL_.

Member Function Documentation

void ScaledImageCanvas::AutoScale_ ( )
protected
ImageCanvas * ScaledImageCanvas::GetImageCanvas ( )
Returns
(pointer) to class member ImageCanvas used for display JW

Definition at line 499 of file ScaledImageCanvas.cpp.

References MiaScWi_.

BIAS::ImageBase & ScaledImageCanvas::GetOrigimg ( )
Returns
datat image origim_ class member JW

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 
)
BIAS::ImageBase & ScaledImageCanvas::GetShownImage ( )
Returns
the image that is shown in the canvas JF

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_.

void ScaledImageCanvas::OnAutoScaleOffset ( wxCommandEvent &  event)
protected
void ScaledImageCanvas::OnHisto ( wxCommandEvent &  event)
protected

Definition at line 774 of file ScaledImageCanvas.cpp.

void ScaledImageCanvas::OnMouseWheel ( wxMouseEvent &  event)
protected

Definition at line 730 of file ScaledImageCanvas.cpp.

void ScaledImageCanvas::OnScaleOffset ( wxScrollEvent &  event)
protected
void ScaledImageCanvas::OnScaleOffsetBorders ( wxCommandEvent &  event)
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().

void ScaledImageCanvas::OnScaleOffsetSteps ( wxSpinEvent &  event)
protected
void ScaledImageCanvas::RaiseZoomWindow ( const bool  raise_or_lower)

Definition at line 209 of file ScaledImageCanvas.cpp.

References MiaScWi_, and BIAS::ImageCanvas::RaiseZoomWindow().

void BIAS::ScaledImageCanvas::SetAutoadaptScale ( const bool  b)
inline

recalculate scale and shift for each new frame or not ?

Definition at line 90 of file ScaledImageCanvas.hh.

Referenced by SetScaleParameters().

void BIAS::ScaledImageCanvas::SetDefaultZoom ( unsigned  z)
inline

Definition at line 59 of file ScaledImageCanvas.hh.

void BIAS::ScaledImageCanvas::SetHighScaleQuality ( bool  on)
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 
)
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 
)
void BIAS::ScaledImageCanvas::SetOffsetRange ( double  min,
double  max 
)
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 
)
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 
)
void BIAS::ScaledImageCanvas::SetScaleRange ( double  min,
double  max 
)
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 
)
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().

virtual bool BIAS::ScaledImageCanvas::Show ( bool  show = true)
inlinevirtual

Definition at line 45 of file ScaledImageCanvas.hh.

void BIAS::ScaledImageCanvas::UpdateHistogramm ( ImageBase  image)
void ScaledImageCanvas::UpdateScaleOffset ( )
protected
void ScaledImageCanvas::UpdateScaleOffsetBorders ( )
protected

Member Data Documentation

bool BIAS::ScaledImageCanvas::AutoadaptScale_
protected
wxSize BIAS::ScaledImageCanvas::box_size
protected

Definition at line 169 of file ScaledImageCanvas.hh.

Referenced by ScaledImageCanvas().

wxSize BIAS::ScaledImageCanvas::box_size_checks
protected

Definition at line 171 of file ScaledImageCanvas.hh.

Referenced by ScaledImageCanvas().

wxSize BIAS::ScaledImageCanvas::box_size_steps
protected

Definition at line 170 of file ScaledImageCanvas.hh.

Referenced by ScaledImageCanvas().

wxCheckBox* BIAS::ScaledImageCanvas::Check_Auto_Sc_Of_
protected

Definition at line 143 of file ScaledImageCanvas.hh.

Referenced by OnScaleOffset(), ScaledImageCanvas(), and SetScaleParameters().

wxCheckBox* BIAS::ScaledImageCanvas::Check_Histo_
protected

Definition at line 144 of file ScaledImageCanvas.hh.

bool BIAS::ScaledImageCanvas::DrawRoi_
protected

Definition at line 195 of file ScaledImageCanvas.hh.

Referenced by ScaledImageCanvas().

std::string BIAS::ScaledImageCanvas::ImageName_
protected

Definition at line 193 of file ScaledImageCanvas.hh.

Referenced by Show(), and UpdateScaleOffset().

double BIAS::ScaledImageCanvas::MaxOffSet_
protected
double BIAS::ScaledImageCanvas::MaxScale_
protected
ImageCanvas* BIAS::ScaledImageCanvas::MiaScWi_
protected
double BIAS::ScaledImageCanvas::MinOffSet_
protected
double BIAS::ScaledImageCanvas::MinScale_
protected
wxString BIAS::ScaledImageCanvas::offset_border_l_value
protected

Definition at line 181 of file ScaledImageCanvas.hh.

Referenced by OnScaleOffsetBorders(), and UpdateScaleOffset().

wxString BIAS::ScaledImageCanvas::offset_border_r_value
protected

Definition at line 182 of file ScaledImageCanvas.hh.

Referenced by OnScaleOffsetBorders(), and UpdateScaleOffset().

wxTextCtrl* BIAS::ScaledImageCanvas::Offset_L_
protected
double BIAS::ScaledImageCanvas::offset_l_old
protected

Definition at line 164 of file ScaledImageCanvas.hh.

Referenced by UpdateScaleOffsetBorders().

int BIAS::ScaledImageCanvas::offset_old
protected

Definition at line 165 of file ScaledImageCanvas.hh.

Referenced by OnScaleOffset(), ScaledImageCanvas(), and UpdateScaleOffset().

wxTextCtrl* BIAS::ScaledImageCanvas::Offset_R_
protected
double BIAS::ScaledImageCanvas::offset_r_old
protected

Definition at line 166 of file ScaledImageCanvas.hh.

Referenced by UpdateScaleOffsetBorders().

wxSpinCtrl* BIAS::ScaledImageCanvas::Offset_Steps_
protected
wxStaticText* BIAS::ScaledImageCanvas::Offset_Text_
protected

Definition at line 158 of file ScaledImageCanvas.hh.

Referenced by ScaledImageCanvas(), and UpdateScaleOffset().

wxSlider * BIAS::ScaledImageCanvas::OffsSL_
protected
BIAS::ImageBase BIAS::ScaledImageCanvas::origim_
protected
wxStatusBar* BIAS::ScaledImageCanvas::p_StatBar
protected

Definition at line 197 of file ScaledImageCanvas.hh.

Referenced by ScaledImageCanvas(), SetStatusBarPtr(), and SetStatusText().

BIAS::Image<unsigned char> BIAS::ScaledImageCanvas::rgbim_
protected

Definition at line 192 of file ScaledImageCanvas.hh.

Referenced by UpdateScaleOffset().

wxString BIAS::ScaledImageCanvas::scale_border_l_value
protected

Definition at line 178 of file ScaledImageCanvas.hh.

Referenced by OnScaleOffsetBorders(), and UpdateScaleOffset().

wxString BIAS::ScaledImageCanvas::scale_border_r_value
protected

Definition at line 179 of file ScaledImageCanvas.hh.

Referenced by OnScaleOffsetBorders(), and UpdateScaleOffset().

wxTextCtrl* BIAS::ScaledImageCanvas::Scale_L_
protected
double BIAS::ScaledImageCanvas::scale_l_old
protected

Definition at line 153 of file ScaledImageCanvas.hh.

Referenced by UpdateScaleOffsetBorders().

int BIAS::ScaledImageCanvas::scale_old
protected

Definition at line 154 of file ScaledImageCanvas.hh.

Referenced by OnScaleOffset(), ScaledImageCanvas(), and UpdateScaleOffset().

wxTextCtrl* BIAS::ScaledImageCanvas::Scale_R_
protected
double BIAS::ScaledImageCanvas::scale_r_old
protected

Definition at line 155 of file ScaledImageCanvas.hh.

Referenced by UpdateScaleOffsetBorders().

wxSpinCtrl* BIAS::ScaledImageCanvas::Scale_Steps_
protected
wxStaticText* BIAS::ScaledImageCanvas::Scale_Text_
protected

Definition at line 147 of file ScaledImageCanvas.hh.

Referenced by ScaledImageCanvas(), and UpdateScaleOffset().

BIAS::Image<float> BIAS::ScaledImageCanvas::scaledf_
protected

Definition at line 191 of file ScaledImageCanvas.hh.

Referenced by AutoScale_(), GetShownImage(), Show(), and UpdateScaleOffset().

wxSlider* BIAS::ScaledImageCanvas::ScaleSL_
protected
int BIAS::ScaledImageCanvas::slider_of_digits
protected
int BIAS::ScaledImageCanvas::slider_sc_digits
protected
wxString BIAS::ScaledImageCanvas::string_base
protected

Definition at line 185 of file ScaledImageCanvas.hh.

BIAS::Image<unsigned char> BIAS::ScaledImageCanvas::ucim_
protected

Definition at line 192 of file ScaledImageCanvas.hh.

Referenced by UpdateScaleOffset().


The documentation for this class was generated from the following files: