![]() |
IPSDK
4_1_0_2
IPSDK : Image Processing Software Development Kit
|
Read and write a Tiff image using IPSDK. More...
Functions | |
| IPSDKIMAGEFILE_API ImagePtr | ipsdk::image::file::loadTiffImageFiles (const boost::filesystem::path &dirPath, const std::string &pattern="*.tif|*.tiff", const eTiffDirectoryMode &tiffDirectoryMode=eTiffDirectoryMode::eTDM_Volume, const eTiffBufferMode &tiffBufferMode=eTiffBufferMode::eTBM_Default) |
| function allowing to load an image from tiff image files contained in a given directory More... | |
| IPSDKIMAGEFILE_API DiskImagePtr | ipsdk::image::file::openTiffImageFile (const boost::filesystem::path &tiffFilePath, const eTiffDirectoryMode &tiffDirectoryMode=eTiffDirectoryMode::eTDM_Volume, const eTiffBufferMode &tiffBufferMode=eTiffBufferMode::eTBM_Default) |
| function allowing to open a tiff file as a disk image More... | |
| IPSDKIMAGEFILE_API void | ipsdk::image::file::saveTiffImageFile (const boost::filesystem::path &tiffFilePath, const ImageConstPtr &pImage, const eTiffCompression &tiffCompression=eTiffCompression::eTC_Lzw) |
| function allowing to save a tiff image file More... | |
| IPSDKIMAGEFILE_API ImagePtr | ipsdk::image::file::loadTiffImageFile (const boost::filesystem::path &tiffFilePath, const eTiffDirectoryMode &tiffDirectoryMode=eTiffDirectoryMode::eTDM_Volume, const eTiffBufferMode &tiffBufferMode=eTiffBufferMode::eTBM_Default) |
| function allowing to load a tiff image file More... | |
| IPSDKIMAGEFILE_API void | ipsdk::image::file::loadTiffImageFile (const boost::filesystem::path &tiffFilePath, ImagePtr &pOutImg, const eTiffDirectoryMode &tiffDirectoryMode=eTiffDirectoryMode::eTDM_Volume, const eTiffBufferMode &tiffBufferMode=eTiffBufferMode::eTBM_Default) |
| function allowing to load a tiff image file More... | |
| IPSDKIMAGEFILE_API ImagePtr | ipsdk::image::file::loadTiffImageFile (const boost::filesystem::path &tiffFilePath, const eTiffBufferMode &tiffBufferMode) |
| function allowing to load a tiff image file More... | |
| IPSDKIMAGEFILE_API void | ipsdk::image::file::loadTiffImageFile (const boost::filesystem::path &tiffFilePath, const eTiffBufferMode &tiffBufferMode, ImagePtr &pOutImg) |
| function allowing to load a tiff image file More... | |
Read and write a Tiff image using IPSDK.
This page briefly presents how to load an image from a TIFF file using IPSDK.
First, the header to include to load and save an image from a TIFF file is :
To save an image in a TIFF file, only the following instruction is needed :
In the same way, these following instruction allows to load an image from a TIFF file :
In Python, an image can then be saved (or loaded) to (from) a TIFF file with the following instructions :
Because the large size of images, some acquisition devices store the images in several files (one slice or frame per file). IPSDK is able to load several TIFF image files and concatenate them into a single image, along the Z-axis or the temporal dimension. This is done by the function ipsdk::image::file::loadTiffImageFiles :
In Python, this is done by the following command :
| IPSDKIMAGEFILE_API ImagePtr ipsdk::image::file::loadTiffImageFile | ( | const boost::filesystem::path & | tiffFilePath, |
| const eTiffDirectoryMode & | tiffDirectoryMode = eTiffDirectoryMode::eTDM_Volume, |
||
| const eTiffBufferMode & | tiffBufferMode = eTiffBufferMode::eTBM_Default |
||
| ) |
function allowing to load a tiff image file
| ipsdk::image::file::IPSDKImageFileException | on failure |
| IPSDKIMAGEFILE_API ImagePtr ipsdk::image::file::loadTiffImageFile | ( | const boost::filesystem::path & | tiffFilePath, |
| const eTiffBufferMode & | tiffBufferMode | ||
| ) |
function allowing to load a tiff image file
| ipsdk::image::file::IPSDKImageFileException | on failure |
| IPSDKIMAGEFILE_API ImagePtr ipsdk::image::file::loadTiffImageFiles | ( | const boost::filesystem::path & | dirPath, |
| const std::string & | pattern = "*.tif|*.tiff", |
||
| const eTiffDirectoryMode & | tiffDirectoryMode = eTiffDirectoryMode::eTDM_Volume, |
||
| const eTiffBufferMode & | tiffBufferMode = eTiffBufferMode::eTBM_Default |
||
| ) |
function allowing to load an image from tiff image files contained in a given directory
| ipsdk::image::file::IPSDKImageFileException | on failure |
| ipsdk::image::file::IPSDKImageFileException | if pattern string is invalid (see detailed description of the function) |
| dirPath | path of the directory containing the files from which the image is built |
| pattern | file pattern used to filter the set of files found in directory. See the detailed description below |
This function loads an image from the TIFF files that are contained in the directory 'dirPath' and that match the pattern(s) specified by the user. Several patterns can be specified by the user, separated by the dedicated character '|'. In that case, for each file found in the directory, the function test the match with each pattern one by one, until a successful match is found. The files found are either sorted alphabetically or numerically, if the pattern string contains the string "<INDEX>". Here is a complete list of the reserved key characters and key words that can be used in the pattern string:
| IPSDKIMAGEFILE_API DiskImagePtr ipsdk::image::file::openTiffImageFile | ( | const boost::filesystem::path & | tiffFilePath, |
| const eTiffDirectoryMode & | tiffDirectoryMode = eTiffDirectoryMode::eTDM_Volume, |
||
| const eTiffBufferMode & | tiffBufferMode = eTiffBufferMode::eTBM_Default |
||
| ) |
function allowing to open a tiff file as a disk image
| ipsdk::image::file::IPSDKImageFileException | on failure |
| IPSDKIMAGEFILE_API void ipsdk::image::file::saveTiffImageFile | ( | const boost::filesystem::path & | tiffFilePath, |
| const ImageConstPtr & | pImage, | ||
| const eTiffCompression & | tiffCompression = eTiffCompression::eTC_Lzw |
||
| ) |
function allowing to save a tiff image file
| ipsdk::image::file::IPSDKImageFileException | on failure |
| IPSDKIMAGEFILE_API void ipsdk::image::file::loadTiffImageFile | ( | const boost::filesystem::path & | tiffFilePath, |
| ImagePtr & | pOutImg, | ||
| const eTiffDirectoryMode & | tiffDirectoryMode = eTiffDirectoryMode::eTDM_Volume, |
||
| const eTiffBufferMode & | tiffBufferMode = eTiffBufferMode::eTBM_Default |
||
| ) |
function allowing to load a tiff image file
| ipsdk::image::file::IPSDKImageFileException | on failure |
| IPSDKIMAGEFILE_API void ipsdk::image::file::loadTiffImageFile | ( | const boost::filesystem::path & | tiffFilePath, |
| const eTiffBufferMode & | tiffBufferMode, | ||
| ImagePtr & | pOutImg | ||
| ) |
function allowing to load a tiff image file
| ipsdk::image::file::IPSDKImageFileException | on failure |
1.8.14