X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2Fkernel_ManagerContour_NDimensions%2FOutlineModelManager.cxx;h=6b2e68b25495332d6d6e275389abe33c2432d2aa;hb=fc546c3fa6dc579e173688cb0d5460af7dd668bb;hp=44d91fa5f592521c68c2fb1dc8d76f5aed628ece;hpb=6e3c929c883c405e0075fa8df10b12a935979367;p=creaContours.git diff --git a/lib/kernel_ManagerContour_NDimensions/OutlineModelManager.cxx b/lib/kernel_ManagerContour_NDimensions/OutlineModelManager.cxx index 44d91fa..6b2e68b 100644 --- a/lib/kernel_ManagerContour_NDimensions/OutlineModelManager.cxx +++ b/lib/kernel_ManagerContour_NDimensions/OutlineModelManager.cxx @@ -78,6 +78,7 @@ * @param theCommand Is the command to execute * @param fromRegistration Indicates if the execution is directed from the registration, by default comes from the GUI = false. */ + bool OutlineModelManager :: executeCommand_OutlineModel(std::string outKName, CommandObject * theCommand, bool fromRegistration) { ContourThing * theOutline = *outlinesEnvironment->getThingByName( outKName ); @@ -337,7 +338,7 @@ * @return Returns the key name of the created outline, or ""if it wasn't created */ // bool OutlineModelManager :: createOutline(std::string aName, ContourThing * &theOutline) - std::string OutlineModelManager :: createOutline(manualContourModel * model, std::vector theInstantData, std::string aName) + std::string OutlineModelManager :: createOutline(manualBaseModel * model, std::vector theInstantData, std::string aName) { ContourThing * theOutline = new ContourThing ( model ); theOutline->setName(aName); @@ -763,14 +764,16 @@ std::string OutlineModelManager :: createCopyContourOf( std::string anExistingKName, std::vector &instantNoTouchData ) { - manualContourModel * manModelContour = getOutlineByKeyName( anExistingKName )->getModel()->Clone(); + manualBaseModel * manModelContour = getOutlineByKeyName( anExistingKName )->getModel()->Clone(); return createOutline( manModelContour, instantNoTouchData ); } - void OutlineModelManager::SaveThingName( FILE *pFile, std::string nameThing ) + void OutlineModelManager::SaveThingName( FILE *pFile, FILE *pFileData, std::string nameThing ) { std::vector< Instant * > *lstInstants; +printf("EED OutlineModelManager::SaveThingName %s\n",nameThing.c_str() ); lstInstants = outlinesEnvironment->getInstantsOfThing( nameThing ); +printf("EED OutlineModelManager::SaveThingName %d\n", (*lstInstants).size() ); Instant *instant = (*lstInstants)[0]; std::vector *vecInst =instant->getInstant(); int i,sizeVecInst = vecInst->size(); @@ -782,5 +785,6 @@ fprintf(pFile,"\n"); ContourThing *contourthing = *outlinesEnvironment->getThingByName(nameThing); contourthing->getModel()->Save(pFile); + contourthing->getModel()->SaveData(pFileData); }