Index: /branches/eam_branches/ipp-20150112/Ohana/src/opihi/include/dvomath.h
===================================================================
--- /branches/eam_branches/ipp-20150112/Ohana/src/opihi/include/dvomath.h	(revision 37854)
+++ /branches/eam_branches/ipp-20150112/Ohana/src/opihi/include/dvomath.h	(revision 37855)
@@ -187,4 +187,5 @@
 int           ListBuffersToList     PROTO((char *name));
 int           CreateBuffer          PROTO((Buffer *buf, int Nx, int Ny, int bitpix, float bzero, float bscale));
+int           CreateBuffer3D        PROTO((Buffer *buf, int Nx, int Ny, int Nz, int bitpix, float bzero, float bscale));
 int           ResetBuffer           PROTO((Buffer *buf, int Nx, int Ny, int bitpix, float bzero, float bscale));
 Buffer       *SelectBuffer          PROTO((char *name, int mode, int verbose));
Index: /branches/eam_branches/ipp-20150112/Ohana/src/opihi/lib.shell/BufferOps.c
===================================================================
--- /branches/eam_branches/ipp-20150112/Ohana/src/opihi/lib.shell/BufferOps.c	(revision 37854)
+++ /branches/eam_branches/ipp-20150112/Ohana/src/opihi/lib.shell/BufferOps.c	(revision 37855)
@@ -120,4 +120,29 @@
 }
   
+int CreateBuffer3D (Buffer *buf, int Nx, int Ny, int Nz, int bitpix, float bzero, float bscale) {
+
+  /* store the default output values */
+  gfits_init_header (&buf[0].header);
+
+  /* assign the necessary internal values */
+  buf[0].header.bitpix   = -32;
+  buf[0].header.Naxes = 3;
+  buf[0].header.Naxis[0] = Nx;
+  buf[0].header.Naxis[1] = Ny;
+  buf[0].header.Naxis[2] = Nz;
+
+  buf[0].bitpix = bitpix;
+  buf[0].bzero  = bzero;
+  buf[0].bscale = bscale;
+  
+  /* make some test of the validity of the values */
+
+  /* create the appropriate header and matrix */
+  gfits_create_header (&buf[0].header);
+  gfits_create_matrix (&buf[0].header, &buf[0].matrix);
+
+  return (TRUE);
+}
+  
 /* copy data from in to out - new memory space */
 int CopyNamedBuffer (char *out, char *in) {
