RegionImage
✖
RegionImage
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 allBasic Examples (2)Summary of the most common use cases
Scope (7)Survey of the scope of standard use cases
Data (5)
Rasterize a Region:

https://wolfram.com/xid/0enz1syci-e5qy4x

Rasterize a MeshRegion:

https://wolfram.com/xid/0enz1syci-7bdrg2

Rasterize a BoundaryMeshRegion:

https://wolfram.com/xid/0enz1syci-flif4y


https://wolfram.com/xid/0enz1syci-rpb1tw

Rasterize a region in 2D with components of 0, 1, and 2 dimensions:

https://wolfram.com/xid/0enz1syci-t0asx1


https://wolfram.com/xid/0enz1syci-1k2rd6

Rasterize a region in 3D with mixed dimensional components:

https://wolfram.com/xid/0enz1syci-iq0r4u


https://wolfram.com/xid/0enz1syci-0bmz2g

Options (6)Common values & functionality for each option
Method (4)
"Thickness" (4)
Compare different settings for the thickness of components that are not full dimensional:

https://wolfram.com/xid/0enz1syci-k1y0lg


https://wolfram.com/xid/0enz1syci-2d8f1x

The thickness is effectively the width of a feature in pixels:

https://wolfram.com/xid/0enz1syci-iqxwc7


https://wolfram.com/xid/0enz1syci-jfhfol

The default "Thickness"Automatic renders one white pixel per Point:

https://wolfram.com/xid/0enz1syci-gyszt

https://wolfram.com/xid/0enz1syci-ct19ca


https://wolfram.com/xid/0enz1syci-32dh2s

RasterSize (2)
By default, regions are rasterized to the default graphics raster size:

https://wolfram.com/xid/0enz1syci-klj3xt


https://wolfram.com/xid/0enz1syci-3nd9wz


https://wolfram.com/xid/0enz1syci-mf56eo


https://wolfram.com/xid/0enz1syci-x9vuyo

Use ImageSize to specify the display size:

https://wolfram.com/xid/0enz1syci-mcgnae


https://wolfram.com/xid/0enz1syci-fcy7wp

Applications (6)Sample problems that can be solved with this function
Create the image of a Sierpiński mesh:

https://wolfram.com/xid/0enz1syci-m1ard2


https://wolfram.com/xid/0enz1syci-ipplfr


https://wolfram.com/xid/0enz1syci-nu7ial

Generate cylindric masks for a volume:

https://wolfram.com/xid/0enz1syci-y4h306


https://wolfram.com/xid/0enz1syci-d9lvxl


https://wolfram.com/xid/0enz1syci-cgcv94

Construct a 3D image from elevation data around Mount Everest:

https://wolfram.com/xid/0enz1syci-nz589s


https://wolfram.com/xid/0enz1syci-fvuwwh

Generate the volume of a polyhedron:

https://wolfram.com/xid/0enz1syci-h8luct


https://wolfram.com/xid/0enz1syci-zvwwvh

"Melting" a snowflake region via curvature flow:

https://wolfram.com/xid/0enz1syci-eau5m0


https://wolfram.com/xid/0enz1syci-biw22z


https://wolfram.com/xid/0enz1syci-zsogaj

Possible Issues (2)Common pitfalls and unexpected behavior
Setting the thickness to zero effectively ignores the lower-dimensional components:

https://wolfram.com/xid/0enz1syci-edv6f

Increase the thickness to get response for lower-dimensional components:

https://wolfram.com/xid/0enz1syci-zu8h2r

3D rasterization can show a moiré-like effect due to the partial volume computation and coloring:

https://wolfram.com/xid/0enz1syci-msyesj

Use a color function that changes only opacities based on the voxel intensity, not the color:

https://wolfram.com/xid/0enz1syci-eadepo


https://wolfram.com/xid/0enz1syci-9n6for

Antialiasing would even improve a color function that changes both color and opacity by voxel intensities:

https://wolfram.com/xid/0enz1syci-olw5i5

Neat Examples (2)Surprising or curious use cases
Estimate the area content of a rasterized disk:

https://wolfram.com/xid/0enz1syci-ca1ver


https://wolfram.com/xid/0enz1syci-g77gaf
Compare the area estimate with the disk area π:

https://wolfram.com/xid/0enz1syci-yjexes


https://wolfram.com/xid/0enz1syci-v812tj

Nested conversion between a discretized and mesh representation of a disk:

https://wolfram.com/xid/0enz1syci-81y5f2


https://wolfram.com/xid/0enz1syci-38yviv


https://wolfram.com/xid/0enz1syci-v81o5f

Wolfram Research (2017), RegionImage, Wolfram Language function, https://reference.wolfram.com/language/ref/RegionImage.html.
Text
Wolfram Research (2017), RegionImage, Wolfram Language function, https://reference.wolfram.com/language/ref/RegionImage.html.
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.
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
Wolfram Language. (2017). RegionImage. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/RegionImage.html
BibTeX
@misc{reference.wolfram_2025_regionimage, author="Wolfram Research", title="{RegionImage}", year="2017", howpublished="\url{https://reference.wolfram.com/language/ref/RegionImage.html}", note=[Accessed: 19-June-2025
]}
BibLaTeX
@online{reference.wolfram_2025_regionimage, organization={Wolfram Research}, title={RegionImage}, year={2017}, url={https://reference.wolfram.com/language/ref/RegionImage.html}, note=[Accessed: 19-June-2025
]}