RegionImage

RegionImage[reg]

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)

Rasterize a region in 2D:

Rasterize a region in 3D:

Scope  (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:

Rasterize a region in 3D with mixed dimensional components:

Parameters  (2)

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

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

Options  (6)

Method  (4)

"Thickness"  (4)

Compare different settings for the thickness of components that are not full dimensional:

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

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

Thicken a shell in 3D:

RasterSize  (2)

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

Specify the raster size:

Use ImageSize to specify the display size:

Applications  (6)

Create the image of a Sierpiński mesh:

Rasterization of a 3D knot:

Generate cylindric masks for a volume:

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

Generate the volume of a polyhedron:

"Melting" a snowflake region via curvature flow:

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 using blur:

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

Neat Examples  (2)

Estimate the area content of a rasterized disk:

Compare the area estimate with the disk area π:

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

Show the evaluation:

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.

BibTeX

@misc{reference.wolfram_2020_regionimage, author="Wolfram Research", title="{RegionImage}", year="2017", howpublished="\url{https://reference.wolfram.com/language/ref/RegionImage.html}", note=[Accessed: 16-April-2021 ]}

BibLaTeX

@online{reference.wolfram_2020_regionimage, organization={Wolfram Research}, title={RegionImage}, year={2017}, url={https://reference.wolfram.com/language/ref/RegionImage.html}, note=[Accessed: 16-April-2021 ]}

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