
SepData(UI)          Cube Reference Manual          SepData(UI)

NAME
     SepData - Base class for the sep data objects

SYNOPSIS
     #include <Cube/sepdata.h>

DESCRIPTION
     SepData is the base class for all SEP data objects. All data
     objects  have a description of their structures using a Sep-
     Info data structure. A SepData object allows operation  such
     as  Window, Merge, Pad, Copy. Each of these operations modi-
     fies the description of the data  structure.   These  opera-
     tions are done in place, the data are overwritten by the new
     ones.

PUBLIC OPERATIONS
     SepData()
     SepData(SepData *)
     SepData(SepInfo *, void *data, int esize)
     SepData(SepInput*)
          Create a SepData object from scratch, from  an  another
          SepData  object,  from  a SepInfo object describing the
          data, or from a SepInput object.

     virtual ~SepData()
          Delete the data, the byte converter,  the  info  struc-
          ture.

     void Pad(int padStart[], int padEnd[])
          Pad this object to a new size. Two arrays corresponding
          of  the  padding  in  each  dimension  must be given in
          input. The data may be padded at the  beginning  or  at
          the end. The data will be padded with zeros. A new data
          array is created with the old one inside.

     void Merge(SepData *)
          Merge a data object with the current object.  The  data
          are  overwritten  in  the  following  way: the data are
          copied from the old ones and the input data are  merged
          into the new array. The dimension description object is
          modified.  If  the  object  was  unitialized,  i.e.  no
          dimension  information  have  been provided, the object
          copies the dimension description, the  data,  from  the
          input  object.   If  the  input object is not contained
          into this and the extension is  possible  the  data  is
          appended  to  the SepData object.  If the input is con-
          tained into this, the data in  the  input  object  have
          priority over this data.
          All these structure dimension are made on  the  coordi-
          nates  of  the input data SepInfo object. To add traces
          to plane the origin of the trace must reflect its posi-
          tion into the plane.

SepData(UI)          Cube Reference Manual          SepData(UI)

     void Window(int first[],int jump[],int num[])
          The object is windowed following the  input  arguments.
          Three  arrays  precising  the  windowing parameters for
          each dimension must be precised.  The data are overrit-
          ten  by the windowed data. The dimension description is
          deleted and  reconstructed  with  the  new  parameters.
          This  function  call  the  protected function doWindow.
          This function is redefined in the subclass  to  propose
          better parameter specification.

     SepData * Copy()
          Return an exact copy of the current object.  Copy  call
          the virtual function doCopy.

     SepData * Byte(int zp,int np,int pcp,int ncp)
          Return a byte converted object of the  current  object.
          The  arguments  describe the pixel values color associ-
          ated respectively to the zero data value, the non  data
          value, the positive clip, the negative clip.

     ByteConverter * GetByteConverter()
          Return the byte converter used to to the  byte  conver-
          sion. The byte converter holds information such as clip
          values, gpow value, ...

     SepInfo * Info()
          Return the dimension description of the data.

     void * Data()
          Return the data associated to this object.

     SepAxis * Axis(int n)
          Return axis information of the axis number n.

     char * Title()
          Return the title

     int Esize()
          Return element size of the data.

PROTECTED OPERATIONS
     SepData( DataStore* )
     SepData(SepInfo *, DataStore *d, int esz )
          Construct a SepData from a DataStore. This  constructor
          is  used  into  the derived class to construct directly
          either a MemoryDataStore or a DiskDataStore.

     virtual SepData * doCreate(SepInfo *,DataStore *data,int esize)
          Create  a  new  object  from  a  dimension  description
          object, the array of data, and the element  size.  This
          function  must  be implemented in all the subclasses of
          the SepData.

SepData(UI)          Cube Reference Manual          SepData(UI)

     virtual SepData * doCopy()
          Create a new object from a copy of the  other  objects.
          This  function  must  be implemented in all the derived
          class of the SepData.

     virtual SepData * badObj(int stat)
          Construct a null SepData from a status code. This  vir-
          tual  function should return an instance of the derived
          class in classes derived from this one.

     virtual void initClass(SepInfo *)
          Initialize the class specific private variables.   This
          virtual  function  when  used  in conjunction with set-
          Private should initialize all private variables.

     void setPrivate(SepInfo *,DataStore *d,int es)
          Initialize the general private variables.   This  func-
          tion  when  used  in  conjunction with initClass should
          initialize all private variables.

     boolean extendOK(SepInfo *)
          Return  true  if  the  extension  to  the  new  sepInfo
          description is OK.  This function is called when trying
          to modify an object of the current class. This function
          checks  the  dimensionality regarding its extensibility
          and its constants axes. Origin and length of  the  con-
          stant axis must be equal.  The class constructor should
          have set the constant axis  flags  to  the  appropriate
          values, e.g. a plane of constant 3-axis value will have
          the third constant Axis value  set  true  so  that  any
          objects constructed will also be planes with a constant
          3-axis value.  If the  new  object  is  going  to  have
          greater  dimensionality  than  this,  this object check
          that the extendDimension flag is true.

     void setSubData(SepData *)
          Insert  the  input  smaller  object  into  the  current
          object.   The  input  data  overwrite the data into the
          current object.

     void doWindow(int first[], int jump[], int length[])
          Window the data using  the  input  window  description.
          first gives the first element to be copied. jump is the
          increment (in samples) between input elements  on  each
          dimension.  length is the number of element to copy for
          each dimension.  This function overwrites its data  and
          its dimension description by the windowed Data.

     void doPad(int padstart[],int padend[])
          Pad this object to a new size. The input array precised
          in  samples how many sample must be added to the begin-
          ning or to the end of the data set for each  dimension.

SepData(UI)          Cube Reference Manual          SepData(UI)

          The data will be padded with zeros. A new data array is
          created with the old one inside. The data is  overwrit-
          ten  by  the  new  padded  data.  The SepInfo object is
          deleted and reconstructed with the new dimensions.

     void doMerge(SepData *)
          Merge a data object with this one to form  a  new  data
          object.   The  data  in  the second object has priority
          over the data in this one.

     SepData * doByte(int zp, int np, int pcp, int ncp)
          Perform the byte conversion.

     SepData * doExtract(SepInfo*)
          Extract a new dataset from the  current  one  from  the
          input dimension description.

SEE ALSO
     ByteConverter.

