![]() |
open_iA
2019.12
A tool for the visual analysis and processing of volumetric datasets, with a focus on industrial computed tomography.
|
#include "open_iA_Core_export.h"#include <vtkSmartPointer.h>#include <QMap>Macros | |
| #define | FOR_VTKIMG_PIXELS(img, x, y, z) |
| #define | FOR_VTKIMG_PIXELS_IDX(img, idx) for (size_t idx = 0; idx < img->GetDimensions()[0]*img->GetDimensions()[1]*img->GetDimensions()[2]; ++idx) |
Enumerations | |
| enum | iACameraPosition { PX, MX, PY, MY, PZ, MZ, Iso } |
Functions | |
| open_iA_Core_API vtkSmartPointer< vtkImageData > | allocateImage (int vtkType, int const dimensions[3], double const spacing[3]) |
| Create a VTK image with the given properties. More... | |
| open_iA_Core_API vtkSmartPointer< vtkImageData > | allocateImage (int vtkType, int const dimensions[3], double const spacing[3], int numComponents) |
| Create a VTK image with the given properties. More... | |
| open_iA_Core_API vtkSmartPointer< vtkImageData > | allocateImage (vtkSmartPointer< vtkImageData > img) |
| Create a VTK image that has the same properties (type, size, spacing) as the given image. More... | |
| open_iA_Core_API vtkSmartPointer< vtkImageData > | castVTKImage (vtkSmartPointer< vtkImageData > img, int dstType) |
| Cast the given VTK image to another data type. More... | |
| open_iA_Core_API bool | isVtkIntegerType (int type) |
| Check whether the given type is integer. More... | |
| open_iA_Core_API int | mapReadableDataTypeToVTKType (QString const &dataTypeName) |
| Maps a given data type string to the corresponding VTK type identifier. More... | |
| open_iA_Core_API int | mapRenderModeToEnum (QString const &) |
| open_iA_Core_API QString | mapVTKTypeToReadableDataType (int vtkType) |
| Maps a given VTK type to the corresponding readable data type. More... | |
| open_iA_Core_API size_t | mapVTKTypeToSize (int vtkType) |
| Returns the size (in bytes) of the given VTK type. More... | |
| open_iA_Core_API const QStringList & | readableDataTypeList (bool withLongLongTypes) |
| Returns a human-readable list of available data types for a single pixel/voxel. More... | |
| open_iA_Core_API vtkSmartPointer< vtkImageData > | readImage (QString const &filename, bool releaseFlag) |
| Read an image from disk into a VTK image. More... | |
| open_iA_Core_API const QMap< int, QString > & | RenderModeMap () |
| open_iA_Core_API void | setCamPosition (vtkCamera *cam, iACameraPosition mode) |
| open_iA_Core_API void | storeImage (vtkSmartPointer< vtkImageData > image, QString const &filename, bool useCompression=true) |
| Stores an image on disk (typically in .mhd format). More... | |
| open_iA_Core_API void | writeSingleSliceImage (QString const &filename, vtkImageData *imageData) |
| Write a single slice image to a common 2D picture format. More... | |
| #define FOR_VTKIMG_PIXELS_IDX | ( | img, | |
| idx | |||
| ) | for (size_t idx = 0; idx < img->GetDimensions()[0]*img->GetDimensions()[1]*img->GetDimensions()[2]; ++idx) |
| enum iACameraPosition |
| open_iA_Core_API vtkSmartPointer<vtkImageData> allocateImage | ( | int | vtkType, |
| int const | dimensions[3], | ||
| double const | spacing[3] | ||
| ) |
Create a VTK image with the given properties.
| vtkType | the VTK type identifier (VTK_INT, VTK_UNSIGNED_CHAR, ...) for the voxel data type to use in the new image |
| dimensions | the size of the image in the 3 dimensions. |
| spacing | the spacing (distance of voxels) in each of the 3 dimension directions. |
| open_iA_Core_API vtkSmartPointer<vtkImageData> allocateImage | ( | int | vtkType, |
| int const | dimensions[3], | ||
| double const | spacing[3], | ||
| int | numComponents | ||
| ) |
Create a VTK image with the given properties.
| vtkType | the VTK type identifier (VTK_INT, VTK_UNSIGNED_CHAR, ...) for the voxel data type to use in the new image |
| dimensions | the size of the image in the 3 dimensions. |
| spacing | the spacing (distance of voxels) in each of the 3 dimension directions. |
| numComponents | the number of components in each voxel. |
| open_iA_Core_API vtkSmartPointer<vtkImageData> allocateImage | ( | vtkSmartPointer< vtkImageData > | img | ) |
Create a VTK image that has the same properties (type, size, spacing) as the given image.
| img | image whose type, size and spacing will be used to create the result image; its data will not be copied over to the new image |
| open_iA_Core_API vtkSmartPointer<vtkImageData> castVTKImage | ( | vtkSmartPointer< vtkImageData > | img, |
| int | dstType | ||
| ) |
Cast the given VTK image to another data type.
| img | the input image |
| dstType | the VTK type identifier (VTK_INT, VTK_UNSIGNED_CHAR, ...) to cast to |
| open_iA_Core_API bool isVtkIntegerType | ( | int | type | ) |
Check whether the given type is integer.
| type | a VTK type identifier (VTK_INT, VTK_UNSIGNED_CHAR, ...) |
| open_iA_Core_API int mapReadableDataTypeToVTKType | ( | QString const & | dataTypeName | ) |
Maps a given data type string to the corresponding VTK type identifier.
| dataTypeName | an entry from the list of readable data types (see readableDataTypeList()) |
| open_iA_Core_API int mapRenderModeToEnum | ( | QString const & | ) |
| open_iA_Core_API QString mapVTKTypeToReadableDataType | ( | int | vtkType | ) |
Maps a given VTK type to the corresponding readable data type.
| vtkType | the VTK type identifier (VTK_INT, VTK_UNSIGNED_CHAR, ...) |
| open_iA_Core_API size_t mapVTKTypeToSize | ( | int | vtkType | ) |
Returns the size (in bytes) of the given VTK type.
| vtkType | a VTK type identifier (VTK_INT, VTK_UNSIGNED_CHAR, ...) |
| open_iA_Core_API const QStringList& readableDataTypeList | ( | bool | withLongLongTypes | ) |
Returns a human-readable list of available data types for a single pixel/voxel.
| withLongLongTypes |
| open_iA_Core_API vtkSmartPointer<vtkImageData> readImage | ( | QString const & | filename, |
| bool | releaseFlag | ||
| ) |
Read an image from disk into a VTK image.
| filename | the name of the file to read. |
| releaseFlag | whether the ITK release flag should be set on the ITK image reader |
| open_iA_Core_API const QMap<int, QString>& RenderModeMap | ( | ) |
| open_iA_Core_API void setCamPosition | ( | vtkCamera * | cam, |
| iACameraPosition | mode | ||
| ) |
| open_iA_Core_API void storeImage | ( | vtkSmartPointer< vtkImageData > | image, |
| QString const & | filename, | ||
| bool | useCompression = true |
||
| ) |
Stores an image on disk (typically in .mhd format).
| image | the image to store |
| filename | the name of the file to write to. |
| useCompression | whether the file should be compressed (.zraw) or not (.raw) in case we are storing .mhd files |
| open_iA_Core_API void writeSingleSliceImage | ( | QString const & | filename, |
| vtkImageData * | imageData | ||
| ) |
Write a single slice image to a common 2D picture format.
| filename | the name of the file to write to; this is expected to have an extension of tif, png, jpg or bmp; the type of the file written will be chosen according to this extension |
| imageData | the image to write; this already needs to be a 2D image (i.e., size in Z dimension = 1) |
1.8.16