X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FmaracasVisuLib%2Fsrc%2Finterface%2FwxWindows%2Fwidgets%2FmanualContour%2FmanualContourModel.cpp;h=f8369751bf63a9c61c893790852361d8776a308e;hb=5380f9e66daf440f27f33bb060e5ae1a646612cd;hp=3a4353a63c671e4cd88d6f4f376a557d4cbed75c;hpb=1747b4600c1578c814c8cffcc17f548d14b4a6fa;p=creaMaracasVisu.git diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourModel.cpp b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourModel.cpp index 3a4353a..f836975 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourModel.cpp +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourModel.cpp @@ -31,6 +31,12 @@ manualContourModel::manualContourModel() _delta_JSTG = 0.0; //--------------------------------------------------------------------------------------------------------------- + +//CMRU 17-08-09 ------------------------------------------------------------------------------------------------- + _realSize = 0.0; + _label = ""; +//--------------------------------------------------------------------------------------------------------------- + } // ---------------------------------------------------------------------------- @@ -260,7 +266,6 @@ void manualContourModel::SetNumberOfPointsSpline(int size) _sizePointsContour = size; } - // ---------------------------------------------------------------------------- void manualContourModel::SetCloseContour(bool closeContour) @@ -645,7 +650,36 @@ void manualContourModel::Save(FILE *ff) // virtual fprintf(ff,"%f %f %f\n", mp->GetX(), mp->GetY(), mp->GetZ() ); } } +//CMRU 03-09-09----------------------------------------------------------------------------------------------- +void manualContourModel::SaveData(FILE *ff) +{ + std::string etiqueta = GetLabel(); + if(etiqueta.empty()) + fprintf(ff,"Label: NO_LABEL\n"); + else + fprintf(ff,"Label: %s\n",etiqueta.c_str()); + fprintf(ff,"Real_Size: %f\n",GetRealSize()); +} + +void manualContourModel::OpenData(FILE *ff) +{ + char tmp[255]; + + fscanf(ff,"%s",tmp); // Label: + fscanf(ff,"%s",tmp); // value + std::cout< manualContourModel::ExploseModel( ) +std::vector manualContourModel::ExploseModel( ) { - std::vector lstTmp; + std::vector lstTmp; lstTmp.push_back(this); return lstTmp; } @@ -695,3 +729,26 @@ void manualContourModel::Transform_Ax_Plus_B (double Ax, double Bx, double Ay, d mp->SetPointY( mp->GetY()*Ay + By ); } } + + +//CMRU 17-08-09---------------------------------------------------------------------------- +void manualContourModel::SetLabel(std::string newLabel) +{ + _label = newLabel; +} + +void manualContourModel::SetRealSize(double newRealSize) +{ + _realSize = newRealSize; +} + +double manualContourModel::GetRealSize() +{ + return _realSize; +} + +std::string manualContourModel::GetLabel() +{ + return _label; +} +//----------------------------------------------------------------------------