casa::ArrayIO_global_functions_Array_binary_IO Struct Reference
[Arrays]

#include <ArrayIO.h>

List of all members.


Detailed Description

Global functions to read/write binary arrays from/to a file.

Intended use:

Part of API

Review Status

Reviewed By:
Gareth Hunt
Date Reviewed:
95Mar31

Synopsis

These global functions provide disk read/write functions for an Array of binary numbers. The write operation is useful, for example, to dump an image in binary form to disk so that it can be displayed with an external utility such as SAOimage.

Example

       Matrix<Float> picture(256, 256); picture = 0.0;
       String fileName="picture.data";
   
       // operations to populate picture
       // .\..
   
       write_array (picture, fileName);

To Do

<linkfrom anchor="Array binary IO" classes="Array Vector Matrix Cube"> <here>Array binary IO</here> -- Simple binary input/output for Arrays. </linkfrom>

Definition at line 238 of file ArrayIO.h.

Public Member Functions

template<class T>
void write_array (const Array< T > &the_array, const String &fileName)
 Write the values of an array in binary format into a file with the given name.
template<class T>
void write_array (const Array< T > &the_array, const Char *fileName)
template<class T>
void read_array (Array< T > &the_array, const String &fileName)
 Read the values of an array in binary format from a file with the given name.
template<class T>
void read_array (Array< T > &the_array, const Char *fileName)


Member Function Documentation

template<class T>
void casa::ArrayIO_global_functions_Array_binary_IO::write_array ( const Array< T > &  the_array,
const String fileName 
)

Write the values of an array in binary format into a file with the given name.

The values are stored in local format, thus are not converted to a canonical format as AipsIO does. Warning: This function is only suitable for built-in data types.

template<class T>
void casa::ArrayIO_global_functions_Array_binary_IO::write_array ( const Array< T > &  the_array,
const Char fileName 
) [inline]

Definition at line 253 of file ArrayIO.h.

References String.

template<class T>
void casa::ArrayIO_global_functions_Array_binary_IO::read_array ( Array< T > &  the_array,
const String fileName 
)

Read the values of an array in binary format from a file with the given name.

The number of values read is the size of the Array, thus the file should at least contain that number of values. Warning: This function is only suitable for built-in data types.

template<class T>
void casa::ArrayIO_global_functions_Array_binary_IO::read_array ( Array< T > &  the_array,
const Char fileName 
) [inline]

Definition at line 269 of file ArrayIO.h.

References String.


The documentation for this struct was generated from the following file:
Generated on Mon Sep 1 22:43:38 2008 for NRAOCASA by  doxygen 1.5.1