Index: trunk/Ohana/src/opihi/dvo/imdense.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/imdense.c	(revision 19823)
+++ trunk/Ohana/src/opihi/dvo/imdense.c	(revision 20936)
@@ -30,8 +30,9 @@
   srand48(B);
 
+  N = 0;
   NPTS = 200;
-  ALLOCATE (Xvec.elements, float, NPTS);
-  ALLOCATE (Yvec.elements, float, NPTS);
-  N = 0;
+  SetVector (&Xvec, OPIHI_FLT, NPTS);
+  SetVector (&Yvec, OPIHI_FLT, NPTS);
+
   for (i = 0; i < Nimage; i++) {
     /* choose a position for point within image box */
@@ -45,27 +46,27 @@
     while (r < Rmin) r += 360.0; 
     while (r > Rmax) r -= 360.0; 
-    status |= fRD_to_XY (&Xvec.elements[N], &Yvec.elements[N], r, d, &graphmode.coords);
-    if ((Xvec.elements[N] >= graphmode.xmin) && 
-	(Xvec.elements[N] <= graphmode.xmax) && 
-	(Yvec.elements[N] >= graphmode.ymin) && 
-	(Yvec.elements[N] <= graphmode.ymax) && status) {
+    status |= RD_to_XY (&Xvec.elements.Flt[N], &Yvec.elements.Flt[N], r, d, &graphmode.coords);
+    if ((Xvec.elements.Flt[N] >= graphmode.xmin) && 
+	(Xvec.elements.Flt[N] <= graphmode.xmax) && 
+	(Yvec.elements.Flt[N] >= graphmode.ymin) && 
+	(Yvec.elements.Flt[N] <= graphmode.ymax) && status) {
       N++;
       if (N > NPTS - 1) { 
 	NPTS += 200;
-	REALLOCATE (Xvec.elements, float, NPTS);
-	REALLOCATE (Yvec.elements, float, NPTS);
+	REALLOCATE (Xvec.elements.Flt, opihi_flt, NPTS);
+	REALLOCATE (Yvec.elements.Flt, opihi_flt, NPTS);
       }
     }
   }
 
-  Xvec.Nelements = Xvec.Nelements = N;
+  Xvec.Nelements = Yvec.Nelements = N;
   if (N > 0) {
     graphmode.style = 2; /* points */
     graphmode.etype = 0;
-    PlotVectorPair (kapa, N, Xvec.elements, Yvec.elements, &graphmode);
+    PlotVectorPair (kapa, &Xvec, &Yvec, &graphmode);
   }
 
-  free (Xvec.elements);
-  free (Yvec.elements);
+  free (Xvec.elements.Flt);
+  free (Yvec.elements.Flt);
   free (image);
   return (TRUE);
