
SepInput(UI)         Cube Reference Manual         SepInput(UI)

NAME
     SepInput - Base class for reading input datas

SYNOPSIS
     #include <Cube/sepinput.h>

DESCRIPTION
     SepInput is responsible for reading data  descriptions  from
     the  header  file  specified  in  input.  This class is also
     responsible for getting the data from disk and puting it  on
     a  DataStore object.  A SepInput is described with a SepInfo
     object which contains the description of n  SepAxis  objects
     and  of the element size of the data.  No data are stored in
     memory inside this class.

PUBLIC OPERATIONS
     SepInput( char* name )
          Create a SepInput object from an header  file.  If  the
          name  is  equal to stdin the standard input is taken as
          the header file.  The input data file is opened. If  no
          data file or no header file is found an error status is
          set, and must be tested with the  function  Valid()  or
          Status().

     ~SepInput()
          The destructor closes the input data file.

     boolean Valid()
     int Status()
     char* StatusMessage()
     void ResetStatus()
          Valid() returns whether or not the status is  OK.   The
          function Status() returns the status.  There are 6 pos-
          sible values for the status:  OK,  NOHEADER,  NOSTREAM,
          BADAXIS,  BADINDEX,  OUTOFMEM  .  The  function SepSta-
          tusMessage( int ) prints on the standard error file  an
          error   message  corresponding  to  the  current  error
          status.(this  function   is   defined   in   sepdefs.h)
          ResetStatus() allows to set the status back to OK.

     SepAxis* Axis(int n=,2,3)
          Return the number n SepAxis object.

     SepInfo* Info()
          Return the SepInfo object.

     boolean Hetch(char*, int& )
     boolean Hetch(char*, float& )
     boolean Hetch(char*, char* )
          Get parameters from the  input  header  file.  true  is
          returned  if  the  variable was defined into the header
          file. otherwise false is returned.

SepInput(UI)         Cube Reference Manual         SepInput(UI)

     boolean Getch(char*, int& )
     boolean Getch(char*, float& )
     boolean Getch(char*, char* )
          Get parameters from the command line . true is returned
          if the variable was defined on the command line. other-
          wise false is returned.

     boolean Fetch(char*, int& )
     boolean Fetch(char*, float& )
     boolean Fetch(char*, char* )
          Get parameters from the  command  line  or  the  header
          file. true is returned if the variable was defined oth-
          erwise false is returned.

     void Sample(DataStore *,int i, int i2, int i3)
          Get a sample pointed by the three input indices. A read
          on  disk  is performed.  If the indices were invalid an
          error status is set.

     void Trace(DataStore *,int ax, int i, int ax2, int i2)
          Get a trace perpendicular to the  plane  given  by  the
          axis  ax and ax2, and at the position i, i2 into this
          plane.

     void Plane(DataStore *,int ax, int i)
          Get a plane perpendicular to the axis ax at the  posi-
          tion i on this axis.

     void Cube(DataStore *)
          Get the cube from the disk into the datastore.

PROTECTED OPERATIONS
     void getSample(DataStore* d, int len, int n, int n2,
                    int i, int i2, int i3)

     void getTrace(DataStore* d, int len, int n, int n2, int n3,
                   int ax, int i, int ax2, int i2)

     void getPlane(DataStore* d, int len, int n, int n2, int n3,
                   int ax, int i)

PROTECTED VARIABLES
     char* headername:
          The input header is in a file  of  this  name.  If  the
          input was on stdin and the input was from a pipe a tem-
          porary file is created and the header copied to it.

     boolean fromStdin, isaPipe:
          Return true if the header file is  the  standard  input
          and if it is a pipe.

     FILE* instream:

SepInput(UI)         Cube Reference Manual         SepInput(UI)

          File descriptor of the data file.

     SepInfo* info:
          SepInfo object.

     int status:
          error status.

SEE ALSO
     SepInfo, intro

