2 #include "OpenLoadImageDialog.h"
4 typedef vtkImageData* (*GETIMAGEDATADIALOG)();
6 OpenLoadImageDialog::OpenLoadImageDialog()
11 bool gimmicknotfound = true;
14 HINSTANCE gimmickhandle;
15 gimmickhandle = LoadLibrary(TEXT("creaImageIO2.dll"));
16 if(gimmickhandle!=NULL){
19 GETIMAGEDATADIALOG getImageDataDialog;
21 getImageDataDialog = (GETIMAGEDATADIALOG)GetProcAddress(gimmickhandle, "getImageDataDialog");
23 std::cout<<"imagedatadialog "<<getImageDataDialog<<std::endl;
25 if(getImageDataDialog!=NULL){
26 img = getImageDataDialog();
27 gimmicknotfound = false;
38 new wxFileDialog( 0, _T("Read Image"),wxEmptyString,wxEmptyString, _T("*.mhd"));
40 if (FD->ShowModal()==wxID_OK)
42 std::string path= FD->GetPath();
44 vtkMetaImageReader *reader = vtkMetaImageReader::New();
45 reader->SetFileName(path.c_str());
46 img = reader->GetOutput();
51 //-------------------------------------------------------------------
52 OpenLoadImageDialog::~OpenLoadImageDialog()
56 vtkImageData* OpenLoadImageDialog::getImageData(){