Visualizing GridFit© Surfaces with CellSurface and CellProjection
The selective plane projection module from the EpiTools app for Matlab was used (version > 2.1.5). The latter automatically saves ASCII files containing the 2nd estimated surface by GridFit© .
The surface/height map files can be found in the Analysis/ folder under vtk/gridfit_frame_###.vtk. Every line in these files represents a coordinate in the surface grid (i.e. x,y,z). Starting from EpiTools plugins for icy version 0.8.7 we provide two tools to use these files, one to visualize the surface as 3D rendering (CellSurface) and the other to evaluate the position of cells in 3D (CellProjection overlay).
We provide example files here to generate the visualizations below.
Requisites: icy plugin 3D Mesh ROI plugin 
The CellSurface plugin visualizes the height map as 3D rendering, leveraging on the 3D Mesh ROI plugin  and the VTK library  integrated in icy. Time series are supported by assigning individual ROIs to specific frames, allowing the user to inspect the morphological changes of the surface over time.
To load our example:
- Open frame_000.tif and the CellSurface plugin
- Set gridfit_frame_000.vtk as input vtk file
- Verify the pixel size in the Sequence Properties (Icy Side Bar) to scale the surface correctly, for the example it should be (x = y = 0.102um) and (z = 0.219um) see (A.)
- Select 3DVTK mode in the sequence viewer (2nd menu from the left) (B.)
- Try the decimate option for better performance and less memory use in case of time series (C.)
- Run the plugin (triangle)
- The Surface can be saved as ROI XML file in the ROI menu (D.)
For more information about the decimation method visit the dedicated vtk documentation page
[WARNING] Currently we do not support registered data as the translation is applied after surface export
[WARNING] If used on a z-stack, leaving the 3DVTK starts cpu intesive computation by 3D mesh roi plugin to adapt the ROI in 2D, to avoid this we suggest removing the ROI beforehand.
The CellProjection overlay for the CellOverlay plugin visualizes as color gradient the magnitude of the z-component from the surface normal of every cell. The overlay uses the estimated height map to assign z-coordinates to all coordinates of the cell’s polygon. To compute the apporximated 3D surface normal for every cells we use Newell’s method . The z-component of the surface normal is useful to estimate the area projection bias through the proportional dependence between 3D and projected 2D area . All values can be exported in an excel sheet through the layer options menu in icy.
To load our example:
- Open frame_000.tif and the CellGraph plugin
- Choose FileType WKT and set skeleton_000.wkt as first time point.
- Run the plugin and a red outline should appear on the sequence (see figure 1)
- Open CellOverlay plugin and select CELL_PROJECTION as Overlay
- Set gridfit_frame_000.vtk as first surface file (A.)
- Verify the pixel size in the Sequence Properties (Icy Side Bar) to scale the surface correctly, for the example it should be (x = y = 0.102um) and (z = 0.219um) (B.)
- Run the plugin (i.e. add the overlay on the sequence)
- Export an XLS sheet with the information for every cell in the Layer Option menu (C.)
An example output excel sheet can be found in the example dataset.
The example surface data set contains the following files
|frame_000.tif||Projected image of wing disc sample with pixel size (x = y = 0.102um) and (z = 0.219um)|
|skeleton_000.wkt||Segmentation line saved with CellExporter for faster loading|
|border_000.wkt||Segmentation border saved with CellExporter for faster loading|
|gridfit_frame_000.vtk||Surface file for frame_000.tif containing the coordinates of the 2nd gridFit estimation in ASCII format (1 grid point per line: x,y,z)|
|cell_projection_overlay.xls||Example excel output sheet containing the compents of the unit surface normal for every cell in teh skeleton|
- Surface Fitting using gridfit by John D’Errico
- Plugin by Alexandre Dufour, available at: http://icy.bioimageanalysis.org/plugin/3D_Mesh_ROI, to install it simply use the icy search bar
- Sutherland, Evan E., Robert F. Sproull, and Robert a. Schumacker. 1974. “A Characterization of Ten Hidden-Surface Algorithms.” ACM Computing Surveys 6 (1): 1–55. doi:10.1145/356625.356626
- John M. Snyder and Alan H. Barr. 1987. Ray tracing complex models containing surface tessellations. ACM Computer Graphics 21 (4): 119-128. doi:10.1145/37401.37417