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

#include <Tools/BIASViewWX/BVWXMainFrame.hh>

+ Inheritance diagram for BIAS::BVWXMainFrame:
+ Collaboration diagram for BIAS::BVWXMainFrame:

Public Member Functions

void AddInfo (const BIAS::ImageBase &image, std::stringstream &info)
 print info such as dim, video format ro info stream. More...
 
 BVWXMainFrame (const wxString &title, const wxPoint &pos, const wxSize &size)
 
int ConvertFLtoUC (ImageBase &img)
 
void FitSizetIfTooSmall ()
 fits the frame size if it is too small for curent image More...
 
void LoadImages (const wxArrayString &paths)
 
void PrintConversionError (const int errorNo, wxString fname)
 
void PrintEmptyNameMsg ()
 
void PrintNoImageToFilter ()
 
void PrintSavingError (const int errorNo, wxString fname)
 
void RefitClients ()
 workaround adapting client canvases size More...
 
void SetFileList (const std::vector< std::string > &fileNames)
 
void UncompressImage (BIAS::ImageBase &image)
 some compressed images display size is bigger then original size e.b. More...
 
 ~BVWXMainFrame ()
 

Protected Types

enum  biasviewxx_IDS {
  ID_About = wxID_ABOUT, ID_Exit = wxID_EXIT, ID_Load = wxID_HIGHEST+2001, ID_RemoveCurrent,
  ID_RemoveAllButCurrent, ID_Info, ID_MetaData, ID_KeyInfo,
  ID_ToolBar, ID_Prev, ID_Next, ID_RunStop,
  ID_Stop, ID_Run, ID_Histogramm, ID_ImageValueBar,
  ID_Delay, ID_Fit, ID_DrawROI, ID_Timer,
  ID_ChangeChannel_1, ID_ChangeChannel_2, ID_ChangeChannel_3, ID_ChangeChannel_4,
  ID_ChangeChannel_5, ID_ChangeChannel_6, ID_ChangeChannel_7, ID_ChangeChannel_8,
  ID_ChangeChannel_ALL, ID_FilterCannyEdge, ID_FilterGauss, ID_FilterGradientSobel3x3,
  ID_FilterMean, ID_FilterMedian, ID_FilterRescale, ID_SaveAs,
  ID_SaveCurrent, ID_SaveMovie, ID_PrintCurrent, ID_Print,
  ID_SaveList, ID_ImageValues, ID_KeepScrollPosition, ID_ToolEnter,
  ID_FilterWindow, ID_ReverseLoop
}
 

Protected Member Functions

void LoadImageFromList (int index)
 
void OnAbout (wxCommandEvent &event)
 
void OnChangeChannel_1 (wxCommandEvent &event)
 
void OnChangeChannel_2 (wxCommandEvent &event)
 
void OnChangeChannel_3 (wxCommandEvent &event)
 
void OnChangeChannel_4 (wxCommandEvent &event)
 
void OnChangeChannel_5 (wxCommandEvent &event)
 
void OnChangeChannel_6 (wxCommandEvent &event)
 
void OnChangeChannel_7 (wxCommandEvent &event)
 
void OnChangeChannel_8 (wxCommandEvent &event)
 
void OnChangeChannel_ALL (wxCommandEvent &event)
 
void OnDelay (wxSpinEvent &event)
 
void OnDrawROI (wxCommandEvent &event)
 
void OnExit (wxCommandEvent &event)
 
void OnFilterCannyEdge (wxCommandEvent &event)
 
void OnFilterGauss (wxCommandEvent &event)
 
void OnFilterGradientSobel3x3 (wxCommandEvent &event)
 
void OnFilterMean (wxCommandEvent &WXUNUSED(event))
 
void OnFilterMedian (wxCommandEvent &event)
 
void OnFilterRescale (wxCommandEvent &event)
 
void OnFilterSave (wxCommandEvent &event)
 
void OnFit (wxCommandEvent &event)
 
void OnHistogramm (wxCommandEvent &event)
 
void OnIdle (wxIdleEvent &event)
 
void OnImageValueBar (wxCommandEvent &event)
 
void OnImageValues (wxCommandEvent &event)
 
void OnInfo (wxCommandEvent &event)
 
void OnKeepScrollPosition (wxCommandEvent &event)
 
void OnKeyInfo (wxCommandEvent &event)
 
void OnLoad (wxCommandEvent &event)
 
void OnMetaData (wxCommandEvent &event)
 
void OnNext (wxCommandEvent &event)
 
void OnPrev (wxCommandEvent &event)
 
void OnPrint (wxCommandEvent &event)
 Print multiple images. More...
 
void OnPrintCurrent (wxCommandEvent &event)
 Print current image. More...
 
void OnRemoveAllButCurrent (wxCommandEvent &event)
 
void OnRemoveCurrent (wxCommandEvent &event)
 
void OnRun (wxCommandEvent &event)
 
void OnRunStop (wxCommandEvent &event)
 
void OnSaveAs (wxCommandEvent &event)
 
void OnSaveAsMovie (wxCommandEvent &event)
 
void OnSaveCurrent (wxCommandEvent &event)
 Save current displayed image with original dimension and .mip as default. More...
 
void OnSaveList (wxCommandEvent &event)
 save all filenames to disk More...
 
void OnSize (wxSizeEvent &event)
 
void OnStop (wxCommandEvent &event)
 
void OnTimer (wxTimerEvent &event)
 
void OnToolEnter (wxCommandEvent &event)
 
void ShowHistogramm (ImageBase &image)
 
void ShowImageValueBar (ImageBase &image)
 

Protected Attributes

bool _BlockAnimation
 
int _CurrentImage
 
wxString _DefaultDir
 
wxString _DefaultFile
 
wxSpinCtrl * _DelaySpin
 
wxMenuItem * _DrawROICheckItem
 
std::vector< std::string > _FileNames
 
wxCheckBox * _FitCheckBox
 
wxMenuItem * _HistogramCheckItem
 
wxButton * _HistogrammButton
 
wxPoint _HistoPosition
 
wxSize _HistoSize
 
ScaledImageCanvas_ImageCanvasFloat
 
ImageCanvas_ImageCanvasUC
 
wxCheckBox * _KeepScrollPositionCheckBox
 
wxBoxSizer * _MainSizer
 
std::string _MetaData
 
bool _NeedReload
 
wxButton * _NewButton
 
wxButton * _PreviousButton
 
wxCheckBox * _ReverseCheckBox
 
wxButton * _RunStopButton
 
wxToolBarToolBase * _RunTool
 
unsigned int _SelectedChannel
 
bool _ShowHistogramm
 
bool _ShowImageValueBar
 
wxWindow_SizerWindow
 
wxTimer _Timer
 
wxButton * _ValueBarButton
 
wxMenuItem * _ValueBarCheckItem
 
wxPoint _ValueBarPosition
 
wxSize _ValueBarSize
 
std::string infoRaw_
 

Detailed Description

Definition at line 57 of file BVWXMainFrame.hh.

Member Enumeration Documentation

Enumerator
ID_About 
ID_Exit 
ID_Load 
ID_RemoveCurrent 
ID_RemoveAllButCurrent 
ID_Info 
ID_MetaData 
ID_KeyInfo 
ID_ToolBar 
ID_Prev 
ID_Next 
ID_RunStop 
ID_Stop 
ID_Run 
ID_Histogramm 
ID_ImageValueBar 
ID_Delay 
ID_Fit 
ID_DrawROI 
ID_Timer 
ID_ChangeChannel_1 
ID_ChangeChannel_2 
ID_ChangeChannel_3 
ID_ChangeChannel_4 
ID_ChangeChannel_5 
ID_ChangeChannel_6 
ID_ChangeChannel_7 
ID_ChangeChannel_8 
ID_ChangeChannel_ALL 
ID_FilterCannyEdge 
ID_FilterGauss 
ID_FilterGradientSobel3x3 
ID_FilterMean 
ID_FilterMedian 
ID_FilterRescale 
ID_SaveAs 
ID_SaveCurrent 
ID_SaveMovie 
ID_PrintCurrent 
ID_Print 
ID_SaveList 
ID_ImageValues 
ID_KeepScrollPosition 
ID_ToolEnter 
ID_FilterWindow 
ID_ReverseLoop 

Definition at line 220 of file BVWXMainFrame.hh.

Constructor & Destructor Documentation

BVWXMainFrame::BVWXMainFrame ( const wxString &  title,
const wxPoint &  pos,
const wxSize &  size 
)

Definition at line 126 of file BVWXMainFrame.cpp.

BVWXMainFrame::~BVWXMainFrame ( )

Definition at line 365 of file BVWXMainFrame.cpp.

Member Function Documentation

void BVWXMainFrame::AddInfo ( const BIAS::ImageBase image,
std::stringstream &  info 
)
int BVWXMainFrame::ConvertFLtoUC ( ImageBase img)

Definition at line 1176 of file BVWXMainFrame.cpp.

void BVWXMainFrame::FitSizetIfTooSmall ( )

fits the frame size if it is too small for curent image

Definition at line 832 of file BVWXMainFrame.cpp.

Referenced by BIAS::BVWXDnDTarget::OnDropFiles(), and BIAS::BVWXApp::OnInit().

void BVWXMainFrame::LoadImageFromList ( int  index)
protected

ImageBase image = new ImageBase(); Camera<unsigned char> camera(image); camera.ParseMetaData(); camera.PrintAppData(info);

set appropriate scale and offset range switch (image.GetStorageType()) { case ImageBase::ST_unsignedshortint: _ImageCanvasFloat->SetScaleRange(1.0/16.0, 1.0); _ImageCanvasFloat->SetOffsetRange(-4095.0, 0.0); break;

case ImageBase::ST_char: _ImageCanvasFloat->SetScaleRange(0.5, 5.0); _ImageCanvasFloat->SetOffsetRange(-128.0, 128.0); break;

case ImageBase::ST_float: _ImageCanvasFloat->SetScaleRange(0.5, 50.0); _ImageCanvasFloat->SetOffsetRange(-100.0, 100.0); break;

default: cout << "Warning: Unknown storage type" << endl; break; }

Definition at line 394 of file BVWXMainFrame.cpp.

References BIAS::AsciiToWx(), BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetStorageType(), BIAS::ImageBase::GetUID(), BIAS::ImageBase::GetWidth(), BIAS::Camera< StorageType >::ParseMetaData(), BIAS::Camera< StorageType >::PrintAppData(), BIAS::ImageBase::SetUID(), and BIAS::ImageBase::StealImage().

void BVWXMainFrame::LoadImages ( const wxArrayString &  paths)
void BVWXMainFrame::OnAbout ( wxCommandEvent &  event)
protected

Definition at line 1043 of file BVWXMainFrame.cpp.

References BIAS::AsciiToWx().

void BVWXMainFrame::OnChangeChannel_1 ( wxCommandEvent &  event)
protected

Definition at line 1731 of file BVWXMainFrame.cpp.

References BIAS::AsciiToWx().

void BVWXMainFrame::OnChangeChannel_2 ( wxCommandEvent &  event)
protected

Definition at line 1740 of file BVWXMainFrame.cpp.

References BIAS::AsciiToWx().

void BVWXMainFrame::OnChangeChannel_3 ( wxCommandEvent &  event)
protected

Definition at line 1749 of file BVWXMainFrame.cpp.

References BIAS::AsciiToWx().

void BVWXMainFrame::OnChangeChannel_4 ( wxCommandEvent &  event)
protected

Definition at line 1759 of file BVWXMainFrame.cpp.

References BIAS::AsciiToWx().

void BVWXMainFrame::OnChangeChannel_5 ( wxCommandEvent &  event)
protected

Definition at line 1768 of file BVWXMainFrame.cpp.

References BIAS::AsciiToWx().

void BVWXMainFrame::OnChangeChannel_6 ( wxCommandEvent &  event)
protected

Definition at line 1777 of file BVWXMainFrame.cpp.

References BIAS::AsciiToWx().

void BVWXMainFrame::OnChangeChannel_7 ( wxCommandEvent &  event)
protected

Definition at line 1786 of file BVWXMainFrame.cpp.

References BIAS::AsciiToWx().

void BVWXMainFrame::OnChangeChannel_8 ( wxCommandEvent &  event)
protected

Definition at line 1795 of file BVWXMainFrame.cpp.

void BVWXMainFrame::OnChangeChannel_ALL ( wxCommandEvent &  event)
protected

Definition at line 1803 of file BVWXMainFrame.cpp.

References BIAS::AsciiToWx().

void BVWXMainFrame::OnDelay ( wxSpinEvent &  event)
protected

Definition at line 1660 of file BVWXMainFrame.cpp.

void BVWXMainFrame::OnDrawROI ( wxCommandEvent &  event)
protected

Definition at line 964 of file BVWXMainFrame.cpp.

void BVWXMainFrame::OnExit ( wxCommandEvent &  event)
protected

Definition at line 1025 of file BVWXMainFrame.cpp.

void BVWXMainFrame::OnFilterCannyEdge ( wxCommandEvent &  event)
protected

Definition at line 1812 of file BVWXMainFrame.cpp.

void BVWXMainFrame::OnFilterGauss ( wxCommandEvent &  event)
protected

Definition at line 1835 of file BVWXMainFrame.cpp.

void BVWXMainFrame::OnFilterGradientSobel3x3 ( wxCommandEvent &  event)
protected

Definition at line 1870 of file BVWXMainFrame.cpp.

void BVWXMainFrame::OnFilterMean ( wxCommandEvent &  WXUNUSEDevent)
protected

Definition at line 1894 of file BVWXMainFrame.cpp.

void BVWXMainFrame::OnFilterMedian ( wxCommandEvent &  event)
protected

Definition at line 1931 of file BVWXMainFrame.cpp.

void BVWXMainFrame::OnFilterRescale ( wxCommandEvent &  event)
protected

Definition at line 1968 of file BVWXMainFrame.cpp.

void BVWXMainFrame::OnFilterSave ( wxCommandEvent &  event)
protected

Definition at line 2003 of file BVWXMainFrame.cpp.

void BVWXMainFrame::OnFit ( wxCommandEvent &  event)
protected

Definition at line 1668 of file BVWXMainFrame.cpp.

void BVWXMainFrame::OnHistogramm ( wxCommandEvent &  event)
protected

Definition at line 1558 of file BVWXMainFrame.cpp.

References BIAS::AsciiToWx().

void BVWXMainFrame::OnIdle ( wxIdleEvent &  event)
protected

Definition at line 1712 of file BVWXMainFrame.cpp.

void BVWXMainFrame::OnImageValueBar ( wxCommandEvent &  event)
protected

Definition at line 1608 of file BVWXMainFrame.cpp.

References BIAS::AsciiToWx().

void BVWXMainFrame::OnImageValues ( wxCommandEvent &  event)
protected
void BVWXMainFrame::OnInfo ( wxCommandEvent &  event)
protected

Definition at line 933 of file BVWXMainFrame.cpp.

References BIAS::AsciiToWx().

void BVWXMainFrame::OnKeepScrollPosition ( wxCommandEvent &  event)
protected

Definition at line 1673 of file BVWXMainFrame.cpp.

void BVWXMainFrame::OnKeyInfo ( wxCommandEvent &  event)
protected

Definition at line 1030 of file BVWXMainFrame.cpp.

void BVWXMainFrame::OnLoad ( wxCommandEvent &  event)
protected

Definition at line 892 of file BVWXMainFrame.cpp.

void BVWXMainFrame::OnMetaData ( wxCommandEvent &  event)
protected

Definition at line 1006 of file BVWXMainFrame.cpp.

References BIAS::AsciiToWx().

void BVWXMainFrame::OnNext ( wxCommandEvent &  event)
protected

Definition at line 1506 of file BVWXMainFrame.cpp.

void BVWXMainFrame::OnPrev ( wxCommandEvent &  event)
protected

Definition at line 1516 of file BVWXMainFrame.cpp.

void BVWXMainFrame::OnPrint ( wxCommandEvent &  event)
protected

Print multiple images.

Definition at line 1294 of file BVWXMainFrame.cpp.

void BVWXMainFrame::OnPrintCurrent ( wxCommandEvent &  event)
protected

Print current image.

Definition at line 1277 of file BVWXMainFrame.cpp.

void BVWXMainFrame::OnRemoveAllButCurrent ( wxCommandEvent &  event)
protected

Definition at line 1107 of file BVWXMainFrame.cpp.

void BVWXMainFrame::OnRemoveCurrent ( wxCommandEvent &  event)
protected

Definition at line 1093 of file BVWXMainFrame.cpp.

void BVWXMainFrame::OnRun ( wxCommandEvent &  event)
protected

Definition at line 1542 of file BVWXMainFrame.cpp.

void BVWXMainFrame::OnRunStop ( wxCommandEvent &  event)
protected

Definition at line 1526 of file BVWXMainFrame.cpp.

void BVWXMainFrame::OnSaveAs ( wxCommandEvent &  event)
protected
void BVWXMainFrame::OnSaveAsMovie ( wxCommandEvent &  event)
protected
void BVWXMainFrame::OnSaveCurrent ( wxCommandEvent &  event)
protected

Save current displayed image with original dimension and .mip as default.

Definition at line 1308 of file BVWXMainFrame.cpp.

References BIAS::AsciiToWx(), BIAS::FileHandling::Basename(), BIAS::FileHandling::Directory(), and BIAS::ImageBase::GetStorageType().

void BVWXMainFrame::OnSaveList ( wxCommandEvent &  event)
protected

save all filenames to disk

Definition at line 1471 of file BVWXMainFrame.cpp.

References BIAS::AsciiToWx().

void BVWXMainFrame::OnSize ( wxSizeEvent &  event)
protected

Definition at line 1717 of file BVWXMainFrame.cpp.

void BVWXMainFrame::OnStop ( wxCommandEvent &  event)
protected

Definition at line 1550 of file BVWXMainFrame.cpp.

void BVWXMainFrame::OnTimer ( wxTimerEvent &  event)
protected

Definition at line 1696 of file BVWXMainFrame.cpp.

void BVWXMainFrame::OnToolEnter ( wxCommandEvent &  event)
protected

Definition at line 1501 of file BVWXMainFrame.cpp.

void BVWXMainFrame::PrintConversionError ( const int  errorNo,
wxString  fname 
)

Definition at line 1144 of file BVWXMainFrame.cpp.

References BIAS::AsciiToWx().

void BVWXMainFrame::PrintEmptyNameMsg ( )

Definition at line 1159 of file BVWXMainFrame.cpp.

void BVWXMainFrame::PrintNoImageToFilter ( )

Definition at line 1166 of file BVWXMainFrame.cpp.

void BVWXMainFrame::PrintSavingError ( const int  errorNo,
wxString  fname 
)

Definition at line 1129 of file BVWXMainFrame.cpp.

References BIAS::AsciiToWx().

void BVWXMainFrame::RefitClients ( )

workaround adapting client canvases size

Definition at line 869 of file BVWXMainFrame.cpp.

Referenced by BIAS::BVWXDnDTarget::OnDropFiles().

void BVWXMainFrame::SetFileList ( const std::vector< std::string > &  fileNames)

Definition at line 368 of file BVWXMainFrame.cpp.

void BVWXMainFrame::ShowHistogramm ( ImageBase image)
protected

Definition at line 1581 of file BVWXMainFrame.cpp.

References BIAS::ImageBase::GetStorageType().

void BVWXMainFrame::ShowImageValueBar ( ImageBase image)
protected

Definition at line 1634 of file BVWXMainFrame.cpp.

References BIAS::ImageBase::GetStorageType().

void BVWXMainFrame::UncompressImage ( BIAS::ImageBase image)

some compressed images display size is bigger then original size e.b.

X3B images can be displayed three times a swide as loaded Uncompress after laod to keep same display and orig image size which eases coordinate transforms between mouse, display rgb and orig image. (JW)

Definition at line 377 of file BVWXMainFrame.cpp.

References BIAS::ImageBase::CM_PGR_XB3_F7M3_GBRG, and BIAS::ImageBase::GetColorModel().

Member Data Documentation

bool BIAS::BVWXMainFrame::_BlockAnimation
protected

Definition at line 120 of file BVWXMainFrame.hh.

int BIAS::BVWXMainFrame::_CurrentImage
protected

Definition at line 117 of file BVWXMainFrame.hh.

wxString BIAS::BVWXMainFrame::_DefaultDir
protected

Definition at line 142 of file BVWXMainFrame.hh.

wxString BIAS::BVWXMainFrame::_DefaultFile
protected

Definition at line 141 of file BVWXMainFrame.hh.

wxSpinCtrl* BIAS::BVWXMainFrame::_DelaySpin
protected

Definition at line 121 of file BVWXMainFrame.hh.

wxMenuItem* BIAS::BVWXMainFrame::_DrawROICheckItem
protected

Definition at line 125 of file BVWXMainFrame.hh.

std::vector<std::string> BIAS::BVWXMainFrame::_FileNames
protected

Definition at line 116 of file BVWXMainFrame.hh.

wxCheckBox* BIAS::BVWXMainFrame::_FitCheckBox
protected

Definition at line 122 of file BVWXMainFrame.hh.

wxMenuItem* BIAS::BVWXMainFrame::_HistogramCheckItem
protected

Definition at line 126 of file BVWXMainFrame.hh.

wxButton* BIAS::BVWXMainFrame::_HistogrammButton
protected

Definition at line 133 of file BVWXMainFrame.hh.

wxPoint BIAS::BVWXMainFrame::_HistoPosition
protected

Definition at line 113 of file BVWXMainFrame.hh.

wxSize BIAS::BVWXMainFrame::_HistoSize
protected

Definition at line 114 of file BVWXMainFrame.hh.

ScaledImageCanvas* BIAS::BVWXMainFrame::_ImageCanvasFloat
protected

Definition at line 112 of file BVWXMainFrame.hh.

ImageCanvas* BIAS::BVWXMainFrame::_ImageCanvasUC
protected

Definition at line 111 of file BVWXMainFrame.hh.

wxCheckBox* BIAS::BVWXMainFrame::_KeepScrollPositionCheckBox
protected

Definition at line 123 of file BVWXMainFrame.hh.

wxBoxSizer* BIAS::BVWXMainFrame::_MainSizer
protected

Definition at line 108 of file BVWXMainFrame.hh.

std::string BIAS::BVWXMainFrame::_MetaData
protected

Definition at line 118 of file BVWXMainFrame.hh.

bool BIAS::BVWXMainFrame::_NeedReload
protected

Definition at line 135 of file BVWXMainFrame.hh.

wxButton* BIAS::BVWXMainFrame::_NewButton
protected

Definition at line 130 of file BVWXMainFrame.hh.

wxButton* BIAS::BVWXMainFrame::_PreviousButton
protected

Definition at line 129 of file BVWXMainFrame.hh.

wxCheckBox* BIAS::BVWXMainFrame::_ReverseCheckBox
protected

Definition at line 124 of file BVWXMainFrame.hh.

wxButton* BIAS::BVWXMainFrame::_RunStopButton
protected

Definition at line 131 of file BVWXMainFrame.hh.

wxToolBarToolBase* BIAS::BVWXMainFrame::_RunTool
protected

Definition at line 132 of file BVWXMainFrame.hh.

unsigned int BIAS::BVWXMainFrame::_SelectedChannel
protected

Definition at line 138 of file BVWXMainFrame.hh.

bool BIAS::BVWXMainFrame::_ShowHistogramm
protected

Definition at line 136 of file BVWXMainFrame.hh.

bool BIAS::BVWXMainFrame::_ShowImageValueBar
protected

Definition at line 137 of file BVWXMainFrame.hh.

wxWindow* BIAS::BVWXMainFrame::_SizerWindow
protected

Definition at line 107 of file BVWXMainFrame.hh.

wxTimer BIAS::BVWXMainFrame::_Timer
protected

Definition at line 119 of file BVWXMainFrame.hh.

wxButton* BIAS::BVWXMainFrame::_ValueBarButton
protected

Definition at line 134 of file BVWXMainFrame.hh.

wxMenuItem* BIAS::BVWXMainFrame::_ValueBarCheckItem
protected

Definition at line 127 of file BVWXMainFrame.hh.

wxPoint BIAS::BVWXMainFrame::_ValueBarPosition
protected

Definition at line 113 of file BVWXMainFrame.hh.

wxSize BIAS::BVWXMainFrame::_ValueBarSize
protected

Definition at line 114 of file BVWXMainFrame.hh.

std::string BIAS::BVWXMainFrame::infoRaw_
protected

Definition at line 217 of file BVWXMainFrame.hh.


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