#include "OpenImageDialog.h"
+#include "creaWx.h"
typedef vtkImageData* (*GETIMAGEDATADIALOG)();
namespace creaMaracasVisuKernel{
OpenImageDialog::OpenImageDialog()
{
-
-
img = NULL;
bool gimmicknotfound = true;
-
+
#ifdef WIN32
- HINSTANCE gimmickhandle;
- gimmickhandle = LoadLibrary(TEXT("creaImageIO2.dll"));
+ HINSTANCE gimmickhandle;
+ gimmickhandle = LoadLibrary(TEXT("creaImageIO2.dll"));
std::cout<<"imagehandle "<<gimmickhandle<<std::endl;
- if(gimmickhandle!=NULL){
+ if(gimmickhandle!=NULL){
-
GETIMAGEDATADIALOG getImageDataDialog;
getImageDataDialog = (GETIMAGEDATADIALOG)GetProcAddress(gimmickhandle, "getImageDataDialog");
-
std::cout<<"imagedatadialog "<<getImageDataDialog<<std::endl;
if(getImageDataDialog!=NULL){
img = getImageDataDialog();
gimmicknotfound = false;
}
- }
+ }
#endif
if(gimmicknotfound){
- wxFileDialog* FD =
+ wxFileDialog* FD =
new wxFileDialog( 0, _T("Read Image"),wxEmptyString,wxEmptyString, _T("*.mhd"));
-
+
if (FD->ShowModal()==wxID_OK)
{
- std::string path= FD->GetPath();
+ std::string path= crea::wx2std(FD->GetPath());
- vtkMetaImageReader *reader = vtkMetaImageReader::New();
- reader->SetFileName(path.c_str());
- img = reader->GetOutput();
- }
- }
-
-
-
+ vtkMetaImageReader *reader = vtkMetaImageReader::New();
+ reader->SetFileName(path.c_str());
+ img = reader->GetOutput();
+ }
+ }
}
//-------------------------------------------------------------------
return img;
}
}
-
manualViewContour::manualViewContour()
{
_id_viewPoint_for_text = 0;
- _mesureScale = 1;
+ _mesureScale = 1;
_initialConoturModel = new manualContourModel();
}
// ----------------------------------------------------------------------------
{
}
-
-
// ----------------------------------------------------------------------------
void manualViewContour::RefreshContour() // virtual
{
-
int i,np,nps;
//JSTG 25-02-08 --------------------
//--------------------------------------------------------------
// EED 27 sep 2006
// _pts->SetPoint(i, x,y,z );
- _pts->SetPoint(i , x*_spc[0] , y*_spc[1] , z*_spc[2] );
-
+ _pts->SetPoint(i, x*_spc[0], y*_spc[1], z*_spc[2] );
}// for
}
int size = GetNumberOfPoints();
char text[50];
char resultText[50];
- strcpy(resultText," ");
+ strcpy(resultText, " ");
//CMRU 19-08-09 ----------------------------------
std::string label;
if (size==2)
{
strcpy(resultText,"L= ");
- gcvt ( _mesureScale * this->_manContModel->GetPathSize() , 5, text );
+ gcvt ( _mesureScale * this->_manContModel->GetPathSize(), 5, text );
strcat(resultText,text);
//CMRU 19-08-09 ----------------------------------
if (_manContModel->IfCloseContour()==true)
{
strcpy(resultText,"P= ");
- gcvt ( _mesureScale * this->_manContModel->GetPathSize() , 5, text );
+ gcvt ( _mesureScale * this->_manContModel->GetPathSize(), 5, text );
strcat(resultText,text);
- gcvt ( _mesureScale * _mesureScale * this->_manContModel->GetPathArea() , 5, text );
+ gcvt ( _mesureScale * _mesureScale * this->_manContModel->GetPathArea(), 5, text );
strcat(resultText," A= ");
strcat(resultText,text);
strcat(resultText," ");
} else {
strcpy(resultText,"L= ");
- gcvt ( _mesureScale * this->_manContModel->GetPathSize() , 5, text );
+ gcvt ( _mesureScale * this->_manContModel->GetPathSize(), 5, text );
strcat(resultText,text);
}
//CMRU 19-08-09 ----------------------------------
#include "Color.xpm"
//#include "creaSystem.h"
+#include "creaWx.h"
BEGIN_EVENT_TABLE( wxMaracasRenderTabbedPanel, wxPanel )
EVT_MENU( 12121, wxMaracasRenderTabbedPanel::OnRefreshView )
** Class constructor
**/
wxMaracasRenderTabbedPanel::wxMaracasRenderTabbedPanel(wxWindow* parent, int id, wxVtk3DBaseView* _baseView)
-: wxPanel(parent, -1, wxDefaultPosition, wxDefaultSize)
+ : wxPanel(parent, -1, wxDefaultPosition, wxDefaultSize)
{
_id = id;
baseView = _baseView;
dialog = NULL;
- volmanager = new wxMaracasMultipleVolumeRendererManager();
+ volmanager = new wxMaracasMultipleVolumeRendererManager();
surrendmanager1 = new wxMaracasSurfaceRenderingManager();
surrendmanager2 = new wxMaracasSurfaceRenderingManager();
surrendmanager3 = new wxMaracasSurfaceRenderingManager();
//wxMaracasRenderTabbedPanel::getInstance()->addRemoveActorSB(_propid, false);
//wxMaracasRenderTabbedPanel::getInstance()->addRemoveActorSC(_propid, false);
addRemoveActorMPR(false);
- if( vtkmpr3Ddataviewer ) { delete vtkmpr3Ddataviewer; }
- if( mwxvtkmpr3Dview ) { delete mwxvtkmpr3Dview; }
+ if( vtkmpr3Ddataviewer ) { delete vtkmpr3Ddataviewer; }
+ if( mwxvtkmpr3Dview ) { delete mwxvtkmpr3Dview; }
this->deleteVolume(_id);
delete dialog;
- delete wxtabs;
+ delete wxtabs;
}
/**
//vtkImageData* img3 = surrendmanager3->getImageData(pathfile);
if(img!=NULL /*&& img1!=NULL && img2!=NULL && img3!=NULL*/)
{
- addVolume(img, filename);
+ addVolume(img, filename);
addSurface1(img, filename);
addSurface2(img, filename);
addSurface3(img, filename);
addMPROptions();
- volname = (wxString) filename;
+ volname = crea::std2wx(filename);
wxtabs->Refresh();
}
}
int wxMaracasRenderTabbedPanel::getPropIdV()
{
return _id;
-}
\ No newline at end of file
+}