Index: /trunk/packages/vizservers/nanovis/Command.cpp
===================================================================
--- /trunk/packages/vizservers/nanovis/Command.cpp	(revision 3567)
+++ /trunk/packages/vizservers/nanovis/Command.cpp	(revision 3568)
@@ -56,7 +56,4 @@
 #include "CmdProc.h"
 #include "Trace.h"
-#ifdef PLANE_CMD
-#include "PlaneRenderer.h"
-#endif
 #ifdef USE_POINTSET_RENDERER
 #include "PointSet.h"
@@ -118,7 +115,4 @@
 static Tcl_ObjCmdProc GridCmd;
 static Tcl_ObjCmdProc LegendCmd;
-#ifdef PLANE_CMD
-static Tcl_ObjCmdProc PlaneCmd;
-#endif
 static Tcl_ObjCmdProc ScreenCmd;
 static Tcl_ObjCmdProc SnapshotCmd;
@@ -1618,5 +1612,5 @@
     }
     std::vector<Volume *>::iterator iter;
-    for (iter = ivol.begin(); iter != ivol.end(); iter++) {
+    for (iter = ivol.begin(); iter != ivol.end(); ++iter) {
         TRACE("setting %s with transfer function %s", (*iter)->name(),
                tf->name());
@@ -2152,126 +2146,4 @@
     return TCL_OK;
 }
-
-#ifdef PLANE_CMD
-static int 
-PlaneAddOp(ClientData clientData, Tcl_Interp *interp, int objc, 
-           Tcl_Obj *const *objv)
-{
-    TRACE("load plane for 2D visualization command");
-
-    int index, w, h;
-    if (objc != 4) {
-        Tcl_AppendResult(interp, "wrong # args: should be \"", 
-            Tcl_GetString(objv[0]), " plane_index w h \"", (char*)NULL);
-        return TCL_ERROR;
-    }
-    if (Tcl_GetIntFromObj(interp, objv[1], &index) != TCL_OK) {
-        return TCL_ERROR;
-    }
-    if (index >= NanoVis::numPlanes) {
-        Tcl_AppendResult(interp, "Invalid plane_index", (char*)NULL);
-        return TCL_ERROR;
-    }
-    if (Tcl_GetIntFromObj(interp, objv[2], &w) != TCL_OK) {
-        return TCL_ERROR;
-    }
-    if (Tcl_GetIntFromObj(interp, objv[3], &h) != TCL_OK) {
-        return TCL_ERROR;
-    }
-
-    //Now read w*h*4 bytes. The server expects the plane to be a stream of
-    //floats
-    char *tmp = new char[int(w*h*sizeof(float))];
-    if (tmp == NULL) {
-        Tcl_AppendResult(interp, "can't allocate stream data", (char *)NULL);
-        return TCL_ERROR;
-    }
-    bzero(tmp, w*h*4);
-    int status = read(fileno(NanoVis::stdin), tmp, w*h*sizeof(float));
-    if (status <= 0) {
-        delete[] tmp;
-        Tcl_AppendResult(interp, "Failed to read image data for plane", (char*)NULL);
-        return TCL_ERROR;
-    }
-    NanoVis::plane[index] = new Texture2D(w, h, GL_FLOAT, GL_LINEAR, 1, (float*)tmp);
-    delete[] tmp;
-    return TCL_OK;
-}
-
-static int
-PlaneLinkOp(ClientData clientData, Tcl_Interp *interp, int objc,
-            Tcl_Obj *const *objv)
-{
-    TRACE("link the plane to the 2D renderer command");
-
-    int plane_index;
-
-    if (objc != 3) {
-        Tcl_AppendResult(interp, "wrong # args: should be \"",
-            Tcl_GetString(objv[0]), " plane_index transfunc_name \"", (char*)NULL);
-        return TCL_ERROR;
-    }
-    if (Tcl_GetIntFromObj(interp, objv[1], &plane_index) != TCL_OK) {
-        return TCL_ERROR;
-    }
-    if (plane_index >= NanoVis::numPlanes) {
-        Tcl_AppendResult(interp, "Invalid plane_index", (char*)NULL);
-        return TCL_ERROR;
-    }
-    NanoVis::planeRenderer->addPlane(NanoVis::plane[plane_index],
-                                     NanoVis::getTransfunc(Tcl_GetString(objv[2])));
-    return TCL_OK;
-}
-
-//Enable a 2D plane for render
-//The plane_index is the index mantained in the 2D plane renderer
-static int
-PlaneEnableOp(ClientData clientData, Tcl_Interp *interp, int objc,
-              Tcl_Obj *const *objv)
-{
-    TRACE("enable a plane so the 2D renderer can render it command");
-
-    if (objc != 3) {
-        Tcl_AppendResult(interp, "wrong # args: should be \"", 
-            Tcl_GetString(objv[0]), " plane_index mode \"", (char*)NULL);
-        return TCL_ERROR;
-    }
-    int plane_index;
-    if (Tcl_GetIntFromObj(interp, objv[1], &plane_index) != TCL_OK) {
-        return TCL_ERROR;
-    }
-    if (plane_index >= NanoVis::numPlanes) {
-        Tcl_AppendResult(interp, "Invalid plane_index", (char*)NULL);
-        return TCL_ERROR;
-    } else if (plane_index < 0) {
-        plane_index = -1;
-    }
-
-    NanoVis::planeRenderer->setActivePlane(plane_index);
-    return TCL_OK;
-}
-
-static Rappture::CmdSpec planeOps[] = {
-    {"active",     2, PlaneEnableOp,    3, 3, "planeIdx",},
-    {"add",        2, PlaneAddOp,       5, 5, "planeIdx width height",},
-    {"link",       1, PlaneLinkOp,      4, 4, "planeIdx transfunc_name",},
-};
-static int nPlaneOps = NumCmdSpecs(planeOps);
-
-static int
-PlaneCmd(ClientData clientData, Tcl_Interp *interp, int objc, 
-         Tcl_Obj *const *objv)
-{
-    Tcl_ObjCmdProc *proc;
-
-    proc = Rappture::GetOpFromObj(interp, nPlaneOps, planeOps,
-                                  Rappture::CMDSPEC_ARG1, objc, objv, 0);
-    if (proc == NULL) {
-        return TCL_ERROR;
-    }
-    return (*proc) (clientData, interp, objc, objv);
-}
-
-#endif /*PLANE_CMD*/
 
 /*
@@ -2341,7 +2213,4 @@
     Tcl_CreateObjCommand(interp, "heightmap",   HeightMapCmd,   NULL, NULL);
     Tcl_CreateObjCommand(interp, "legend",      LegendCmd,      NULL, NULL);
-#ifdef PLANE_CMD
-    Tcl_CreateObjCommand(interp, "plane",       PlaneCmd,       NULL, NULL);
-#endif
     Tcl_CreateObjCommand(interp, "screen",      ScreenCmd,      NULL, NULL);
     Tcl_CreateObjCommand(interp, "snapshot",    SnapshotCmd,    NULL, NULL);
Index: /trunk/packages/vizservers/nanovis/FlowBox.h
===================================================================
--- /trunk/packages/vizservers/nanovis/FlowBox.h	(revision 3567)
+++ /trunk/packages/vizservers/nanovis/FlowBox.h	(revision 3568)
@@ -40,5 +40,5 @@
     }
 
-    bool visible()
+    bool visible() const
     {
         return !_sv.isHidden;
Index: /trunk/packages/vizservers/nanovis/FlowParticles.h
===================================================================
--- /trunk/packages/vizservers/nanovis/FlowParticles.h	(revision 3567)
+++ /trunk/packages/vizservers/nanovis/FlowParticles.h	(revision 3568)
@@ -42,5 +42,5 @@
     }
 
-    bool visible()
+    bool visible() const
     {
         return !_sv.isHidden;
Index: /trunk/packages/vizservers/nanovis/TransferFunction.cpp
===================================================================
--- /trunk/packages/vizservers/nanovis/TransferFunction.cpp	(revision 3567)
+++ /trunk/packages/vizservers/nanovis/TransferFunction.cpp	(revision 3568)
@@ -24,5 +24,6 @@
 using namespace vrmath;
 
-TransferFunction::TransferFunction(int size, float *data)
+TransferFunction::TransferFunction(const char *name, int size, float *data) :
+    _name(name)
 {
     // _size : # of slot, 4 : rgba
Index: /trunk/packages/vizservers/nanovis/TransferFunction.h
===================================================================
--- /trunk/packages/vizservers/nanovis/TransferFunction.h	(revision 3567)
+++ /trunk/packages/vizservers/nanovis/TransferFunction.h	(revision 3568)
@@ -17,4 +17,6 @@
 #define TRANSFER_FUNCTION_H
 
+#include <string>
+
 #include <vrmath/Vector3f.h>
 
@@ -24,5 +26,5 @@
 {
 public:
-    TransferFunction(int size, float *data);
+    TransferFunction(const char *name, int size, float *data);
 
     void update(float *data);
@@ -57,10 +59,5 @@
     const char *name() const
     {
-        return _name;
-    }
-
-    void name(const char *name)
-    {
-        _name = name;
+        return _name.c_str();
     }
 
@@ -77,5 +74,5 @@
     float *_data;
     Texture1D *_tex;	///< the texture storing the colors 
-    const char *_name;
+    std::string _name;
     GLuint _id;		///< OpenGL texture identifier
 };
Index: /trunk/packages/vizservers/nanovis/config.h
===================================================================
--- /trunk/packages/vizservers/nanovis/config.h	(revision 3567)
+++ /trunk/packages/vizservers/nanovis/config.h	(revision 3568)
@@ -58,9 +58,3 @@
 //#define FILTER_GRADIENTS
 
-/* 
- * Controls whether the plane* commands are registered in the 
- * interpreter. [Are these commands still required?]
- */
-//#define PLANE_CMD
-
 #endif 
Index: /trunk/packages/vizservers/nanovis/nanovis.cpp
===================================================================
--- /trunk/packages/vizservers/nanovis/nanovis.cpp	(revision 3567)
+++ /trunk/packages/vizservers/nanovis/nanovis.cpp	(revision 3568)
@@ -152,9 +152,4 @@
 NvLIC *NanoVis::licRenderer = NULL;
 PlaneRenderer *NanoVis::planeRenderer = NULL;
-#ifdef PLANE_CMD
-// pointers to 2D planes, currently handle up 10
-int NanoVis::numPlanes = 10;
-Texture2D *NanoVis::plane[10];
-#endif
 #ifdef USE_POINTSET_RENDERER
 PointSetRenderer *NanoVis::pointSetRenderer = NULL;
@@ -206,10 +201,4 @@
         delete colorTableRenderer;
     }
-#ifdef PLANE_CMD
-    for (int i = 0; i < numPlanes; i++) {
-        TRACE("Deleting plane[%d]", i);
-        delete plane[i];
-    }
-#endif
     if (legendTexture != NULL) {
         TRACE("Deleting legendTexture");
@@ -620,5 +609,5 @@
     TransferFunctionHashmap::iterator itr = tfTable.find(id);
     if (itr == tfTable.end()) {
-        ERROR("No transfer function named \"%s\" found", id.c_str());
+        TRACE("No transfer function named \"%s\" found", id.c_str());
         return NULL;
     } else {
@@ -635,5 +624,5 @@
     if (tf == NULL) {
         TRACE("Creating new transfer function \"%s\"", id.c_str());
-        tf = new TransferFunction(n, data);
+        tf = new TransferFunction(id.c_str(), n, data);
         tfTable[id] = tf;
     } else {
Index: /trunk/packages/vizservers/nanovis/nanovis.h
===================================================================
--- /trunk/packages/vizservers/nanovis/nanovis.h	(revision 3567)
+++ /trunk/packages/vizservers/nanovis/nanovis.h	(revision 3568)
@@ -198,8 +198,5 @@
     static NvLIC *licRenderer;
     static PlaneRenderer *planeRenderer;
-#if PLANE_CMD
-    static int numPlanes;
-    static Texture2D *plane[]; ///< Pointers to 2D planes
-#endif
+
 #ifdef USE_POINTSET_RENDERER
     static PointSetRenderer *pointSetRenderer;
Index: /trunk/packages/vizservers/nanovis/protocol-nanovis.txt
===================================================================
--- /trunk/packages/vizservers/nanovis/protocol-nanovis.txt	(revision 3567)
+++ /trunk/packages/vizservers/nanovis/protocol-nanovis.txt	(revision 3568)
@@ -173,17 +173,4 @@
    Set orientation of volumes
 
-
---- Colormaped Plane (if PLANE_CMD is defined in config.h) ---
-plane active <planeIdx>
-      Set the active plane [0,9], or -1 to disable
-      Plane must first be added and linked
-plane add <planeIdx> <width> <height>
-      followed by image data: w * h floats on stdin
-      planeIdx: [0,9]
-plane link <planeIdx> <transfunc name>
-      Enable a plane for rendering using the given transfer
-      function.  Plane must first be added.
---- End Colormaped Plane (if PLANE_CMD is defined in config.h) ---
-
 ================================================================================
 Replies:
