Creating a 3d mesh from annotated volumetric data

hey i have an annotated 3d volume. i want to create a 3d mesh out of it kind of like the meshes from the allen brain atlas

There are many relevant examples on the VTK examples website - such as https://lorensen.github.io/VTKExamples/site/Cxx/Modelling/DiscreteMarchingCubes/. You may also read the VTK textbook to get familiar with basic VTK features.