#include <creaImageIOWxGimmickReaderDialog.h>

Public Types | |
| typedef WxGimmickView::EventType | EventType |
Public Member Functions | |
| WxGimmickReaderDialog () | |
| WxGimmickReaderDialog (wxWindow *parent, const wxWindowID id, const std::string i_namedescp, const std::string i_namedb, wxString title, const wxPoint &pos, const wxSize &size, int image_min_dim=GIMMICK_2D_IMAGE_SELECTION, int image_max_dim=GIMMICK_3D_IMAGE_SELECTION, int output_dim=NATIVE, int threads=0) | |
| boost::shared_ptr< Gimmick > | GetGimmick () |
| ~WxGimmickReaderDialog () | |
| Destructor. | |
| void | GetSelectedImages (std::vector< vtkImageData * > &s, int dim) |
| void | GetSelectedImagesInVector (std::vector< vtkImageData * > &s, int dim) |
| void | getSelected (std::vector< OutStrGimmick > &outG, std::vector< std::string > i_attr, bool mult, const std::string outmodel) |
| void | GetSelectedFiles (std::vector< std::string > &s) |
| void | OnSelChanged (EventType &event) |
| void | OnContextualMenu (EventType &event) |
| void | OnMenuTest (wxCommandEvent &event) |
| void | OnValid (bool valid) |
| Callback method on a selection. | |
| void | OnExit () |
| void | deleteMessage () |
| void | stopReading () |
Private Types | |
| enum | { TVID = 1 } |
Private Attributes | |
| boost::shared_ptr< Gimmick > | mGimmick |
| WxGimmickView * | mView |
| wxButton * | mOkButton |
| wxButton * | mCancelButton |
| wxBoxSizer * | mtopsizer |
Definition at line 18 of file creaImageIOWxGimmickReaderDialog.h.
Definition at line 36 of file creaImageIOWxGimmickReaderDialog.h.
anonymous enum [private] |
Definition at line 85 of file creaImageIOWxGimmickReaderDialog.h.
{
TVID = 1
// OKID = 2,
// CANCELID = 3
};
| creaImageIO::WxGimmickReaderDialog::WxGimmickReaderDialog | ( | ) |
| creaImageIO::WxGimmickReaderDialog::WxGimmickReaderDialog | ( | wxWindow * | parent, | |
| const wxWindowID | id, | |||
| const std::string | i_namedescp, | |||
| const std::string | i_namedb, | |||
| wxString | title, | |||
| const wxPoint & | pos, | |||
| const wxSize & | size, | |||
| int | image_min_dim = GIMMICK_2D_IMAGE_SELECTION, |
|||
| int | image_max_dim = GIMMICK_3D_IMAGE_SELECTION, |
|||
| int | output_dim = NATIVE, |
|||
| int | threads = 0 | |||
| ) |
Definition at line 10 of file creaImageIOWxGimmickReaderDialog.cpp.
References creaImageIO::GimmickView::ConnectValidationObserver(), GimmickDebugMessage, creaImageIO::GimmickView::Initialize(), mCancelButton, mGimmick, mOkButton, mtopsizer, mView, OnValid(), and TVID.
: wxDialog( parent,
id,
title,
pos,
size,
wxRESIZE_BORDER |
wxSYSTEM_MENU |
wxCLOSE_BOX |
wxMAXIMIZE_BOX |
wxMINIMIZE_BOX |
wxCAPTION
),
// mGimmick(0),
mView(0)
{
GimmickDebugMessage(1,"WxGimmickReaderDialog::WxGimmickReaderDialog"
<<std::endl);
mtopsizer = new wxBoxSizer(wxVERTICAL);
try {
mGimmick = boost::shared_ptr<Gimmick>(new Gimmick());
mGimmick->Initialize(i_namedescp,i_namedb);
mView = new WxGimmickView(mGimmick,
this,
TVID,
wxDefaultPosition,
size,
min_dim,
max_dim,
threads);
mView->Initialize();
// Connect the AddProgress callback
mView->ConnectValidationObserver
( boost::bind( &WxGimmickReaderDialog::OnValid , this, _1 ) );
}
catch (crea::Exception e)
{
e.Print();
return;
}
mtopsizer->Add( mView,1,wxGROW,0);
wxSizer* bsizer = this->CreateSeparatedButtonSizer(wxOK|wxCANCEL);
/*mOkButton = new wxButton(this, wxID_OK, _T("OK"), wxPoint(170,50));
mCancelButton = new wxButton(this, wxID_CANCEL, _T("CANCEL"), wxPoint(210,50));
*/ mOkButton = (wxButton*)FindWindowById(GetAffirmativeId(), this);
mCancelButton = (wxButton*)FindWindowById(GetEscapeId(), this);
mOkButton->Enable(false);
mtopsizer->Add ( bsizer, 0, wxGROW );
SetSizer( mtopsizer );
Layout();
}

| creaImageIO::WxGimmickReaderDialog::~WxGimmickReaderDialog | ( | ) |
Destructor.
Definition at line 81 of file creaImageIOWxGimmickReaderDialog.cpp.
References GimmickDebugMessage, mGimmick, and mView.
{
GimmickDebugMessage(1,"WxGimmickReaderDialog::~WxGimmickReaderDialog"
<<std::endl);
if (mView)
{
delete mView;
}
if (mGimmick)
{
mGimmick->Finalize();
}
}
| void creaImageIO::WxGimmickReaderDialog::deleteMessage | ( | ) |
| boost::shared_ptr<Gimmick> creaImageIO::WxGimmickReaderDialog::GetGimmick | ( | ) | [inline] |
Definition at line 34 of file creaImageIOWxGimmickReaderDialog.h.
{ return mGimmick; }
| void creaImageIO::WxGimmickReaderDialog::getSelected | ( | std::vector< OutStrGimmick > & | outG, | |
| std::vector< std::string > | i_attr, | |||
| bool | mult, | |||
| const std::string | outmodel | |||
| ) | [inline] |
Definition at line 55 of file creaImageIOWxGimmickReaderDialog.h.
{
mView->getSelectedFiles(outG, i_attr, mult, outmodel);
}
| void creaImageIO::WxGimmickReaderDialog::GetSelectedFiles | ( | std::vector< std::string > & | s | ) | [inline] |
Definition at line 60 of file creaImageIOWxGimmickReaderDialog.h.
{ mView->GetSelectedFiles(s); }
| void creaImageIO::WxGimmickReaderDialog::GetSelectedImages | ( | std::vector< vtkImageData * > & | s, | |
| int | dim | |||
| ) | [inline] |
Definition at line 44 of file creaImageIOWxGimmickReaderDialog.h.
{ mView->GetSelectedImages(s, dim); }
| void creaImageIO::WxGimmickReaderDialog::GetSelectedImagesInVector | ( | std::vector< vtkImageData * > & | s, | |
| int | dim | |||
| ) | [inline] |
Definition at line 47 of file creaImageIOWxGimmickReaderDialog.h.
{ mView->GetSelectedImagesInVector(s, dim); }
| void creaImageIO::WxGimmickReaderDialog::OnContextualMenu | ( | EventType & | event | ) |
| void creaImageIO::WxGimmickReaderDialog::OnExit | ( | ) | [inline] |
Definition at line 67 of file creaImageIOWxGimmickReaderDialog.h.
{ mView->StopPlayer(); }
| void creaImageIO::WxGimmickReaderDialog::OnMenuTest | ( | wxCommandEvent & | event | ) |
| void creaImageIO::WxGimmickReaderDialog::OnSelChanged | ( | EventType & | event | ) |
| void creaImageIO::WxGimmickReaderDialog::OnValid | ( | bool | valid | ) |
Callback method on a selection.
Definition at line 97 of file creaImageIOWxGimmickReaderDialog.cpp.
References mOkButton.
Referenced by WxGimmickReaderDialog().
{
mOkButton->Enable(t);
}

| void creaImageIO::WxGimmickReaderDialog::stopReading | ( | ) | [inline] |
Definition at line 71 of file creaImageIOWxGimmickReaderDialog.h.
{
mView->stopReader();
}
wxButton* creaImageIO::WxGimmickReaderDialog::mCancelButton [private] |
Definition at line 82 of file creaImageIOWxGimmickReaderDialog.h.
Referenced by WxGimmickReaderDialog().
boost::shared_ptr<Gimmick> creaImageIO::WxGimmickReaderDialog::mGimmick [private] |
Definition at line 78 of file creaImageIOWxGimmickReaderDialog.h.
Referenced by WxGimmickReaderDialog(), and ~WxGimmickReaderDialog().
wxButton* creaImageIO::WxGimmickReaderDialog::mOkButton [private] |
Definition at line 81 of file creaImageIOWxGimmickReaderDialog.h.
Referenced by OnValid(), and WxGimmickReaderDialog().
wxBoxSizer* creaImageIO::WxGimmickReaderDialog::mtopsizer [private] |
Definition at line 83 of file creaImageIOWxGimmickReaderDialog.h.
Referenced by WxGimmickReaderDialog().
Definition at line 79 of file creaImageIOWxGimmickReaderDialog.h.
Referenced by WxGimmickReaderDialog(), and ~WxGimmickReaderDialog().
1.7.1