-
- /* EED Borrame
- char tmp[255];
- FILE *pFile=fopen(filename.c_str(),"r+");
-
- fscanf(pFile,"%s",tmp); // --CreaContour--
-
- fscanf(pFile,"%s",tmp); // Version
- fscanf(pFile,"%s",tmp); // 1.0.3 || 1.0.2 || 1.0.1 || 1.0.0
-
- deleteAllContours();
-
- loadContours(pFile, false);
- loadContours(pFile, true);
-
- fclose(pFile);
- */
-}
-
-
-//EED03
-/*EED Borrame
-void wxContourMainFrame::loadContours( FILE *pFile, bool staticContour )
-{
- char tmp[255];
-
- if (staticContour==false)
- {
- fscanf(pFile,"%s",tmp); // ImageDimensions
- fscanf(pFile,"%s",tmp); // X
- fscanf(pFile,"%s",tmp); // Y
- fscanf(pFile,"%s",tmp); // Z
-
- fscanf(pFile,"%s",tmp); // ImageSpacing
- fscanf(pFile,"%s",tmp); // X
- fscanf(pFile,"%s",tmp); // Y
- fscanf(pFile,"%s",tmp); // Z
- }
-
- fscanf(pFile,"%s",tmp); // NumberOfContours
- fscanf(pFile,"%s",tmp); // ##
- int numberOfContours = atoi(tmp);
-
- std::vector<int> instantVector;
- int typeContourModel;
- manualBaseModel *manModelContour;
- int typeView;
-
- int i;
- for (i=0;i<numberOfContours;i++)
- {
- instantVector.clear();
- fscanf(pFile,"%s",tmp); // Instant
- fscanf(pFile,"%s",tmp); // 1
- instantVector.push_back( atoi(tmp) );
- fscanf(pFile,"%s",tmp); // 2
- instantVector.push_back( atoi(tmp) );
- fscanf(pFile,"%s",tmp); // 3
- instantVector.push_back( atoi(tmp) );
- fscanf(pFile,"%s",tmp); // 4
- instantVector.push_back( atoi(tmp) );
- fscanf(pFile,"%s",tmp); // 5
- instantVector.push_back( atoi(tmp) );
- fscanf(pFile,"%s",tmp); // 6
- instantVector.push_back( atoi(tmp) );
-
- fscanf(pFile,"%s",tmp); // TypeContourModel
- fscanf(pFile,"%s",tmp); // ##
- typeContourModel = atoi(tmp);
-
- manModelContour = kernelManager->factoryManualContourModel(typeContourModel);
- manModelContour->Open(pFile);
-
- fscanf(pFile,"%s",tmp); // TypeView
- fscanf(pFile,"%s",tmp); // ##
- typeView = atoi(tmp);
-
- std::string theName;
- theName = kernelManager->createOutline( manModelContour, instantVector );
- bool addedModel = theName.compare("") != 0;
- if( addedModel )
- {
- double spc[3];//Si no hay imagen pero hay contornos que spacing se pone por default
- _theViewPanel->getSpacing(spc);
- //Adding the manualContourControler to interface objects structure
- //Adding the manualViewContour to interface objects structure
- //_theViewPanel->getSceneManager()->setControlActiveStateOfALL( false );//This call is being done here because if the ROI is created underneath the previously created ROIS will still be active.
- _theViewPanel->getSceneManager()->configureViewControlTo( theName, manModelContour,spc , typeView) ;
- }
-
- if (staticContour==true)
- {
- Instant instant(&instantVector);
- kernelManager->changeContourOfManager( theName , &instant );
- }
- }// for numberOfContours