16 #include "libmesh/bounding_box.h" 20 #ifdef LIBMESH_HAVE_VTK 24 #include "libmesh/ignore_warnings.h" 26 #include "vtkSmartPointer.h" 27 #include "vtkPNGReader.h" 28 #include "vtkTIFFReader.h" 29 #include "vtkImageData.h" 30 #include "vtkStringArray.h" 31 #include "vtkImageThreshold.h" 32 #include "vtkImageNormalize.h" 33 #include "vtkImageCast.h" 34 #include "vtkImageShiftScale.h" 35 #include "vtkImageMagnitude.h" 36 #include "vtkImageFlip.h" 38 #include "libmesh/restore_warnings.h" 92 #ifdef LIBMESH_HAVE_VTK 95 vtkSmartPointer<vtkStringArray>
_files;
129 #ifdef LIBMESH_HAVE_VTK A helper class for re-directing output streams to Console output objects form MooseObjects.
unsigned int _component
Component to extract.
vtkAlgorithmOutput * _algorithm
VTK-6 seems to work better in terms of "algorithm outputs" rather than vtkImageData pointers...
virtual void setupImageSampler(MooseMesh &mesh)
Perform initialization of image data.
vtkSmartPointer< vtkImageReader2 > _image
Complete image data.
ConsoleStream _is_console
Create a console stream object for this helper class.
virtual Real sample(const Point &p) const
Return the pixel value for the given point.
BoundingBox _bounding_box
Bounding box for testing points.
vtkImageData * _data
Complete image data.
std::vector< double > _voxel
Physical pixel size.
vtkSmartPointer< vtkImageMagnitude > _magnitude_filter
Pointer to the magnitude filter.
void vtkShiftAndScale()
Apply image re-scaling using the vtkImageShiftAndRescale object.
Point _origin
Origin of image.
vtkSmartPointer< vtkImageShiftScale > _shift_scale_filter
Pointer to the shift and scaling filter.
const InputParameters & _is_pars
Parameters for interface.
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
static InputParameters validParams()
Constructor.
ImageSampler(const InputParameters ¶meters)
void vtkThreshold()
Perform thresholding.
vtkSmartPointer< vtkStringArray > _files
List of file names to extract data.
A helper class for reading and sampling images using VTK.
Point _physical_dims
Physical dimensions of image.
To be called in the validParams functions of classes that need to operate on ranges of files...
std::vector< int > _dims
Pixel dimension of image.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void vtkMagnitude()
Convert the image to greyscale.
vtkSmartPointer< vtkImageThreshold > _image_threshold
Pointer to thresholding filter.
std::array< bool, 3 > _flip
image flip