OutlineModelBuilder.cxx
Go to the documentation of this file.00001
00002
00003
00004
00005 #include "OutlineModelBuilder.h"
00006
00007
00008
00009
00012
00013
00014
00015
00024 OutlineModelBuilder :: OutlineModelBuilder(std::string theConceptsFile, std::string datadir)
00025 {
00026 conceptsFile = theConceptsFile;
00027 imagesSectionEnvOtherConceptsFN = datadir + "/imageSectionOtherConceptsFile.cf";
00028 outlinesEnvOtherConceptsFN = datadir + "/outlinesOtherConceptsFile.cf";
00029 axesEnvOtherConceptsFN = datadir + "/axesOtherConceptsFile.cf";
00030 axesEnv_Reader = NULL;
00031 imagesSectionEnv_Reader = NULL;
00032 imageSourceEnv_Reader = NULL;
00033 outlinesEnv_Reader = NULL;
00034 }
00035
00039 OutlineModelBuilder :: ~OutlineModelBuilder()
00040 {
00041 delete axesEnv_Reader;
00042 delete imagesSectionEnv_Reader;
00043 delete imageSourceEnv_Reader;
00044 delete outlinesEnv_Reader;
00045 }
00046
00047
00048
00049
00054 SomeEnvironment<ImageSourceThing *> * OutlineModelBuilder :: getImSourceEnv()
00055 {
00056 return ( imageSourceEnv_Reader!= NULL ) ? imageSourceEnv_Reader->getEnvironment() : new SomeEnvironment<ImageSourceThing *>();
00057 }
00062 SomeEnvironment<ImageSectionThing *> * OutlineModelBuilder :: getImSectionEnv()
00063 {
00064 return ( imagesSectionEnv_Reader!= NULL ) ? imagesSectionEnv_Reader->getEnvironment() : new SomeEnvironment<ImageSectionThing *>();
00065 }
00066
00067
00068
00069
00070 SomeEnvironment<AxeThing *> * OutlineModelBuilder :: getAxesEnv()
00071 {
00072 return ( axesEnv_Reader!= NULL ) ? axesEnv_Reader->getEnvironment() : new SomeEnvironment<AxeThing *>();
00073 }
00078 SomeEnvironment<ContourThing *> * OutlineModelBuilder :: getContourEnv()
00079 {
00080 return ( outlinesEnv_Reader!= NULL ) ? outlinesEnv_Reader->getEnvironment() : new SomeEnvironment<ContourThing *>();
00081 }
00082
00083
00089 void OutlineModelBuilder :: buildImageSource_Envornment( std::string sourcesFile, std::map<std::string, ImageSourceThing *> * sources )
00090 {
00091 if( !conceptsFile.empty() )
00092 imageSourceEnv_Reader = new ReaderEnvironment<ImageSourceThing *> (conceptsFile, sourcesFile, sources);
00093
00094 }
00095
00101 void OutlineModelBuilder :: buildImageSection_Envornment( std::string sectionsFile, std::map<std::string, ImageSectionThing *>* sections )
00102 {
00103 if( !conceptsFile.empty() )
00104 imagesSectionEnv_Reader = new ReaderEnvironment<ImageSectionThing *> ( imagesSectionEnvOtherConceptsFN, conceptsFile, sectionsFile, sections);
00105 }
00106
00107
00113 void OutlineModelBuilder :: buildAxe_Envornment( std::string axesFile, std::map<std::string, AxeThing *>* axes )
00114 {
00115 if( !conceptsFile.empty() )
00116 axesEnv_Reader = new ReaderEnvironment<AxeThing *> ( axesEnvOtherConceptsFN, conceptsFile, axesFile, axes);
00117 }
00118
00124 void OutlineModelBuilder :: buildCountour_Envornment( std::string outlinesFile, std::map<std::string, ContourThing *>* outlines )
00125 {
00126 if( !conceptsFile.empty() )
00127 outlinesEnv_Reader = new ReaderEnvironment< ContourThing *> ( outlinesEnvOtherConceptsFN, conceptsFile, outlinesFile, outlines);
00128 }
00129