Public Types | Public Member Functions | Private Types | Private Attributes

creaImageIO::WxGimmickReaderDialog Class Reference
[Top level graphical user interfaces]

#include <creaImageIOWxGimmickReaderDialog.h>

Collaboration diagram for creaImageIO::WxGimmickReaderDialog:
Collaboration graph
[legend]

List of all members.

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< GimmickGetGimmick ()
 ~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< GimmickmGimmick
WxGimmickViewmView
wxButton * mOkButton
wxButton * mCancelButton
wxBoxSizer * mtopsizer

Detailed Description

Definition at line 18 of file creaImageIOWxGimmickReaderDialog.h.


Member Typedef Documentation

Definition at line 36 of file creaImageIOWxGimmickReaderDialog.h.


Member Enumeration Documentation

anonymous enum [private]
Enumerator:
TVID 

Definition at line 85 of file creaImageIOWxGimmickReaderDialog.h.

      {
        TVID = 1
        //      OKID = 2,
        //      CANCELID = 3
      };


Constructor & Destructor Documentation

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(); 
  }

Here is the call graph for this function:

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();
      }

  }


Member Function Documentation

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);
  }

Here is the caller graph for this function:

void creaImageIO::WxGimmickReaderDialog::stopReading (  )  [inline]

Definition at line 71 of file creaImageIOWxGimmickReaderDialog.h.

        {
                mView->stopReader();
        }


Member Data Documentation

Definition at line 82 of file creaImageIOWxGimmickReaderDialog.h.

Referenced by WxGimmickReaderDialog().

Definition at line 81 of file creaImageIOWxGimmickReaderDialog.h.

Referenced by OnValid(), and WxGimmickReaderDialog().

Definition at line 83 of file creaImageIOWxGimmickReaderDialog.h.

Referenced by WxGimmickReaderDialog().


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