Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Raster.C File Reference


Detailed Description

Read/write/display raster images

Definition in file Raster.C.

#include "Raster/Raster.H"
#include "Image/ColorOps.H"
#include "Image/Image.H"
#include "Image/MathOps.H"
#include "Image/Pixels.H"
#include "Raster/CcodeWriter.H"
#include "Raster/DpxParser.H"
#include "Raster/GenericFrame.H"
#include "Raster/JpegParser.H"
#include "Raster/PfmParser.H"
#include "Raster/PfmWriter.H"
#include "Raster/PfzParser.H"
#include "Raster/PfzWriter.H"
#include "Raster/PlaintextWriter.H"
#include "Raster/PngParser.H"
#include "Raster/PngWriter.H"
#include "Raster/PnmParser.H"
#include "Raster/PnmWriter.H"
#include "Raster/QuartzQuickTimeParser.H"
#include "Raster/RawWriter.H"
#include "Raster/YuvParser.H"
#include "Raster/YuvWriter.H"
#include "Util/Assert.H"
#include "Util/FileUtil.H"
#include "Util/log.H"
#include "Video/VideoFrame.H"
#include "rutz/shared_ptr.h"
#include "rutz/trace.h"
#include <cerrno>
#include <cstring>
#include <fcntl.h>
#include <list>
#include <sys/stat.h>
#include <sys/types.h>

Include dependency graph for Raster.C:

Go to the source code of this file.

Functions

bool hasMatchingExtension (const std::string &fname, const RasterFileFormat ftype, const int mode)
const char * defaultExtensionFor (const RasterFileFormat ftype)
std::string getExtensionListString (const int mode)
rutz::shared_ptr< RasterParsermakeParser (RasterFileFormat ftype, const char *fname)
rutz::shared_ptr< RasterWritermakeWriter (RasterFileFormat ftype, const char *fname)
RasterFileFormat addFileExtension (std::string &fname, const RasterFileFormat ftype, const int mode, const bool fatal)
bool Raster::fileExists (std::string fname, const RasterFileFormat ftype=RASFMT_AUTO, const bool chkFormat=false)
 Return true if file exists on disk.
std::string Raster::getImageComments (std::string fname, const RasterFileFormat ftype=RASFMT_AUTO)
 Get image comments without fully reading the image (PPM only).
Dims Raster::getImageDims (std::string fname, const RasterFileFormat ftype=RASFMT_AUTO)
 Get image dimensions without fully reading the image.
GenericFrameSpec Raster::getFrameSpec (std::string fname, const RasterFileFormat ftype=RASFMT_AUTO)
 Get image specifications without fully reading the image.
GenericFrame Raster::ReadFrame (std::string fname, RasterFileFormat ftype=RASFMT_AUTO)
 Read a GenericFrame from a raster file.
Image< PixRGB< byte > > Raster::ReadRGB (std::string fname, RasterFileFormat ftype=RASFMT_AUTO)
 Read an RGB byte image from a raster file.
Image< byteRaster::ReadGray (std::string fname, RasterFileFormat ftype=RASFMT_AUTO)
 Read a greyscale byte image from a greyscale raster file.
Image< byteRaster::ReadGrayNTSC (std::string fname, const RasterFileFormat ftype=RASFMT_AUTO)
 Read a greyscale byte image, converting to NTSC coordinates if necessary.
Image< float > Raster::ReadFloat (std::string fname, RasterFileFormat ftype=RASFMT_AUTO)
 Read a greyscale float image from a greyscale raster file.
VideoFrame Raster::ReadVideo (std::string fname, RasterFileFormat ftype=RASFMT_AUTO)
 Read a VideoFrame from a raster file.
std::string Raster::WriteFrame (const GenericFrame &image, std::string fname, RasterFileFormat ftype=RASFMT_AUTO)
 Write a GenericFrame to a raster file.
std::string Raster::WriteRGB (const Image< PixRGB< byte > > &image, std::string fname, const RasterFileFormat ftype=RASFMT_AUTO)
 Write an RGB byte image to a raster file.
std::string Raster::WriteGray (const Image< byte > &image, std::string fname, const RasterFileFormat ftype=RASFMT_AUTO)
 Write a grayscale byte image to a raster file.
std::string Raster::WriteFloat (const Image< float > &image, const int flags, std::string fname, const RasterFileFormat ftype=RASFMT_AUTO)
 Write a float image to a raster file.
void Raster::NoXV ()
 Turn off the use of xv.
void Raster::Display (const char *file)
 calls xv to display an image that is on disk
void Raster::waitForKey ()
 wait for the [return] key
void Raster::VisuRGB (const Image< PixRGB< byte > > &image, std::string fname, const RasterFileFormat ftype=RASFMT_AUTO)
 Save image of type Image< PixRGB<byte> > to disk then display it using xv.
void Raster::VisuGray (const Image< byte > &image, std::string fname, const RasterFileFormat ftype=RASFMT_AUTO)
 Save image of type Image<byte> to disk then display it using xv.
void Raster::VisuFloat (const Image< float > &image, const int flags, std::string fname, const RasterFileFormat ftype=RASFMT_AUTO)
 Save image of type Image<float> to disk then display it using xv.

Variables

const int MODE_R = (1 << 0)
const int MODE_W = (1 << 1)
const RasFileExtension allExtensions []
const RasFileDefaultExtension defaultExtensions []
bool USING_XV = true


Variable Documentation

const RasFileDefaultExtension defaultExtensions[] [static]
 

Initial value:

    {
      { ".pnm",             RASFMT_PNM },
      { ".png",             RASFMT_PNG },
      { ".pfm",             RASFMT_PFM },
      { ".pfz",             RASFMT_PFZ },
      { ".jpg",             RASFMT_JPEG },
      { ".txt",             RASFMT_TXT },
      { ".C",               RASFMT_CCODE },
      { ".dpx",             RASFMT_DPX },

      
      

      
      { 0, RASFMT_AUTO }
    }

Definition at line 193 of file Raster.C.

Referenced by defaultExtensionFor().


Generated on Mon Nov 23 15:49:03 2009 for iLab Neuromorphic Vision Toolkit by  doxygen 1.4.4