I want to draw a plane(say I have the plane equation) on a 3d image. Is there any option to do so in ITK snap or slicer? If not what could be the approach through ITK?
Conceptually most simple approach is to use iterators. Iterate over your circle’s bounding box, and at each voxel evaluate the circle equation by using TransformIndexToPhysicalPoint(). If the given voxel is within one voxel’s size of the mathematical circle, set the voxel’s intensity to 255, otherwise do not modify the voxel.
ITK-SNAP does not support arbitrary orientations. This can be done using Slicer: use segment editor to draw a circle, then use “Simple Filters” to add it to the base image.
There is already GUI for these in 3D Slicer’s Segment editor module (paint and scissors to define the stencil, then mask volume to paint it into the 3D image). You can easily automate these operations using Python scripting. You can ask details on Slicer forum.
ITK contains a nice framework for parametric object representation called SpatialObject’s. An
itk::SpatialObject can be sampled on an image pixel grid with
itk::SpatialObjectToImageFilter. Here is an example:
SpatialObject’s are covered thoroughly in the ITK Software Guide.