creaMaracasVisuKernel::OpenImageDialog Class Reference

#include <OpenImageDialog.h>

List of all members.

Public Member Functions

 OpenImageDialog ()
 ~OpenImageDialog ()
vtkImageData * getImageData ()

Private Attributes

vtkImageData * img

Detailed Description

Definition at line 11 of file OpenImageDialog.h.


Constructor & Destructor Documentation

creaMaracasVisuKernel::OpenImageDialog::OpenImageDialog (  ) 

Definition at line 8 of file OpenImageDialog.cxx.

References img.

00009         {
00010                 img = NULL;
00011                 bool gimmicknotfound = true;
00012 
00013         #ifdef WIN32
00014                 HINSTANCE gimmickhandle;
00015                 gimmickhandle = LoadLibrary(TEXT("creaImageIO2.dll"));
00016                 std::cout<<"imagehandle "<<gimmickhandle<<std::endl;
00017                 if(gimmickhandle!=NULL){
00018 
00019                         GETIMAGEDATADIALOG getImageDataDialog;
00020 
00021                         getImageDataDialog = (GETIMAGEDATADIALOG)GetProcAddress(gimmickhandle, "getImageDataDialog");
00022 
00023                         std::cout<<"imagedatadialog "<<getImageDataDialog<<std::endl;
00024 
00025                         if(getImageDataDialog!=NULL){
00026                                 img = getImageDataDialog();
00027                                 gimmicknotfound = false;
00028                         }
00029                 }
00030 
00031         #endif
00032 
00033                 if(gimmicknotfound){
00034 
00035                         wxFileDialog* FD =
00036                           new wxFileDialog( 0, _T("Read Image"),wxEmptyString,wxEmptyString, _T("*.mhd"));
00037 
00038                         if (FD->ShowModal()==wxID_OK)
00039                         {
00040                                 std::string  path= crea::wx2std(FD->GetPath());
00041 
00042                                 vtkMetaImageReader *reader =  vtkMetaImageReader::New();
00043                                 reader->SetFileName(path.c_str());
00044                                 img = reader->GetOutput();
00045                         }
00046                 }
00047         }

creaMaracasVisuKernel::OpenImageDialog::~OpenImageDialog (  ) 

Definition at line 50 of file OpenImageDialog.cxx.

00051         {
00052         }


Member Function Documentation

vtkImageData * creaMaracasVisuKernel::OpenImageDialog::getImageData (  ) 

Definition at line 54 of file OpenImageDialog.cxx.

References img.

00054                                                    {
00055                 return img;
00056         }


Member Data Documentation

Definition at line 20 of file OpenImageDialog.h.

Referenced by getImageData(), and OpenImageDialog().


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

Generated on 18 Mar 2010 for creaMaracasVisu_lib by  doxygen 1.6.1