From: Juan Prieto Date: Wed, 3 Dec 2008 11:42:54 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: EED.02Oct2009~143 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=a3c5b7933550c47e3f68d0a40c6cd59aa398f200;p=creaMaracasVisu.git *** empty log message *** --- diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_N_ViewersWidget.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_N_ViewersWidget.cxx index d9d07c6..c24788a 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_N_ViewersWidget.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_N_ViewersWidget.cxx @@ -3,8 +3,8 @@ Program: wxMaracas Module: $RCSfile: wxMaracas_N_ViewersWidget.cxx,v $ Language: C++ - Date: $Date: 2008/10/31 16:32:42 $ - Version: $Revision: 1.1 $ + Date: $Date: 2008/12/03 11:42:54 $ + Version: $Revision: 1.2 $ Copyright: (c) 2002, 2003 License: @@ -200,10 +200,15 @@ void wxMaracas_N_ViewersWidget::SetImage( vtkImageData *image ) { - if (wxwindow1!=NULL) { wxwindow1->SetImage(image); } - if (wxwindow2!=NULL) { wxwindow2->SetImage(image); } + if (wxwindow1!=NULL) { + + wxwindow1->SetImage(image); + } + if (wxwindow2!=NULL) { wxwindow2->SetImage(image); } if (wxwindow3!=NULL) { wxwindow3->SetImage(image); } if (wxwindow4!=NULL) { wxwindow4->SetImage(image); } + + } diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.cxx index 9c8cc59..d81a468 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.cxx @@ -3,8 +3,8 @@ Program: wxMaracas Module: $RCSfile: wxMaracas_ViewerWidget.cxx,v $ Language: C++ - Date: $Date: 2008/11/24 15:11:25 $ - Version: $Revision: 1.2 $ + Date: $Date: 2008/12/03 11:42:54 $ + Version: $Revision: 1.3 $ Copyright: (c) 2002, 2003 License: @@ -257,7 +257,16 @@ void wxMaracas_ViewerWidget::SetImage( vtkImageData *image ) { - printf("EED wxMaracas_ViewerWidget::SetImage IMPORTANT this methode is missing \n"); + //printf("EED wxMaracas_ViewerWidget::SetImage IMPORTANT this methode is missing \n"); + marImageData* mar = mvtkmprbasedata->GetMarImageData(); + mar->removeImageData(0); + mar->AddImageData(image); + + ConfigureVTK(); + RefreshView(); + + + } double wxMaracas_ViewerWidget :: GetX() diff --git a/lib/maracasVisuLib/src/kernel/marImageData.cpp b/lib/maracasVisuLib/src/kernel/marImageData.cpp index de4273f..88476ca 100644 --- a/lib/maracasVisuLib/src/kernel/marImageData.cpp +++ b/lib/maracasVisuLib/src/kernel/marImageData.cpp @@ -78,6 +78,19 @@ vtkImageData *marImageData::GetImageData() { return _imagedataLST[0]; } + +void marImageData::removeImageData(int index) +{ + if(index < _imagedataLST.size()){ + + //vtkImageData* img = _imagedataLST[index]; + for(int i = index; i < _imagedataLST.size()-1; i++){ + _imagedataLST[i] = _imagedataLST[i+1]; + } + _imagedataLST.pop_back(); + //delete img; + } +} // ---------------------------------------------------------------------------------------------- int marImageData::GetXOriginal(int value) { diff --git a/lib/maracasVisuLib/src/kernel/marImageData.h b/lib/maracasVisuLib/src/kernel/marImageData.h index 87db79c..0eaaf2e 100644 --- a/lib/maracasVisuLib/src/kernel/marImageData.h +++ b/lib/maracasVisuLib/src/kernel/marImageData.h @@ -19,6 +19,8 @@ public: void SetVoiOriginal(int voi[6]); void AddImageData(vtkImageData *imagedata); + void removeImageData(int index); + void GetSpcOriginal(double spc[3]); void GetVoiOriginal(int voi[6]); vtkImageData *GetImageData();