casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
Viff Class Reference

#include <Viff.h>

Public Types

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

Public Member Functions

 Viff ()
 
 ~Viff ()
 
casacore::Bool put (const casacore::Array< float > &array)
 Put casacore::Array (or any class derived from it, casacore::Vector, casacore::Matrix, Cube...) into this Viff structure. More...
 
casacore::Bool put (const casacore::Array< casacore::Complex > &array)
 
casacore::Bool get (casacore::Array< float > &array)
 Get the casacore::Array out of this Viff structre. More...
 
casacore::Bool get (casacore::Array< casacore::Complex > &array)
 
casacore::Bool read (casacore::String name)
 Read the Viff file specified by name; return false if it fails (file does not exist, no permissions, etc). More...
 
casacore::Bool write (casacore::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). More...
 
casacore::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. More...
 
casacore::uInt ny () const
 
casacore::uInt nz () const
 
casacore::Bool putLocations (const casacore::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. More...
 

Private Member Functions

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

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 57 of file Viff.h.

Member Enumeration Documentation

anonymous enum
Enumerator
BYTE 
SHORT 
INTEGER 
FLOAT 
DOUBLE 
COMPLEX 
DCOMPLEX 

Definition at line 59 of file Viff.h.

Constructor & Destructor Documentation

Viff::Viff ( )
Viff::~Viff ( )

Member Function Documentation

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

Get the casacore::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 casacore::Array<T> type. casacore::Complex types are turned into real and integer types by taking the real component.

casacore::Bool Viff::get ( casacore::Array< casacore::Complex > &  array)
casacore::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.

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

Put casacore::Array (or any class derived from it, casacore::Vector, casacore::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 casacore::Array types differ, a conversion will be done. casacore::Complex types are turned into real and integer by taking the real component.

casacore::Bool Viff::put ( const casacore::Array< casacore::Complex > &  array)
casacore::Bool Viff::putLocations ( const casacore::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 casacore::Cube<float> of values where the first two indices in the casacore::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 casacore::Cube can be constructed from a casacore::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);

casacore::Bool Viff::read ( casacore::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;.

casacore::Bool Viff::write ( casacore::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 113 of file Viff.h.

char* Viff::comment
private

Definition at line 116 of file Viff.h.

unsigned long Viff::data_storage_type
private

Definition at line 114 of file Viff.h.

xvimage* Viff::kimage
private

Definition at line 121 of file Viff.h.

unsigned long Viff::location_dim
private

Definition at line 119 of file Viff.h.

unsigned long Viff::location_type
private

Definition at line 119 of file Viff.h.

unsigned long Viff::map_col_size
private

Definition at line 117 of file Viff.h.

unsigned long Viff::map_row_size
private

Definition at line 117 of file Viff.h.

unsigned long Viff::map_scheme
private

Definition at line 117 of file Viff.h.

unsigned long Viff::map_storage_type
private

Definition at line 117 of file Viff.h.

unsigned long Viff::num_data_bands
private

Definition at line 113 of file Viff.h.

unsigned long Viff::num_of_images
private

Definition at line 115 of file Viff.h.

unsigned long Viff::row_size
private

Definition at line 113 of file Viff.h.


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