casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Public Member Functions | Private Member Functions | Private Attributes
Viff Class Reference

#include <Viff.h>

List of all members.

Public Types

enum  {
  BYTE,
  SHORT,
  INTEGER,
  FLOAT,
  DOUBLE,
  COMPLEX,
  DCOMPLEX
}

Public Member Functions

 Viff ()
 ~Viff ()
Bool put (const Array< float > &array)
 Put Array (or any class derived from it, Vector, Matrix, Cube...) into this Viff structure.
Bool put (const Array< Complex > &array)
Bool get (Array< float > &array)
 Get the Array out of this Viff structre.
Bool get (Array< Complex > &array)
Bool read (String name)
 Read the Viff file specified by name; return false if it fails (file does not exist, no permissions, etc).
Bool write (String name)
 Write the current Viff structure to a file; create a 0-sized Viff image if this object has not been previously filled (by read or by put).
uInt nx () const
 Viff can be thought of as always containing a "3D" data structure, and a vector is when only one of the dimentions is non-unity.
uInt ny () const
uInt nz () const
Bool putLocations (const Cube< float > &)
 We can assign an N dimensional location to each (x,y) position in the Viff object (yes, this is strange - ask the authors of Viff), i.e.

Private Member Functions

void setDefaults ()
 These members are the arguments to create image;.

Private Attributes

unsigned long col_size
unsigned long row_size
unsigned long num_data_bands
unsigned long data_storage_type
unsigned long num_of_images
char * comment
unsigned long map_row_size
unsigned long map_col_size
unsigned long map_scheme
unsigned long map_storage_type
unsigned long location_type
unsigned long location_dim
xvimage * kimage

Detailed Description

Definition at line 58 of file Viff.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
BYTE 
SHORT 
INTEGER 
FLOAT 
DOUBLE 
COMPLEX 
DCOMPLEX 

Definition at line 60 of file Viff.h.


Constructor & Destructor Documentation


Member Function Documentation

Bool Viff::get ( Array< float > &  array)

Get the Array out of this Viff structre.

If the Viff structure isn't initialized it will return a 0-sized array and set the flag to False. This will convert from the internal Viff type to the desired Array<T> type. Complex types are turned into real and integer types by taking the real component.

Bool Viff::get ( Array< Complex > &  array)
uInt Viff::nx ( ) const

Viff can be thought of as always containing a "3D" data structure, and a vector is when only one of the dimentions is non-unity.

nx(), ny() and nx() return 0 if the Viff object isn't defined.

uInt Viff::ny ( ) const
uInt Viff::nz ( ) const
Bool Viff::put ( const Array< float > &  array)

Put Array (or any class derived from it, Vector, Matrix, Cube...) into this Viff structure.

Non-degenerate arrays of dimension >=4 will cause a "False" to be returned, since Viff images are restricted to 3 dimensions. When the Viff type and the Array types differ, a conversion will be done. Complex types are turned into real and integer by taking the real component.

Bool Viff::put ( const Array< Complex > &  array)
Bool Viff::putLocations ( const Cube< float > &  )

We can assign an N dimensional location to each (x,y) position in the Viff object (yes, this is strange - ask the authors of Viff), i.e.

we can assign nx()*ny() N-dimensional locations. Fundamentally this is done by giving a Cube<float> of values where the first two indices in the Cube correspond to the (x,y) in the Viff structure, and the Z-depth of the cube corresponds to the dimensionality of the positions we want to assign. Because a Cube can be constructed from a Vector, to create a file which contains a y vs x vector plot, you merely have to do something like: viff.put(y); viff.putLocations(x);

Bool Viff::read ( String  name)

Read the Viff file specified by name; return false if it fails (file does not exist, no permissions, etc).

void Viff::setDefaults ( ) [private]

These members are the arguments to create image;.

Bool Viff::write ( String  name)

Write the current Viff structure to a file; create a 0-sized Viff image if this object has not been previously filled (by read or by put).

Return True if this succeeds, False otherwise. Note that this will overwrite an existing file.


Member Data Documentation

unsigned long Viff::col_size [private]

Definition at line 114 of file Viff.h.

char* Viff::comment [private]

Definition at line 117 of file Viff.h.

unsigned long Viff::data_storage_type [private]

Definition at line 115 of file Viff.h.

xvimage* Viff::kimage [private]

Definition at line 122 of file Viff.h.

unsigned long Viff::location_dim [private]

Definition at line 120 of file Viff.h.

unsigned long Viff::location_type [private]

Definition at line 120 of file Viff.h.

unsigned long Viff::map_col_size [private]

Definition at line 118 of file Viff.h.

unsigned long Viff::map_row_size [private]

Definition at line 118 of file Viff.h.

unsigned long Viff::map_scheme [private]

Definition at line 118 of file Viff.h.

unsigned long Viff::map_storage_type [private]

Definition at line 118 of file Viff.h.

unsigned long Viff::num_data_bands [private]

Definition at line 114 of file Viff.h.

unsigned long Viff::num_of_images [private]

Definition at line 116 of file Viff.h.

unsigned long Viff::row_size [private]

Definition at line 114 of file Viff.h.


The documentation for this class was generated from the following file: