Changeset 2828 for trunk/packages/vizservers
- Timestamp:
- Mar 7, 2012, 2:42:57 PM (13 years ago)
- Location:
- trunk/packages/vizservers/nanovis
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/vizservers/nanovis/Command.cpp
r2822 r2828 71 71 72 72 #define PLANE_CMD 0 73 #define __TEST_CODE__ 074 // FOR testing new functions75 #define _LOCAL_ZINC_TEST_ 076 77 #if _LOCAL_ZINC_TEST_78 /* #include "Test.h" */79 #endif80 73 81 74 // EXTERN DECLARATIONS … … 1148 1141 nBytes = buf.size(); 1149 1142 1150 #if _LOCAL_ZINC_TEST_1151 //FILE* fp = fopen("/home/nanohub/vrinside/nv/data/HOON/QDWL_100_100_50_strain_8000i.nd_zatom_12_1", "rb");1152 FILE* fp;1153 1154 fp = fopen("/home/nanohub/vrinside/nv/data/HOON/GaAs_AlGaAs_2QD_B4.nd_zc_1_wf", "rb");1155 if (fp == NULL) {1156 ERROR("cannot open the file\n");1157 return TCL_ERROR;1158 }1159 unsigned char* b = (unsigned char*)malloc(nBytes);1160 fread(b, nBytes, 1, fp);1161 fclose(fp);1162 #endif /*_LOCAL_ZINC_TEST_*/1163 1143 TRACE("Checking header[%.20s]\n", bytes); 1164 1144 1165 Volume *volPtr; 1166 volPtr = NULL; // Supress compiler warning. 1167 1145 Volume *volPtr = NULL; 1146 1168 1147 if ((nBytes > 5) && (strncmp(bytes, "<HDR>", 5) == 0)) { 1169 1148 TRACE("ZincBlende stream is in\n"); … … 1172 1151 //vol = NvZincBlendeReconstructor::getInstance()->loadFromStream(fdata); 1173 1152 1174 #if _LOCAL_ZINC_TEST_1175 volPtr = NvZincBlendeReconstructor::getInstance()->loadFromMemory(b);1176 #else1177 1153 volPtr = NvZincBlendeReconstructor::getInstance()->loadFromMemory((void*) buf.bytes()); 1178 #endif /*_LOCAL_ZINC_TEST_*/1179 1154 if (volPtr == NULL) { 1180 1155 Tcl_AppendResult(interp, "can't get volume instance", (char *)NULL); … … 1199 1174 Tcl_SetHashValue(hPtr, volPtr); 1200 1175 volPtr->name(Tcl_GetHashKey(&NanoVis::volumeTable, hPtr)); 1201 #if __TEST_CODE__1202 } else if ((nBytes > 5) && (strncmp(bytes, "<FET>", 5) == 0)) {1203 TRACE("FET loading...\n");1204 std::stringstream fdata;1205 fdata.write(nBytes - 5, bytes + 5);1206 Rappture::Outcome context;1207 volPtr = load_volume_stream3(context, tag, fdata);1208 if (volPtr == NULL) {1209 Tcl_AppendResult(interp, context.remark(), (char*)NULL);1210 return TCL_ERROR;1211 }1212 #endif /*__TEST_CODE__*/1213 1176 } else { 1214 1177 if ((nBytes > 5) && (strncmp(bytes, "<ODX>", 5) == 0)) { … … 2394 2357 Tcl_CreateObjCommand(interp, "up", UpCmd, NULL, NULL); 2395 2358 Tcl_CreateObjCommand(interp, "volume", VolumeCmd, NULL, NULL); 2396 #if __TEST_CODE__ 2397 Tcl_CreateObjCommand(interp, "test", TestCmd, NULL, NULL); 2398 #endif 2359 2399 2360 Tcl_InitHashTable(&NanoVis::volumeTable, TCL_STRING_KEYS); 2400 2361 Tcl_InitHashTable(&NanoVis::heightmapTable, TCL_STRING_KEYS); -
trunk/packages/vizservers/nanovis/dxReader.cpp
r2822 r2828 41 41 #include "NvZincBlendeReconstructor.h" 42 42 43 #define _LOCAL_ZINC_TEST_ 044 45 43 /* Load a 3D volume from a dx-format file 46 44 */ … … 126 124 } else if (sscanf(start, "delta %lg %lg %lg", &ddx, &ddy, &ddz) == 3) { 127 125 int count = 0; 128 129 126 // found one of the delta lines 127 if (ddx != 0.0) { 130 128 dx = ddx; 131 129 count++; -
trunk/packages/vizservers/nanovis/nanovis.cpp
r2827 r2828 66 66 #include <BMPImageLoaderImpl.h> 67 67 #include <ImageLoaderFactory.h> 68 69 //#define _LOCAL_ZINC_TEST_70 68 71 69 // R2 headers
Note: See TracChangeset
for help on using the changeset viewer.