Changeset 3983 for trunk/packages/vizservers
- Timestamp:
- Oct 2, 2013, 6:51:58 AM (11 years ago)
- Location:
- trunk/packages/vizservers/vtkvis
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/vizservers/vtkvis/RendererCmd.cpp
r3962 r3983 2509 2509 static Rappture::CmdSpec colorMapOps[] = { 2510 2510 {"add", 1, ColorMapAddOp, 5, 5, "colorMapName colormap alphamap"}, 2511 {"delete", 1, ColorMapDeleteOp, 2, 3, "?colorMapName?"}, 2511 {"define", 3, ColorMapAddOp, 5, 5, "colorMapName colormap alphamap"}, 2512 {"delete", 3, ColorMapDeleteOp, 2, 3, "?colorMapName?"}, 2512 2513 {"res", 1, ColorMapNumTableEntriesOp, 3, 4, "numTableEntries ?colorMapName?"} 2513 2514 }; … … 7165 7166 range[1] = -DBL_MAX; 7166 7167 7168 bool opaque = true; 7169 7167 7170 if (objc == 9) { 7168 7171 const char *dataSetName = Tcl_GetString(objv[8]); 7169 7172 if (!g_renderer->renderColorMap(colorMapName, dataSetName, legendType, fieldName, title, 7170 range, width, height, true, numLabels, imgData)) {7173 range, width, height, opaque, numLabels, imgData)) { 7171 7174 Tcl_AppendResult(interp, "Color map \"", 7172 7175 colorMapName, "\" or dataset \"", … … 7176 7179 } else { 7177 7180 if (!g_renderer->renderColorMap(colorMapName, "all", legendType, fieldName, title, 7178 range, width, height, true, numLabels, imgData)) {7181 range, width, height, opaque, numLabels, imgData)) { 7179 7182 Tcl_AppendResult(interp, "Color map \"", 7180 7183 colorMapName, "\" was not found", (char*)NULL); … … 7237 7240 vtkSmartPointer<vtkUnsignedCharArray>::New(); 7238 7241 7239 if (!g_renderer->renderColorMap(colorMapName, width, height, true, imgData)) { 7242 bool opaque = true; 7243 7244 if (!g_renderer->renderColorMap(colorMapName, width, height, opaque, imgData)) { 7240 7245 Tcl_AppendResult(interp, "Color map \"", 7241 7246 colorMapName, "\" was not found", (char*)NULL); … … 7273 7278 # endif // USE_THREADS 7274 7279 #endif // DEBUG 7280 7275 7281 return TCL_OK; 7276 7282 } … … 11936 11942 double distance; 11937 11943 double maxFactor = 4.0; 11944 #if 1 11945 distance = 1.0 / (quality * (maxFactor - 1.0) + 1.0); 11946 #else 11938 11947 if (quality >= 0.5) { 11939 11948 distance = 1.0 / ((quality - 0.5) * (maxFactor - 1.0) * 2.0 + 1.0); … … 11941 11950 distance = ((0.5 - quality) * (maxFactor - 1.0) * 2.0 + 1.0); 11942 11951 } 11952 #endif 11943 11953 if (objc == 4) { 11944 11954 const char *name = Tcl_GetString(objv[3]); -
trunk/packages/vizservers/vtkvis/protocol.txt
r3962 r3983 189 189 190 190 colormap add <colorMapName> <colorMap> <opacityMap> 191 (Re-)define a colormap. If colorMapName doesn't exist, it is created, 192 otherwise the colormap is redefined and all users will be updated. 191 193 colorMap = Tcl list of {value r g b} control points 192 194 opacityMap = Tcl list of {value alpha} control points 195 colormap define <colorMapName> <colorMap> <opacityMap> 196 (Re-)define a colormap (same as 'add') 193 197 colormap delete <?colorMapName?> 194 198 colormap res <numberOfTableEntries>
Note: See TracChangeset
for help on using the changeset viewer.