OutlineModelManager Class Reference

#include <OutlineModelManager.h>

Collaboration diagram for OutlineModelManager:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 OutlineModelManager (SomeEnvironment< ImageSourceThing * > *imSourceEnv, SomeEnvironment< ImageSectionThing * > *imSectionEnv, SomeEnvironment< AxeThing * > *axesEnv, SomeEnvironment< ContourThing * > *contourEnv)
 ~OutlineModelManager ()
ContourWorkspacecreateWorkSpace ()
void setWorkSpace (ContourWorkspace *aWorkSpace)
bool executeCommand_OutlineModel (std::string outKName, CommandObject *theCommand, bool fromRegistration)
bool executeCommand (CommandObject *theCommand, bool fromRegistration=false)
bool executeCommandsQueue (std::deque< CommandObject * > executionQueue, bool fromRegistration=false)
bool setUserConcepts (std::string conceptsScript)
bool addUserConcept (std::string theConceptName, int conceptSize)
std::vector< NameWrapper * > getActualInstantOutlines ()
std::vector< ContourThing ** > getOutlinesAtInstant (Instant *anInstant, bool ifAnnotate=true)
std::vector< std::string > GetLstNameThings ()
std::vector< std::string > GetLstNameThingsStatic ()
std::vector< ContourThing * > getOutlinesFromGroup (std::string aGroupName)
bool addOutlinesGroup (std::string theOutlineName, OutlineGroup *theGroup)
ContourThinggetOutlineByKeyName (std::string outKName)
ImageSourceThinggetImageSourceThingByKeyName (std::string iSeourceKName)
ImageSectionThinggetImageSectionThingByKeyName (std::string iSectionName)
std::string createOutline (manualBaseModel *model, std::vector< int > theInstantData, std::string aName="")
bool createAxe (std::string aDescription, Instant *theInstantData)
bool createImageSource (std::string aSource, Instant *theInstantData)
bool createImageSection (std::string aSecImageData, Instant *theInstantData)
std::string addOutline (ContourThing *theOutline, Instant *theInstantData)
void removeOutline (std::string ss)
bool addAxe (AxeThing *thaAxe, Instant *theInstantData)
bool addImageSource (ImageSourceThing *imageSource, Instant *theInstantData)
bool addImageSection (ImageSectionThing *imageSection, Instant *theInstantData)
void annotateOutlineWrap (std::string kOutlineName, std::string theRealName)
void annotateOutlinesWrap (std::vector< std::string > keyNames, std::vector< ContourThing ** > theOutlinesVector)
void annotateActualOutlineWrap (std::string actualKeyOutline, std::string theRealName)
void annotateActualAxeWrap (std::string actualKeyAxe, std::string theRealName)
void annotateActualSectionImageWrap (std::string actualKeyImage, std::string theRealName)
void annotateActualSourceImageWrap (std::string actualKeyImage, std::string theRealName)
void setInstant (Instant *newActualInstantData)
AxeThinggetAxeByKeyName (std::string axeKName)
std::vector< Instant * > getOutlineInstantsByName (std::string thekName)
std::vector< Instant * > getOutlineInstants ()
bool includeOutlineInstant (std::string outKName, Instant *anInstantData)
bool includeAxeInstant (std::string axeKName, Instant *anInstantData)
bool includeImageSectionInstant (std::string imaKName, Instant *anInstantData)
bool includeImageSourceInstant (std::string imaKName, Instant *anInstantData)
void getConceptsInformation (std::vector< std::string > &conceptNameVect, std::vector< int > &conceptSizeVect)
ContourWorkspacegetContourWorkspace ()
int getGroupsCount ()
void clean ()
void removeAllOutlines ()
std::string createCopyContourOf (std::string anExistingKName, std::vector< int > &instantNoTouchData)
void SaveThingName (FILE *pFile, FILE *pFileData, std::string nameThing)
void ChangeContourOfList (std::string keyName, Instant *instant)
int IsPartOfStaticList (std::string ss)
Instant * getInstant ()

Private Member Functions

void updateToActualInstant ()
bool setAutomaticConcepts ()

Private Attributes

std::string actualGruopID
SomeEnvironment< AxeThing * > * axesEnvironment
SomeEnvironment
< ImageSectionThing * > * 
imagesSectionEnvironment
SomeEnvironment
< ImageSourceThing * > * 
imageSourceEnvironment
SomeEnvironment< ContourThing * > * outlinesEnvironment
std::map< std::string,
OutlineGroup * > 
outlineGroups
ContourWorkspaceworkSpace
InstantMembersNameListactualInstantWrapping
bool changeSourceImage
int counterIdKey
PrefixMaxKeyGenerator keyGenerator
std::string axeConcept
std::string axeDepthConcept
Instant * actualInstant
std::vector< ContourThing ** > staticContourLst


Detailed Description

Definition at line 35 of file OutlineModelManager.h.


Constructor & Destructor Documentation

OutlineModelManager::OutlineModelManager ( SomeEnvironment< ImageSourceThing * > *  imSourceEnv,
SomeEnvironment< ImageSectionThing * > *  imSectionEnv,
SomeEnvironment< AxeThing * > *  axesEnv,
SomeEnvironment< ContourThing * > *  contourEnv 
)

Definition at line 18 of file OutlineModelManager.cxx.

References actualInstant, actualInstantWrapping, PrefixMaxKeyGenerator::addKeyThing(), axesEnvironment, changeSourceImage, counterIdKey, imageSourceEnvironment, imagesSectionEnvironment, keyGenerator, outlinesEnvironment, and workSpace.

00019         {
00020                 actualInstant                           = NULL;
00021                 imageSourceEnvironment          = imSourceEnv;
00022                 imagesSectionEnvironment        = imSectionEnv;
00023                 axesEnvironment                         = axesEnv;
00024                 outlinesEnvironment                     = contourEnv;
00025 
00026                 workSpace                                       = new ContourWorkspace(this);//implies a shared workSpace
00027                 keyGenerator                            = * new PrefixMaxKeyGenerator();
00028                 counterIdKey                            = 0;
00029 
00030                 actualInstantWrapping           = new InstantMembersNameList();
00031                 changeSourceImage                       = true;
00032 
00033                 bool allOK      = keyGenerator.addKeyThing("Axes", "Axe");
00034                 allOK &= keyGenerator.addKeyThing("Image Sources", "Image source");
00035                 allOK &= keyGenerator.addKeyThing("Image Sections", "Image section");
00036                 allOK &= keyGenerator.addKeyThing("Outlines", "Outline");
00037                 //setAutomaticConcepts();
00038         }

Here is the call graph for this function:

OutlineModelManager::~OutlineModelManager (  ) 

Definition at line 43 of file OutlineModelManager.cxx.

References actualInstant, actualInstantWrapping, clean(), and workSpace.

00044         {
00045                 clean();
00046                 delete actualInstant;
00047                 delete workSpace;
00048                 delete actualInstantWrapping;
00049         }

Here is the call graph for this function:


Member Function Documentation

bool OutlineModelManager::addAxe ( AxeThing thaAxe,
Instant *  theInstantData 
)

Definition at line 464 of file OutlineModelManager.cxx.

References axesEnvironment, PrefixMaxKeyGenerator::generateKeyOf(), and keyGenerator.

Referenced by createAxe().

00465         {
00466                 std::string kName;
00467                 bool added  = keyGenerator.generateKeyOf("Axes", axesEnvironment->getNumberOfThings(),kName);
00468                 added &= axesEnvironment->addThingWithInstant(kName,theAxe, theInstantData);
00469                 return added;
00470         }

Here is the call graph for this function:

Here is the caller graph for this function:

bool OutlineModelManager::addImageSection ( ImageSectionThing imageSection,
Instant *  theInstantData 
)

Definition at line 492 of file OutlineModelManager.cxx.

References PrefixMaxKeyGenerator::generateKeyOf(), imagesSectionEnvironment, and keyGenerator.

00493         {
00494                 std::string kName;
00495                 bool added  = keyGenerator.generateKeyOf("Image Sections", imagesSectionEnvironment->getNumberOfThings(),kName);
00496                 added &= imagesSectionEnvironment->addThingWithInstant(kName, imageSection, theInstantData);
00497                 return added;
00498         }

Here is the call graph for this function:

bool OutlineModelManager::addImageSource ( ImageSourceThing imageSource,
Instant *  theInstantData 
)

Definition at line 478 of file OutlineModelManager.cxx.

References PrefixMaxKeyGenerator::generateKeyOf(), imageSourceEnvironment, and keyGenerator.

00479         {
00480                 std::string kName;
00481                 bool added  = keyGenerator.generateKeyOf("Image Sources", imageSourceEnvironment->getNumberOfThings(),kName);
00482                 added &= imageSourceEnvironment->addThingWithInstant(kName,imageSource, theInstantData );
00483                 return added;
00484         }

Here is the call graph for this function:

std::string OutlineModelManager::addOutline ( ContourThing theOutline,
Instant *  theInstantData 
)

Definition at line 393 of file OutlineModelManager.cxx.

References counterIdKey, PrefixMaxKeyGenerator::generateKeyOf(), ContourThing::getName(), keyGenerator, outlinesEnvironment, and ContourThing::setName().

Referenced by createOutline().

00394         {
00395                 std::string kName;
00396 
00397 // EED
00398 //              bool added  = keyGenerator.generateKeyOf("Outlines", outlinesEnvironment->getNumberOfThings(),kName);
00399 
00400                 counterIdKey++;
00401                 bool added = keyGenerator.generateKeyOf( "Outlines", counterIdKey , kName );
00402 
00403                 if( theOutline->getName().compare("")==0 )
00404                 {
00405                         theOutline->setName(kName);
00406                 }
00407                 added &= outlinesEnvironment->addThingWithInstant(kName,theOutline, theInstantData);
00408                 if( added )
00409                         return kName;
00410                 else
00411                         return "";
00412         }

Here is the call graph for this function:

Here is the caller graph for this function:

bool OutlineModelManager::addOutlinesGroup ( std::string  theOutlineName,
OutlineGroup theGroup 
)

Adds to storing at (outlineGroups) an outline group given its name and the group

Parameters:
theOutlineName The name of the group containing the outlines names to add
theGroup The outlines group to add
Returns:
Returns true
Gets the outlines at a specific form the outline's environment
Parameters:
aGroupName The name of the group containing the outlines names to get
Returns:
The vector to the outlineGroups at the given group

Definition at line 296 of file OutlineModelManager.cxx.

References outlineGroups.

00297         {
00298         outlineGroups.insert(std::pair <std::string, OutlineGroup *> ( theOutlineName, theGroup ));
00299 //              std::map<std::string, OutlineGroup *> :: iterator iter = NULL;
00300                 std::map<std::string, OutlineGroup *> :: iterator iter;
00301                 iter = outlineGroups.find( theOutlineName );
00302                 bool ifAdded = iter->first.compare( theOutlineName ) == 0;
00303                 return ifAdded;
00304         }

bool OutlineModelManager::addUserConcept ( std::string  theConceptName,
int  conceptSize 
)

Definition at line 177 of file OutlineModelManager.cxx.

References axesEnvironment, imageSourceEnvironment, imagesSectionEnvironment, and outlinesEnvironment.

Referenced by setUserConcepts().

00178         {
00179                 bool allOK = axesEnvironment->addConcept(theConceptName, conceptSize);
00180                 allOK &= imagesSectionEnvironment->addConcept(theConceptName, conceptSize);
00181                 allOK &= imageSourceEnvironment->addConcept(theConceptName, conceptSize);
00182                 allOK &= outlinesEnvironment->addConcept(theConceptName, conceptSize);
00183                 return allOK;
00184         }

Here is the caller graph for this function:

void OutlineModelManager::annotateActualAxeWrap ( std::string  actualKeyAxe,
std::string  theRealName 
)

Definition at line 540 of file OutlineModelManager.cxx.

References actualInstantWrapping.

00541         {
00542                 actualInstantWrapping -> setActualAxeWrap(actualKeyAxe, theRealName);
00543         }

void OutlineModelManager::annotateActualOutlineWrap ( std::string  actualKeyOutline,
std::string  theRealName 
)

Definition at line 530 of file OutlineModelManager.cxx.

References actualInstantWrapping.

00531         {
00532                 actualInstantWrapping -> setActualOutline(actualKeyOutline, theRealName);
00533         }

void OutlineModelManager::annotateActualSectionImageWrap ( std::string  actualKeyImage,
std::string  theRealName 
)

Definition at line 550 of file OutlineModelManager.cxx.

References actualInstantWrapping.

00551         {
00552                 actualInstantWrapping -> setActualSectionImageNamesWrapp(actualKeyImage, theRealName);
00553         }

void OutlineModelManager::annotateActualSourceImageWrap ( std::string  actualKeyImage,
std::string  theRealName 
)

Definition at line 560 of file OutlineModelManager.cxx.

References actualInstantWrapping.

00561         {
00562                 actualInstantWrapping -> setActualSourceImageNamesWrapp(actualKeyImage, theRealName);
00563         }

void OutlineModelManager::annotateOutlinesWrap ( std::vector< std::string >  keyNames,
std::vector< ContourThing ** >  theOutlinesVector 
)

Definition at line 515 of file OutlineModelManager.cxx.

References actualInstantWrapping, InstantMembersNameList::clean(), and ContourThing::getName().

Referenced by getOutlinesAtInstant().

00516         {
00517                 actualInstantWrapping ->clean();
00518                 for(int i=0; i<kNamesVector.size(); i++)
00519                 {
00520                         ContourThing * anOutline = *theOutlinesVector[i];
00521                         actualInstantWrapping -> addOutlineName( kNamesVector[i], anOutline->getName() );
00522                 }
00523         }

Here is the call graph for this function:

Here is the caller graph for this function:

void OutlineModelManager::annotateOutlineWrap ( std::string  kOutlineName,
std::string  theRealName 
)

Definition at line 505 of file OutlineModelManager.cxx.

References actualInstantWrapping.

00506         {
00507                 actualInstantWrapping -> addOutlineName(kOutlineName, theRealName);
00508         }

void OutlineModelManager::ChangeContourOfList ( std::string  keyName,
Instant *  instant 
)

Definition at line 198 of file OutlineModelManager.cxx.

References IsPartOfStaticList(), outlinesEnvironment, and staticContourLst.

Referenced by KernelManagerContour::changeContourOfManager().

00199         {
00200                 int ispartofstaticlist = IsPartOfStaticList(keyName);
00201                 if (ispartofstaticlist==-1)
00202                 {
00203                         staticContourLst.push_back(  this->outlinesEnvironment->getThingByName(keyName)  );
00204                         this->outlinesEnvironment->removeThingFromInstant(keyName, instant);
00205                 } else {
00206                         ContourThing **contourthing  = staticContourLst[ispartofstaticlist];
00207                         this->outlinesEnvironment->addInstantToThing    ( keyName , instant );
00208                         staticContourLst.erase( staticContourLst.begin()+ispartofstaticlist );
00209                 }
00210         }

Here is the call graph for this function:

Here is the caller graph for this function:

void OutlineModelManager::clean (  ) 

Definition at line 684 of file OutlineModelManager.cxx.

References actualInstantWrapping, InstantMembersNameList::clean(), PrefixMaxKeyGenerator::clear(), keyGenerator, and outlineGroups.

Referenced by ~OutlineModelManager().

00685         {
00686                 /*axesEnvironment->clean();
00687                 imagesSectionEnvironment->clean();
00688                 imageSourceEnvironment->clean();
00689                 outlinesEnvironment->clean();*/
00690                 outlineGroups.clear();
00691                 actualInstantWrapping->clean();
00692                 keyGenerator.clear();
00693                 //workSpace->clear();
00694         }

Here is the call graph for this function:

Here is the caller graph for this function:

bool OutlineModelManager::createAxe ( std::string  aDescription,
Instant *  theInstantData 
)

Definition at line 354 of file OutlineModelManager.cxx.

References addAxe(), and AxeThing::setDescription().

00355         {
00356                 AxeThing * theAxe = new AxeThing ();
00357                 theAxe->setDescription(aDescription);
00358                 return addAxe(theAxe, theInstantData);
00359         }

Here is the call graph for this function:

std::string OutlineModelManager::createCopyContourOf ( std::string  anExistingKName,
std::vector< int > &  instantNoTouchData 
)

Definition at line 765 of file OutlineModelManager.cxx.

References createOutline(), ContourThing::getModel(), and getOutlineByKeyName().

Referenced by KernelManagerContour::createCopyContourOf().

00766         {
00767                 manualBaseModel * manModelContour  = getOutlineByKeyName( anExistingKName )->getModel()->Clone();
00768                 return createOutline( manModelContour, instantNoTouchData );
00769         }

Here is the call graph for this function:

Here is the caller graph for this function:

bool OutlineModelManager::createImageSection ( std::string  aSecImageData,
Instant *  theInstantData 
)

Definition at line 380 of file OutlineModelManager.cxx.

00381         {
00382                 //imageSection = new ImageSectionThing(aSecImageData);
00383 //              return addImageSection(new ImageSectionThing(aSecImageData), theInstantData);
00384                 return NULL;
00385         }

bool OutlineModelManager::createImageSource ( std::string  aSource,
Instant *  theInstantData 
)

Definition at line 367 of file OutlineModelManager.cxx.

00368         {
00369 //              imageSource = new ImageSourceThing(aSource);
00370                 //return addImageSource(new ImageSourceThing(aSource), theInstantData);
00371                 return NULL;//***********************************************************************************************
00372         }

std::string OutlineModelManager::createOutline ( manualBaseModel *  model,
std::vector< int >  theInstantData,
std::string  aName = "" 
)

Definition at line 341 of file OutlineModelManager.cxx.

References addOutline(), and ContourThing::setName().

Referenced by createCopyContourOf(), KernelManagerContour::createOutline(), and KernelManagerContour::GetPoints().

00342         {
00343                 ContourThing * theOutline = new ContourThing ( model );
00344                 theOutline->setName(aName);
00345                 return addOutline( theOutline, new Instant( &theInstantData ) );
00346         }

Here is the call graph for this function:

Here is the caller graph for this function:

ContourWorkspace * OutlineModelManager::createWorkSpace (  ) 

Definition at line 60 of file OutlineModelManager.cxx.

References workSpace.

00061         {
00062                 workSpace = new ContourWorkspace(this);
00063                 return workSpace;
00064         }

bool OutlineModelManager::executeCommand ( CommandObject theCommand,
bool  fromRegistration = false 
)

Definition at line 98 of file OutlineModelManager.cxx.

Referenced by ContourWorkspace::executeCommand(), and executeCommandsQueue().

00099         {
00100                 bool executedCom = true;
00101                 //TODO**********************************************************************************************************************************************
00102                 //Interpreting who is the one that executes the command
00103 
00104                 //Modifiying the command in necessary for detaching interpreted information
00105 
00106                 //If is an outline, sending the command to execute the specific command
00107 
00108                 return executedCom;
00109         }

Here is the caller graph for this function:

bool OutlineModelManager::executeCommand_OutlineModel ( std::string  outKName,
CommandObject theCommand,
bool  fromRegistration 
)

Definition at line 82 of file OutlineModelManager.cxx.

References ContourWorkspace::callRegisterCommand(), ContourThing::executeCommand(), ContourThing::getUndoCommandOf(), outlinesEnvironment, and workSpace.

00083         {
00084                 ContourThing * theOutline = *outlinesEnvironment->getThingByName( outKName );
00085                 if(!fromRegistration)
00086                 {
00087                         CommandObject * undoCommand = theOutline->getUndoCommandOf( theCommand );
00088                         workSpace->callRegisterCommand(theCommand, undoCommand);
00089                 }
00090                 return theOutline->executeCommand( theCommand );
00091         }

Here is the call graph for this function:

bool OutlineModelManager::executeCommandsQueue ( std::deque< CommandObject * >  executionQueue,
bool  fromRegistration = false 
)

Definition at line 116 of file OutlineModelManager.cxx.

References executeCommand().

Referenced by ContourWorkspace::executeCommandsQueue().

00117         {
00118                 bool executedComs = executionQueue.size()>0 ? true : false;
00119                 while( executionQueue.size()>0 )
00120                 {
00121                         CommandObject * aCmmand = executionQueue.front();
00122                         executedComs &= executeCommand(aCmmand, fromRegistration);
00123                         executionQueue.pop_front();
00124                 }
00125                 return executedComs;
00126         }

Here is the call graph for this function:

Here is the caller graph for this function:

std::vector< NameWrapper * > OutlineModelManager::getActualInstantOutlines (  ) 

Gets the outlines at an instant form the wrapping reference

Parameters:
anInstant The instant wondered to get outlines at
ifAnnotate Indicates if it is needed to annotate the searched outlines
Returns:
The vector to the outlines at the given instance
Gets the outlines at an instant form the outline's environment
Parameters:
anInstant The instant wondered to get outlines at
ifAnnotate Indicates if it is needed to annotate the searched outlines
Returns:
The vector to the outlines at the given instance

Definition at line 192 of file OutlineModelManager.cxx.

References actualInstantWrapping, and InstantMembersNameList::getOutlinesNamesVector().

Referenced by KernelManagerContour::getActualInstantOutlines().

00193         {
00194                 return actualInstantWrapping->getOutlinesNamesVector();
00195         }

Here is the call graph for this function:

Here is the caller graph for this function:

AxeThing * OutlineModelManager::getAxeByKeyName ( std::string  axeKName  ) 

Definition at line 586 of file OutlineModelManager.cxx.

References axesEnvironment.

00587         {
00588                 return *axesEnvironment->getThingByName(axeKName);
00589         }

void OutlineModelManager::getConceptsInformation ( std::vector< std::string > &  conceptNameVect,
std::vector< int > &  conceptSizeVect 
)

Definition at line 661 of file OutlineModelManager.cxx.

References outlinesEnvironment.

00662         {
00663                 if( outlinesEnvironment != NULL )
00664                 {
00665                         //if (outlinesEnvironment->getNumberOfThings()>0)
00666                                 outlinesEnvironment->getConceptsInformation(conceptNameVect, conceptSizeVect);
00667                 }
00668         }

ContourWorkspace * OutlineModelManager::getContourWorkspace (  ) 

Definition at line 675 of file OutlineModelManager.cxx.

References workSpace.

00676         {
00677                 return workSpace;
00678         }

int OutlineModelManager::getGroupsCount (  ) 

ImageSectionThing * OutlineModelManager::getImageSectionThingByKeyName ( std::string  iSectionName  ) 

Definition at line 330 of file OutlineModelManager.cxx.

References imagesSectionEnvironment.

00331         {
00332                 return *(imagesSectionEnvironment->getThingByName(iSectionName));
00333         }

ImageSourceThing * OutlineModelManager::getImageSourceThingByKeyName ( std::string  iSeourceKName  ) 

Definition at line 320 of file OutlineModelManager.cxx.

References imageSourceEnvironment.

Referenced by KernelManagerContour::initializeEnvironment().

00321         {
00322                 return *(imageSourceEnvironment->getThingByName(iSeourceKName));
00323         }

Here is the caller graph for this function:

Instant * OutlineModelManager::getInstant (  ) 

Definition at line 576 of file OutlineModelManager.cxx.

References actualInstant.

Referenced by KernelManagerContour::getCurrentInstant().

00577         {
00578                 return actualInstant;
00579         }

Here is the caller graph for this function:

std::vector< std::string > OutlineModelManager::GetLstNameThings (  ) 

Gets the name of all outlines

Returns:
The vector of strings of all outlines

Definition at line 254 of file OutlineModelManager.cxx.

References getOutlineInstants(), and outlinesEnvironment.

Referenced by KernelManagerContour::GetLstNameThings().

00255         {
00256                 std::vector<std::string> kNamesVector;
00257                 std::vector<ContourThing **> outlinesVector; //= new std::vector<ContourThing **>();
00258                 std::vector<Instant *> lstInstants = getOutlineInstants();
00259                 int i,sizeLstInstants = lstInstants.size();
00260                 Instant *instant;
00261                 for ( i=0 ; i<sizeLstInstants ; i++ )
00262                 {
00263                         instant = lstInstants[i];
00264                         outlinesEnvironment->getThings( kNamesVector, outlinesVector, instant);
00265                 } // for i
00266                 return kNamesVector;
00267         }

Here is the call graph for this function:

Here is the caller graph for this function:

std::vector< std::string > OutlineModelManager::GetLstNameThingsStatic (  ) 

Definition at line 242 of file OutlineModelManager.cxx.

References staticContourLst.

Referenced by KernelManagerContour::GetLstNameThingsStatic().

00243         {
00244                 std::vector<std::string> result;
00245                 int i,sizeStaticContourLst =  staticContourLst.size();
00246                 for ( i=0 ; i<sizeStaticContourLst ; i++ )
00247                 {
00248                         ContourThing **contourthing  = staticContourLst[i];
00249                         result.push_back( (*contourthing)->getName() );
00250                 }// for i
00251                 return result;
00252         }

Here is the caller graph for this function:

ContourThing * OutlineModelManager::getOutlineByKeyName ( std::string  outKName  ) 

Definition at line 310 of file OutlineModelManager.cxx.

References outlinesEnvironment.

Referenced by createCopyContourOf(), KernelManagerContour::deleteCModel(), KernelManagerContour::getOutlineByKeyName(), and getOutlinesFromGroup().

00311         {
00312                 return *(outlinesEnvironment->getThingByName(outKName));
00313         }

Here is the caller graph for this function:

std::vector< Instant * > OutlineModelManager::getOutlineInstants (  ) 

Definition at line 605 of file OutlineModelManager.cxx.

References outlinesEnvironment.

Referenced by GetLstNameThings().

00606         {
00607                 return *outlinesEnvironment->getExistingInstants();
00608         }

Here is the caller graph for this function:

std::vector< Instant * > OutlineModelManager::getOutlineInstantsByName ( std::string  thekName  ) 

Definition at line 596 of file OutlineModelManager.cxx.

References outlinesEnvironment.

00597         {
00598                 return *outlinesEnvironment->getInstantsOfThing(thekName);
00599         }

std::vector< ContourThing ** > OutlineModelManager::getOutlinesAtInstant ( Instant *  anInstant,
bool  ifAnnotate = true 
)

Gets the outlines at an instant form the outline's environment

Parameters:
anInstant The instant wondered to get outlines at
ifAnnotate Indicates if it is needed to annotate the searched outlines
Returns:
The vector to the outlines at the given instance

Definition at line 219 of file OutlineModelManager.cxx.

References annotateOutlinesWrap(), outlinesEnvironment, and staticContourLst.

Referenced by KernelManagerContour::getOutlinesAtInstant(), KernelManagerContour::getOutlinesNameAtInstant(), and updateToActualInstant().

00220         {
00221                 std::vector<std::string> kNamesVector;
00222                 std::vector<ContourThing **> outlinesVector; //= new std::vector<ContourThing **>();
00223                 outlinesEnvironment->getThings( kNamesVector, outlinesVector, anInstant);
00224 
00225 //EED01
00226                 int i,sizeStaticContourLst =  staticContourLst.size();
00227                 for ( i=0 ; i<sizeStaticContourLst ; i++ )
00228                 {
00229                         ContourThing **contourthing  = staticContourLst[i];
00230                         outlinesVector.push_back( contourthing );
00231                         kNamesVector.push_back( (*contourthing)->getName() );
00232                 }// for i
00233 
00234                 if (ifAnnotate)
00235                 {
00236                         annotateOutlinesWrap(kNamesVector, outlinesVector);
00237                 }
00238                 return outlinesVector;
00239         }

Here is the call graph for this function:

Here is the caller graph for this function:

std::vector< ContourThing * > OutlineModelManager::getOutlinesFromGroup ( std::string  aGroupName  ) 

Gets the outlines at a specific form the outline's environment

Parameters:
aGroupName The name of the group containing the outlines names to get
Returns:
The vector to the outlineGroups at the given group
Gets the outlines at a specific form the outline's environment
Parameters:
aGroupName The name of the group containing the outlines names to get
Returns:
The vector to the outlines at the given group

Definition at line 275 of file OutlineModelManager.cxx.

References getOutlineByKeyName(), and outlineGroups.

00276         {
00277                 std::vector<ContourThing *> outlinesVector;
00278                 std::map< std::string,OutlineGroup * >::iterator iterP = outlineGroups.find(aGroupName);
00279                 if ( iterP != outlineGroups.end() )
00280                 {
00281                         std::vector<std::string> kNamesVector = iterP->second->getGroupOutlinesNames();
00282                         for(int i=0; i<kNamesVector.size();i++)
00283                         {
00284                                 ContourThing * outlineI = getOutlineByKeyName(kNamesVector[i]);
00285                                 outlinesVector.push_back(outlineI);
00286                         }
00287                 }
00288                 return outlinesVector;
00289         }

Here is the call graph for this function:

bool OutlineModelManager::includeAxeInstant ( std::string  axeKName,
Instant *  anInstantData 
)

Definition at line 629 of file OutlineModelManager.cxx.

References axesEnvironment.

00630         {
00631                 return axesEnvironment->addInstantToThing( axeKName,anInstantData );
00632         }

bool OutlineModelManager::includeImageSectionInstant ( std::string  imaKName,
Instant *  anInstantData 
)

Definition at line 640 of file OutlineModelManager.cxx.

References imagesSectionEnvironment.

00641         {
00642                 return imagesSectionEnvironment->addInstantToThing( imaKName,anInstantData );
00643         }

bool OutlineModelManager::includeImageSourceInstant ( std::string  imaKName,
Instant *  anInstantData 
)

Definition at line 651 of file OutlineModelManager.cxx.

References imageSourceEnvironment.

00652         {
00653                 return imageSourceEnvironment->addInstantToThing( imaKName,anInstantData );
00654         }

bool OutlineModelManager::includeOutlineInstant ( std::string  outKName,
Instant *  anInstantData 
)

Definition at line 618 of file OutlineModelManager.cxx.

References outlinesEnvironment.

00619         {
00620                 return outlinesEnvironment->addInstantToThing(outKName,anInstantData);
00621         }

int OutlineModelManager::IsPartOfStaticList ( std::string  ss  ) 

Definition at line 415 of file OutlineModelManager.cxx.

References staticContourLst.

Referenced by ChangeContourOfList(), and KernelManagerContour::IsPartOfStaticList().

00416         {
00417                 int iBack=-1;
00418                 int i, size = staticContourLst.size();
00419                 for( i=0 ; i<size ; i++ )
00420                 {
00421                         ContourThing **contourthing  = staticContourLst[i];
00422                         if ((*contourthing)->getName() == ss)
00423                         {
00424                                 iBack=i;
00425                         } // getName() == ss
00426                 }
00427                 return iBack;
00428         }

Here is the caller graph for this function:

void OutlineModelManager::removeAllOutlines (  ) 

Definition at line 441 of file OutlineModelManager.cxx.

References outlinesEnvironment, removeOutline(), and staticContourLst.

Referenced by KernelManagerContour::removeAllOutlines().

00442         {
00443                 //
00444                 staticContourLst.clear();
00445 
00446                 //
00447                 std::vector< ContourThing **>  thingsVector;
00448                 outlinesEnvironment->getThingsOfEnvironment( &thingsVector );
00449                 int i,sizeThingVector = thingsVector.size();
00450                 for(i=0;i<sizeThingVector;i++)
00451                 {
00452                         ContourThing ** contourthing =  thingsVector[i];
00453                     removeOutline(  (*contourthing)->getName()   );
00454                 }
00455         }

Here is the call graph for this function:

Here is the caller graph for this function:

void OutlineModelManager::removeOutline ( std::string  ss  ) 

Definition at line 435 of file OutlineModelManager.cxx.

References outlinesEnvironment.

Referenced by KernelManagerContour::deleteCModel(), and removeAllOutlines().

00436         {
00437                         outlinesEnvironment->removeThing( ss );
00438         }

Here is the caller graph for this function:

void OutlineModelManager::SaveThingName ( FILE *  pFile,
FILE *  pFileData,
std::string  nameThing 
)

Definition at line 771 of file OutlineModelManager.cxx.

References ContourThing::getModel(), and outlinesEnvironment.

Referenced by KernelManagerContour::SaveThingName().

00772         {
00773                 std::vector< Instant * > *lstInstants;
00774                 lstInstants = outlinesEnvironment->getInstantsOfThing( nameThing );
00775                 Instant *instant = (*lstInstants)[0];
00776                 std::vector<int> *vecInst =instant->getInstant();
00777                 int i,sizeVecInst = vecInst->size();
00778                 fprintf(pFile,"Instant ");
00779                 for ( i=0 ; i<sizeVecInst ; i++ )
00780                 {
00781                         fprintf(pFile,"%d ",(*vecInst)[i]);
00782                 }
00783                 fprintf(pFile,"\n");
00784                 ContourThing *contourthing = *outlinesEnvironment->getThingByName(nameThing);
00785                 contourthing->getModel()->Save(pFile);
00786                 contourthing->getModel()->SaveData(pFileData);
00787         }

Here is the call graph for this function:

Here is the caller graph for this function:

bool OutlineModelManager::setAutomaticConcepts (  )  [private]

Definition at line 742 of file OutlineModelManager.cxx.

References axeConcept, axeDepthConcept, axesEnvironment, imagesSectionEnvironment, and outlinesEnvironment.

00743         {
00744                 axeConcept = "Axe";
00745                 axeDepthConcept = "Axe Depth";
00746                 int axeC_size = 10;
00747                 int axeDepthC_size = INT_MAX;
00748 
00749                 bool allOK = axesEnvironment->addConcept(axeConcept, axeC_size);
00750                 allOK &= imagesSectionEnvironment->addConcept(axeConcept, axeC_size);
00751                 allOK &= outlinesEnvironment->addConcept(axeConcept, axeC_size);
00752 
00753                 allOK &= imagesSectionEnvironment->addConcept(axeDepthConcept, axeDepthC_size);
00754                 allOK &= outlinesEnvironment->addConcept(axeDepthConcept, axeDepthC_size);
00755 /*
00756                 allOK &= keyGenerator.addKeyThing("Axes", "Axe");
00757                 allOK &= keyGenerator.addKeyThing("Image Sources", "Image source");
00758                 allOK &= keyGenerator.addKeyThing("Image Sections", "Image section");
00759                 allOK &= keyGenerator.addKeyThing("Outlines", "Outline");*/
00760 
00761                 return allOK;
00762         }

void OutlineModelManager::setInstant ( Instant *  newActualInstantData  ) 

Definition at line 570 of file OutlineModelManager.cxx.

References actualInstant, and updateToActualInstant().

Referenced by KernelManagerContour::setInstant().

00571         {
00572                 actualInstant = newActualInstantData;
00573                 updateToActualInstant();
00574         }

Here is the call graph for this function:

Here is the caller graph for this function:

bool OutlineModelManager::setUserConcepts ( std::string  conceptsScript  ) 

Definition at line 134 of file OutlineModelManager.cxx.

References addUserConcept().

00135         {
00136                 bool allOK = true;
00137                 int endSub;
00138                 std::string::size_type equalIndex = conceptsScript.find("=", 0);
00139                 std::string::size_type nextIndex = 0;
00140                 while( equalIndex != std::string::npos && allOK)
00141                 {
00142             endSub = equalIndex;
00143                         std::string concept = conceptsScript.substr( 0, endSub );
00144                         conceptsScript.erase( 0, endSub+1 );
00145                         std::cout << "C: " << concept <<std::endl;
00146                         nextIndex = conceptsScript.find(";", 0);
00147                         std::string cSize;
00148                         if(nextIndex != std::string::npos)
00149                         {
00150                                 endSub = nextIndex;
00151                                 cSize = conceptsScript.substr( 0, endSub );
00152                                 conceptsScript.erase( 0, endSub+1 );
00153                         }
00154                         else
00155                         {
00156                                 endSub = conceptsScript.size();
00157                                 cSize = conceptsScript.substr( 0, endSub );
00158                                 conceptsScript.erase( 0, endSub );
00159                         }
00160                         int intReturn = atoi(cSize.c_str());
00161                         std::cout << "SZ: "<<intReturn <<std::endl;
00162                         equalIndex = conceptsScript.find("=", 0);
00163                         if( intReturn>0 )
00164                                 allOK &= addUserConcept(concept, intReturn);
00165                         else
00166                                 allOK = false;
00167                 }
00168                 return allOK;
00169         }

Here is the call graph for this function:

void OutlineModelManager::setWorkSpace ( ContourWorkspace aWorkSpace  ) 

Definition at line 70 of file OutlineModelManager.cxx.

References workSpace.

00071         {
00072                 workSpace = aWorkSpace;
00073         }

void OutlineModelManager::updateToActualInstant (  )  [private]

Definition at line 699 of file OutlineModelManager.cxx.

References actualInstant, and getOutlinesAtInstant().

Referenced by setInstant().

00700         {
00701                 Instant * longInstant = actualInstant;
00702                 /*Instant * mediumInstant = new Instant();
00703                 Instant * shortInstant = new Instant();
00704                 std::vector<int>* theInstant = longInstant->getInstant();
00705                 for(int i=1; i<theInstant->size(); i++)
00706                 {
00707                         if (i>=2)
00708                                 shortInstant->addConcept( (*theInstant)[i] );
00709                         mediumInstant->addConcept( (*theInstant)[i] );
00710                 }
00711 
00712                 //getting the sourceAtInstant
00713                 std::vector<std::string> kSourceVector;
00714                 std::vector<ImageSourceThing **> imSourceVector;
00715                 imageSourceEnvironment->getThings(kSourceVector, imSourceVector, shortInstant);
00716                 annotateActualSourceImageWrap(kSourceVector[0], (**imSourceVector[0]).getSourceImage());
00717 
00718         //getting the aAxeAtInstant
00719                 std::vector<std::string> kAxeVector;
00720                 std::vector<AxeThing **> axesVector;
00721                 axesEnvironment->getThings(kAxeVector, axesVector, mediumInstant);
00722                 if ( !kAxeVector.empty() )
00723                         annotateActualAxeWrap(kAxeVector[0], (**axesVector[0]).getDescription());
00724 
00725                 //getting the sectionAtInstant
00726                 std::vector<std::string> kSectionVector;
00727                 std::vector<ImageSectionThing **> imSectionVector;
00728                 imagesSectionEnvironment->getThings(kSectionVector, imSectionVector, longInstant); if ( !kSectionVector.empty() )
00729             //annotateActualSectionImageWrap(kSectionVector[0], (**imSectionVector[0]).getImageData());
00730                 */
00731 
00732                 //getting the outlines
00733 
00734                 std::vector<ContourThing ** > vect = getOutlinesAtInstant( longInstant );
00735 
00736         }

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

std::string OutlineModelManager::actualGruopID [private]

Definition at line 401 of file OutlineModelManager.h.

std::string OutlineModelManager::axeConcept [private]

Definition at line 467 of file OutlineModelManager.h.

Referenced by setAutomaticConcepts().

std::string OutlineModelManager::axeDepthConcept [private]

Definition at line 468 of file OutlineModelManager.h.

Referenced by setAutomaticConcepts().

SomeEnvironment<AxeThing *>* OutlineModelManager::axesEnvironment [private]

Definition at line 461 of file OutlineModelManager.h.

Referenced by OutlineModelManager().

Definition at line 463 of file OutlineModelManager.h.

Referenced by addOutline(), and OutlineModelManager().

std::map< std::string,OutlineGroup * > OutlineModelManager::outlineGroups [private]

Definition at line 446 of file OutlineModelManager.h.

Referenced by addOutlinesGroup(), clean(), and getOutlinesFromGroup().


The documentation for this class was generated from the following files:

Generated on Wed Jun 27 23:28:34 2012 for creaContours_lib by  doxygen 1.5.7.1