Changeset 4815
- Timestamp:
- Dec 2, 2014, 6:03:53 PM (10 years ago)
- Location:
- vtkvis/branches/1.8
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
vtkvis/branches/1.8
- Property svn:mergeinfo changed
/vtkvis/trunk (added) merged: 4814
- Property svn:mergeinfo changed
-
vtkvis/branches/1.8/Renderer.h
r4793 r4815 773 773 void setImageWindow(const DataSetId& id, double window); 774 774 775 void setImageSliceInterp(const DataSetId& id, bool state); 776 775 777 void setImageSlicePlane(const DataSetId& id, double normal[3], double origin[3]); 776 778 -
vtkvis/branches/1.8/RendererCmd.cpp
r4792 r4815 7181 7181 7182 7182 static int 7183 ImageSliceInterpOp(ClientData clientData, Tcl_Interp *interp, int objc, 7184 Tcl_Obj *const *objv) 7185 { 7186 bool state; 7187 if (GetBooleanFromObj(interp, objv[2], &state) != TCL_OK) { 7188 return TCL_ERROR; 7189 } 7190 if (objc == 4) { 7191 const char *name = Tcl_GetString(objv[3]); 7192 g_renderer->setImageSliceInterp(name, state); 7193 } else { 7194 g_renderer->setImageSliceInterp("all", state); 7195 } 7196 return TCL_OK; 7197 } 7198 7199 static int 7183 7200 ImageSlicePlaneOp(ClientData clientData, Tcl_Interp *interp, int objc, 7184 7201 Tcl_Obj *const *objv) … … 7268 7285 {"pos", 1, ImagePositionOp, 5, 6, "x y z ?dataSetName?"}, 7269 7286 {"scale", 2, ImageScaleOp, 5, 6, "sx sy sz ?dataSetName?"}, 7287 {"sinterp", 2, ImageSliceInterpOp, 3, 4, "bool ?dataSetName?"}, 7270 7288 {"slice", 2, ImageSlicePlaneOp, 8, 9, "nx ny nz ox oy oz ?dataSetName?"}, 7271 7289 {"visible", 1, ImageVisibleOp, 3, 4, "bool ?dataSetName?"}, -
vtkvis/branches/1.8/RendererGraphicsObjs.cpp
r4090 r4815 2408 2408 } 2409 2409 2410 void Renderer::setImageSliceInterp(const DataSetId& id, bool state) 2411 { 2412 ImageHashmap::iterator itr; 2413 2414 bool doAll = false; 2415 2416 if (id.compare("all") == 0) { 2417 itr = _images.begin(); 2418 if (itr == _images.end()) 2419 return; 2420 doAll = true; 2421 } else { 2422 itr = _images.find(id); 2423 } 2424 if (itr == _images.end()) { 2425 ERROR("Image not found: %s", id.c_str()); 2426 return; 2427 } 2428 2429 do { 2430 itr->second->setJumpToNearestSlice(!state); 2431 } while (doAll && ++itr != _images.end()); 2432 2433 _needsRedraw = true; 2434 } 2435 2410 2436 void Renderer::setImageSlicePlane(const DataSetId& id, double normal[3], double origin[3]) 2411 2437 {
Note: See TracChangeset
for help on using the changeset viewer.