Update of /cvsroot/octaviz/octaviz/Examples
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv26704/Examples
Modified Files:
PolyCut.m vtk_image_demo.m xyPlot.m
Log Message:
Use vktGetDataRoot() instead of hard-coded paths
Use @VTK_DATA_ROOT for configuration via cmake at build time
Index: PolyCut.m
===================================================================
RCS file: /cvsroot/octaviz/octaviz/Examples/PolyCut.m,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- PolyCut.m 21 Sep 2004 22:50:41 -0000 1.1.1.1
+++ PolyCut.m 25 Feb 2007 19:29:50 -0000 1.2
@@ -6,7 +6,8 @@
% First start by reading a cow model. We also generate surface normals for;
% prettier rendering.;
cow = vtkBYUReader();
-cow.SetGeometryFileName("/usr/share/vtkdata/Data/Viewpoint/cow.g");
+VTK_DATA_ROOT = vtkGetDataRoot();
+cow.SetGeometryFileName(strcat(VTK_DATA_ROOT,"/Data/Viewpoint/cow.g"));
cowNormals = vtkPolyDataNormals();
cowNormals.SetInput(cow.GetOutput());
@@ -103,4 +104,4 @@
%renWin.SetSize(300, 300);
-vtk_update(f);
\ No newline at end of file
+vtk_update(f);
Index: xyPlot.m
===================================================================
RCS file: /cvsroot/octaviz/octaviz/Examples/xyPlot.m,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- xyPlot.m 21 Sep 2004 22:50:41 -0000 1.1.1.1
+++ xyPlot.m 25 Feb 2007 19:29:51 -0000 1.2
@@ -14,10 +14,11 @@
vtk_init
+VTK_DATA_ROOT = vtkGetDataRoot();
% Create a PLOT3D reader and load the data.
pl3d = vtkPLOT3DReader("New");
- pl3d.SetXYZFileName("/usr/share/vtkdata/Data/combxyz.bin")
- pl3d.SetQFileName("/usr/share/vtkdata/Data/combq.bin")
+ pl3d.SetXYZFileName(strcat(VTK_DATA_ROOT,"/Data/combxyz.bin"));
+ pl3d.SetQFileName(strcat(VTK_DATA_ROOT,"/Data/combq.bin"));
pl3d.SetScalarFunctionNumber(100)
pl3d.SetVectorFunctionNumber(202)
pl3d.Update()
Index: vtk_image_demo.m
===================================================================
RCS file: /cvsroot/octaviz/octaviz/Examples/vtk_image_demo.m,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- vtk_image_demo.m 21 Sep 2004 22:50:43 -0000 1.1.1.1
+++ vtk_image_demo.m 25 Feb 2007 19:29:51 -0000 1.2
@@ -18,7 +18,8 @@
reader = vtkPNGReader();
reader.SetDataSpacing(0.8, 0.8, 1.5)
-reader.SetFileName("/usr/share/vtkdata/Data/fullhead15.png")
+VTK_DATA_ROOT = vtkGetDataRoot();
+reader.SetFileName(strcat(VTK_DATA_ROOT,"/Data/fullhead15.png"));
shiftScale = vtkImageShiftScale();
shiftScale.SetInput(reader.GetOutput())
shiftScale.SetShift(0)
|