Basic Image AlgorithmS Library
2.8.0
|
Routines for loading and writing all kinds of image formats. More...
#include <Base/Image/ImageIO.hh>
Public Types | |
enum | TFileFormat { FF_auto =4242, FF_unknown =9999, FF_mip =0, FF_ppm =1, FF_pgm =2, FF_jpg =3, FF_tif =4, FF_png =5, FF_viff =6, FF_exr =7, FF_dds =8, FF_raw4096 =9, FF_bmp =10, FF_pbm =12, FF_Real32 =13, FF_matrix =14 } |
format specifier when writing an image to a file Do NOT change order or associated enum value because it may confuse IO rotines for loading old images. More... | |
Static Public Member Functions | |
static int | ExportDevIL (const std::string &FileName, const ImageBase &img, const bool &fileOverwrite=true, const bool &allowPadding=true) |
Save to disk using the DevIL/OpenIL library. More... | |
static int | ExportLibJPEG (const std::string &filename, const BIAS::ImageBase &image, const int quality=100) |
Writes an image to disk using the LibJPEG library encapsulated in ExportImage. More... | |
static int | ExportMagickPP (const std::string &FileName, const ImageBase img, const int &quality=BIAS_DEFAULT_IMAGE_QUALITY, const bool &writeMetaData=false, const bool &forceBinaryPNMformat=true, const bool &losslesJpgMode=false, const bool &writeGZipped=false, const std::string &comment=std::string("")) |
Reads an image from disk using the ImageMagick++ library. More... | |
static int | ExportMatrix (const std::string &FileName, const ImageBase &img, const bool verbose) |
Export BIAS images to text images. More... | |
static int | ExportOpenCV (const std::string &filename, const ImageBase &image) |
Write an image to disk using the OpenCV library. More... | |
static int | ExportOpenEXR (const std::string &FileName, const ImageBase &input) |
save an .exr OpenEXR image to disk. More... | |
static int | ExportTIFFLIB (const std::string &FileName, const BIAS::ImageBase &img, const unsigned int rowsPerStripArg=0, const unsigned int compressionAlgo=BIAS_COMPRESSION_NONE, const std::string &comment=std::string("BIAS::ImageIO Jan Woetzel")) |
Write image to disk using TiffLib directly. More... | |
static std::string | ExtensionName (const std::string &oldName, const std::string &newExtension) |
appends extension to name if extension is not already extension, avoids double extension like ".pgm.pgm" More... | |
static std::string | GetExtension (const BIAS::ImageIO::TFileFormat &fmt) |
return the default extension for a given FileFormat enum More... | |
static BIAS::ImageIO::TFileFormat | GetFileFormat (const std::string &str) |
determines the BIAS::ImageIO::TFileFormat for a given filename/ extension Decision based on extension comparison More... | |
static int | ImportDevIL (const std::string &FileName, ImageBase &result, const unsigned int &tex3DplaneZ=1) |
Reads an image from disk using the DevIL/OpenIL library. More... | |
static int | ImportImage (const std::string &filename, ImageBase &result) |
Try to load/import an image from a file using external libs. More... | |
static int | ImportLibJPEG (const std::string &filename, BIAS::ImageBase &result, bool readComment=true) |
Reads an image from disk using the LibJPEG library encapsulated in ImportImage. More... | |
static int | ImportMagickPP (const std::string &FileName, ImageBase &result, const bool &dummy=false, const bool &readMetaData=true) |
Reads an image from disk using the ImageMagick++ library. More... | |
static int | ImportMagickPPAutoconvert (const std::string &FileName, ImageBase &result, const bool &assumeGrey=false, const bool &readMetaData=false) |
Reads an image from disk using the ImageMagick++ library. More... | |
static int | ImportMatrix (const std::string &FileName, ImageBase &img, const bool verbose) |
Import text images to BIAS. More... | |
static int | ImportOpenCV (const std::string &filename, ImageBase &image) |
Reads an image from disk using the OpenCV library. More... | |
static int | ImportOpenEXR (const std::string &FileName, ImageBase &result) |
load an .exr OpenEXR image from disk. More... | |
static int | ImportRADIANCE (const std::string &FileName, ImageBase &result) |
import Greg Wards Radiance RGBE image format (.hdr, .rad) A high dynamic range RGBE image contains 24 bits RGB Mantissa and 8 common exponent bits that encode the dynamic range. More... | |
static int | ImportRAWwithHeader (const std::string &filename, BIAS::ImageBase &img) |
Reads a proprietary .RAW format from disk A typical file consists of these blocks: More... | |
static int | ImportReal32 (const std::string &FileName, ImageBase &result) |
Loads proprietary raw floating point 2d image from Mathematica Real32 values Example how to export in Mathematica: More... | |
static int | ImportTIFFLIB (const std::string &FileName, ImageBase &img) |
read a tiff image from disk using TiffLib directly More... | |
static void | InitDevIL () |
initialize devIL once globally. More... | |
static int | Load (const std::string &FileName, ImageBase &img) |
first tries a call to Read MIP image and if that fails, tries to Import Image with all other available format loaders and third party libraries. More... | |
static int | ParseRAWwithHeader (const std::string &buf, const std::string &tag, unsigned int &retVal) |
helper function for ImportRAWwithHeader Parses buf for tag More... | |
static void | PrintInfoDevIL (std::ostream &os=std::cout) |
print info in currently bound DevIL image More... | |
static int | Save (const std::string &filename, const ImageBase &img, const enum TFileFormat FileFormat=FF_auto, const bool sync=BIAS_DEFAULT_SYNC, const int c_jpeg_quality=BIAS_DEFAULT_IMAGE_QUALITY, const bool forceNewID=BIAS_DEFAULT_FORCENEWID, const bool &writeMetaData=true) |
Export image as file using extrnal libs. More... | |
static int | WriteRAW_IMA (const std::string &FileName, const ImageBase &img_const) |
Write image in binary file format needed by RealEyes. More... | |
static int | WriteUnbuffered (const std::string &FileName, const ImageBase &img) |
Write a mip binary image to disk circumventing OS caches as good as possible. More... | |
Static Protected Member Functions | |
static int | ExportImagePnm_ (const std::string &FileName, const ImageBase &img, bool sync=false, const bool &writeMetaData=true) |
static int | ImportImagePnm_ (std::ifstream &ifs, ImageBase &result, int depth) |
static int | ImportImageViff_ (std::ifstream &ifs, ImageBase &result) |
import a one channel grey float viff image (Khoros image format) for compatibility to old stereo code More... | |
static int | Read_ (const std::string &FileName, ImageBase &img) |
Read a proprietary mip binary Image from disk and allocate memory structure. More... | |
static int | Write_ (const std::string &FileName, const ImageBase &img, const bool sync=false, const bool forceNewID=true) |
Write a proprietary mip binary Image to disk. More... | |
Static Protected Attributes | |
static char * | MemAlignedBuffer_ = NULL |
static unsigned long int | MemAlignedBufferSize_ = 0 |
Routines for loading and writing all kinds of image formats.
Definition at line 69 of file ImageIO.hh.
format specifier when writing an image to a file Do NOT change order or associated enum value because it may confuse IO rotines for loading old images.
Enumerator | |
---|---|
FF_auto | |
FF_unknown | |
FF_mip | |
FF_ppm | |
FF_pgm | |
FF_jpg | |
FF_tif | |
FF_png | |
FF_viff | |
FF_exr | |
FF_dds | |
FF_raw4096 | |
FF_bmp | |
FF_pbm | |
FF_Real32 | |
FF_matrix |
Definition at line 76 of file ImageIO.hh.
|
static |
Save to disk using the DevIL/OpenIL library.
See http://openil.sourceforge.net for details. Supports writing multiple formats, including
FileName | the output filename to read from. |
img | image to be saved |
fileOverwrite | true to overwrite file if exists |
Definition at line 2288 of file ImageIO.cpp.
References BIAS::ImageBase::CM_BGR, BIAS::ImageBase::CM_BGRA, BIAS::ImageBase::CM_Grey, BIAS::ImageBase::CM_GreyA, BIAS::ImageBase::CM_RGB, BIAS::ImageBase::CM_RGBA, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetColorModel(), BIAS::ImageBase::GetDepth(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetImageData(), BIAS::ImageBase::GetPixelCount(), BIAS::ImageBase::GetStorageType(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::PadToPowerOfTwo(), BIAS::ImageBase::ST_char, BIAS::ImageBase::ST_double, BIAS::ImageBase::ST_float, BIAS::ImageBase::ST_int, BIAS::ImageBase::ST_shortint, BIAS::ImageBase::ST_unsignedchar, BIAS::ImageBase::ST_unsignedint, and BIAS::ImageBase::ST_unsignedshortint.
|
staticprotected |
Definition at line 991 of file ImageIO.cpp.
References BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetDepth(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetImageData(), BIAS::ImageBase::GetMetaData(), BIAS::ImageBase::GetSizeByte(), BIAS::ImageBase::GetWidth(), and BIAS::MetaData::WriteAscii().
|
static |
Writes an image to disk using the LibJPEG library encapsulated in ExportImage.
filename | the filename to write image to |
image | is the image to save |
quality | determines the compression factor used for JPEG (100: no compression, highest quality) |
Definition at line 956 of file ImageIO.cpp.
References BIAS::JpegHandler::Compress(), BIAS::ImageConvert::ConvertST(), BIAS::JpegHandler::Init(), BIAS::JpegHandler::Release(), BIAS::JpegHandler::SetVerbose(), BIAS::ImageBase::ST_unsignedchar, and BIAS::JpegHandler::WriteJPEG().
|
static |
Reads an image from disk using the ImageMagick++ library.
Implement 16bit short write with Magick++ using BLOB.
Implement quality directive for jpg saving with Magick++.
FileName | the input filename to read from. |
img | contains the image to be written to disk. |
quality | for saving, e.g.1-100 for jpeg, tested for jpeg. Is overridden by losslessMode parameter |
writeMetaData | try to write ASCII MetaData as comment to file. |
forceBinaryPNMformat | true to write BINARY pnm/pbm/pgmp/ppm instead of human readable ASCII. |
losslesMode | true to write in jpeg loslles mode. overrides quality setting |
writeGZipped | true for additional gzip compression (e.g. .pgm.gz) which may be useful for human readable ASCII pgm output but save disk space. |
Output file type is determined automatically by file extension.
See http://www.imagemagick.org/script/formats.php or
for supported formats.
quality and compession are two different parameters in jpeg but the user usually wants lossles and no compression on lossless flag, so force 100% quality, here:
Comment header is limited to 4096 Bytes for some formats and ASCII BIAS::MetaData representation may be too long to do so!
Definition at line 1652 of file ImageIO.cpp.
References BIAS::ImageConvert::BIAS2ImageMagick(), BIAS::ImageBase::CM_RGB, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetMetaData(), BIAS::ImageBase::GetStorageType(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::Init(), BIAS::FileHandling::LowerCase(), BIAS::ImageBase::Release(), BIAS::ImageBase::SetColorModel(), BIAS::ImageBase::ST_unsignedchar, BIAS::FileHandling::Suffix(), BIAS::ImageConvert::ToRGB(), and BIAS::MetaData::WriteAscii().
|
static |
Export BIAS images to text images.
Definition at line 1268 of file ImageIO.cpp.
References BIAS::FileHandling::Extension(), BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetImageDataArray(), BIAS::ImageBase::GetStorageType(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::IsInterleaved(), BIAS::ImageBase::ST_float, and BIAS::ImageBase::ST_unsignedchar.
|
static |
Write an image to disk using the OpenCV library.
[in] | filename | Specifies the name of the file to write to. |
[in] | image | Contains the image to write. |
Definition at line 286 of file ImageIO.cpp.
References BIAS::WrapBias2Ipl::CreateIplImageShared().
|
static |
save an .exr OpenEXR image to disk.
Definition at line 355 of file ImageIO.cpp.
References BIAS::OpenEXRInterface::Export().
|
static |
Write image to disk using TiffLib directly.
rowsPerStripArg | nr of rows if strip based writing is used in contrast to scanlin or tile based TIFF format. for value 0 the imageheight is used => one big strip. |
compressionAlgo | compression algorithm to use. better compression = slower. E.g. BIAS_COMPRESSION_LZW or BIAS_COMPRESSION_NONE |
Definition at line 2967 of file ImageIO.cpp.
References BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetDepth(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetImageDataArray(), BIAS::ImageBase::GetWidth(), and BIAS::ImageBase::IsInterleaved().
|
static |
appends extension to name if extension is not already extension, avoids double extension like ".pgm.pgm"
oldName | filename (maybe selected by user) |
newExtension | desired extension |
Definition at line 1072 of file ImageIO.cpp.
References BIAS::FileHandling::DirectoryAndBasename(), BIAS::FileHandling::Extension(), and BIAS::FileHandling::LowerCase().
Referenced by Save(), Write_(), and WriteRAW_IMA().
|
static |
return the default extension for a given FileFormat enum
Definition at line 2499 of file ImageIO.cpp.
|
static |
determines the BIAS::ImageIO::TFileFormat for a given filename/ extension Decision based on extension comparison
Definition at line 2543 of file ImageIO.cpp.
References BIAS::FileHandling::Extension(), and BIAS::FileHandling::LowerCase().
|
static |
Reads an image from disk using the DevIL/OpenIL library.
See http://openil.sourceforge.net for details. Supports reading multiple formats, including
FileName | the input filename to read from. |
tex3DplaneZ | ignored for tex2D. Useful to extarct 2D texture from volumetric 2D texture. |
result | contains the read image if success. |
Definition at line 2122 of file ImageIO.cpp.
References BIAS::ImageBase::CM_BGR, BIAS::ImageBase::CM_BGRA, BIAS::ImageBase::CM_Grey, BIAS::ImageBase::CM_GreyA, BIAS::ImageBase::CM_invalid, BIAS::ImageBase::CM_RGB, BIAS::ImageBase::CM_RGBA, BIAS::ImageBase::GetBitDepth(), BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetDepth(), BIAS::ImageBase::GetImageData(), BIAS::ImageBase::GetPixelCount(), BIAS::ImageBase::Init(), BIAS::ImageBase::IsEmpty(), BIAS::ImageBase::Release(), BIAS::ImageBase::SetColorModel(), BIAS::ImageBase::ST_char, BIAS::ImageBase::ST_double, BIAS::ImageBase::ST_float, BIAS::ImageBase::ST_int, BIAS::ImageBase::ST_invalid, BIAS::ImageBase::ST_shortint, BIAS::ImageBase::ST_unsignedchar, BIAS::ImageBase::ST_unsignedint, BIAS::ImageBase::ST_unsignedshortint, and BIAS::ImageBase::UpdateImageDataArrayFromImageData_().
|
static |
Try to load/import an image from a file using external libs.
Formats supported are listed in TFileFormat. More over a few other formats may be includeable like GIF. The imported image is always of the type RGB.
filename | name of the file to be loaded |
Definition at line 378 of file ImageIO.cpp.
References BIAS::ImageBase::CM_Grey, BIAS::ImageBase::CM_RGB, BIAS::MetaData::Find(), BIAS::ImageBase::GetMetaData(), BIAS::ImageBase::InvalidateUID(), BIAS::AppData::MD_USE_ASCII, BIAS::AppData::MD_UUID, BIAS::AppData::sdata, BIAS::ImageBase::SetColorModel(), BIAS::ImageBase::SetUID(), and BIAS::AppData::tag.
Referenced by Load().
|
staticprotected |
Definition at line 575 of file ImageIO.cpp.
References BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetImageData(), BIAS::ImageBase::GetMetaData(), BIAS::ImageBase::GetPixelCount(), BIAS::ImageBase::GetStorageType(), BIAS::ImageBase::Init(), BIAS::ImageBase::IsEmpty(), BIAS::ImageBase::Release(), BIAS::ImageBase::SetBitDepth(), BIAS::ImageBase::ST_invalid, BIAS::ImageBase::ST_unsignedchar, and BIAS::ImageBase::ST_unsignedshortint.
|
staticprotected |
import a one channel grey float viff image (Khoros image format) for compatibility to old stereo code
Definition at line 1386 of file ImageIO.cpp.
References BIAS::ImageBase::CM_Grey, xvimage::col_size, BIAS::ImageBase::GetImageData(), BIAS::ImageBase::GetSizeByte(), BIAS::ImageBase::Init(), BIAS::ImageBase::IsEmpty(), BIAS::ImageBase::Release(), xvimage::row_size, BIAS::ImageBase::SetColorModel(), and BIAS::ImageBase::ST_float.
|
static |
Reads an image from disk using the LibJPEG library encapsulated in ImportImage.
filename | the input filename to read from. |
result | is the returned read image |
readComment | specifies if comment metadata should be read |
Definition at line 540 of file ImageIO.cpp.
References BIAS::JpegHandler::Decompress(), BIAS::JpegHandler::Init(), BIAS::ImageBase::IsEmpty(), BIAS::JpegHandler::ReadJPEG(), BIAS::JpegHandler::Release(), BIAS::ImageBase::Release(), and BIAS::JpegHandler::SetVerbose().
|
static |
Reads an image from disk using the ImageMagick++ library.
is called automatically by ImportImage.
dummy | ignored, for consistency with ImportMagickPPAutoconvert |
readMetaData | true to try to read metadat (from comment field) |
Definition at line 193 of file ImageIO.cpp.
References BIAS::MetaData::Add(), BIAS::ImageBase::GetMetaData(), and BIAS::ImageConvert::ImageMagick2BIAS().
|
static |
Reads an image from disk using the ImageMagick++ library.
: This routine is working inefficiently, because it doesn't know what to do about conversion if read and requested types don't match (10/2004) However it works and assumes RGB in case of doubt.
result image must be initialized. Thread image is automatically converted to match the result image.
FileName | the input filename to read from. |
img | contains the read image if success. |
assumeGrey | not implemented for now, just for interface compatibility with Bias Import functions |
readMetaData | try to read ASCII metadata from file comment. |
See http://www.imagemagick.org/script/formats.php for supported formats.
keep the output storagetype
Definition at line 1450 of file ImageIO.cpp.
References BIAS::ImageBase::CM_BGR, BIAS::ImageBase::CM_Grey, BIAS::ImageBase::CM_GreyA, BIAS::ImageBase::CM_invalid, BIAS::ImageBase::CM_RGB, BIAS::ImageBase::CM_RGBA, BIAS::ImageBase::GetColorModel(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetImageData(), BIAS::ImageBase::GetStorageType(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::Init(), BIAS::ImageBase::IsEmpty(), BIAS::ImageBase::Release(), BIAS::ImageBase::SetColorModel(), BIAS::ImageBase::ST_char, BIAS::ImageBase::ST_double, BIAS::ImageBase::ST_float, BIAS::ImageBase::ST_int, BIAS::ImageBase::ST_invalid, BIAS::ImageBase::ST_shortint, BIAS::ImageBase::ST_unsignedchar, BIAS::ImageBase::ST_unsignedint, and BIAS::ImageBase::ST_unsignedshortint.
|
static |
Import text images to BIAS.
The format is: cols rows channels interleaved row1 (all channels) row2 ..... .....
Definition at line 1232 of file ImageIO.cpp.
References BIAS::FileHandling::Extension(), BIAS::ImageBase::GetImageDataArray(), BIAS::ImageBase::Init(), and BIAS::ImageBase::ST_float.
|
static |
Reads an image from disk using the OpenCV library.
[in] | filename | Specifies the name of the file to read from. |
[out] | image | Returns the image read from file if successful. |
Definition at line 256 of file ImageIO.cpp.
References BIAS::WrapBias2Ipl::CreateBiasImageCopy().
|
static |
load an .exr OpenEXR image from disk.
Definition at line 365 of file ImageIO.cpp.
References BIAS::OpenEXRInterface::Import().
|
static |
import Greg Wards Radiance RGBE image format (.hdr, .rad) A high dynamic range RGBE image contains 24 bits RGB Mantissa and 8 common exponent bits that encode the dynamic range.
See http://radsite.lbl.gov/radiance/ Own implementation just for copyright reasons.
Definition at line 2624 of file ImageIO.cpp.
References BIAS::ImageBase::GetImageDataArray(), BIAS::ImageBase::Init(), BIAS::ImageBase::IsEmpty(), BIAS::ImageBase::Release(), and BIAS::ImageBase::ST_unsignedchar.
|
static |
Reads a proprietary .RAW format from disk A typical file consists of these blocks:
E.g. RAW4096 is 4096 Byte text header followed by arbitrary size RAW datat specicified in the header. Used for most efficient write to disk on WIN32 using system calls without buffering and cache with DMA. E.g:
TODO: encode header information in Write routine compatible to digital cameras .raw format which is very similar.
FYI: IrFanView can read and display this format natively (on WIN32).
Inspired by http://www.dalibor.cz/minolta/raw_file_format.htm and the need to write exactly on aligned memory and disk block sizes for performance reasons, in particular on WIN32.
Works only with 8 bpp one plane Bayer pattern raw images (from scorpion camera) actually.
Definition at line 1791 of file ImageIO.cpp.
References BIAS::ImageBase::CM_Bayer_RGGB, BIAS::ImageBase::CopyIn_NoInit(), BIAS::ImageBase::Init(), BIAS::ImageBase::IsEmpty(), BIAS::ImageBase::Release(), and BIAS::ImageBase::SetColorModel().
|
static |
Loads proprietary raw floating point 2d image from Mathematica Real32 values Example how to export in Mathematica:
(* helper functions *) Header[img_] := ({1, Dimensions[img][[1]], Dimensions[img][[2]], 1}) ExportReal32[filename_, img_] := Export[filename <> ".real32", Append[Header[img], img], "Real32"] (* sample data *) img = { {1.1, 2.2}, {3.3, 4.4}, {5.5, 6.6} }; (* final usage writing to disk in appropriate format: *) ExportReal32["out_img", img]
Definition at line 2788 of file ImageIO.cpp.
References BIAS::ImageBase::GetImageData(), BIAS::ImageBase::Init(), BIAS::ImageBase::IsEmpty(), BIAS::ImageBase::Release(), and BIAS::ImageBase::ST_float.
|
static |
read a tiff image from disk using TiffLib directly
Definition at line 3092 of file ImageIO.cpp.
|
static |
initialize devIL once globally.
Usually called by IL load and save functions automatically. To speed up first load/save you can "pre-call" it on startup.
Definition at line 2043 of file ImageIO.cpp.
|
static |
first tries a call to Read MIP image and if that fails, tries to Import Image with all other available format loaders and third party libraries.
Note: Win32 paths such as "C:/data/image.jpg" will work, backslashes not because they escape chars.
Definition at line 141 of file ImageIO.cpp.
References BIAS::FileHandling::FilenameExpansion(), BIAS::FileHandling::GetCwd(), and ImportImage().
Referenced by BIAS::VideoSink_FFmpeg::AddFrame(), BIAS::ImgObjGL::CreateGLCubemap(), BIAS::VideoSource_Disk_Bayer::GrabSingle(), BIAS::VideoSource_DiskZessPMD::GrabSingle(), BIAS::VideoSource_Disk::GrabSingle(), BIAS::IOUtils::LoadCamera(), BIAS::IOUtils::LoadImageList(), BIAS::CylindricDepthTrackingPanorama::LoadPanorama(), BIAS::VideoSource_Disk_Bayer::OpenDevice(), BIAS::VideoSource_DiskZessPMD::OpenDevice(), BIAS::VideoSource_Disk::OpenDevice(), BIAS::SceneTexturedPlane::SetImage(), BIAS::ShowCamWxFrame::ShowCamWxFrame(), BIAS::glfCubeMap::UploadImageFromFile(), and BIAS::glfTexture2D::UploadImageFromFile().
|
static |
helper function for ImportRAWwithHeader Parses buf for tag
Definition at line 1922 of file ImageIO.cpp.
|
static |
print info in currently bound DevIL image
Definition at line 2085 of file ImageIO.cpp.
|
staticprotected |
Read a proprietary mip binary Image from disk and allocate memory structure.
Please note the more general purpose Load/Save interface you may want to use instead.
FileName | complete name of file to be loaded |
img | object to receive the image data fro the file |
id | The image is assigned id if there is no id in the file |
Definition at line 1341 of file ImageIO.cpp.
References BIAS::ImageBase::GetMetaData().
|
static |
Export image as file using extrnal libs.
filename | name of the file to be loaded |
img | Image to be saved, not const because of setUUID side effect. |
FileFormat | What file format shall be used for saving |
jpeg_quality | Quality of a jpeg image to be saved, unused in all other formats |
sync | does only worlk with pgm/ppm (woelk) |
writeMetaData | true to (try to) write meta data to disk and false to drop it. |
Definition at line 725 of file ImageIO.cpp.
References BIAS::MetaData::Add(), ExtensionName(), BIAS::FileHandling::FilenameExpansion(), BIAS::UUID::GenerateUUID(), BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetDepth(), BIAS::ImageBase::GetMetaData(), BIAS::ImageBase::GetStorageType(), BIAS::UUID::GetString(), BIAS::ImageBase::GetUID(), BIAS::ImageConvert::IP_ToGrey(), BIAS::UUID::IsValid(), BIAS::ImageBase::SetUID(), and BIAS::ImageBase::ST_invalid.
Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::_CalcCornerness(), BIAS::LinearRegionDetector< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorKLT< StorageType, CalculationType >::_ComputeCornerness(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::_WriteDebugImage(), BIAS::ThreeDOutOpenSceneGraph::AddOSGImage_(), BIAS::ImageAlignment::Align(), BIAS::MixtureOfGaussians< StorageType >::Apply(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::clfUnifiedMultilateralFilter::Compute(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::Detect(), BIAS::RectificationViaProjectionMappingBase< InputStorageType, OutputStorageType >::Disp2Depth(), BIAS::glfTexture2D::DumpUC_RGBA(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3ValidGreyFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5ValidGreyFloat(), BIAS::Convolution< InputStorageType, OutputStorageType >::FilterFloat(), BIAS::Convolution< InputStorageType, OutputStorageType >::FilterInt(), BIAS::CylindricDepthTrackingPanorama::GetTriangleMesh(), BIAS::SphericalDepthPanorama::GetTriangleMesh(), BIAS::CylindricDepthPanorama::GetTriangleMesh(), BIAS::ImageLegendFrame::OnSave(), BIAS::ExampleMixtureOfGaussiansFrame::OnTimer(), BIAS::Tracker< StorageType, CalculationType >::PreparePyramide(), BIAS::CylindricDepthPanorama::ProcessCylindricProjection(), BIAS::IOUtils::SaveCamera(), BIAS::FilterDialogBase< InputST, OutputST >::SaveFilteredImage(), BIAS::ShowCamWxFrame::SaveImageUnthreaded_(), BIAS::CylindricDepthTrackingPanorama::SavePanorama(), BIAS::OpenGLCanvasBase::ScreenShot(), BIAS::ScreenShotListener::StoreNextScreenShot_(), BIAS::Tracker< StorageType, CalculationType >::Track(), BIAS::TrackerBaseAffine< StorageType >::TrackAffine_(), BIAS::TrackerBaseAffine2< StorageType >::TrackAffine_(), and BIAS::ThreeDOut::VRMLOutIndexedFaceSets().
|
staticprotected |
Write a proprietary mip binary Image to disk.
Please note the more general purpose Load/Save interface you may want to use instead.
FileName | output file name. Extension .mip is added if extension isn't already (case insensitive) 'mip' (JW 04/2003) |
sync | tries to flush all open buffers/caches |
Definition at line 1096 of file ImageIO.cpp.
References ExtensionName(), BIAS::UUID::GenerateUUID(), BIAS::ImageBase::GetMetaData(), BIAS::ImageBase::GetUID(), BIAS::UUID::IsValid(), BIAS::ImageBase::SetUID(), and BIAS::MetaData::WriteBinary().
|
static |
Write image in binary file format needed by RealEyes.
Definition at line 1173 of file ImageIO.cpp.
References ExtensionName(), BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetImageData(), BIAS::ImageBase::GetWidth(), and BIAS::ImageBase::IsInterleaved().
|
static |
Write a mip binary image to disk circumventing OS caches as good as possible.
(O_DIRECT)
Definition at line 1975 of file ImageIO.cpp.
References BIAS::UUID::GenerateUUID(), BIAS::ImageBase::GetMetaData(), BIAS::ImageBase::GetUID(), BIAS::UUID::IsValid(), BIAS::ImageBase::SetUID(), and BIAS::MetaData::WriteBinary().
|
staticprotected |
Definition at line 566 of file ImageIO.hh.
|
staticprotected |
Definition at line 567 of file ImageIO.hh.