#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 9 of file creaContoursFactory.h.
creaContoursFactory::creaContoursFactory | ( | ) |
Definition at line 25 of file creaContoursFactory.cpp.
creaContoursFactory::~creaContoursFactory | ( | ) | [virtual] |
Definition at line 31 of file creaContoursFactory.cpp.
manualContourBaseControler * creaContoursFactory::getContourControler | ( | std::string | typeContour | ) |
Definition at line 100 of file creaContoursFactory.cpp.
References getContourControler().
00101 { 00102 manualContourBaseControler *manContourControl = NULL; 00103 if (typeContour.compare("spline")==0) 00104 { 00105 manContourControl = getContourControler(1); 00106 } 00107 00108 if (typeContour.compare("rectangle")==0) 00109 { 00110 manContourControl = getContourControler(2); 00111 } 00112 00113 if (typeContour.compare("circle")==0) 00114 { 00115 manContourControl = getContourControler(3); 00116 } 00117 00118 if (typeContour.compare("bullEye")==0) 00119 { 00120 manContourControl = getContourControler(4); 00121 } 00122 00123 if (typeContour.compare("line")==0) 00124 { 00125 manContourControl = getContourControler(6); 00126 } 00127 00128 if (typeContour.compare("points")==0) 00129 { 00130 manContourControl = getContourControler(7); 00131 } 00132 00133 if (typeContour.compare("rotationTool")==0) 00134 { 00135 manContourControl = getContourControler(8); 00136 } 00137 00138 if (typeContour.compare("polygon")==0) 00139 { 00140 manContourControl = getContourControler(10); 00141 } 00142 00143 //JPReyes 13/04/2010 00144 //Spline 3D 00145 if(typeContour.compare("spline3D")==0) 00146 { 00147 manContourControl = getContourControler(12); 00148 } 00149 return manContourControl; 00150 }
manualContourBaseControler * creaContoursFactory::getContourControler | ( | int | typeContour | ) |
Definition at line 36 of file creaContoursFactory.cpp.
Referenced by getContourControler().
00037 { 00038 manualContourBaseControler *manContourControl = NULL; 00039 //spline 00040 if (typeContour==1) 00041 { 00042 manContourControl = new manualContourControler(); 00043 } 00044 00045 //rectangle 00046 if (typeContour==2) 00047 { 00048 manContourControl = new manualRoiControler(); 00049 } 00050 00051 //circle 00052 if (typeContour==3) 00053 { 00054 manContourControl = new manualCircleControler(); 00055 } 00056 00057 //bullEye 00058 if (typeContour==4) 00059 { 00060 manContourControl = new manualRoiControler(); 00061 } 00062 00063 //line 00064 if (typeContour==6) 00065 { 00066 manContourControl = new manualLineControler(); 00067 } 00068 00069 //points 00070 if (typeContour==7) 00071 { 00072 manContourControl = new manualContourControler(); 00073 } 00074 00075 //rotationTool 00076 if (typeContour==8) 00077 { 00078 manContourControl = new manualRotationToolControler(); 00079 } 00080 00081 //polygon 00082 if (typeContour==10) 00083 { 00084 manContourControl = new manualContourControler(); 00085 } 00086 00087 00088 //JPReyes 13/04/2010 00089 //Spline 3D 00090 if(typeContour==12) 00091 { 00092 printf("JPReyes %p creaContoursFactory::getContourControler pasando por el Contour 12 \n",this); 00093 manContourControl = new manualContour3V3DControler(); 00094 } 00095 00096 return manContourControl; 00097 00098 }
manualBaseModel * creaContoursFactory::getContourModel | ( | std::string | typeContour | ) |
Definition at line 364 of file creaContoursFactory.cpp.
References getContourModel().
00365 { 00366 manualBaseModel *manModelContour=NULL; 00367 00368 if (typeContour.compare("spline")==0) 00369 { 00370 manModelContour = getContourModel(1); 00371 } 00372 00373 if (typeContour.compare("rectangle")==0) 00374 { 00375 manModelContour = getContourModel(2); 00376 } 00377 00378 if (typeContour.compare("circle")==0) 00379 { 00380 manModelContour = getContourModel(3); 00381 } 00382 00383 if (typeContour.compare("bullEye")==0) 00384 { 00385 manModelContour = getContourModel(4); 00386 00387 } 00388 00389 if (typeContour.compare("line")==0) 00390 { 00391 manModelContour = getContourModel(6); 00392 } 00393 00394 if (typeContour.compare("points")==0) 00395 { 00396 manModelContour = getContourModel(7); 00397 } 00398 00399 if (typeContour.compare("rotationTool")==0) 00400 { 00401 manModelContour = getContourModel(8); 00402 } 00403 00404 if (typeContour.compare("polygon")==0) 00405 { 00406 manModelContour = getContourModel(10); 00407 } 00408 00409 00410 //JPReyes 13/04/2010 00411 //Spline 3D 00412 if (typeContour.compare("spline3D")==0) 00413 { 00414 manModelContour = getContourModel(12); 00415 } 00416 00417 return manModelContour; 00418 }
manualBaseModel * creaContoursFactory::getContourModel | ( | int | typeContour | ) |
Definition at line 269 of file creaContoursFactory.cpp.
References manualContourModelBullEye::AddSector().
Referenced by getContourModel().
00270 { 00271 manualBaseModel *manModelContour=NULL; 00272 00273 // spline 00274 if (typeContour==1) 00275 { 00276 manModelContour = new manualContourModel(); 00277 } 00278 00279 // rectangle 00280 if (typeContour==2) 00281 { 00282 manModelContour = new manualContourModelRoi(); 00283 } 00284 00285 // circle 00286 if (typeContour==3) 00287 { 00288 manModelContour = new manualContourModelCircle(); 00289 } 00290 00291 //bullEye 00292 if(typeContour==4) 00293 { 00294 //Here we create a bullEye with 3 crowns and 5 sectors. 00295 manualContourModelBullEye *manModelContourBullEye = new manualContourModelBullEye(); 00296 00297 int iCrown,sizeCrowns,iSector,sizeSectors; 00298 double radioA,radioB,ang,angDelta,radioA2,radioB2 ; 00299 00300 sizeCrowns = 3; 00301 radioA=33; 00302 radioB=0; 00303 angDelta= 72; 00304 for ( iCrown=0 ; iCrown<sizeCrowns ; iCrown++ ) 00305 { 00306 sizeSectors = 5; 00307 radioB = radioA; 00308 if (iCrown==sizeCrowns-1) 00309 { 00310 radioA = 0; 00311 } 00312 else 00313 { 00314 radioA = radioA+33; 00315 } 00316 radioA2=radioA/100.0; 00317 radioB2=radioB/100.0; 00318 ang=0; 00319 for ( iSector=0 ; iSector<sizeSectors ; iSector++ ) 00320 { 00321 ang = ang+angDelta; 00322 manModelContourBullEye->AddSector(radioA2,radioB2,ang,angDelta); 00323 } // for iSector 00324 }//for iCrown 00325 manModelContour = manModelContourBullEye; 00326 } 00327 00328 // line 00329 if (typeContour==6) 00330 { 00331 manModelContour = new manualContourModelLine(); 00332 } 00333 00334 // points 00335 if (typeContour==7) 00336 { 00337 manModelContour = new manualBaseModel(); 00338 } 00339 00340 //rotationTool 00341 if(typeContour==8) 00342 { 00343 manModelContour = new manualContourModelRotationTool(); 00344 } 00345 00346 //polygon 00347 if(typeContour==10) 00348 { 00349 manModelContour = new manualContourModelPolygon(); 00350 } 00351 00352 00353 //JPReyes 13/04/2010 00354 //Spline 3D 00355 if(typeContour==12) 00356 { 00357 manModelContour = new manualContourModel(); 00358 } 00359 00360 return manModelContour; 00361 }
manualViewBaseContour * creaContoursFactory::getCountourView | ( | std::string | typeContour | ) |
Definition at line 213 of file creaContoursFactory.cpp.
References getCountourView().
00214 { 00215 00216 manualViewBaseContour *manViewerContour = NULL; 00217 00218 if (typeContour.compare("spline")==0) 00219 { 00220 manViewerContour = getCountourView(1); 00221 } 00222 00223 if (typeContour.compare("rectangle")==0) 00224 { 00225 manViewerContour = getCountourView(2); 00226 } 00227 00228 if (typeContour.compare("circle")==0) 00229 { 00230 manViewerContour = getCountourView(3); 00231 } 00232 00233 if (typeContour.compare("bullEye")==0) 00234 { 00235 manViewerContour = getCountourView(4); 00236 } 00237 00238 if (typeContour.compare("line")==0) 00239 { 00240 manViewerContour = getCountourView(6); 00241 } 00242 00243 if (typeContour.compare("points")==0) 00244 { 00245 manViewerContour = getCountourView(7); 00246 } 00247 00248 if (typeContour.compare("rotationTool")==0) 00249 { 00250 manViewerContour = getCountourView(8); 00251 } 00252 00253 if (typeContour.compare("polygon")==0) 00254 { 00255 manViewerContour = getCountourView(10); 00256 } 00257 00258 //JPReyes 13/04/2010 00259 //Spline 3D 00260 if (typeContour.compare("spline3D")==0) 00261 { 00262 manViewerContour = getCountourView(12); 00263 } 00264 00265 return manViewerContour; 00266 00267 }
manualViewBaseContour * creaContoursFactory::getCountourView | ( | int | typeContour | ) |
Definition at line 152 of file creaContoursFactory.cpp.
Referenced by getCountourView().
00153 { 00154 00155 manualViewBaseContour *manViewerContour = NULL; 00156 //spline 00157 if (typeContour==1) 00158 { 00159 manViewerContour = new manualViewContour(); 00160 } 00161 00162 //rectangle 00163 if (typeContour==2) 00164 { 00165 manViewerContour = new manualViewRoi(); 00166 } 00167 00168 //circle 00169 if (typeContour==3) 00170 { 00171 manViewerContour = new manualViewCircle(); 00172 } 00173 00174 //bullEye 00175 if (typeContour==4) 00176 { 00177 manViewerContour = new manualViewBullEye(); 00178 } 00179 00180 //line 00181 if (typeContour==6) 00182 { 00183 manViewerContour = new manualViewLine(); 00184 } 00185 00186 //points 00187 if (typeContour==7) 00188 { 00189 manViewerContour = new manualViewPoints(); 00190 } 00191 00192 //rotationTool 00193 if (typeContour==8) 00194 { 00195 manViewerContour = new manualViewRotationTool(); 00196 } 00197 00198 //polygon 00199 if (typeContour==10) 00200 { 00201 manViewerContour = new manualViewContour(); 00202 } 00203 00204 //JPReyes 13/04/2010 00205 //Spline 3D 00206 if(typeContour==12) 00207 { 00208 manViewerContour = new manualView3DContour(); 00209 } 00210 return manViewerContour; 00211 }