X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=bbtk%2Fsrc%2FbbmaracasvisuShowNPoints.cxx;h=25debba998835ec2288161ba90eb76b10d9a49d3;hb=c68f4e0d9298fe538f87a974947cce470148c60b;hp=63b5236cb28ed3f5ffb173941a4c2f4f05b1437c;hpb=910aad6b5adef5024f896cc5a0daa79f1cda0661;p=creaMaracasVisu.git diff --git a/bbtk/src/bbmaracasvisuShowNPoints.cxx b/bbtk/src/bbmaracasvisuShowNPoints.cxx index 63b5236..25debba 100644 --- a/bbtk/src/bbmaracasvisuShowNPoints.cxx +++ b/bbtk/src/bbmaracasvisuShowNPoints.cxx @@ -6,6 +6,7 @@ #include "vtkPolyDataMapper.h" #include "vtkRenderWindow.h" #include "vtkTextActor3D.h" +#include namespace bbcreaMaracasVisu { @@ -344,7 +345,8 @@ void WidgetShowNPoints::OnAddPoint (wxCommandEvent& event) //EED int result_FD = FD->ShowModal(); - + std::string tmpLabel; + // This line is need it by windows //EED FD->SetReturnCode( result_FD ); @@ -366,7 +368,13 @@ void WidgetShowNPoints::OnAddPoint (wxCommandEvent& event) y=lstPointsY[i]; z=lstPointsZ[i]; value= mimage->GetScalarComponentAsDouble(x,y,z,0); - fprintf(ff,"%d\t%d\t%d\t%f\t%s\n", x , y , z , value , lstLabels[i].c_str()); + if (lstLabels[i]!="") + { + tmpLabel=lstLabels[i]; + } else{ + tmpLabel="<_VOID_>"; + } + fprintf(ff,"%d\t%d\t%d\t%f\t%s\n", x , y , z , value , tmpLabel.c_str()); } // for fclose(ff); } else { // else ff @@ -409,6 +417,7 @@ void WidgetShowNPoints::OnAddPoint (wxCommandEvent& event) for (i=0; i")==0) { strcpy(chartmp,""); } AddPoint(x,y,z, chartmp ); } fclose(ff); @@ -591,6 +600,7 @@ void WidgetShowNPoints::UpdatePoints(wxCommandEvent &event) { this->lstSourceSphere[i]->SetRadius(mradio); this->lstActorsSphere[i]->GetProperty()->SetOpacity(mopacity); + this->lstActorsText[i]->GetTextProperty()->SetOpacity(mopacity); this->lstActorsText[i]->SetPosition(this->lstActorsText[i]->GetPosition()[0]+difradio,this->lstActorsText[i]->GetPosition()[1], this->lstActorsText[i]->GetPosition()[2]); }