PANDORE Version 6 GREYC-IMAGE

pdepth2graylevel



Converts depth values to gray levels.



Synopsis

pdepth2graylevel threshold [-m mask ] [im_in|-] [im_out|-]

Description

pdepth2graylevel builds a 2D image from a 3D image, where depths of the 3D image im_in are converted to gray level into the 2D image im_out. The depth is defined as the slice of the first pixel at the same xy-coordinates that have a value > threshold. The first slice is supposed to be at the depth 0.

The algorithm is as follows:

  for (z=0; z< depth(im_in); z++)
      if (im_in[z][y][x] > threshold ) then im-out[p.y][p.x] = p.z;

Parameters

Inputs

Outputs

Result

Returns SUCCESS or FAILURE.

Examples

Builds a Random Dot Stereogram from the 3D image cyto3d.pan:

   pdepth2graylevel 50 cyto3d.pan i0.pan
   pmultcst 10 i0.pan i1.pan
   prds i1.pan rds_out.pan

See also

Utility, pgraylevel2depth

C++ prototype

Errc PDepth2Graylevel( const Img3duc &im_in, Img2dsl &im_out, long threshold );

Version française

Construction d'une image de niveau de gris 2D à partir d'une image 3D.


Author: Jean-Marie Janik