OpenImageDialog::OpenImageDialog(bool usegimmick)
{
img = NULL;
-
+ _filename = "";
bool gimmickfound = false;
if(usegimmick){
vtkMetaImageReader* reader = vtkMetaImageReader::New();
reader->SetFileName(path.c_str());
reader->Update();
+ _filename = path;
img = vtkImageData::New();
img->DeepCopy(reader->GetOutput());
//reader->GetOutput()->Delete();
}
}*/
- std::cout<<"image reference count "<<img->GetReferenceCount()<<std::endl;
+ /*std::cout<<"image reference count "<<img->GetReferenceCount()<<std::endl;*/
}
//delete FD;
}
vtkImageData* OpenImageDialog::getImageData(){
return img;
}
+ std::string OpenImageDialog::getFilename(){
+ return _filename;
+ }
}
Program: wxMaracas
Module: $RCSfile: wxMaracas_N_ViewersWidget.cxx,v $
Language: C++
- Date: $Date: 2010/03/26 14:52:24 $
- Version: $Revision: 1.16 $
+ Date: $Date: 2010/05/03 13:46:48 $
+ Version: $Revision: 1.17 $
Copyright: (c) 2002, 2003
License:
//-----------------------------------------------------------------------------------
double wxMaracas_N_ViewersWidget :: GetX()
-{
+{
+ invariant();
return mvtkmprbasedata->GetX();
// return wxwindow1->GetX();
}
//-----------------------------------------------------------------------------------
double wxMaracas_N_ViewersWidget :: GetY()
{
+ invariant();
return mvtkmprbasedata->GetY();
// return wxwindow1->GetY();
}
//-----------------------------------------------------------------------------------
double wxMaracas_N_ViewersWidget :: GetZ()
{
+ invariant();
return mvtkmprbasedata->GetZ();
// return wxwindow1->GetZ();
}
+void wxMaracas_N_ViewersWidget :: invariant(){
+ if(mvtkmprbasedata == 0){
+ throw "The image has not been set in the viewer";
+ }
+}
+
void wxMaracas_N_ViewersWidget::setColorTransferFunction(vtkColorTransferFunction* colortable){
if (wxwindow1!=NULL) {
wxwindow1->setColorTransferFunction(colortable);
Program: wxMaracas
Module: $RCSfile: wxMaracas_N_ViewersWidget.h,v $
Language: C++
- Date: $Date: 2009/11/30 20:52:51 $
- Version: $Revision: 1.9 $
+ Date: $Date: 2010/05/03 13:46:48 $
+ Version: $Revision: 1.10 $
Copyright: (c) 2002, 2003
License:
std::vector<int> *nTypeView;
vtkMPRBaseData* mvtkmprbasedata;
-
+
+ void invariant();
DECLARE_EVENT_TABLE( );
};