| STIRA
    0.1
    | 
A class to hold spectral bands of an image. More...
#include <ImageIO.h>
| Public Types | |
| enum | outputType { NULL_OUT, GRADIENT_OUT, NORMAL_OUT, LOG_OUT, ABSOLUTE_NORM_OUT, ABSOLUTE_POS_OUT, ABSOLUTE_NEG_OUT } | 
| type to identify how the image intensities need to be rescaled for export  More... | |
| Public Member Functions | |
| ImageIO () | |
| Constructor. | |
| ~ImageIO () | |
| Destructor. | |
| Static Public Member Functions | |
| static Image * | Read (std::string fname) | 
| reads a file using the correct input help method  More... | |
| static ArrayGrid< int > * | ReadPGMasInt (std::string fname) | 
| reads an image as a grid of integers  More... | |
| static bool | Write (Image *pImage, std::string fname, outputType outtype=NULL_OUT) | 
| determines whether image object has 1 or three bands and then writes image with appropriate method to file  More... | |
| static void | WritePGM (ArrayGrid< std::complex< double > > *pGrid, std::string fileName, outputType outtype=NULL_OUT) | 
| writes an ArrayGrid of complex doubles from memory to disk . It writes two files: one containing all the real values, one containing all the imaginary values  More... | |
| static bool | WritePGM (ArrayGrid< double > *pGrid, std::string fileName, outputType outtype=NULL_OUT) | 
| writes an ArrayGrid of doubles from memory to disk .  More... | |
| static bool | WritePGM (ArrayGrid< int > *pGrid, std::string fileName, outputType outtype=NULL_OUT) | 
| writes an ArrayGrid of integers from memory to disk .  More... | |
| static bool | WritePGM (ArrayGrid< bool > *pGrid, std::string fileName) | 
| writes an ArrayGrid of booleans from memory to disk .  More... | |
| static bool | WriteTXT (ArrayGrid< double > *pGrid, std::string fileName) | 
| writes an ArrayGrid of doubles from memory to disk in a simple text file.  More... | |
| static double | GetOpenCvGrayValue (IplImage *pIplImage, int x, int y) | 
| gets an intensity of an OpenCV image assuming it is a gray value  More... | |
| static void | SetOpenCvGrayValue (IplImage *pIplImage, int x, int y, double value) | 
| sets the intensity at position (x,y) in an OpenCV image assuming it is a gray value  More... | |
| static double | GetOpenCvColorValue (IplImage *pIplImage, int x, int y, int bandNr) | 
| gets an intensity at position (x,y) in an OpenCV image in the specified color band  More... | |
| static void | SetOpenCvColorValue (IplImage *pIplImage, int x, int y, int bandNr, double value) | 
| sets an intensity at position (x,y) in an OpenCV image in the specified color band  More... | |
| static ArrayGrid< double > * | ConvertOpenCvToDoubleArrayGrid (IplImage *pIplImage) | 
| static ArrayGrid< double > * | ConvertOpenCvToDoubleArrayGrid (IplImage *pIplImage, ArrayGrid< double > *pGrid) | 
| static ArrayGrid< bool > * | ConvertOpenCvToBooleanArrayGrid (IplImage *pIplImage, double threshold=0) | 
| static IplImage * | ConvertArrayGridToOpenCv (ArrayGrid< double > *pGridIn, IplImage *pImgOut) | 
| static Image * | ConvertOpenCvToImage (IplImage *pIplImage) | 
| converts an OpenCV image structure to our library image class  More... | |
| static IplImage * | ConvertImageToOpenCv (Image *pImage) | 
| converts object of our own image class into an OpenCV image structure  More... | |
| static Image * | ReadImageOpenCV (std::string fname, bool useROI=false, common::RectangularROI< int > myImageROI=common::RectangularROI< int >(0, 0, 0, 0)) | 
| reads an image from a disk file using OpenCVuseBGR  More... | |
| static ArrayGrid< double > * | ReadArrayOpenCVAsDouble (std::string fname, ArrayGrid< double > *pGrid=0, bool useROI=false, common::RectangularROI< int > myImageROI=common::RectangularROI< int >(0, 0, 0, 0)) | 
| reads a single band of an image from a disk file using OpenCV  More... | |
| static ArrayGrid< int > * | ReadArrayOpenCVAsInt (std::string fname, bool useROI=false, common::RectangularROI< int > myImageROI=common::RectangularROI< int >(0, 0, 0, 0)) | 
| reads a single band of an image from a disk file using OpenCV  More... | |
| static bool | WriteOpenCV (Image *pImage, std::string fname, outputType outtype=NORMAL_OUT) | 
| writes an image object to a disk file  More... | |
| static bool | WriteOpenCV (ArrayGrid< double > *pGrid, std::string fname, outputType outtype=NORMAL_OUT) | 
| writes a single grid object of double precision float values to a disk file  More... | |
| static bool | WriteOpenCV (ArrayGrid< int > *pGrid, std::string fname, outputType outtype=NORMAL_OUT) | 
| writes a single grid object of integer values to a disk file  More... | |
| static bool | WriteOpenCV (ArrayGrid< bool > *pGrid, std::string fname) | 
| writes a single grid object of booleans to a disk file  More... | |
| static void | GetInputMinMax (ArrayGrid< double > *pGrid, double &mmin, double &mmax, outputType myType=NULL_OUT) | 
| gets minimum and maximum value of values in pGrid, or of function of values in pGrid (abs(intensity), log(intensity), ...)  More... | |
| static bool | RescaleGrid (ArrayGrid< double > *pGrid, outputType outtype=NULL_OUT) | 
| Rescales the values in a real-valued grid according to type outtypeMore... | |
A class to hold spectral bands of an image.
type to identify how the image intensities need to be rescaled for export
| 
 | static | 
converts object of our own image class into an OpenCV image structure
| pImage | object of our own image class | 
References stira::imagedata::Image::GetBands(), stira::imagedata::Image::GetHeight(), stira::imagedata::Image::GetNumberOfBands(), and stira::imagedata::Image::GetWidth().
| 
 | static | 
converts an OpenCV image structure to our library image class
| pIplImage | input OpenCV image structure | 
References stira::imagedata::Image::GetBands().
| 
 | static | 
gets minimum and maximum value of values in pGrid, or of function of values in pGrid (abs(intensity), log(intensity), ...)
| pGrid | input grid | 
| mmin | output value with minimum | 
| mmax | output value with maximum | 
| myType | type of function to apply to grid values before comparing them | 
References stira::imagedata::ArrayGrid< T >::GetHeight(), stira::imagedata::ArrayGrid< T >::GetValue(), and stira::imagedata::ArrayGrid< T >::GetWidth().
| 
 | static | 
gets an intensity at position (x,y) in an OpenCV image in the specified color band
| pIplImage | OpenCV image to read from | 
| x | x coordinate to read from | 
| y | y coordinate to read from | 
| bandNr | number of the color band to read the value from | 
| 
 | static | 
gets an intensity of an OpenCV image assuming it is a gray value
| pIplImage | OpenCV image to read from | 
| x | x coordinate to read from | 
| y | y coordinate to read from | 
| 
 | static | 
reads a file using the correct input help method
| fname | name of the file to read from | 
| 
 | static | 
reads a single band of an image from a disk file using OpenCV
| fname | the name of the file to read from | 
| pGrid | pointer to output grid; will create a new grid if NULL | 
| useROI | flag whether to read the whole image or an ROI of the image | 
| myImageROI | if useROI is true, only image data within this ROI will read from the image | 
References stira::common::RectangularROI< T >::GetBottomRightCorner(), stira::common::RectangularROI< T >::GetTopLeftCorner(), stira::imagedata::ArrayGrid< T >::SetValue(), stira::common::Point< T >::x, and stira::common::Point< T >::y.
| 
 | static | 
reads a single band of an image from a disk file using OpenCV
| fname | the name of the file to read from | 
| useROI | flag whether to read the whole image or an ROI of the image | 
| myImageROI | if useROI is true, only image data within this ROI will read from the image | 
References stira::common::RectangularROI< T >::GetBottomRightCorner(), stira::common::RectangularROI< T >::GetTopLeftCorner(), stira::imagedata::ArrayGrid< T >::SetValue(), stira::common::Point< T >::x, and stira::common::Point< T >::y.
| 
 | static | 
reads an image from a disk file using OpenCVuseBGR
| fname | the name of the file to read from | 
| useROI | flag whether to read the whole image or an ROI of the image | 
| myImageROI | if useROI is true, only image data within this ROI will read from the image | 
References stira::imagedata::Image::GetBands(), stira::common::RectangularROI< T >::GetBottomRightCorner(), stira::common::RectangularROI< T >::GetTopLeftCorner(), stira::common::Point< T >::x, and stira::common::Point< T >::y.
| 
 | static | 
reads an image as a grid of integers
| fname | name of the file to read from | 
References stira::imagedata::Image::GetBands(), stira::imagedata::Image::SetImageName(), and stira::imagedata::ArrayGrid< T >::SetValue().
| 
 | static | 
Rescales the values in a real-valued grid according to type outtype 
| pGrid | ArrayGrid object of which values needed to be rescaled | 
| outtype | type of rescaling to apply before writing to disk | 
References stira::imagedata::ArrayGrid< T >::GetHeight(), stira::imagedata::ArrayGrid< T >::GetValue(), stira::imagedata::ArrayGrid< T >::GetWidth(), stira::imagedata::ArrayGrid< T >::MultiplyWith(), and stira::imagedata::ArrayGrid< T >::SetValue().
| 
 | static | 
sets an intensity at position (x,y) in an OpenCV image in the specified color band
| pIplImage | OpenCV image to write to | 
| x | x coordinate to write to | 
| y | y coordinate to write to | 
| bandNr | number of the color band to write the value to | 
References stira::imagedata::ArrayGrid< T >::GetHeight(), stira::imagedata::ArrayGrid< T >::GetValue(), stira::imagedata::ArrayGrid< T >::GetWidth(), and stira::imagedata::ArrayGrid< T >::SetValue().
| 
 | static | 
sets the intensity at position (x,y) in an OpenCV image assuming it is a gray value
| pIplImage | OpenCV image to write to | 
| x | x coordinate to write to | 
| y | y coordinate to write to | 
| value | value to set | 
| 
 | static | 
determines whether image object has 1 or three bands and then writes image with appropriate method to file
| pImage | image object to be written to file | 
| fileName | name of the file to write to | 
| outtype | type of rescaling to apply before writing to disk | 
References stira::imagedata::Image::GetNumberOfBands().
Referenced by stira::degradationestimation::CompareSmoothSharpDijk::Run(), and stira::contrastenhance::HazeRemover::Run().
| 
 | static | 
writes an image object to a disk file
| fname | the name of the file to write to | 
| outtype | type of rescaling to apply before writing to disk | 
References stira::imagedata::Image::Clone(), stira::imagedata::Image::GetBands(), stira::imagedata::Image::GetHeight(), stira::imagedata::Image::GetNumberOfBands(), and stira::imagedata::Image::GetWidth().
Referenced by stira::filter::LocalBinaryPattern::ComputeJensenShannonDivergenceBetweenImagePatches(), and stira::filter::LocalBinaryPattern::ComputePointLBPSymHistogram().
| 
 | static | 
writes a single grid object of double precision float values to a disk file
| fname | the name of the file to write to | 
| outtype | type of rescaling to apply before writing to disk | 
References stira::imagedata::ArrayGrid< T >::Clone(), stira::imagedata::ArrayGrid< T >::GetHeight(), stira::imagedata::ArrayGrid< T >::GetValue(), and stira::imagedata::ArrayGrid< T >::GetWidth().
| 
 | static | 
writes a single grid object of integer values to a disk file
| fname | the name of the file to write to | 
| outtype | type of rescaling to apply before writing to disk | 
References stira::imagedata::ArrayGrid< T >::GetHeight(), stira::imagedata::ArrayGrid< T >::GetValue(), and stira::imagedata::ArrayGrid< T >::GetWidth().
| 
 | static | 
writes a single grid object of booleans to a disk file
| fname | the name of the file to write to | 
References stira::imagedata::ArrayGrid< T >::GetHeight(), stira::imagedata::ArrayGrid< T >::GetValue(), and stira::imagedata::ArrayGrid< T >::GetWidth().
| 
 | static | 
writes an ArrayGrid of complex doubles from memory to disk . It writes two files: one containing all the real values, one containing all the imaginary values
| pGrid | ArrayGrid object to be written to file | 
| fileName | name of the file to write to | 
| outtype | type of rescaling to apply before writing to disk | 
References stira::imagedata::ArrayGrid< T >::SetValue().
Referenced by stira::filter::GaussConvolve::DerivativeConvolveFFT(), stira::imagetools::GridGenerator::GenerateIsingTexture(), stira::steerable::PyramidReal::Reconstruct(), stira::filter::DifferenceOfGaussians::Run(), stira::steerable::ComputeSteerableFilteredImages::Run(), stira::imageanalysis::CannyEdgeDetector::Run(), stira::deconvolve::GNCDeconvolve::Run(), stira::degradationestimation::BlurEstimatorHu::Run(), stira::filter::LocalBinaryPattern::RunHistogram(), stira::contrastenhance::AdaptiveEnhanceLuong::SetWindowSize(), stira::steerable::PyramidMaster< T >::ViewTransferFunction(), stira::steerable::PyramidComplex::VisualizeComplexBandpass(), stira::steerable::PyramidReal::VisualizeReconstructedBandpass(), stira::steerable::PyramidComplex::VisualizeReconstructedBandpass(), stira::imageanalysis::CannyEdgeDetector::~CannyEdgeDetector(), and stira::pyramidapplications::PyramidKeyPointDetector::~PyramidKeyPointDetector().
| 
 | static | 
writes an ArrayGrid of doubles from memory to disk .
| pGrid | ArrayGrid object to be written to file | 
| fileName | name of the file to write to | 
| outtype | type of rescaling to apply before writing to disk | 
References stira::imagedata::ArrayGrid< T >::Clone(), stira::imagedata::ArrayGrid< T >::GetHeight(), stira::imagedata::ArrayGrid< T >::GetValue(), and stira::imagedata::ArrayGrid< T >::GetWidth().
| 
 | static | 
writes an ArrayGrid of integers from memory to disk .
| pGrid | ArrayGrid object to be written to file | 
| fileName | name of the file to write to | 
| outtype | type of rescaling to apply before writing to disk | 
References stira::imagedata::ArrayGrid< T >::GetHeight(), stira::imagedata::ArrayGrid< T >::GetValue(), stira::imagedata::ArrayGrid< T >::GetWidth(), and stira::imagedata::ArrayGrid< T >::SetValue().
| 
 | static | 
writes an ArrayGrid of booleans from memory to disk .
| pGrid | ArrayGrid object to be written to file | 
| fileName | name of the file to write to disk | 
References stira::imagedata::ArrayGrid< T >::GetHeight(), stira::imagedata::ArrayGrid< T >::GetValue(), and stira::imagedata::ArrayGrid< T >::GetWidth().
| 
 | static | 
writes an ArrayGrid of doubles from memory to disk in a simple text file.
| pGrid | ArrayGrid object to be written to file | 
| fileName | name of the file to write to | 
References stira::imagedata::Image::Clone(), stira::imagedata::Image::GetBands(), stira::imagedata::Image::GetHeight(), stira::imagedata::ArrayGrid< T >::GetHeight(), stira::imagedata::Image::GetNumberOfBands(), stira::imagedata::ArrayGrid< T >::GetValue(), stira::imagedata::Image::GetWidth(), and stira::imagedata::ArrayGrid< T >::GetWidth().
 1.8.11
 1.8.11