RegionImage
RegionImage[reg]
returns a rasterized grayscale 2D or 3D image of reg.
RegionImage[reg,{{xmin,xmax},…}]
restricts to the bounds .
Details and Options
- RegionImage converts regions to 2D and 3D raster images.
- The region reg can be anything that is ConstantRegionQ and a RegionEmbeddingDimension of 2 or 3.
- The following options can be specified:
-
ImageResolution Automatic - image resolution in DPI for rasterization
ImageSize Automatic - final displayed image size in printer's points
MetaInformation < > metainformation to be included in the image Method Automatic method parameters to use RasterSize Automatic raster size in pixels or voxels for rasterization - By default, an automatic thickness is chosen to draw lower-dimensional regions. With Method->{"Thickness"->t}, these regions are rasterized using the absolute thickness t.
Examples
open allclose allScope (7)
Data (5)
Rasterize a Region:
Rasterize a MeshRegion:
Rasterize a BoundaryMeshRegion:
Rasterize a region in 2D with components of 0, 1, and 2 dimensions:
Options (6)
Method (4)
RasterSize (2)
By default, regions are rasterized to the default graphics raster size:
Use ImageSize to specify the display size:
Applications (6)
Possible Issues (2)
Setting the thickness to zero effectively ignores the lower-dimensional components:
Increase the thickness to get response for lower-dimensional components:
3D rasterization can show a moiré-like effect due to the partial volume computation and coloring:
Use a color function that changes only opacities based on the voxel intensity, not the color:
Antialiasing would even improve a color function that changes both color and opacity by voxel intensities:
Text
Wolfram Research (2017), RegionImage, Wolfram Language function, https://reference.wolfram.com/language/ref/RegionImage.html.
CMS
Wolfram Language. 2017. "RegionImage." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/RegionImage.html.
APA
Wolfram Language. (2017). RegionImage. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/RegionImage.html