WOLFRAM

returns a rasterized grayscale 2D or 3D image of reg.

RegionImage[reg,{{xmin,xmax},}]

restricts to the bounds .

Details and Options

Examples

open allclose all

Basic Examples  (2)Summary of the most common use cases

Rasterize a region in 2D:

Out[1]=1

Rasterize a region in 3D:

Out[1]=1

Scope  (7)Survey of the scope of standard use cases

Data  (5)

Rasterize a Region:

Out[1]=1

Rasterize a MeshRegion:

Out[1]=1

Rasterize a BoundaryMeshRegion:

Out[1]=1
Out[2]=2

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

Out[1]=1
Out[2]=2

Rasterize a region in 3D with mixed dimensional components:

Out[1]=1
Out[2]=2

Parameters  (2)

Rasterize the part of a region in 2D that is within specified bounds:

Out[1]=1

Rasterize the part of a region in 3D that is within specified bounds:

Out[1]=1

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:

Out[1]=1
Out[2]=2

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

Out[1]=1
Out[2]=2

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

Out[2]=2

Thicken a shell in 3D:

Out[1]=1

RasterSize  (2)

By default, regions are rasterized to the default graphics raster size:

Out[1]=1
Out[2]=2

Specify the raster size:

Out[3]=3
Out[4]=4

Use ImageSize to specify the display size:

Out[1]=1
Out[2]=2

Applications  (6)Sample problems that can be solved with this function

Create the image of a Sierpiński mesh:

Out[1]=1

Rasterization of a 3D knot:

Out[1]=1
Out[2]=2

Generate cylindric masks for a volume:

Out[1]=1
Out[2]=2
Out[3]=3

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

Out[1]=1
Out[2]=2

Generate the volume of a polyhedron:

Out[1]=1
Out[2]=2

"Melting" a snowflake region via curvature flow:

Out[1]=1
Out[2]=2
Out[3]=3

Possible Issues  (2)Common pitfalls and unexpected behavior

Setting the thickness to zero effectively ignores the lower-dimensional components:

Out[1]=1

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

Out[5]=5

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

Out[1]=1

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

Out[2]=2

Antialiasing using blur:

Out[3]=3

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

Out[4]=4

Neat Examples  (2)Surprising or curious use cases

Estimate the area content of a rasterized disk:

Out[1]=1

Compare the area estimate with the disk area π:

Out[3]=3
Out[4]=4

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

Out[1]=1
Out[2]=2

Show the evaluation:

Out[3]=3
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.

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 ]}

@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 ]}

@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 ]}