|
VTK-m
2.0
|
VTK-m File input and output classes. More...
Classes | |
| class | BasePixel |
| Base type for more complex pixels (RGB, Greyscale, etc) that describes various values such as bit-depth, channel width, bytes per pixel, and how various data should be polled. More... | |
| class | BOVDataSetReader |
| struct | ComponentTypeFromSize |
| struct | ComponentTypeFromSize< size, typename std::enable_if<(size==16)>::type > |
| struct | ComponentTypeFromSize< size, typename std::enable_if<(size==8)>::type > |
| class | ErrorIO |
| class | GreyPixel |
| class | ImageReaderBase |
| Manages reading, and loading data from images. More... | |
| class | ImageReaderHDF5 |
| Reading images using HDF5 Image format. More... | |
| class | ImageReaderPNG |
| Manages reading images using the PNG format via lodepng. More... | |
| class | ImageReaderPNM |
| Manages reading images using the PNM format. More... | |
| class | ImageWriterBase |
| Manages writing, and loading data from images. More... | |
| class | ImageWriterHDF5 |
| Writing images using HDF5 Image format. More... | |
| class | ImageWriterPNG |
| Manages writing images using the PNG format via lodepng. More... | |
| class | ImageWriterPNM |
| Manages writing images using the PNM format. More... | |
| class | RGBPixel |
| class | VTKDataSetReader |
| class | VTKDataSetReaderBase |
| struct | VTKDataSetWriter |
| class | VTKPolyDataReader |
| class | VTKRectilinearGridReader |
| class | VTKStructuredGridReader |
| class | VTKStructuredPointsReader |
| class | VTKUnstructuredGridReader |
Typedefs | |
| using | RGBPixel_8 = RGBPixel< 8 > |
| using | RGBPixel_16 = RGBPixel< 16 > |
| using | GreyPixel_16 = GreyPixel< 16 > |
| using | GreyPixel_8 = GreyPixel< 8 > |
Enumerations | |
| enum | FileType { FileType::ASCII, FileType::BINARY } |
Functions | |
| VTKM_IO_EXPORT vtkm::UInt32 | DecodePNG (std::vector< unsigned char > &out_image, unsigned long &image_width, unsigned long &image_height, const unsigned char *in_png, std::size_t in_size) |
| Decodes a PNG file buffer in memory, into a raw pixel buffer Output is RGBA 32-bit (8 bit per channel) color format no matter what color type the original PNG image had. More... | |
| VTKM_IO_EXPORT vtkm::UInt32 | EncodePNG (std::vector< unsigned char > const &image, unsigned long width, unsigned long height, unsigned char *out_png, std::size_t out_size) |
| VTKM_IO_EXPORT vtkm::UInt32 | SavePNG (std::string const &filename, std::vector< unsigned char > const &image, unsigned long width, unsigned long height) |
| VTKM_IO_EXPORT bool | EndsWith (const std::string &value, const std::string &ending) |
| Checks if a provided string ends with a specific substring. More... | |
| VTKM_IO_EXPORT std::string | Filename (const std::string &filePath) |
| Returns the filename component of a filePath string. More... | |
| VTKM_IO_EXPORT std::string | ParentPath (const std::string &filePath) |
| Returns the directory component of a filePath string. More... | |
| VTKM_IO_EXPORT bool | CreateDirectoriesFromFilePath (const std::string &filePath) |
| Creates all the directories found in a given filePath component if they don't exist. More... | |
| VTKM_IO_EXPORT std::string | MergePaths (const std::string &filePathPrefix, const std::string &filePathSuffix) |
| Merges two filepath strings together using the correct system filepath seperator EX: MergePaths("path/to/merge", "some/filename.txt") = "path/to/merge/some/filename.txt" EX: MergePaths("path/to/merge/", "/some/filename.txt") = "path/to/merge/some/filename.txt". More... | |
| VTKM_IO_EXPORT std::string | PrefixStringToFilename (const std::string &filePath, const std::string &prefix) |
| Takes the supplied prefix and prepends it to the filename for the provided filePath EX: PrefixStringToFilename("/some/path/to/filename.txt", "prefix-") = "/some/path/to/prefix-filename.txt". More... | |
| VTKM_IO_EXPORT char | GetWindowsPathSeperator (const std::string &filePath) |
| determine which path separator to use for windows given a provided path Should return one of either '\' or '/' depending on what the provided path uses. More... | |
| VTKM_IO_EXPORT void | WriteImageFile (const vtkm::cont::DataSet &dataSet, const std::string &fullPath, const std::string &fieldName) |
| VTKM_IO_EXPORT vtkm::cont::DataSet | ReadImageFile (const std::string &fullPath, const std::string &fieldName) |
VTK-m File input and output classes.
vtkm::io defines API for basic reading of VTK files. Intended to be used for examples and testing.
| using vtkm::io::GreyPixel_16 = typedef GreyPixel<16> |
| using vtkm::io::GreyPixel_8 = typedef GreyPixel<8> |
| using vtkm::io::RGBPixel_16 = typedef RGBPixel<16> |
| using vtkm::io::RGBPixel_8 = typedef RGBPixel<8> |
|
strong |
| VTKM_IO_EXPORT bool vtkm::io::CreateDirectoriesFromFilePath | ( | const std::string & | filePath | ) |
Creates all the directories found in a given filePath component if they don't exist.
Only returns true if directories are actually created.
| VTKM_IO_EXPORT vtkm::UInt32 vtkm::io::DecodePNG | ( | std::vector< unsigned char > & | out_image, |
| unsigned long & | image_width, | ||
| unsigned long & | image_height, | ||
| const unsigned char * | in_png, | ||
| std::size_t | in_size | ||
| ) |
Decodes a PNG file buffer in memory, into a raw pixel buffer Output is RGBA 32-bit (8 bit per channel) color format no matter what color type the original PNG image had.
This gives predictable, usable data from any random input PNG.
| VTKM_IO_EXPORT vtkm::UInt32 vtkm::io::EncodePNG | ( | std::vector< unsigned char > const & | image, |
| unsigned long | width, | ||
| unsigned long | height, | ||
| unsigned char * | out_png, | ||
| std::size_t | out_size | ||
| ) |
| VTKM_IO_EXPORT bool vtkm::io::EndsWith | ( | const std::string & | value, |
| const std::string & | ending | ||
| ) |
Checks if a provided string ends with a specific substring.
| VTKM_IO_EXPORT std::string vtkm::io::Filename | ( | const std::string & | filePath | ) |
Returns the filename component of a filePath string.
Mimics the functionality of the c++17 filesystem::path filename function
| VTKM_IO_EXPORT char vtkm::io::GetWindowsPathSeperator | ( | const std::string & | filePath | ) |
determine which path separator to use for windows given a provided path Should return one of either '\' or '/' depending on what the provided path uses.
If no seperator is found it will just return '\'
| VTKM_IO_EXPORT std::string vtkm::io::MergePaths | ( | const std::string & | filePathPrefix, |
| const std::string & | filePathSuffix | ||
| ) |
Merges two filepath strings together using the correct system filepath seperator EX: MergePaths("path/to/merge", "some/filename.txt") = "path/to/merge/some/filename.txt" EX: MergePaths("path/to/merge/", "/some/filename.txt") = "path/to/merge/some/filename.txt".
| VTKM_IO_EXPORT std::string vtkm::io::ParentPath | ( | const std::string & | filePath | ) |
Returns the directory component of a filePath string.
Mimics the functionality of the c++17 filesystem::path parent_path function
| VTKM_IO_EXPORT std::string vtkm::io::PrefixStringToFilename | ( | const std::string & | filePath, |
| const std::string & | prefix | ||
| ) |
Takes the supplied prefix and prepends it to the filename for the provided filePath EX: PrefixStringToFilename("/some/path/to/filename.txt", "prefix-") = "/some/path/to/prefix-filename.txt".
| VTKM_IO_EXPORT vtkm::cont::DataSet vtkm::io::ReadImageFile | ( | const std::string & | fullPath, |
| const std::string & | fieldName | ||
| ) |
| VTKM_IO_EXPORT vtkm::UInt32 vtkm::io::SavePNG | ( | std::string const & | filename, |
| std::vector< unsigned char > const & | image, | ||
| unsigned long | width, | ||
| unsigned long | height | ||
| ) |
| VTKM_IO_EXPORT void vtkm::io::WriteImageFile | ( | const vtkm::cont::DataSet & | dataSet, |
| const std::string & | fullPath, | ||
| const std::string & | fieldName | ||
| ) |
1.8.17