How does the Flatten feature work? What makes it different than the Level and Filter operators?

# Flatten Operator

**Menno**#2

What a great question!

The Flatten feature is a very effective way of flattening your sample, in order to better see and evaluate surface features. You can subtract a certain shape (plane, cylinder, sphere, or polynomial) from your original scan) to get a flatter image.

Flattening by subtracting a plane (Plane Flattening) is much like the leveling feature, but Plane Flattening uses the entire image to calculate the average plane, rather than three user-selected points. This makes it much more comprehensive.

Flattening using Normal Plane is interesting in that it levels as many areas of the image as possible, rather than calculating one average slope. This is helpful when you have steps in your image. Consider the situation below, here is what Plane Flattening does:

Here is what the Normal Plane Flattening does:

Flattening using Cylinder and Sphere work much the same way. Let's look at this example:

It is not quite a spherical surface, so subtracting a sphere leaves a surface that is not flat. Because the sample is a parabolic mirror, flattening using a 2nd order polynomial works well:

As you can see, subtracting a second-order polynomial really allows you to see the fine surface details of this mirror.

What is the difference compared to the filter operator? Filter removes all waviness above a user-specified threshold, called cutoff. It works in any direction which tends to make it more aggressive. Even if a surface is not perfectly spherical, for example, or doesn't have any specific shape, you can still end up with a perfectly flat surface. For the image shown below, even an 11th-order polynomial cannot get this flat:

However, using Filter with a 10 um cutoff does:

Using Filter typically leads to lower (and more accurate) roughness values.

Hopefully this helps!