00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #include "vuUtilityFactory.h"
00028 #include "wxUtilities/vuSplat/vuSplat.h"
00029 #include "wxUtilities/vuCellProjector/vuCellProjector.h"
00030 #include "wxUtilities/vuRaycast/vuRaycast.h"
00031 #include "wxUtilities/vuMarchingCubes/vuMarchingCubes.h"
00032 #include "wxUtilities/vuBccSplat/vuBccSplat.h"
00033 #include "wxUtilities/vuBCCFirstHitRaycaster/vuBCCFirstHitRaycaster.h"
00034 #include "wxUtilities/vuBCCMarchingTetrahedra/vuBCCMarchingTetrahedra.h"
00035 #include "wxUtilities/vuBCCSheetSplatter/vuBCCSheetSplatter.h"
00036 #include "wxUtilities/vuBCCRaycaster/vuBCCRaycaster.h"
00037 #include "wxUtilities/vuSlicer/vuSlicer.h"
00038 #include "wxUtilities/vuFVR/vuFVR.h"
00039
00040 #ifdef DO_SPECTRAL
00041 #include "wxUtilities/vuSpecFVR/vuSpecFVR.h"
00042 #include "wxUtilities/vuSpectral/vuSpectral.h"
00043 #ifndef WIN32 // hack, until NVIDIA extensions are available under WIN32
00044 #include "wxUtilities/vuSpecSplat/vuSpecSplat.h"
00045 #endif
00046 #endif
00047
00048 #include "wxUtilities/vuLightfield/vuBrowser/vuSphericBrowser1B.h"
00049 #include "wxUtilities/vuLightfield/vuBrowser/vuSphericBrowser3B.h"
00050 #include "wxUtilities/vuLightfield/vuBrowser/vuSphericBrowser1F.h"
00051 #include "wxUtilities/vuLightfield/vuBrowser/vuSphericBrowser2F.h"
00052 #include "wxUtilities/vuLightfield/vuBrowser/vuSphericBrowser3F.h"
00053
00054 #include "wxUtilities/vuLightfield/vuRevolver/vuSphericRevolver1B.h"
00055 #include "wxUtilities/vuLightfield/vuRevolver/vuSphericRevolver3B.h"
00056 #include "wxUtilities/vuLightfield/vuRevolver/vuSphericRevolver1F.h"
00057 #include "wxUtilities/vuLightfield/vuRevolver/vuSphericRevolver2F.h"
00058 #include "wxUtilities/vuLightfield/vuRevolver/vuSphericRevolver3F.h"
00059
00060 #include "wxUtilities/vuLightfield/vuFBR/vuSphericFBR2F.h"
00061
00062 #include "wxUtilities/vuLightfield/vuSimpleFBR/vuSimpleFBR1B.h"
00063 #include "wxUtilities/vuLightfield/vuSimpleFBR/vuSimpleFBR3B.h"
00064
00065 #include "wxUtilities/vuShearWarp/vuShearWarp.h"
00066 #include "wxUtilities/vuBCCShearWarp/vuBCCShearWarp.h"
00067
00068 #include "wxUtilities/vuFourier/vuStandardFVR/vuStandardFVR1F.h"
00069 #include "wxUtilities/vuFourier/vuStandardFVR/vuStandardFVR3F.h"
00070
00071
00072 vuUtilityWindow *vuUtilityFactory::create(const char *name)
00073 {
00074 vuUtilityWindow *window=0;
00075
00076 if (strcmp(name,"vuSplat")==0)
00077 window = new vuSplat();
00078 else if (strcmp(name,"vuCellProjector")==0)
00079 window = new vuCellProjector();
00080 else if (strcmp(name,"vuRaycast")==0)
00081 window = new vuRaycast();
00082 else if (strcmp(name,"vuMarchingCubes")==0)
00083 window = new vuMarchingCubes();
00084 else if (strcmp(name,"vuBccSplat")==0)
00085 window = new vuBccSplat();
00086 else if (strcmp(name,"vuBCCFirstHitRaycaster")==0)
00087 window = new vuBCCFirstHitRaycaster();
00088 else if (strcmp(name,"vuBCCMarchingTetrahedra")==0)
00089 window = new vuBCCMarchingTetrahedra();
00090 else if (strcmp(name,"vuBCCSheetSplatter")==0)
00091 window = new vuBCCSheetSplatter();
00092 else if (strcmp(name,"vuBCCRaycaster")==0)
00093 window = new vuBCCRaycaster();
00094 else if (strcmp(name,"vuSlicer")==0)
00095 window = new vuSlicer();
00096 else if (strcmp(name,"vuFVR")==0)
00097 window = new vuFVR();
00098
00099 #ifdef DO_SPECTRAL
00100 else if (strcmp(name,"vuSpecFVR")==0)
00101 window = new vuSpecFVR();
00102 else if (strcmp(name,"vuSpectral")==0)
00103 window = new vuSpectral();
00104 #ifndef WIN32 // hack, until NVIDIA extensions are available under WIN32
00105 else if (strcmp(name,"vuSpecSplat")==0)
00106 window = new vuSpecSplat();
00107 #endif
00108 #endif
00109
00110 else if (strcmp(name,"vuShearWarp")==0)
00111 window = new vuShearWarp();
00112 else if (strcmp(name,"vuBCCShearWarp")==0)
00113 window = new vuBCCShearWarp();
00114
00115
00116 else if (strcmp(name,"vuSphericBrowser1B")==0)
00117 window = new vuSphericBrowser1B();
00118 else if (strcmp(name,"vuSphericBrowser3B")==0)
00119 window = new vuSphericBrowser3B();
00120 else if (strcmp(name,"vuSphericBrowser1F")==0)
00121 window = new vuSphericBrowser1F();
00122 else if (strcmp(name,"vuSphericBrowser2F")==0)
00123 window = new vuSphericBrowser2F();
00124 else if (strcmp(name,"vuSphericBrowser3F")==0)
00125 window = new vuSphericBrowser3F();
00126
00127 else if (strcmp(name,"vuSphericRevolver1B")==0)
00128 window = new vuSphericRevolver1B();
00129 else if (strcmp(name,"vuSphericRevolver3B")==0)
00130 window = new vuSphericRevolver3B();
00131 else if (strcmp(name,"vuSphericRevolver1F")==0)
00132 window = new vuSphericRevolver1F();
00133 else if (strcmp(name,"vuSphericRevolver2F")==0)
00134 window = new vuSphericRevolver2F();
00135 else if (strcmp(name,"vuSphericRevolver3F")==0)
00136 window = new vuSphericRevolver3F();
00137
00138 else if (strcmp(name,"vuSphericFBR2F")==0)
00139 window = new vuSphericFBR2F();
00140
00141 else if (strcmp(name,"vuSimpleFBR1B")==0)
00142 window = new vuSimpleFBR1B();
00143 else if (strcmp(name,"vuSimpleFBR3B")==0)
00144 window = new vuSimpleFBR3B();
00145
00146 else if (strcmp(name,"vuStandardFVR1F")==0)
00147 window = new vuStandardFVR1F();
00148 else if (strcmp(name,"vuStandardFVR3F")==0)
00149 window = new vuStandardFVR3F();
00150
00151 return window;
00152 }
00153
00154 bool vuUtilityFactory::isAvailable(const char *name)
00155 {
00156 if (strcmp(name,"vuSplat")==0)
00157 return true;
00158 if (strcmp(name,"vuCellProjector")==0)
00159 return true;
00160 else if (strcmp(name,"vuRaycast")==0)
00161 return true;
00162 else if (strcmp(name,"vuMarchingCubes")==0)
00163 return true;
00164 else if (strcmp(name,"vuBccSplat")==0)
00165 return true;
00166 else if (strcmp(name,"vuBCCFirstHitRaycaster")==0)
00167 return true;
00168 else if (strcmp(name,"vuBCCMarchingTetrahedra")==0)
00169 return true;
00170 else if (strcmp(name,"vuBCCSheetSplatter")==0)
00171 return true;
00172 else if (strcmp(name,"vuBCCRaycaster")==0)
00173 return true;
00174 else if (strcmp(name,"vuSlicer")==0)
00175 return true;
00176 else if (strcmp(name,"vuFVR")==0)
00177 return true;
00178 else if (strcmp(name,"vuLightfield")==0)
00179 return true;
00180 #ifdef DO_SPECTRAL
00181 else if (strcmp(name,"vuSpecFVR")==0)
00182 return true;
00183 else if (strcmp(name,"vuSpectral")==0)
00184 return true;
00185 #ifndef WIN32 // hack, until NVIDIA extensions are available under WIN32
00186 else if (strcmp(name,"vuSpecSplat")==0)
00187 return true;
00188 #endif
00189 #endif
00190
00191 else if (strcmp(name,"vuShearWarp")==0)
00192 return true;
00193 else if (strcmp(name,"vuBCCShearWarp")==0)
00194 return true;
00195
00196 else if (strcmp(name,"vuSphericBrowser1B")==0)
00197 return true;
00198 else if (strcmp(name,"vuSphericBrowser3B")==0)
00199 return true;
00200 else if (strcmp(name,"vuSphericBrowser1F")==0)
00201 return true;
00202 else if (strcmp(name,"vuSphericBrowser2F")==0)
00203 return true;
00204 else if (strcmp(name,"vuSphericBrowser3F")==0)
00205 return true;
00206
00207 else if (strcmp(name,"vuSphericRevolver1B")==0)
00208 return true;
00209 else if (strcmp(name,"vuSphericRevolver3B")==0)
00210 return true;
00211 else if (strcmp(name,"vuSphericRevolver1F")==0)
00212 return true;
00213 else if (strcmp(name,"vuSphericRevolver2F")==0)
00214 return true;
00215 else if (strcmp(name,"vuSphericRevolver3F")==0)
00216 return true;
00217
00218 else if (strcmp(name,"vuSphericFBR2F")==0)
00219 return true;
00220
00221 else if (strcmp(name,"vuSimpleFBR1B")==0)
00222 return true;
00223 else if (strcmp(name,"vuSimpleFBR3B")==0)
00224 return true;
00225
00226 else if (strcmp(name,"vuStandardFVR1F")==0)
00227 return true;
00228 else if (strcmp(name,"vuStandardFVR3F")==0)
00229 return true;
00230
00231 else
00232 return false;
00233 }
00234
00235 wxStringList vuUtilityFactory::listAvailable(const char* FileType)
00236 {
00237 wxStringList utilities;
00238
00239 if (strcmp(vuSplat::getFileType(),FileType)==0)
00240 utilities.Add("vuSplat");
00241 if (strcmp(vuSplat::getFileType(),FileType)==0)
00242 utilities.Add("vuCellProjector");
00243 if (strcmp(vuRaycast::getFileType(),FileType)==0)
00244 utilities.Add("vuRaycast");
00245 if (strstr(vuMarchingCubes::getFileType(),FileType)!=0)
00246
00247
00248 utilities.Add("vuMarchingCubes");
00249 if (strcmp(vuBccSplat::getFileType(),FileType)==0)
00250 utilities.Add("vuBccSplat");
00251 if (strcmp(vuBCCFirstHitRaycaster::getFileType(),FileType)==0)
00252 utilities.Add("vuBCCFirstHitRaycaster");
00253 if (strcmp(vuBCCMarchingTetrahedra::getFileType(),FileType)==0)
00254 utilities.Add("vuBCCMarchingTetrahedra");
00255 if (strcmp(vuBCCSheetSplatter::getFileType(),FileType)==0)
00256 utilities.Add("vuBCCSheetSplatter");
00257 if (strcmp(vuBCCRaycaster::getFileType(),FileType)==0)
00258 utilities.Add("vuBCCRaycaster");
00259 if (strcmp(vuSlicer::getFileType(),FileType)==0)
00260 utilities.Add("vuSlicer");
00261 if (strcmp(vuFVR::getFileType(),FileType)==0)
00262 utilities.Add("vuFVR");
00263
00264 #ifdef DO_SPECTRAL
00265 if (strcmp(vuSpecFVR::getFileType(),FileType)==0)
00266 utilities.Add("vuSpecFVR");
00267 if (strcmp(vuSpectral::getFileType(),FileType)==0)
00268 utilities.Add("vuSpectral");
00269 #ifndef WIN32 // hack, until NVIDIA extensions are available under WIN32
00270 if (strcmp(vuSpecSplat::getFileType(),FileType)==0)
00271 utilities.Add("vuSpecSplat");
00272 #endif
00273 #endif
00274
00275 if (strcmp(vuShearWarp::getFileType(),FileType)==0)
00276 utilities.Add("vuShearWarp");
00277 if (strcmp(vuBCCShearWarp::getFileType(),FileType)==0)
00278 utilities.Add("vuBCCShearWarp");
00279
00280 if (strcmp(vuSphericBrowser1B::getFileType(),FileType)==0)
00281 utilities.Add("vuSphericBrowser1B");
00282 if (strcmp(vuSphericBrowser3B::getFileType(),FileType)==0)
00283 utilities.Add("vuSphericBrowser3B");
00284 if (strcmp(vuSphericBrowser1F::getFileType(),FileType)==0)
00285 utilities.Add("vuSphericBrowser1F");
00286 if (strcmp(vuSphericBrowser2F::getFileType(),FileType)==0)
00287 utilities.Add("vuSphericBrowser2F");
00288 if (strcmp(vuSphericBrowser3F::getFileType(),FileType)==0)
00289 utilities.Add("vuSphericBrowser3F");
00290
00291 if (strcmp(vuSphericRevolver1B::getFileType(),FileType)==0)
00292 utilities.Add("vuSphericRevolver1B");
00293 if (strcmp(vuSphericRevolver3B::getFileType(),FileType)==0)
00294 utilities.Add("vuSphericRevolver3B");
00295 if (strcmp(vuSphericRevolver1F::getFileType(),FileType)==0)
00296 utilities.Add("vuSphericRevolver1F");
00297 if (strcmp(vuSphericRevolver2F::getFileType(),FileType)==0)
00298 utilities.Add("vuSphericRevolver2F");
00299 if (strcmp(vuSphericRevolver3F::getFileType(),FileType)==0)
00300 utilities.Add("vuSphericRevolver3F");
00301
00302 if (strcmp(vuSphericFBR2F::getFileType(),FileType)==0)
00303 utilities.Add("vuSphericFBR2F");
00304
00305 if (strcmp(vuSimpleFBR1B::getFileType(),FileType)==0)
00306 utilities.Add("vuSimpleFBR1B");
00307 if (strcmp(vuSimpleFBR3B::getFileType(),FileType)==0)
00308 utilities.Add("vuSimpleFBR3B");
00309
00310 if (strcmp(vuStandardFVR1F::getFileType(),FileType)==0)
00311 utilities.Add("vuStandardFVR1F");
00312 if (strcmp(vuStandardFVR3F::getFileType(),FileType)==0)
00313 utilities.Add("vuStandardFVR3F");
00314
00315 return utilities;
00316 }
00317