#include <creaContoursFactory.h>
Public Member Functions | |
creaContoursFactory () | |
virtual | ~creaContoursFactory () |
manualContourBaseControler * | getContourControler (int typeContour) |
manualContourBaseControler * | getContourControler (std::string typeContour) |
manualBaseModel * | getContourModel (int typeContour) |
manualBaseModel * | getContourModel (std::string typeContour) |
manualViewBaseContour * | getCountourView (int typeContour) |
manualViewBaseContour * | getCountourView (std::string typeContour) |
Definition at line 24 of file creaContoursFactory.h.
creaContoursFactory::creaContoursFactory | ( | ) |
Definition at line 3 of file creaContoursFactory.cpp.
creaContoursFactory::~creaContoursFactory | ( | ) | [virtual] |
Definition at line 9 of file creaContoursFactory.cpp.
manualContourBaseControler * creaContoursFactory::getContourControler | ( | std::string | typeContour | ) |
Definition at line 70 of file creaContoursFactory.cpp.
References getContourControler().
00071 { 00072 manualContourBaseControler *manContourControl; 00073 if (typeContour.compare("spline")==0) 00074 { 00075 manContourControl = getContourControler(1); 00076 } 00077 00078 if (typeContour.compare("rectangle")==0) 00079 { 00080 manContourControl = getContourControler(2); 00081 } 00082 00083 if (typeContour.compare("circle")==0) 00084 { 00085 manContourControl = getContourControler(3); 00086 } 00087 00088 if (typeContour.compare("bullEye")==0) 00089 { 00090 manContourControl = getContourControler(4); 00091 } 00092 00093 if (typeContour.compare("line")==0) 00094 { 00095 manContourControl = getContourControler(6); 00096 } 00097 00098 if (typeContour.compare("points")==0) 00099 { 00100 manContourControl = getContourControler(7); 00101 } 00102 00103 if (typeContour.compare("rotationTool")==0) 00104 { 00105 manContourControl = getContourControler(8); 00106 } 00107 00108 if (typeContour.compare("polygon")==0) 00109 { 00110 manContourControl = getContourControler(10); 00111 } 00112 00113 return manContourControl; 00114 }
manualContourBaseControler * creaContoursFactory::getContourControler | ( | int | typeContour | ) |
Definition at line 14 of file creaContoursFactory.cpp.
Referenced by getContourControler().
00015 { 00016 manualContourBaseControler *manContourControl; 00017 //spline 00018 if (typeContour==1) 00019 { 00020 manContourControl = new manualContourControler(); 00021 } 00022 00023 //rectangle 00024 if (typeContour==2) 00025 { 00026 manContourControl = new manualRoiControler(); 00027 } 00028 00029 //circle 00030 if (typeContour==3) 00031 { 00032 manContourControl = new manualCircleControler(); 00033 } 00034 00035 //bullEye 00036 if (typeContour==4) 00037 { 00038 manContourControl = new manualRoiControler(); 00039 } 00040 00041 //line 00042 if (typeContour==6) 00043 { 00044 manContourControl = new manualLineControler(); 00045 } 00046 00047 //points 00048 if (typeContour==7) 00049 { 00050 manContourControl = new manualContourControler(); 00051 } 00052 00053 //rotationTool 00054 if (typeContour==8) 00055 { 00056 manContourControl = new manualRotationToolControler(); 00057 } 00058 00059 //polygon 00060 if (typeContour==10) 00061 { 00062 manContourControl = new manualContourControler(); 00063 } 00064 return manContourControl; 00065 00066 00067 00068 }
manualBaseModel * creaContoursFactory::getContourModel | ( | std::string | typeContour | ) |
Definition at line 305 of file creaContoursFactory.cpp.
References getContourModel().
00306 { 00307 manualBaseModel *manModelContour=NULL; 00308 00309 if (typeContour.compare("spline")==0) 00310 { 00311 manModelContour = getContourModel(1); 00312 } 00313 00314 if (typeContour.compare("rectangle")==0) 00315 { 00316 manModelContour = getContourModel(2); 00317 } 00318 00319 if (typeContour.compare("circle")==0) 00320 { 00321 manModelContour = getContourModel(3); 00322 } 00323 00324 if (typeContour.compare("bullEye")==0) 00325 { 00326 manModelContour = getContourModel(4); 00327 00328 } 00329 00330 if (typeContour.compare("line")==0) 00331 { 00332 manModelContour = getContourModel(6); 00333 } 00334 00335 if (typeContour.compare("points")==0) 00336 { 00337 manModelContour = getContourModel(7); 00338 } 00339 00340 if (typeContour.compare("rotationTool")==0) 00341 { 00342 manModelContour = getContourModel(8); 00343 } 00344 00345 if (typeContour.compare("polygon")==0) 00346 { 00347 manModelContour = getContourModel(10); 00348 } 00349 00350 return manModelContour; 00351 }
manualBaseModel * creaContoursFactory::getContourModel | ( | int | typeContour | ) |
Definition at line 218 of file creaContoursFactory.cpp.
References manualContourModelBullEye::AddSector().
Referenced by getContourModel().
00219 { 00220 manualBaseModel *manModelContour=NULL; 00221 00222 // spline 00223 if (typeContour==1) 00224 { 00225 manModelContour = new manualContourModel(); 00226 } 00227 00228 // rectangle 00229 if (typeContour==2) 00230 { 00231 manModelContour = new manualContourModelRoi(); 00232 } 00233 00234 // circle 00235 if (typeContour==3) 00236 { 00237 manModelContour = new manualContourModelCircle(); 00238 } 00239 00240 //bullEye 00241 if(typeContour==4) 00242 { 00243 //Here we create a bullEye with 3 crowns and 5 sectors. 00244 manualContourModelBullEye *manModelContourBullEye = new manualContourModelBullEye(); 00245 00246 int iCrown,sizeCrowns,iSector,sizeSectors; 00247 double radioA,radioB,ang,angDelta,radioA2,radioB2 ; 00248 00249 sizeCrowns = 3; 00250 radioA=33; 00251 radioB=0; 00252 angDelta= 72; 00253 for ( iCrown=0 ; iCrown<sizeCrowns ; iCrown++ ) 00254 { 00255 sizeSectors = 5; 00256 radioB = radioA; 00257 if (iCrown==sizeCrowns-1) 00258 { 00259 radioA = 0; 00260 } 00261 else 00262 { 00263 radioA = radioA+33; 00264 } 00265 radioA2=radioA/100.0; 00266 radioB2=radioB/100.0; 00267 ang=0; 00268 for ( iSector=0 ; iSector<sizeSectors ; iSector++ ) 00269 { 00270 ang = ang+angDelta; 00271 manModelContourBullEye->AddSector(radioA2,radioB2,ang,angDelta); 00272 } // for iSector 00273 }//for iCrown 00274 manModelContour = manModelContourBullEye; 00275 } 00276 00277 // line 00278 if (typeContour==6) 00279 { 00280 manModelContour = new manualContourModelLine(); 00281 } 00282 00283 // points 00284 if (typeContour==7) 00285 { 00286 manModelContour = new manualBaseModel(); 00287 } 00288 00289 //rotationTool 00290 if(typeContour==8) 00291 { 00292 manModelContour = new manualContourModelRotationTool(); 00293 } 00294 00295 //polygon 00296 if(typeContour==10) 00297 { 00298 manModelContour = new manualContourModelPolygon(); 00299 } 00300 00301 return manModelContour; 00302 }
manualViewBaseContour * creaContoursFactory::getCountourView | ( | std::string | typeContour | ) |
Definition at line 170 of file creaContoursFactory.cpp.
References getCountourView().
00171 { 00172 00173 manualViewBaseContour *manViewerContour; 00174 00175 if (typeContour.compare("spline")==0) 00176 { 00177 manViewerContour = getCountourView(1); 00178 } 00179 00180 if (typeContour.compare("rectangle")==0) 00181 { 00182 manViewerContour = getCountourView(2); 00183 } 00184 00185 if (typeContour.compare("circle")==0) 00186 { 00187 manViewerContour = getCountourView(3); 00188 } 00189 00190 if (typeContour.compare("bullEye")==0) 00191 { 00192 manViewerContour = getCountourView(4); 00193 } 00194 00195 if (typeContour.compare("line")==0) 00196 { 00197 manViewerContour = getCountourView(6); 00198 } 00199 00200 if (typeContour.compare("points")==0) 00201 { 00202 manViewerContour = getCountourView(7); 00203 } 00204 00205 if (typeContour.compare("rotationTool")==0) 00206 { 00207 manViewerContour = getCountourView(8); 00208 } 00209 00210 if (typeContour.compare("polygon")==0) 00211 { 00212 manViewerContour = getCountourView(10); 00213 } 00214 return manViewerContour; 00215 00216 }
manualViewBaseContour * creaContoursFactory::getCountourView | ( | int | typeContour | ) |
Definition at line 116 of file creaContoursFactory.cpp.
Referenced by getCountourView().
00117 { 00118 00119 manualViewBaseContour *manViewerContour; 00120 //spline 00121 if (typeContour==1) 00122 { 00123 manViewerContour = new manualViewContour(); 00124 } 00125 00126 //rectangle 00127 if (typeContour==2) 00128 { 00129 manViewerContour = new manualViewRoi(); 00130 } 00131 00132 //circle 00133 if (typeContour==3) 00134 { 00135 manViewerContour = new manualViewCircle(); 00136 } 00137 00138 //bullEye 00139 if (typeContour==4) 00140 { 00141 manViewerContour = new manualViewBullEye(); 00142 } 00143 00144 //line 00145 if (typeContour==6) 00146 { 00147 manViewerContour = new manualViewLine(); 00148 } 00149 00150 //points 00151 if (typeContour==7) 00152 { 00153 manViewerContour = new manualViewPoints(); 00154 } 00155 00156 //rotationTool 00157 if (typeContour==8) 00158 { 00159 manViewerContour = new manualViewRotationTool(); 00160 } 00161 00162 //polygon 00163 if (typeContour==10) 00164 { 00165 manViewerContour = new manualViewContour(); 00166 } 00167 return manViewerContour; 00168 }