]> Creatis software - bbtk.git/blob - packages/vtk/src/bbvtkImageCharacteristics.xml
Merge branch 'vtk8itk5wx3-mingw64' of ssh://git.creatis.insa-lyon.fr/bbtk into vtk8it...
[bbtk.git] / packages / vtk / src / bbvtkImageCharacteristics.xml
1 <?xml version="1.0" encoding="iso-8859-1"?>
2
3 <blackbox name="ImageCharacteristics" >
4
5 <author>jpr at creatis.insa-lyon.fr</author>
6 <description><PRE>Exports objet sizes, etc</PRE></description>
7 <category>image;</category>
8
9 <include>vtkImageData.h</include> 
10
11 <input name="In"        type="vtkImageData*" description="Input image"/>
12 <output name="NX"       type="int"    description="Number of Columns"/>
13 <output name="NY"       type="int"    description="Number of Rows"/>
14 <output name="NZ"       type="int"    description="Number of Planes"/>
15 <output name="XSpacing" type="double" description="X spacing"/>
16 <output name="YSpacing" type="double" description="Y Spacing"/>
17 <output name="ZSpacing" type="double" description="Z Spacing"/>
18  
19  <process><PRE>
20  int dim[3];
21    bbGetInputIn()->GetDimensions(dim);
22    bbSetOutputNX(dim[0]);
23    bbSetOutputNY(dim[1]);
24    bbSetOutputNZ(dim[2]);
25    
26  double pixelSpacing[3]; 
27    bbGetInputIn()->GetSpacing(pixelSpacing);
28    bbSetOutputXSpacing(pixelSpacing[0]);   
29    bbSetOutputYSpacing(pixelSpacing[1]); 
30    bbSetOutputZSpacing(pixelSpacing[2]);          
31  </PRE></process>
32
33 </blackbox>  
34