You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(14) |
Dec
(6) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
|
Feb
(1) |
Mar
(8) |
Apr
(6) |
May
(5) |
Jun
(2) |
Jul
(2) |
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(3) |
Nov
(2) |
Dec
(21) |
2007 |
Jan
(9) |
Feb
(5) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(24) |
Nov
|
Dec
(15) |
2008 |
Jan
(6) |
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
(4) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Jonathan S. <jjs...@us...> - 2005-05-11 05:11:58
|
Update of /cvsroot/octaviz/octaviz/Scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv586 Modified Files: vtk_axis.m vtk_trisurf.m Log Message: clipping now works with vtk_axis(limits) Index: vtk_trisurf.m =================================================================== RCS file: /cvsroot/octaviz/octaviz/Scripts/vtk_trisurf.m,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- vtk_trisurf.m 7 Mar 2005 02:05:00 -0000 1.8 +++ vtk_trisurf.m 11 May 2005 05:11:49 -0000 1.9 @@ -151,7 +151,7 @@ ptids.SetArray( t(:), no_tris*4, 0 ); polys.SetCells( no_tris, ptids ); - ##in VTK, by default red = low values, blue - high values; we reverse that here + ##in VTK, by default red = low values, blue = high values; we reverse that here ##c=-c; ## manually create color map table instead; a must if later add a scalar bar lut = vtkLookupTable(); Index: vtk_axis.m =================================================================== RCS file: /cvsroot/octaviz/octaviz/Scripts/vtk_axis.m,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- vtk_axis.m 8 May 2005 00:47:32 -0000 1.8 +++ vtk_axis.m 11 May 2005 05:11:49 -0000 1.9 @@ -21,7 +21,15 @@ ## @end deftypefn ## @seealso{vtk_scalarbar} -## Author: Dragan Tubic +## Author: Jonathan Stickel, Dragan Tubic + +## almost there... clipping now works on multiple actors, even keeping coloring correct +## to do: +## - "equal"/"normal" and "square" to work on multiple actors (easy to do) +## - force axes wider when wider limits are specified (i.e. not "tight") +## - add "tight" option +## - update help + function vtk_axis(varargin) @@ -34,29 +42,6 @@ f.axes_on = 1; elseif ( strcmp(arg, "off") ) f.axes_on = 0; - - elseif ( strcmp(arg, "auto") ) ## reset axes bounds - ## (working with just one Prop for now) - ## remove any clipping... how to do this elegently? - clipping = 0; - for i = 2:f.renderer.GetActors.GetNumberOfItems - actor = f.renderer.GetActors.GetItemAsObject(i-1); - if (!actor.GetVisibility) - clipping = 1; # maybe add this as a structure to figure, so don't need to test here - endif - endfor - ## if there has been clipping (as determined by some actors not being visible), - ## remove visible actors (the clipped ones) and make visible the others (unclipped) - if (clipping) - for i = 2:f.renderer.GetActors.GetNumberOfItems - actor = f.renderer.GetActors.GetLastActor; - if (actor.GetVisibility) - f.renderer.RemoveViewProp(actor); - else - actor.VisibilityOn - endif - endfor - endif elseif ( strcmp(arg, "equal") || strcmp(arg, "normal") ) ## defaults in vtk ## (working with just one Prop for now) @@ -73,21 +58,52 @@ ## scale the plot so that it is square ## (working with just one Prop for now) f.renderer.GetProps.GetLastProp.SetScale(1/span(1),1/span(2),1/span(3)) + + elseif ( strcmp(arg, "auto") ) ## reset axes bounds + ## remove any clipping... how to do this elegently? + ## this seems to be a hack, but it works; however, it may lead to a memory leak + clipping = 0; + for i = 1:f.renderer.GetActors.GetNumberOfItems-1 # vtk counting starts at 0 + actor = f.renderer.GetActors.GetItemAsObject(i); + if (!actor.GetVisibility) + clipping = 1; # maybe add this as a structure to vtk_figure, so don't need to test here + break + endif + endfor + ## if there has been clipping (as determined by some actors not being visible), + ## remove visible actors (the clipped ones) and make visible the others (unclipped) + if (clipping) + i = 1; + while i < f.renderer.GetActors().GetNumberOfItems(); + actor = f.renderer.GetActors.GetItemAsObject(i); + if (actor.GetVisibility) + f.renderer.RemoveViewProp(actor); + --i; + else + actor.VisibilityOn + endif + ++i; + endwhile + endif endif - + else ## clip everything to desired axes limits - ##disp("manual setting of axis bounds not implemented yet") - ## attempt at clipping (only one Actor for now) + ## how to do this elegently? + ## this seems to be a hack, but it works; however, it may lead to a memory leak limits = arg; - clippd = clipaxes(f.renderer.GetActors.GetLastActor.GetMapper.GetInput,limits); - ## this doesn't work because you can't recover original! - ##f.renderer.GetActors.GetLastActor.GetMapper.SetInput(clippoly.GetOutput); - clipmapper = vtkPolyDataMapper; - clipmapper.SetInput(clippd); - clipactor = vtkActor; - clipactor.SetMapper(clipmapper); - f.renderer.GetActors.GetLastActor.VisibilityOff; # turn unclipped actor off - f.renderer.AddActor(clipactor); + nactors = f.renderer.GetActors().GetNumberOfItems(); + for i = 1:nactors-1 # outline actor is i=0 + clipmapper{i} = vtkPolyDataMapper; + clipactor{i} = vtkActor; + unclipactor = f.renderer.GetActors.GetItemAsObject(i); + clipactor{i}.ShallowCopy(unclipactor); # copy actor properties (e.g. color) + clipmapper{i}.ShallowCopy(unclipactor.GetMapper); # copy mapper properties (e.g. lookup table) + unclipactor.VisibilityOff; # turn unclipped actor off + clippd{i} = clipaxes(clipactor{i}.GetMapper.GetInput, limits); + clipmapper{i}.SetInput(clippd{i}); + clipactor{i}.SetMapper(clipmapper{i}); + f.renderer.AddActor(clipactor{i}); + endfor endif endfor @@ -101,7 +117,6 @@ clippoly = vtkClipPolyData; clippoly.SetClipFunction(plane); clippd = vtkPolyData; - ##clippoly.GenerateClipScalarsOff(); clippoly.GenerateClippedOutputOn(); ## clip xlow @@ -150,8 +165,3 @@ ## to set arbitrary scaling ##f.renderer.GetProps.GetLastProp.SetScale(xscale,yscale,zscale) - -## to get at the polydata input of the last actor; hopefully I can then clip it -#f.renderer.GetActors.GetLastActor.GetMapper.GetInput - -## can add more inputs (i.e. from other actors) to vtkClipPolyData with AddInput command? \ No newline at end of file |
From: Jonathan S. <jjs...@us...> - 2005-05-08 00:47:43
|
Update of /cvsroot/octaviz/octaviz/Scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11512 Modified Files: vtk_axis.m Log Message: progress on axis function Index: vtk_axis.m =================================================================== RCS file: /cvsroot/octaviz/octaviz/Scripts/vtk_axis.m,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- vtk_axis.m 29 Apr 2005 16:45:58 -0000 1.7 +++ vtk_axis.m 8 May 2005 00:47:32 -0000 1.8 @@ -75,25 +75,19 @@ f.renderer.GetProps.GetLastProp.SetScale(1/span(1),1/span(2),1/span(3)) endif - else - disp("manual setting of axis bounds not implemented yet") -# ## attempt at clipping (only one Actor for now) -# plane = vtkPlane(); -# plane.SetOrigin(0, 0, 0); # trial case for now, will recode to use input values -# plane.SetNormal(1, 0, 0); -# clippoly = vtkClipPolyData; -# clippoly.SetClipFunction(plane); -# clippoly.GenerateClipScalarsOn(); -# clippoly.GenerateClippedOutputOn(); -# ##clippoly.SetValue(0.5); ?? -# clippoly.SetInput(f.renderer.GetActors.GetLastActor.GetMapper.GetInput); -# ##f.renderer.GetActors.GetLastActor.GetMapper.SetInput(clippoly.GetOutput); # this doesn't work because you can't recover original! -# clipmapper = vtkPolyDataMapper; -# clipmapper.SetInput(clippoly.GetOutput); -# clipactor = vtkActor; -# clipactor.SetMapper(clipmapper); -# f.renderer.GetActors.GetLastActor.VisibilityOff; # turn unclipped actor off -# f.renderer.AddActor(clipactor); + else ## clip everything to desired axes limits + ##disp("manual setting of axis bounds not implemented yet") + ## attempt at clipping (only one Actor for now) + limits = arg; + clippd = clipaxes(f.renderer.GetActors.GetLastActor.GetMapper.GetInput,limits); + ## this doesn't work because you can't recover original! + ##f.renderer.GetActors.GetLastActor.GetMapper.SetInput(clippoly.GetOutput); + clipmapper = vtkPolyDataMapper; + clipmapper.SetInput(clippd); + clipactor = vtkActor; + clipactor.SetMapper(clipmapper); + f.renderer.GetActors.GetLastActor.VisibilityOff; # turn unclipped actor off + f.renderer.AddActor(clipactor); endif endfor @@ -102,6 +96,54 @@ endfunction +function clippd = clipaxes(polydata,limits) + plane = vtkPlane(); + clippoly = vtkClipPolyData; + clippoly.SetClipFunction(plane); + clippd = vtkPolyData; + ##clippoly.GenerateClipScalarsOff(); + clippoly.GenerateClippedOutputOn(); + + ## clip xlow + plane.SetOrigin(limits(1), 0, 0); + plane.SetNormal(1, 0, 0); + clippoly.SetInput(polydata); + clippoly.Update; + clippd.DeepCopy(clippoly.GetOutput); + ## clip xhigh + plane.SetOrigin(limits(2), 0, 0); + plane.SetNormal(-1, 0, 0); + clippoly.SetInput(clippd) + clippoly.Update; + clippd.DeepCopy(clippoly.GetOutput); + ## clip ylow + plane.SetOrigin(0, limits(3), 0); + plane.SetNormal(0, 1, 0); + clippoly.SetInput(clippd) + clippoly.Update; + clippd.DeepCopy(clippoly.GetOutput); + ## clip yhigh + plane.SetOrigin(0, limits(4), 0); + plane.SetNormal(0, -1, 0); + clippoly.SetInput(clippd) + clippoly.Update; + clippd.DeepCopy(clippoly.GetOutput); + ## clip zlow + plane.SetOrigin(0, 0, limits(5)); + plane.SetNormal(0, 0, 1); + clippoly.SetInput(clippd) + clippoly.Update; + clippd.DeepCopy(clippoly.GetOutput); + ## clip zhigh + plane.SetOrigin(0, 0, limits(6)); + plane.SetNormal(0, 0, -1); + clippoly.SetInput(clippd) + clippoly.Update; + clippd.DeepCopy(clippoly.GetOutput); +endfunction + + +## notes: ## to set arbitrary ranges on the axes ##f.axes.UseRangesOn ##f.axes.SetRanges(xl,xh,yl,yh,zl,zh) @@ -111,3 +153,5 @@ ## to get at the polydata input of the last actor; hopefully I can then clip it #f.renderer.GetActors.GetLastActor.GetMapper.GetInput + +## can add more inputs (i.e. from other actors) to vtkClipPolyData with AddInput command? \ No newline at end of file |
From: Jonathan S. <jjs...@us...> - 2005-04-29 16:46:06
|
Update of /cvsroot/octaviz/octaviz/Scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17197 Modified Files: vtk_axis.m Log Message: working on axis functionality Index: vtk_axis.m =================================================================== RCS file: /cvsroot/octaviz/octaviz/Scripts/vtk_axis.m,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- vtk_axis.m 29 Apr 2005 05:31:26 -0000 1.6 +++ vtk_axis.m 29 Apr 2005 16:45:58 -0000 1.7 @@ -34,10 +34,32 @@ f.axes_on = 1; elseif ( strcmp(arg, "off") ) f.axes_on = 0; + + elseif ( strcmp(arg, "auto") ) ## reset axes bounds + ## (working with just one Prop for now) + ## remove any clipping... how to do this elegently? + clipping = 0; + for i = 2:f.renderer.GetActors.GetNumberOfItems + actor = f.renderer.GetActors.GetItemAsObject(i-1); + if (!actor.GetVisibility) + clipping = 1; # maybe add this as a structure to figure, so don't need to test here + endif + endfor + ## if there has been clipping (as determined by some actors not being visible), + ## remove visible actors (the clipped ones) and make visible the others (unclipped) + if (clipping) + for i = 2:f.renderer.GetActors.GetNumberOfItems + actor = f.renderer.GetActors.GetLastActor; + if (actor.GetVisibility) + f.renderer.RemoveViewProp(actor); + else + actor.VisibilityOn + endif + endfor + endif + elseif ( strcmp(arg, "equal") || strcmp(arg, "normal") ) ## defaults in vtk ## (working with just one Prop for now) - ## remove any clipping... how to do that?????? - # probably will need to add a new structure to the figure object which contains uncut data ## reset scaling f.renderer.GetProps.GetLastProp.SetScale(1,1,1) f.axes.UseRangesOff @@ -52,12 +74,12 @@ ## (working with just one Prop for now) f.renderer.GetProps.GetLastProp.SetScale(1/span(1),1/span(2),1/span(3)) endif + else disp("manual setting of axis bounds not implemented yet") - ## attempt at clipping (only one Actor for now) - # needs to be redone so that original data can be recovered +# ## attempt at clipping (only one Actor for now) # plane = vtkPlane(); -# plane.SetOrigin(0, 0, 0); +# plane.SetOrigin(0, 0, 0); # trial case for now, will recode to use input values # plane.SetNormal(1, 0, 0); # clippoly = vtkClipPolyData; # clippoly.SetClipFunction(plane); @@ -65,12 +87,13 @@ # clippoly.GenerateClippedOutputOn(); # ##clippoly.SetValue(0.5); ?? # clippoly.SetInput(f.renderer.GetActors.GetLastActor.GetMapper.GetInput); -# ##f.renderer.GetActors.GetLastActor.GetMapper.SetInput(clippoly.GetOutput); ## this doesn't work because you can't recover original! +# ##f.renderer.GetActors.GetLastActor.GetMapper.SetInput(clippoly.GetOutput); # this doesn't work because you can't recover original! # clipmapper = vtkPolyDataMapper; # clipmapper.SetInput(clippoly.GetOutput); # clipactor = vtkActor; # clipactor.SetMapper(clipmapper); -# f.renderer.AddActor(clipactor); +# f.renderer.GetActors.GetLastActor.VisibilityOff; # turn unclipped actor off +# f.renderer.AddActor(clipactor); endif endfor |
From: Jonathan S. <jjs...@us...> - 2005-04-29 05:31:35
|
Update of /cvsroot/octaviz/octaviz/Scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16951 Modified Files: vtk_axis.m Log Message: working on axis functionality Index: vtk_axis.m =================================================================== RCS file: /cvsroot/octaviz/octaviz/Scripts/vtk_axis.m,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- vtk_axis.m 26 Apr 2005 05:07:20 -0000 1.5 +++ vtk_axis.m 29 Apr 2005 05:31:26 -0000 1.6 @@ -36,6 +36,9 @@ f.axes_on = 0; elseif ( strcmp(arg, "equal") || strcmp(arg, "normal") ) ## defaults in vtk ## (working with just one Prop for now) + ## remove any clipping... how to do that?????? + # probably will need to add a new structure to the figure object which contains uncut data + ## reset scaling f.renderer.GetProps.GetLastProp.SetScale(1,1,1) f.axes.UseRangesOff elseif ( strcmp(arg, "square") ) @@ -51,6 +54,23 @@ endif else disp("manual setting of axis bounds not implemented yet") + ## attempt at clipping (only one Actor for now) + # needs to be redone so that original data can be recovered +# plane = vtkPlane(); +# plane.SetOrigin(0, 0, 0); +# plane.SetNormal(1, 0, 0); +# clippoly = vtkClipPolyData; +# clippoly.SetClipFunction(plane); +# clippoly.GenerateClipScalarsOn(); +# clippoly.GenerateClippedOutputOn(); +# ##clippoly.SetValue(0.5); ?? +# clippoly.SetInput(f.renderer.GetActors.GetLastActor.GetMapper.GetInput); +# ##f.renderer.GetActors.GetLastActor.GetMapper.SetInput(clippoly.GetOutput); ## this doesn't work because you can't recover original! +# clipmapper = vtkPolyDataMapper; +# clipmapper.SetInput(clippoly.GetOutput); +# clipactor = vtkActor; +# clipactor.SetMapper(clipmapper); +# f.renderer.AddActor(clipactor); endif endfor @@ -63,5 +83,8 @@ ##f.axes.UseRangesOn ##f.axes.SetRanges(xl,xh,yl,yh,zl,zh) -## to set arbitrary scaling???? +## to set arbitrary scaling ##f.renderer.GetProps.GetLastProp.SetScale(xscale,yscale,zscale) + +## to get at the polydata input of the last actor; hopefully I can then clip it +#f.renderer.GetActors.GetLastActor.GetMapper.GetInput |
From: Jonathan S. <jjs...@us...> - 2005-04-26 05:07:51
|
Update of /cvsroot/octaviz/octaviz/Scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27235 Modified Files: vtk_axis.m Log Message: working on axis functionality Index: vtk_axis.m =================================================================== RCS file: /cvsroot/octaviz/octaviz/Scripts/vtk_axis.m,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- vtk_axis.m 23 Apr 2005 23:31:20 -0000 1.4 +++ vtk_axis.m 26 Apr 2005 05:07:20 -0000 1.5 @@ -35,10 +35,19 @@ elseif ( strcmp(arg, "off") ) f.axes_on = 0; elseif ( strcmp(arg, "equal") || strcmp(arg, "normal") ) ## defaults in vtk + ## (working with just one Prop for now) f.renderer.GetProps.GetLastProp.SetScale(1,1,1) f.axes.UseRangesOff elseif ( strcmp(arg, "square") ) - disp("square option not implemented yet") + vtk_axis("equal") # get to a known scale + dlims = f.outline.GetBounds; + span = [dlims(2)-dlims(1);dlims(4)-dlims(3);dlims(6)-dlims(5)]; + ## set axis limits to data values (not visible scaled values) + f.axes.UseRangesOn + f.axes.SetRanges(dlims) + ## scale the plot so that it is square + ## (working with just one Prop for now) + f.renderer.GetProps.GetLastProp.SetScale(1/span(1),1/span(2),1/span(3)) endif else disp("manual setting of axis bounds not implemented yet") @@ -55,4 +64,4 @@ ##f.axes.SetRanges(xl,xh,yl,yh,zl,zh) ## to set arbitrary scaling???? -##f.renderer.GetProps.GetLastProp.SetScale(xscale,yscale,zscale) \ No newline at end of file +##f.renderer.GetProps.GetLastProp.SetScale(xscale,yscale,zscale) |
From: Jonathan S. <jjs...@us...> - 2005-04-23 23:31:32
|
Update of /cvsroot/octaviz/octaviz/Scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23597 Modified Files: vtk_axis.m Log Message: working on axis function Index: vtk_axis.m =================================================================== RCS file: /cvsroot/octaviz/octaviz/Scripts/vtk_axis.m,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- vtk_axis.m 21 Apr 2005 17:04:23 -0000 1.3 +++ vtk_axis.m 23 Apr 2005 23:31:20 -0000 1.4 @@ -15,7 +15,7 @@ ## 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ## -*- texinfo -*- -## @deftypefn {Function File} {} vtk_axis(@var{bool}) +## @deftypefn {Function File} {} vtk_axis([@var{options}]) ## Right now, this can only be used to turn the axes on and off. ## Eventually this function should allow setting the scaling and limits of the axes. ## @end deftypefn @@ -23,15 +23,27 @@ ## Author: Dragan Tubic -function vtk_axis(visibility) - +function vtk_axis(varargin) + f = vtk_figure(0); - if ( visibility == 0 ) - f.axes_on = 0; - else - f.axes_on = 1; - end + for i=1:nargin + arg = varargin{i}; + if isstr(arg) + if ( strcmp(arg, "on") ) + f.axes_on = 1; + elseif ( strcmp(arg, "off") ) + f.axes_on = 0; + elseif ( strcmp(arg, "equal") || strcmp(arg, "normal") ) ## defaults in vtk + f.renderer.GetProps.GetLastProp.SetScale(1,1,1) + f.axes.UseRangesOff + elseif ( strcmp(arg, "square") ) + disp("square option not implemented yet") + endif + else + disp("manual setting of axis bounds not implemented yet") + endif + endfor vtk_update(f); |
From: Jonathan S. <jjs...@us...> - 2005-04-21 17:04:32
|
Update of /cvsroot/octaviz/octaviz/Scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25186 Modified Files: vtkGetDataRoot.m vtk_axis.m vtk_figure.m Log Message: working on axes functionality Index: vtk_figure.m =================================================================== RCS file: /cvsroot/octaviz/octaviz/Scripts/vtk_figure.m,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- vtk_figure.m 31 Mar 2005 17:40:21 -0000 1.8 +++ vtk_figure.m 21 Apr 2005 17:04:23 -0000 1.9 @@ -169,11 +169,11 @@ axes.SetAxisTitleTextProperty(tprop); axes.SetAxisLabelTextProperty(tprop); axes.SetViewProp( outline_actor ); - axes.GetXAxisActor2D().AdjustLabelsOn(); - axes.GetYAxisActor2D().AdjustLabelsOn(); - axes.GetZAxisActor2D().AdjustLabelsOn(); - axes.SetInertia(10); - axes.ScalingOn(); + ##axes.GetXAxisActor2D().AdjustLabelsOn(); # discovered a case where the axis label is off by ~25% when this is used; JJS 4/5/05 + ##axes.GetYAxisActor2D().AdjustLabelsOn(); + ##axes.GetZAxisActor2D().AdjustLabelsOn(); + axes.SetInertia(10); + axes.ScalingOn(); renderer.AddActor(axes); ren_win = vtkRenderWindow; Index: vtkGetDataRoot.m =================================================================== RCS file: /cvsroot/octaviz/octaviz/Scripts/vtkGetDataRoot.m,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- vtkGetDataRoot.m 21 Sep 2004 22:50:44 -0000 1.1.1.1 +++ vtkGetDataRoot.m 21 Apr 2005 17:04:22 -0000 1.2 @@ -1,5 +1,7 @@ -function f = vtkGetDataRoot();; - -f = "/usr/share/vtkdata";;; +function f = vtkGetDataRoot() -endfunction;; \ No newline at end of file + ## I guess this is a locally set variable; should put this in documents + ## f = "/usr/share/vtkdata"; + f = "/usr/local/share/vtk/VTKData-release-4-4"; + +endfunction Index: vtk_axis.m =================================================================== RCS file: /cvsroot/octaviz/octaviz/Scripts/vtk_axis.m,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- vtk_axis.m 23 Oct 2004 18:47:58 -0000 1.2 +++ vtk_axis.m 21 Apr 2005 17:04:23 -0000 1.3 @@ -36,3 +36,11 @@ vtk_update(f); endfunction + + +## to set arbitrary ranges on the axes +##f.axes.UseRangesOn +##f.axes.SetRanges(xl,xh,yl,yh,zl,zh) + +## to set arbitrary scaling???? +##f.renderer.GetProps.GetLastProp.SetScale(xscale,yscale,zscale) \ No newline at end of file |
From: Jonathan S. <jjs...@us...> - 2005-04-21 16:29:41
|
Update of /cvsroot/octaviz/octaviz/Examples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7020 Modified Files: ClipCow.m Log Message: now using vtkGetDataRoot Index: ClipCow.m =================================================================== RCS file: /cvsroot/octaviz/octaviz/Examples/ClipCow.m,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- ClipCow.m 21 Sep 2004 22:50:42 -0000 1.1.1.1 +++ ClipCow.m 21 Apr 2005 16:29:31 -0000 1.2 @@ -6,7 +6,9 @@ % 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"); +##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()); |
From: Jonathan S. <jjs...@us...> - 2005-03-31 17:40:36
|
Update of /cvsroot/octaviz/octaviz/Scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29919 Modified Files: vtk_clear.m vtk_figure.m vtk_scalarbar.m vtk_title.m Log Message: updated prop commands and such Index: vtk_clear.m =================================================================== RCS file: /cvsroot/octaviz/octaviz/Scripts/vtk_clear.m,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- vtk_clear.m 23 Oct 2004 18:47:58 -0000 1.2 +++ vtk_clear.m 31 Mar 2005 17:40:20 -0000 1.3 @@ -30,7 +30,7 @@ ## clear the rendered actors, but not the axes or outline for i = 2:f.renderer.GetActors().GetNumberOfItems() - f.renderer.RemoveProp(f.renderer.GetActors().GetLastActor()); + f.renderer.RemoveViewProp(f.renderer.GetActors().GetLastActor()); end ## clear existing scalarbar and title, if they exist @@ -38,7 +38,7 @@ while i < f.renderer.GetProps().GetNumberOfItems(); if ( f.renderer.GetProps().GetItemAsObject(i).IsA("vtkScalarBarActor") || f.renderer.GetProps().GetItemAsObject(i).IsA("vtkTextActor") ) - f.renderer.RemoveProp( f.renderer.GetProps().GetItemAsObject(i) ); + f.renderer.RemoveViewProp( f.renderer.GetProps().GetItemAsObject(i) ); --i; endif ++i; Index: vtk_title.m =================================================================== RCS file: /cvsroot/octaviz/octaviz/Scripts/vtk_title.m,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- vtk_title.m 7 Mar 2005 02:05:00 -0000 1.3 +++ vtk_title.m 31 Mar 2005 17:40:21 -0000 1.4 @@ -31,7 +31,7 @@ nprops = f.renderer.GetProps().GetNumberOfItems(); for i = 0:nprops-1; if ( f.renderer.GetProps().GetItemAsObject(i).IsA("vtkTextActor") ) - f.renderer.RemoveProp( f.renderer.GetProps().GetItemAsObject(i) ); + f.renderer.RemoveViewProp( f.renderer.GetProps().GetItemAsObject(i) ); break endif endfor Index: vtk_scalarbar.m =================================================================== RCS file: /cvsroot/octaviz/octaviz/Scripts/vtk_scalarbar.m,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- vtk_scalarbar.m 23 Oct 2004 18:47:58 -0000 1.4 +++ vtk_scalarbar.m 31 Mar 2005 17:40:21 -0000 1.5 @@ -34,7 +34,7 @@ nprops = f.renderer.GetProps().GetNumberOfItems(); for i = 0:nprops-1; if ( f.renderer.GetProps().GetItemAsObject(i).IsA("vtkScalarBarActor") ) - f.renderer.RemoveProp( f.renderer.GetProps().GetItemAsObject(i) ); + f.renderer.RemoveViewProp( f.renderer.GetProps().GetItemAsObject(i) ); break endif endfor @@ -46,6 +46,7 @@ scalarBar.GetPositionCoordinate().SetValue(0.85, 0.05); scalarBar.SetWidth(0.15); scalarBar.SetHeight(0.9); + scalarBar.SetLabelFormat("%1.2g"); f.renderer.AddActor2D(scalarBar); ## shadow unnecessary, and doesn't export to vector format correctly Index: vtk_figure.m =================================================================== RCS file: /cvsroot/octaviz/octaviz/Scripts/vtk_figure.m,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- vtk_figure.m 7 Mar 2005 02:05:00 -0000 1.7 +++ vtk_figure.m 31 Mar 2005 17:40:21 -0000 1.8 @@ -164,16 +164,16 @@ axes.SetCamera(renderer.GetActiveCamera()); axes.SetLabelFormat("%1.2g"); axes.SetFlyModeToOuterEdges(); - axes.SetFontFactor(1.0); + ##axes.SetFontFactor(1.0); # redundant, set below axes.SetNumberOfLabels(5); axes.SetAxisTitleTextProperty(tprop); axes.SetAxisLabelTextProperty(tprop); axes.SetViewProp( outline_actor ); - axes.GetXAxisActor2D().AdjustLabelsOn(); - axes.GetYAxisActor2D().AdjustLabelsOn(); - axes.GetZAxisActor2D().AdjustLabelsOn(); - axes.SetInertia(10); - axes.ScalingOn(); + axes.GetXAxisActor2D().AdjustLabelsOn(); + axes.GetYAxisActor2D().AdjustLabelsOn(); + axes.GetZAxisActor2D().AdjustLabelsOn(); + axes.SetInertia(10); + axes.ScalingOn(); renderer.AddActor(axes); ren_win = vtkRenderWindow; @@ -185,7 +185,7 @@ ## my display preferences; JJS 9/25/04 ## certainly could create functions later to allow users to easily change them renderer.SetBackground( 0.4, 0.4, 0.4 ); - axes.SetFontFactor(1.2); + axes.SetFontFactor(1.5); # was 1.2, but sizing seems smaller in recent VTK version ren_win.SetSize(400,400); iren.SetInteractorStyle(vtkInteractorStyleTrackballCamera()); |
From: Dragan T. <dr...@us...> - 2005-03-11 01:00:07
|
Update of /cvsroot/octaviz/octaviz/Common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32258/Common Modified Files: octaviz.h Log Message: Added missing #include <inttypes.h> Index: octaviz.h =================================================================== RCS file: /cvsroot/octaviz/octaviz/Common/octaviz.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- octaviz.h 7 Mar 2005 02:06:53 -0000 1.3 +++ octaviz.h 11 Mar 2005 00:59:54 -0000 1.4 @@ -41,7 +41,7 @@ #include <string> #include <map> - +#include <inttypes.h> // Threads #include <pthread.h> /// X window and Motif related stuff |
From: Dragan T. <dr...@us...> - 2005-03-07 02:07:04
|
Update of /cvsroot/octaviz/octaviz/Common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1987/Common Modified Files: octaviz.cc octaviz.h vtkInitializeInteractor.cc Log Message: Replaced unsigned int pointer casts with uintptr_t. Fixed 32/64 bit issues. Should work now on AMD64 bit platform. Thanks to Mark Hesselink. Index: octaviz.cc =================================================================== RCS file: /cvsroot/octaviz/octaviz/Common/octaviz.cc,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- octaviz.cc 16 Nov 2004 02:21:17 -0000 1.3 +++ octaviz.cc 7 Mar 2005 02:06:53 -0000 1.4 @@ -112,9 +112,9 @@ vtk_pointer ( pointer ) { //std::cout << "Creating.\n" << std::flush; - std::map<unsigned int, int>& reference_count = get_reference_map(); + std::map<uintptr_t, int>& reference_count = get_reference_map(); - unsigned int key = reinterpret_cast<unsigned int>( pointer ); + uintptr_t key = reinterpret_cast<uintptr_t>( pointer ); if ( belongs_to_octave ) { @@ -124,7 +124,7 @@ { error("Panic: creating vtk object that already exists!\n"); } - reference_count[key] = 1; + reference_count[key] = 1; return; } @@ -147,9 +147,9 @@ vtk_pointer (s.vtk_pointer) { //std::cout << "Creating copy.\n" << std::flush; - std::map<unsigned int, int>& reference_count = get_reference_map(); + std::map<uintptr_t, int>& reference_count = get_reference_map(); - unsigned int key = reinterpret_cast<unsigned int>( vtk_pointer ); + uintptr_t key = reinterpret_cast<uintptr_t>( vtk_pointer ); // If this is a clone than it exists in reference count map if ( reference_count.find(key) == reference_count.end() ) return; @@ -161,8 +161,8 @@ vtk_object::~vtk_object (void) { //std::cout << "Destroying.\n" << std::flush; - std::map<unsigned int, int>& reference_count = get_reference_map(); - unsigned int key = reinterpret_cast<unsigned int>( vtk_pointer ); + std::map<uintptr_t, int>& reference_count = get_reference_map(); + uintptr_t key = reinterpret_cast<uintptr_t>( vtk_pointer ); // Check if the pointer is reference counted. if ( reference_count.find(key) == reference_count.end() ) return; @@ -182,6 +182,17 @@ { return reinterpret_cast<unsigned int>(vtk_pointer); } + +octave_uint64 vtk_object::uint64_scalar_value (void) const +{ + return reinterpret_cast<octave_uint64_t>(vtk_pointer); +} + +octave_uint32 vtk_object::uint32_scalar_value (void) const +{ + return reinterpret_cast<octave_uint32_t>(vtk_pointer); +} + bool vtk_object::is_defined (void) const { @@ -306,17 +317,17 @@ } -std::map<unsigned int, int>& vtk_object::get_reference_map() +std::map<uintptr_t, int>& vtk_object::get_reference_map() { - static std::map<unsigned int, int> reference_count; + static std::map<uintptr_t, int> reference_count; return reference_count; } void vtk_object::print_ref_table() { octave_stdout << "vtk_object::print_ref_table\n" << std::flush; - std::map<unsigned int, int>& reference_count = get_reference_map(); - std::map<unsigned int, int>:: iterator i; + std::map<uintptr_t, int>& reference_count = get_reference_map(); + std::map<uintptr_t, int>:: iterator i; for ( i = reference_count.begin(); i != reference_count.end(); i++ ) { octave_stdout << std::hex << (*i).first << ":" << (*i).second << std::endl; Index: vtkInitializeInteractor.cc =================================================================== RCS file: /cvsroot/octaviz/octaviz/Common/vtkInitializeInteractor.cc,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- vtkInitializeInteractor.cc 3 Nov 2004 23:51:19 -0000 1.3 +++ vtkInitializeInteractor.cc 7 Mar 2005 02:06:53 -0000 1.4 @@ -75,7 +75,7 @@ vtkXOpenGLRenderWindow* RenderWindow = reinterpret_cast<vtkXOpenGLRenderWindow*>(CurrentInteractor->GetRenderWindow()); Widget widg = CurrentInteractor->GetWidget(); Atom wm_delete_window = XInternAtom(XtDisplay(widg), "WM_DELETE_WINDOW", False); - vtk_delete_window_atoms[wm_delete_window] = reinterpret_cast<unsigned int>(RenderWindow); + vtk_delete_window_atoms[wm_delete_window] = reinterpret_cast<uintptr_t>(RenderWindow); // turn off default delete response XSetWMProtocols(XtDisplay(widg), XtWindow(widg), &wm_delete_window, 1); return retval; Index: octaviz.h =================================================================== RCS file: /cvsroot/octaviz/octaviz/Common/octaviz.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- octaviz.h 24 Oct 2004 02:09:13 -0000 1.2 +++ octaviz.h 7 Mar 2005 02:06:53 -0000 1.3 @@ -70,6 +70,11 @@ unsigned int uint_value (bool req_int=false, bool frc_str_conv=false) const; + octave_uint64 uint64_scalar_value (void) const; + + octave_uint32 uint32_scalar_value (void) const; + + bool is_defined (void) const; // since we are a function, we won't see do_index_op @@ -102,7 +107,7 @@ vtkObjectBase* vtk_pointer; - static std::map<unsigned int, int>& get_reference_map(); + static std::map<uintptr_t, int>& get_reference_map(); std::string vtk_class; |
From: Dragan T. <dr...@us...> - 2005-03-07 02:07:04
|
Update of /cvsroot/octaviz/octaviz/Wrapping In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1987/Wrapping Modified Files: vtkWrapOctave.c Log Message: Replaced unsigned int pointer casts with uintptr_t. Fixed 32/64 bit issues. Should work now on AMD64 bit platform. Thanks to Mark Hesselink. Index: vtkWrapOctave.c =================================================================== RCS file: /cvsroot/octaviz/octaviz/Wrapping/vtkWrapOctave.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- vtkWrapOctave.c 1 Mar 2005 02:53:07 -0000 1.3 +++ vtkWrapOctave.c 7 Mar 2005 02:06:54 -0000 1.4 @@ -15,6 +15,7 @@ #include <stdio.h> #include <string.h> +#include <inttypes.h> #include "vtkParse.h" int numberOfWrappedFunctions = 0; @@ -348,7 +349,11 @@ case 109: case 309: fprintf(fp," if ( args(%i).type_id() != vtk_object::static_type_id() ) error_flag = 1;\n",start_arg); - fprintf(fp," else temp%i = reinterpret_cast<%s*>( args(%i).uint32_scalar_value().value() );\n",i,currentFunction->ArgClasses[i],start_arg); +# if __WORDSIZE == 64 + fprintf(fp," else temp%i = reinterpret_cast<%s*>( args(%i).uint64_scalar_value().value() );\n",i,currentFunction->ArgClasses[i],start_arg); +# else + fprintf(fp," else temp%i = reinterpret_cast<%s*>( args(%i).uint32_scalar_value().value() );\n",i,currentFunction->ArgClasses[i],start_arg); +# endif /* FIXME fprintf(fp," retval = octave_value( new vtk_object(temp%i) );\n",MAX_ARGS); fprintf(fp," 309temp%i = (%s *)(vtkTclGetPointerFromObject(argv[%i],(char *) \"%s\",interp,error_flag));\n",i,currentFunction->ArgClasses[i],start_arg, @@ -685,7 +690,11 @@ fprintf(fp," octave_stdout << help_map[args(0).string_value()] << std::endl;\n"); fprintf(fp," return retval;\n }\n\n"); +# if __WORDSIZE == 64 + fprintf(fp," %s *vtk_pointer = reinterpret_cast<%s*>( args(0).uint64_scalar_value().value() );\n",data->ClassName,data->ClassName); +# else fprintf(fp," %s *vtk_pointer = reinterpret_cast<%s*>( args(0).uint32_scalar_value().value() );\n",data->ClassName,data->ClassName); +# endif fprintf(fp," std::string method_name = args(1).string_value();\n"); fprintf(fp," int error_flag;\n"); fprintf(fp," error_flag = 0; error_flag = error_flag;\n\n"); @@ -710,7 +719,11 @@ fprintf(fp," error_flag = 0;\n"); fprintf(fp," vtkOctaveCommand* comm = vtkOctaveCommand::New();\n"); fprintf(fp," comm->SetFunctionName(args(3).string_value().c_str());\n"); +# if __WORDSIZE == 64 + fprintf(fp," vtk_object *vtk_obj = reinterpret_cast<vtk_object*>( args(0).uint64_scalar_value().value() );\n"); +# else fprintf(fp," vtk_object *vtk_obj = reinterpret_cast<vtk_object*>( args(0).uint32_scalar_value().value() );\n"); +# endif fprintf(fp," comm->SetObject( vtk_obj );\n"); fprintf(fp," vtk_pointer->AddObserver(args(2).string_value().c_str(),comm);\n"); fprintf(fp," comm->Delete();\n"); |
Update of /cvsroot/octaviz/octaviz/Scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1430 Modified Files: vtk_arrows3.m vtk_cone3.m vtk_contour3.m vtk_figure.m vtk_line3.m vtk_plot3.m vtk_quiver3.m vtk_title.m vtk_trimesh.m vtk_trisurf.m Log Message: Replaced deprecated Prop functions in preparation for VTK 5.0. Index: vtk_cone3.m =================================================================== RCS file: /cvsroot/octaviz/octaviz/Scripts/vtk_cone3.m,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- vtk_cone3.m 23 Oct 2004 18:47:58 -0000 1.2 +++ vtk_cone3.m 7 Mar 2005 02:05:00 -0000 1.3 @@ -135,7 +135,7 @@ end f = vtk_figure(0); - f.renderer.AddProp(arrowActor); + f.renderer.AddActor(arrowActor); vtk_update(f); endfunction Index: vtk_trisurf.m =================================================================== RCS file: /cvsroot/octaviz/octaviz/Scripts/vtk_trisurf.m,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- vtk_trisurf.m 5 Dec 2004 05:22:01 -0000 1.7 +++ vtk_trisurf.m 7 Mar 2005 02:05:00 -0000 1.8 @@ -207,7 +207,7 @@ end f = vtk_figure(0); - f.renderer.AddProp(surfaceActor); + f.renderer.AddActor(surfaceActor); vtk_update(f); endfunction Index: vtk_trimesh.m =================================================================== RCS file: /cvsroot/octaviz/octaviz/Scripts/vtk_trimesh.m,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- vtk_trimesh.m 25 Oct 2004 05:37:10 -0000 1.6 +++ vtk_trimesh.m 7 Mar 2005 02:05:00 -0000 1.7 @@ -210,7 +210,7 @@ prop.SetRepresentationToWireframe() f = vtk_figure(0); - f.renderer.AddProp(surfaceActor); + f.renderer.AddActor(surfaceActor); else ## We will now create a nice looking mesh by wrapping the edges in tubes, ## and putting fat spheres at the points. @@ -256,8 +256,8 @@ ballActor.SetMapper(mapBalls); f = vtk_figure(0); - f.renderer.AddProp(edgeActor); - f.renderer.AddProp(ballActor); + f.renderer.AddActor(edgeActor); + f.renderer.AddActor(ballActor); endif vtk_update(f); Index: vtk_figure.m =================================================================== RCS file: /cvsroot/octaviz/octaviz/Scripts/vtk_figure.m,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- vtk_figure.m 7 Dec 2004 01:45:16 -0000 1.6 +++ vtk_figure.m 7 Mar 2005 02:05:00 -0000 1.7 @@ -168,13 +168,13 @@ axes.SetNumberOfLabels(5); axes.SetAxisTitleTextProperty(tprop); axes.SetAxisLabelTextProperty(tprop); - axes.SetProp( outline_actor ); + axes.SetViewProp( outline_actor ); axes.GetXAxisActor2D().AdjustLabelsOn(); axes.GetYAxisActor2D().AdjustLabelsOn(); axes.GetZAxisActor2D().AdjustLabelsOn(); axes.SetInertia(10); axes.ScalingOn(); - renderer.AddProp(axes); + renderer.AddActor(axes); ren_win = vtkRenderWindow; ren_win.AddRenderer(renderer); Index: vtk_contour3.m =================================================================== RCS file: /cvsroot/octaviz/octaviz/Scripts/vtk_contour3.m,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- vtk_contour3.m 25 Oct 2004 05:37:09 -0000 1.1 +++ vtk_contour3.m 7 Mar 2005 02:05:00 -0000 1.2 @@ -138,7 +138,7 @@ contActor.SetMapper(contMapper) f = vtk_figure(0); - f.renderer.AddProp(contActor); + f.renderer.AddActor(contActor); f.axes.YAxisVisibilityOff(); # turn off the "Z" axes (but use YAxis command!?) vtk_update(f); Index: vtk_title.m =================================================================== RCS file: /cvsroot/octaviz/octaviz/Scripts/vtk_title.m,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- vtk_title.m 23 Oct 2004 18:47:58 -0000 1.2 +++ vtk_title.m 7 Mar 2005 02:05:00 -0000 1.3 @@ -42,7 +42,7 @@ textActor.GetPositionCoordinate().SetValue(0.25,0.90); textActor.SetHeight(0.05); textActor.SetInput( titlename ); - f.renderer.AddProp(textActor); + f.renderer.AddActor(textActor); vtk_update(f); Index: vtk_arrows3.m =================================================================== RCS file: /cvsroot/octaviz/octaviz/Scripts/vtk_arrows3.m,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- vtk_arrows3.m 23 Oct 2004 18:47:58 -0000 1.3 +++ vtk_arrows3.m 7 Mar 2005 02:05:00 -0000 1.4 @@ -138,7 +138,7 @@ end f = vtk_figure(0); - f.renderer.AddProp(arrowActor); + f.renderer.AddActor(arrowActor); vtk_update(f); endfunction Index: vtk_plot3.m =================================================================== RCS file: /cvsroot/octaviz/octaviz/Scripts/vtk_plot3.m,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- vtk_plot3.m 10 Dec 2004 03:32:10 -0000 1.5 +++ vtk_plot3.m 7 Mar 2005 02:05:00 -0000 1.6 @@ -146,7 +146,7 @@ end f = vtk_figure(0); - f.renderer.AddProp(cloud_actor); + f.renderer.AddActor(cloud_actor); vtk_update(f); endfunction Index: vtk_line3.m =================================================================== RCS file: /cvsroot/octaviz/octaviz/Scripts/vtk_line3.m,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- vtk_line3.m 28 Nov 2004 04:01:13 -0000 1.4 +++ vtk_line3.m 7 Mar 2005 02:05:00 -0000 1.5 @@ -132,7 +132,7 @@ poly_actor.GetProperty().SetOpacity(1); end - f.renderer.AddProp(poly_actor); + f.renderer.AddActor(poly_actor); end vtk_update(f); Index: vtk_quiver3.m =================================================================== RCS file: /cvsroot/octaviz/octaviz/Scripts/vtk_quiver3.m,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- vtk_quiver3.m 27 Oct 2004 05:34:45 -0000 1.1 +++ vtk_quiver3.m 7 Mar 2005 02:05:00 -0000 1.2 @@ -138,8 +138,8 @@ hog_actor.SetMapper(hog_mapper) f = vtk_figure(0); - f.renderer.AddProp(surfaceActor); - f.renderer.AddProp(hog_actor); + f.renderer.AddActor(surfaceActor); + f.renderer.AddActor(hog_actor); vtk_update(f); endfunction |
From: Dragan T. <dr...@us...> - 2005-03-01 02:56:04
|
Update of /cvsroot/octaviz/octaviz/Common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19198 Modified Files: OctavizCommon.h Log Message: Fixed CurrentTime name conflict. Thanks to George Hexner. Index: OctavizCommon.h =================================================================== RCS file: /cvsroot/octaviz/octaviz/Common/OctavizCommon.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- OctavizCommon.h 12 Oct 2004 02:52:47 -0000 1.2 +++ OctavizCommon.h 1 Mar 2005 02:55:53 -0000 1.3 @@ -6,3 +6,9 @@ #ifdef None #undef None #endif +#ifdef CurrentTime + #undef CurrentTime +#endif + + + |
From: Dragan T. <dr...@us...> - 2005-03-01 02:53:19
|
Update of /cvsroot/octaviz/octaviz/Wrapping In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18169 Modified Files: lex.yy.c vtkParse.l vtkParse.tab.c vtkWrapOctave.c Log Message: Patched (but not fixed) vtkIdType problem. Index: lex.yy.c =================================================================== RCS file: /cvsroot/octaviz/octaviz/Wrapping/lex.yy.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- lex.yy.c 1 Mar 2005 02:13:29 -0000 1.2 +++ lex.yy.c 1 Mar 2005 02:53:06 -0000 1.3 @@ -83,14 +83,14 @@ /* The "const" storage-class-modifier is valid. */ #define YY_USE_CONST -#else /* ! __cplusplus */ +#else /* ! __cplusplus */ #if __STDC__ #define YY_USE_CONST -#endif /* __STDC__ */ [...2337 lines suppressed...] + * as though doing an assignment. + */ + return (void *) realloc( (char *) ptr, size ); } void yyfree (void * ptr ) { - free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ + free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" @@ -2598,3 +2641,7 @@ #undef YY_DECL #endif #line 238 "vtkParse.l" + + + + Index: vtkParse.l =================================================================== RCS file: /cvsroot/octaviz/octaviz/Wrapping/vtkParse.l,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- vtkParse.l 1 Mar 2005 02:13:29 -0000 1.2 +++ vtkParse.l 1 Mar 2005 02:53:06 -0000 1.3 @@ -176,7 +176,7 @@ "static" return(STATIC); "vtkFloatingPointType" return(DOUBLE); -"vtkIdType" return(LONG); +"vtkIdType" return(INT); "vtkSetMacro" return(SetMacro); "vtkGetMacro" return(GetMacro); "vtkSetStringMacro" return(SetStringMacro); Index: vtkParse.tab.c =================================================================== RCS file: /cvsroot/octaviz/octaviz/Wrapping/vtkParse.tab.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- vtkParse.tab.c 1 Mar 2005 02:13:29 -0000 1.2 +++ vtkParse.tab.c 1 Mar 2005 02:53:06 -0000 1.3 @@ -169,6 +169,7 @@ Modify vtkParse.tab.c: - remove TABs + - comment out yyerrorlab stuff */ @@ -226,7 +227,7 @@ sigAllocatedLength) { currentFunction->Signature = (char *) [...1518 lines suppressed...] { if ((!strcmp(h_cls,data.ClassName))&& - currentFunction->Name && - (!strcmp(h_func,currentFunction->Name))&& - (h_type == currentFunction->ReturnType)) + currentFunction->Name && + (!strcmp(h_func,currentFunction->Name))&& + (h_type == currentFunction->ReturnType)) { currentFunction->HaveHint = 1; currentFunction->HintSize = h_value; @@ -2979,7 +2978,7 @@ case 301: case 302: case 307: case 304: case 305: case 306: case 313: look_for_hint(); - break; + break; } } Index: vtkWrapOctave.c =================================================================== RCS file: /cvsroot/octaviz/octaviz/Wrapping/vtkWrapOctave.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- vtkWrapOctave.c 1 Mar 2005 02:13:29 -0000 1.2 +++ vtkWrapOctave.c 1 Mar 2005 02:53:07 -0000 1.3 @@ -498,7 +498,7 @@ fprintf(fp," if ( ( method_name == \"%s\" ) && ( nargin == %i ) )\n {\n", currentFunction->Name, required_args + 2); /* process the args */ - fprintf(fp,"\n/* %s */\n",currentFunction->Signature); + fprintf(fp,"\n/* ah %s */\n",currentFunction->Signature); for (i = 0; i < currentFunction->NumberOfArguments; i++) { output_temp(fp, i, currentFunction->ArgTypes[i], |
From: Dragan T. <dr...@us...> - 2005-03-01 02:13:49
|
Update of /cvsroot/octaviz/octaviz/Wrapping In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5805 Modified Files: hints lex.yy.c vtkParse.h vtkParse.l vtkParse.tab.c vtkParse.y vtkWrapOctave.c Log Message: Fixed problems related to preprocessor directives within class declarations (CVS VTK). Index: vtkParse.h =================================================================== RCS file: /cvsroot/octaviz/octaviz/Wrapping/vtkParse.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- vtkParse.h 21 Sep 2004 22:50:39 -0000 1.1.1.1 +++ vtkParse.h 1 Mar 2005 02:13:29 -0000 1.2 @@ -33,6 +33,7 @@ char *ReturnClass; char *Comment; char *Signature; + int IsLegacy; } FunctionInfo; typedef struct _FileInfo Index: vtkParse.y =================================================================== RCS file: /cvsroot/octaviz/octaviz/Wrapping/vtkParse.y,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- vtkParse.y 21 Sep 2004 22:50:39 -0000 1.1.1.1 +++ vtkParse.y 1 Mar 2005 02:13:29 -0000 1.2 @@ -12,14 +12,42 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ - %{ + +/* + +This file must be translated to C and modified to build everywhere. + +Run yacc like this: + + yacc -b vtkParse vtkParse.y + +Modify vtkParse.tab.c: + - remove TABs + - comment out yyerrorlab stuff + +*/ + #include <stdio.h> #include <stdlib.h> #include <string.h> #define yyerror(a) fprintf(stderr,"%s\n",a) #define yywrap() 1 +static void vtkParseDebug(const char* s1, const char* s2); + +/* MSVC Does not define __STDC__ properly. */ +#if defined(_MSC_VER) && _MSC_VER >= 1200 && !defined(__STDC__) +# define __STDC__ 1 +#endif + +/* Disable warnings in generated code. */ +#if defined(_MSC_VER) +# pragma warning (disable: 4127) /* conditional expression is constant */ +# pragma warning (disable: 4244) /* conversion to smaller integer type */ +#endif + +int yylex(void); void output_function(); /* vtkstrdup is not part of POSIX so we create our own */ @@ -44,7 +72,7 @@ int CommentState; int openSig; int invertSig; - int sigAllocatedLength; + unsigned int sigAllocatedLength; #define YYMAXDEPTH 1000 @@ -107,6 +135,10 @@ currentFunction->Signature = NULL; } } + void legacySig(void) + { + currentFunction->IsLegacy = 1; + } %} %union{ @@ -139,6 +171,7 @@ %token STATIC %token VAR_FUNCTION %token ARRAY_NUM +%token VTK_LEGACY /* macro tokens */ %token SetMacro @@ -179,55 +212,99 @@ class_def_body: class_def_item | class_def_item class_def_body; class_def_item: scope_type ':' | var - | function | FRIEND function | macro ';' | macro; + | operator + | FRIEND operator + | function func_body { output_function(); } + | FRIEND function func_body { output_function(); } + | legacy_function func_body { legacySig(); output_function(); } + | macro ';' + | macro; -function: '~' func { preSig("~"); output_function(); } - | VIRTUAL '~' func { preSig("virtual ~"); output_function(); } - | func +legacy_function: VTK_LEGACY '(' function ')' + +function: '~' func { preSig("~"); } + | VIRTUAL '~' func { preSig("virtual ~"); } + | func + | type func + { + currentFunction->ReturnType = $<integer>1; + } + | type CONST func + { + currentFunction->ReturnType = $<integer>1; + } + | VIRTUAL type CONST func + { + preSig("virtual "); + currentFunction->ReturnType = $<integer>2; + } + | VIRTUAL type func + { + preSig("virtual "); + currentFunction->ReturnType = $<integer>2; + } + | VIRTUAL func + { + preSig("virtual "); + }; + +operator: + operator_sig { output_function(); } - | type func + | type operator_sig { currentFunction->ReturnType = $<integer>1; output_function(); - } - | VIRTUAL type func + } + | type CONST operator_sig + { + currentFunction->ReturnType = $<integer>1; + output_function(); + } + | VIRTUAL type CONST operator_sig { preSig("virtual "); currentFunction->ReturnType = $<integer>2; output_function(); } - | VIRTUAL func + | VIRTUAL type operator_sig + { + preSig("virtual "); + currentFunction->ReturnType = $<integer>2; + output_function(); + } + | VIRTUAL operator_sig { preSig("virtual "); output_function(); }; -func: func_beg { postSig(")"); } maybe_const { postSig(";"); openSig = 0; } - func_end +operator_sig: OPERATOR maybe_other_no_semi ';' + { + currentFunction->IsOperator = 1; + vtkParseDebug("Converted operator", 0); + } + +func: func_sig { postSig(")"); } maybe_const { postSig(";"); openSig = 0; } { openSig = 1; currentFunction->Name = $<str>1; - fprintf(stderr," Parsed func %s\n",$<str>1); - } - | OPERATOR maybe_other_no_semi ';' - { - currentFunction->IsOperator = 1; - fprintf(stderr," Converted operator\n"); + vtkParseDebug("Parsed func", $<str>1); } - | func_beg '=' NUM ';' + | func_sig '=' NUM { postSig(") = 0;"); currentFunction->Name = $<str>1; - fprintf(stderr," Parsed func %s\n",$<str>1); + vtkParseDebug("Parsed func", $<str>1); currentFunction->IsPureVirtual = 1; data.IsAbstract = 1; }; maybe_const: | CONST {postSig(" const");}; -func_beg: any_id '(' {postSig(" ("); } args_list ')'; +func_sig: any_id '(' {postSig(" ("); } args_list ')'; const_mod: CONST {postSig("const ");}; @@ -235,7 +312,7 @@ any_id: VTK_ID {postSig($<str>1);} | ID {postSig($<str>1);}; -func_end: ';' +func_body: ';' | '{' maybe_other '}' ';' | '{' maybe_other '}' | ':' maybe_other_no_semi ';'; @@ -284,8 +361,8 @@ { postSig("[]"); $<integer>$ = 300 + $<integer>4 % 1000; }; type: const_mod type_red1 {$<integer>$ = 1000 + $<integer>2;} - | type_red1 {$<integer>$ = $<integer>1;}; - | static_mod type_red1 {$<integer>$ = 2000 + $<integer>2;}; + | type_red1 {$<integer>$ = $<integer>1;} + | static_mod type_red1 {$<integer>$ = 2000 + $<integer>2;} | static_mod const_mod type_red1 {$<integer>$ = 3000 + $<integer>3;}; type_red1: type_red2 {$<integer>$ = $<integer>1;} @@ -859,6 +936,7 @@ sprintf(currentFunction->Signature, "%s *SafeDownCast (vtkObject* o);", $<str>3); sprintf(temps,"SafeDownCast"); + currentFunction->Name = vtkstrdup(temps); currentFunction->NumberOfArguments = 1; currentFunction->ArgTypes[0] = 309; currentFunction->ArgCounts[0] = 1; @@ -890,6 +968,19 @@ #include <string.h> #include "lex.yy.c" +static void vtkParseDebug(const char* s1, const char* s2) +{ + if ( getenv("DEBUG") ) + { + fprintf(stderr, " %s", s1); + if ( s2 ) + { + fprintf(stderr, " %s", s2); + } + fprintf(stderr, "\n"); + } +} + /* initialize the structure */ void InitFunction(FunctionInfo *func) { @@ -905,6 +996,7 @@ func->ReturnClass = NULL; func->Comment = NULL; func->Signature = NULL; + func->IsLegacy = 0; sigAllocatedLength = 0; openSig = 1; invertSig = 0; Index: vtkParse.l =================================================================== RCS file: /cvsroot/octaviz/octaviz/Wrapping/vtkParse.l,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- vtkParse.l 21 Sep 2004 22:50:39 -0000 1.1.1.1 +++ vtkParse.l 1 Mar 2005 02:13:29 -0000 1.2 @@ -1,9 +1,30 @@ %option yylineno %{ + +/* + +This file must be translated to C and modified to build everywhere. + +Run flex like this: + + flex vtkParse.l + +Modify lex.yy.c: + - remove yyunput function + - remove TABs + +*/ + /* We do not care of interactive mode */ #define YY_NEVER_INTERACTIVE 1 #define YY_NO_UNPUT 1 +/* Do not include unistd.h in generated source. */ +#define YY_NO_UNISTD_H + +/* Skip declaring this function. It is a macro. */ +#define YY_SKIP_YYWRAP + #ifdef _WIN32 #pragma warning ( disable : 4127 ) #pragma warning ( disable : 4131 ) @@ -179,6 +200,7 @@ "vtkWorldCoordinateMacro" return(WorldCoordinateMacro); "vtkTypeMacro" return(TypeMacro); "vtkTypeRevisionMacro" return(TypeMacro); +"VTK_LEGACY" return(VTK_LEGACY); [0-9]+ { sscanf(yytext,"%d",&yylval.integer); return(NUM);} Index: vtkWrapOctave.c =================================================================== RCS file: /cvsroot/octaviz/octaviz/Wrapping/vtkWrapOctave.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- vtkWrapOctave.c 21 Sep 2004 22:50:41 -0000 1.1.1.1 +++ vtkWrapOctave.c 1 Mar 2005 02:13:29 -0000 1.2 @@ -348,7 +348,7 @@ case 109: case 309: fprintf(fp," if ( args(%i).type_id() != vtk_object::static_type_id() ) error_flag = 1;\n",start_arg); - fprintf(fp," else temp%i = reinterpret_cast<%s*>( args(%i).uint_value() );\n",i,currentFunction->ArgClasses[i],start_arg); + fprintf(fp," else temp%i = reinterpret_cast<%s*>( args(%i).uint32_scalar_value().value() );\n",i,currentFunction->ArgClasses[i],start_arg); /* FIXME fprintf(fp," retval = octave_value( new vtk_object(temp%i) );\n",MAX_ARGS); fprintf(fp," 309temp%i = (%s *)(vtkTclGetPointerFromObject(argv[%i],(char *) \"%s\",interp,error_flag));\n",i,currentFunction->ArgClasses[i],start_arg, @@ -685,7 +685,7 @@ fprintf(fp," octave_stdout << help_map[args(0).string_value()] << std::endl;\n"); fprintf(fp," return retval;\n }\n\n"); - fprintf(fp," %s *vtk_pointer = reinterpret_cast<%s*>( args(0).uint_value() );\n",data->ClassName,data->ClassName); + fprintf(fp," %s *vtk_pointer = reinterpret_cast<%s*>( args(0).uint32_scalar_value().value() );\n",data->ClassName,data->ClassName); fprintf(fp," std::string method_name = args(1).string_value();\n"); fprintf(fp," int error_flag;\n"); fprintf(fp," error_flag = 0; error_flag = error_flag;\n\n"); @@ -710,7 +710,7 @@ fprintf(fp," error_flag = 0;\n"); fprintf(fp," vtkOctaveCommand* comm = vtkOctaveCommand::New();\n"); fprintf(fp," comm->SetFunctionName(args(3).string_value().c_str());\n"); - fprintf(fp," vtk_object *vtk_obj = reinterpret_cast<vtk_object*>( args(0).uint_value() );\n"); + fprintf(fp," vtk_object *vtk_obj = reinterpret_cast<vtk_object*>( args(0).uint32_scalar_value().value() );\n"); fprintf(fp," comm->SetObject( vtk_obj );\n"); fprintf(fp," vtk_pointer->AddObserver(args(2).string_value().c_str(),comm);\n"); fprintf(fp," comm->Delete();\n"); Index: lex.yy.c =================================================================== RCS file: /cvsroot/octaviz/octaviz/Wrapping/lex.yy.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- lex.yy.c 21 Sep 2004 22:50:41 -0000 1.1.1.1 +++ lex.yy.c 1 Mar 2005 02:13:29 -0000 1.2 @@ -1,55 +1,96 @@ -/* A lexical scanner generated by flex */ -/* Scanner skeleton version: - * $Header$ - */ +#line 3 "lex.yy.c" + +#define YY_INT_ALIGNED short int + +/* A lexical scanner generated by flex */ [...4243 lines suppressed...] - yylex(); - return 0; - } -#endif -#line 224 "vtkParse.l" +#define YYTABLES_NAME "yytables" +#undef YY_NEW_FILE +#undef YY_FLUSH_BUFFER +#undef yy_set_bol +#undef yy_new_buffer +#undef yy_set_interactive +#undef yytext_ptr +#undef YY_DO_BEFORE_ACTION +#ifdef YY_DECL_IS_OURS +#undef YY_DECL_IS_OURS +#undef YY_DECL +#endif +#line 238 "vtkParse.l" Index: vtkParse.tab.c =================================================================== RCS file: /cvsroot/octaviz/octaviz/Wrapping/vtkParse.tab.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- vtkParse.tab.c 21 Sep 2004 22:50:40 -0000 1.1.1.1 +++ vtkParse.tab.c 1 Mar 2005 02:13:29 -0000 1.2 @@ -1,22 +1,198 @@ -#define YYBYACC 1 -#define YYMAJOR 1 -#define YYMINOR 9 -#define YYLEX yylex() -#define YYEMPTY -1 -#define yyclearin (yychar=(YYEMPTY)) -#define yyerrok (yyerrflag=0) -#define YYRECOVERING() (yyerrflag!=0) -static int yygrowstack(); -#define YYPREFIX "yy" -#line 44 "vtkParse.y" [...4102 lines suppressed...] + else + { + fout = fopen(argv[3],"w"); + data.OutputFileName = argv[3]; + } + + if (!fout) + { + fprintf(stderr,"Error opening output file %s\n",argv[3]); + exit(1); + } + vtkParseOutput(fout,&data); + fclose (fout); + + return 0; +} + + + + Index: hints =================================================================== RCS file: /cvsroot/octaviz/octaviz/Wrapping/hints,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- hints 21 Sep 2004 22:50:39 -0000 1.1.1.1 +++ hints 1 Mar 2005 02:13:29 -0000 1.2 @@ -23,6 +23,9 @@ vtkCoordinate GetComputedViewportValue 304 2 vtkCoordinate GetComputedWorldValue 307 3 vtkCubeAxesActor2D GetBounds 307 6 +vtkCubeAxesActor2D GetRanges 307 6 +vtkDataObject GetWholeExtent 304 6 +vtkDataObject GetUpdateExtent 304 6 vtkDataArray GetRange 307 2 vtkDataArray GetTuple2 307 2 vtkDataArray GetTuple3 307 3 @@ -53,6 +56,7 @@ vtkImageConvolve GetKernel5x5 301 25 vtkImageConvolve GetKernel3x3x3 301 27 vtkImageData GetDimensions 304 3 +vtkImageData GetExtent 304 6 vtkImageData GetIncrements 304 3 vtkImageData GetPoint 307 3 vtkImageEllipsoidSource GetWholeExtent 304 6 @@ -70,6 +74,8 @@ vtkImageReslice GetResliceAxesDirectionCosines 307 9 vtkImageReslice GetResliceAxesOrigin 307 3 vtkImageSource GetExecuteExtent 304 6 +vtkImageSpatialAlgorithm GetKernelMiddle 304 3 +vtkImageSpatialAlgorithm GetKernelSize 304 3 vtkImageSpatialFilter GetKernelMiddle 304 3 vtkImageSpatialFilter GetKernelSize 304 3 vtkImageTracerWidget GetHandlePosition 307 3 @@ -139,6 +145,7 @@ vtkQuadricClustering GetNumberOfDivisions 304 3 vtkRayCaster GetParallelIncrements 301 2 vtkRayCaster GetParallelStartPosition 301 3 +vtkRectilinearGrid GetExtent 304 6 vtkRectilinearGrid GetPoint 307 3 vtkRecursiveSphereDirectionEncoder GetDecodedGradient 301 3 vtkRenderer ComputeVisiblePropBounds 307 6 @@ -146,6 +153,7 @@ vtkSplineWidget GetHandlePosition 307 3 vtkStreamer GetStartPosition 307 3 vtkStructuredGrid GetDimensions 304 3 +vtkStructuredGrid GetExtent 304 6 vtkStructuredGrid GetPoint 307 3 vtkStructuredGrid GetScalarRange 307 2 vtkStructuredPointsGeometryFilter GetExtent 304 6 |
From: Rafael L. <rla...@us...> - 2005-02-12 21:41:45
|
Update of /cvsroot/octaviz/octaviz/debian In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30018 Removed Files: .cvsignore README.Debian changelog compat control copyright docs rules watch Log Message: Removing all the Debian-related files, because they are now maintained by the Debian Octave Group (see http://alioth.debian.org/projects/pkg-octave and http://svn.debian.org/wsvn/pkg-octave) --- control DELETED --- --- compat DELETED --- --- copyright DELETED --- --- changelog DELETED --- --- rules DELETED --- --- docs DELETED --- --- README.Debian DELETED --- --- watch DELETED --- --- .cvsignore DELETED --- |
From: Dragan T. <dr...@us...> - 2004-12-10 03:32:25
|
Update of /cvsroot/octaviz/octaviz/Scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24950 Modified Files: vtk_plot3.m Log Message: Added vtk_lot3 example. Index: vtk_plot3.m =================================================================== RCS file: /cvsroot/octaviz/octaviz/Scripts/vtk_plot3.m,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- vtk_plot3.m 22 Oct 2004 05:42:55 -0000 1.4 +++ vtk_plot3.m 10 Dec 2004 03:32:10 -0000 1.5 @@ -22,6 +22,19 @@ ## the points to be plotted as red spheres. The optional ## @var{prop},@var{val} is a property,value pair argument. Valid ## properties are MarkerColor, MarkerSize, and Opacity. +## +## Example: Everybody's favorite +## @example +## o = [30 62 19;8 21 10]; +## n = [31 21 11;18 42 14;55 46 17;56 25 13]; +## c = [5 49 15;30 50 16;42 42 15;43 29 13;18 28 12;32 6 8;63 36 15;59 60 20]; +## h = [23 5 7;32 0 16;37 5 0;73 36 16;69 60 20;54 62 28;57 66 12;6 59 16;1 44 22;0 49 6]; +## vtk_plot3(o(:,1),o(:,2),o(:,3),'MarkerSize', 8, 'MarkerColor', [1 0 0]); +## vtk_plot3(n(:,1),n(:,2),n(:,3),'MarkerSize',10, 'MarkerColor', [0 0 1]); +## vtk_plot3(c(:,1),c(:,2),c(:,3),'MarkerSize',10, 'MarkerColor', [0 1 0]); +## vtk_plot3(h(:,1),h(:,2),h(:,3),'MarkerSize', 5, 'MarkerColor', [1 1 1]); +## @end example +## ## @end deftypefn ## @seealso{vtk_arrows3,vtk_get_line_spec} |
From: Dragan T. <dr...@us...> - 2004-12-07 01:45:26
|
Update of /cvsroot/octaviz/octaviz/Scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19807 Modified Files: vtk_figure.m Log Message: Changed axes display to improve readibility: tick marks are now positioned at round values. Index: vtk_figure.m =================================================================== RCS file: /cvsroot/octaviz/octaviz/Scripts/vtk_figure.m,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- vtk_figure.m 28 Nov 2004 03:25:18 -0000 1.5 +++ vtk_figure.m 7 Dec 2004 01:45:16 -0000 1.6 @@ -162,13 +162,18 @@ axes = vtkCubeAxesActor2D; axes.SetCamera(renderer.GetActiveCamera()); - axes.SetLabelFormat("%4.2f"); + axes.SetLabelFormat("%1.2g"); axes.SetFlyModeToOuterEdges(); axes.SetFontFactor(1.0); axes.SetNumberOfLabels(5); axes.SetAxisTitleTextProperty(tprop); axes.SetAxisLabelTextProperty(tprop); axes.SetProp( outline_actor ); + axes.GetXAxisActor2D().AdjustLabelsOn(); + axes.GetYAxisActor2D().AdjustLabelsOn(); + axes.GetZAxisActor2D().AdjustLabelsOn(); + axes.SetInertia(10); + axes.ScalingOn(); renderer.AddProp(axes); ren_win = vtkRenderWindow; |
From: Dragan T. <dr...@us...> - 2004-12-05 05:23:20
|
Update of /cvsroot/octaviz/octaviz/Scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15618 Added Files: vtk_pcolor.m Log Message: Added vtk_pcolor --- NEW FILE: vtk_pcolor.m --- ## Copyright (C) 2004 Dragan Tubic ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2, or (at your option) ## any later version. ## ## This program is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ## General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with this file. If not, write to the Free Software Foundation, ## 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ## -*- texinfo -*- ## @deftypefn {Function File} {} vtk_pcolor(@var{x},@var{y},@var{c},[@var{prop},@var{val}]) ## Displays a surface plot defined by @var{x},@var{y} matrices, ## where @var{x} and @var{y} are typically formed by meshgrid. ## @var{c} is a matrix to give a color scale. ## ## Optional @var{prop},@var{val} arguments can be used to change ## properties of the plot. Currently, valid properties are ## ";Interp;". ## ## @end deftypefn ## @seealso{vtk_surf, vtk_mesh} ## Author: Dragan Tubic function vtk_pcolor( varargin ) valid_props = ";;"; [no_numerical_params, first_prop_index, line_spec_index] = vtk_parse_params(valid_props, all_va_args); if ( no_numerical_params < 3 | no_numerical_params > 3 ) error("Syntax is vtk_surf( x, y, c )"); end if ( no_numerical_params == 3 ) x = nth (varargin,1); y = nth (varargin,2); z = x*0; c = nth (varargin,3); end [nr nc] = size(x); if ( nr < 2 | nc < 2 ) error("input has to be at least 2xN or Nx2 matrix"); end m=nc; n=nr; i=0:m-2; j=0:n-2; [i,j]=meshgrid(i,j); i=i(:); j=j(:); t=[i*n+j,i*n+(j+1),(i+1)*n+(j+1) ; i*n+j (i+1)*n+(j+1),(i+1)*n+j]; %1; one way to construct the triangles if ( first_prop_index > 0 ) f=vtk_trisurf(t+1,x(:),y(:),z(:),c(:),'Interpolation','Flat',varargin{first_prop_index:length(varargin)}); else f=vtk_trisurf(t+1,x(:),y(:),z(:),c(:),'Interpolation','Flat'); end endfunction |
From: Dragan T. <dr...@us...> - 2004-12-05 05:22:11
|
Update of /cvsroot/octaviz/octaviz/Scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15269 Modified Files: vtk_trisurf.m Log Message: Added Interpolation property to vtk_trisurf. This property sets the shading (used by vtk_pcolor) to flat if needed. Index: vtk_trisurf.m =================================================================== RCS file: /cvsroot/octaviz/octaviz/Scripts/vtk_trisurf.m,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- vtk_trisurf.m 25 Oct 2004 05:37:10 -0000 1.6 +++ vtk_trisurf.m 5 Dec 2004 05:22:01 -0000 1.7 @@ -27,7 +27,7 @@ ## ## Optional @var{prop},@var{val} arguments can be used to change ## properties of the plot. Currently, valid properties are -## ";Opacity;Color;". +## ";Opacity;Color;Interpolation;". ## ## @end deftypefn ## @seealso{vtk_trimesh, vtk_surf} @@ -35,7 +35,7 @@ ## Author: Dragan Tubic function f = vtk_trisurf( varargin ) - valid_props = ";Opacity;Color;"; + valid_props = ";Opacity;Color;Interpolation;"; [no_numerical_params, first_prop_index, line_spec_index] = vtk_parse_params(valid_props, all_va_args); if ( first_prop_index > 0 ) @@ -183,8 +183,15 @@ surfaceActor = vtkActor(); surfaceActor.SetMapper(surfaceMapper); - ## prop = surfaceActor.GetProperty(); + prop = surfaceActor.GetProperty(); + ##prop.SetInterpolationToGouraud(); %default + if isfield(properties,"Interpolation") + if ( properties.Interpolation == "Flat" ) + prop.SetInterpolationToFlat(); + end + end + ##prop.SetInterpolationToFlat(); ## prop.SetDiffuse(0); ##prop.SetAmbient(1); |
From: Rafael L. <rla...@us...> - 2004-12-04 22:02:43
|
Update of /cvsroot/octaviz/octaviz/debian In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26826 Modified Files: changelog Log Message: Debian release 0.4.0-8. Index: changelog =================================================================== RCS file: /cvsroot/octaviz/octaviz/debian/changelog,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- changelog 24 Nov 2004 08:38:23 -0000 1.5 +++ changelog 4 Dec 2004 22:02:34 -0000 1.6 @@ -1,3 +1,9 @@ +octaviz (0.4.0-8) experimental; urgency=low + + * Rebuilt against octave 2.1.64. + + -- Rafael Laboissiere <ra...@de...> Sat, 4 Dec 2004 14:26:09 +0100 + octaviz (0.4.0-7) experimental; urgency=low * Rebuilt against octave 2.1.63. |
From: Dragan T. <dr...@us...> - 2004-12-04 21:38:02
|
Update of /cvsroot/octaviz/octaviz/Scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21800 Modified Files: vtk_mesh.m Log Message: Fixid limits in teardrop example to avoid coincident points. Index: vtk_mesh.m =================================================================== RCS file: /cvsroot/octaviz/octaviz/Scripts/vtk_mesh.m,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- vtk_mesh.m 28 Nov 2004 04:01:13 -0000 1.6 +++ vtk_mesh.m 4 Dec 2004 21:37:50 -0000 1.7 @@ -27,7 +27,7 @@ ## ## Example: Triaxial Teardrop ## @example -## [u,v] = meshgrid(0:pi/20:pi,0:pi/20:2*pi); +## [u,v] = meshgrid(0.01:pi/20:pi,0:pi/20:2*pi); ## x = ( 1 - cos(u) ) .* cos( u + 2*pi/3 ) .* cos( v + 2*pi/3 ) / 2; ## y = ( 1 - cos(u) ) .* cos( u + 2*pi/3 ) .* cos( v - 2*pi/3 ) / 2; ## z = cos( u - 2*pi/3 ); |
From: Dragan T. <dr...@us...> - 2004-11-28 07:44:32
|
Update of /cvsroot/octaviz/octaviz/Scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16175 Modified Files: vtk_line3.m vtk_mesh.m Log Message: Corrected examples to allow cut'n'paste. Index: vtk_mesh.m =================================================================== RCS file: /cvsroot/octaviz/octaviz/Scripts/vtk_mesh.m,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- vtk_mesh.m 28 Nov 2004 03:25:26 -0000 1.5 +++ vtk_mesh.m 28 Nov 2004 04:01:13 -0000 1.6 @@ -24,13 +24,15 @@ ## Optional @var{prop},@var{val} arguments can be used to change ## properties of the plot. Currently, valid properties are ## ";BallRadius;LineRadius;Fancy;". -## Example: Triaxial Teardrop ## +## Example: Triaxial Teardrop +## @example ## [u,v] = meshgrid(0:pi/20:pi,0:pi/20:2*pi); ## x = ( 1 - cos(u) ) .* cos( u + 2*pi/3 ) .* cos( v + 2*pi/3 ) / 2; ## y = ( 1 - cos(u) ) .* cos( u + 2*pi/3 ) .* cos( v - 2*pi/3 ) / 2; ## z = cos( u - 2*pi/3 ); ## vtk_mesh(x,y,z,'Fancy',1); +## @end example ## ## @end deftypefn ## @seealso{vtk_trimesh, vtk_surf} Index: vtk_line3.m =================================================================== RCS file: /cvsroot/octaviz/octaviz/Scripts/vtk_line3.m,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- vtk_line3.m 28 Nov 2004 03:25:26 -0000 1.3 +++ vtk_line3.m 28 Nov 2004 04:01:13 -0000 1.4 @@ -16,13 +16,16 @@ ## -*- texinfo -*- ## @deftypefn {Function File} {} vtk_line3(@var{x}, @var{y}, @var{z}, [@var{fmt} | @var{prop},@var{val}]) +## ## Plots 3D line segments between the specified points. The data point ## coordinates must be given as 3 equal size @var{x}, @var{y}, and ## @var{z} matrices. The optional @var{fmt} takes the form of a "line ## specification"; e.g. "r" would cause the lines to be plotted in color ## red. The optional @var{prop},@var{val} is a property,value pair ## argument. Valid properties are Color, Radius, and Opacity. +## ## Example: Knot (torus) +## @example ## nmeridian = 6; nlongitude = 11; ## phi = 0:pi/1000:2*pi; ## mu = phi * nmeridian; @@ -30,6 +33,7 @@ ## y = sin(mu) .* (1 + cos(nlongitude*mu/nmeridian) / 2.0); ## z = sin(nlongitude*mu/nmeridian) / 2.0; ## vtk_line3(x',y',z','Radius',0.05); +## @end example ## ## @end deftypefn ## @seealso{vtk_plot3,vtk_arrows3,vtk_get_line_spec} |
From: Dragan T. <dr...@us...> - 2004-11-28 03:26:11
|
Update of /cvsroot/octaviz/octaviz/Scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7983 Modified Files: vtk_figure.m vtk_line3.m vtk_mesh.m vtk_surf.m Log Message: Added examples in DOCSTRING for vtk_line3.m vtk_mesh.m vtk_surf.m. Index: vtk_mesh.m =================================================================== RCS file: /cvsroot/octaviz/octaviz/Scripts/vtk_mesh.m,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- vtk_mesh.m 25 Oct 2004 05:37:09 -0000 1.4 +++ vtk_mesh.m 28 Nov 2004 03:25:26 -0000 1.5 @@ -24,7 +24,14 @@ ## Optional @var{prop},@var{val} arguments can be used to change ## properties of the plot. Currently, valid properties are ## ";BallRadius;LineRadius;Fancy;". -## +## Example: Triaxial Teardrop +## +## [u,v] = meshgrid(0:pi/20:pi,0:pi/20:2*pi); +## x = ( 1 - cos(u) ) .* cos( u + 2*pi/3 ) .* cos( v + 2*pi/3 ) / 2; +## y = ( 1 - cos(u) ) .* cos( u + 2*pi/3 ) .* cos( v - 2*pi/3 ) / 2; +## z = cos( u - 2*pi/3 ); +## vtk_mesh(x,y,z,'Fancy',1); +## ## @end deftypefn ## @seealso{vtk_trimesh, vtk_surf} Index: vtk_figure.m =================================================================== RCS file: /cvsroot/octaviz/octaviz/Scripts/vtk_figure.m,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- vtk_figure.m 24 Oct 2004 02:19:14 -0000 1.4 +++ vtk_figure.m 28 Nov 2004 03:25:18 -0000 1.5 @@ -162,7 +162,7 @@ axes = vtkCubeAxesActor2D; axes.SetCamera(renderer.GetActiveCamera()); - axes.SetLabelFormat("%4.2g"); + axes.SetLabelFormat("%4.2f"); axes.SetFlyModeToOuterEdges(); axes.SetFontFactor(1.0); axes.SetNumberOfLabels(5); Index: vtk_surf.m =================================================================== RCS file: /cvsroot/octaviz/octaviz/Scripts/vtk_surf.m,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- vtk_surf.m 25 Oct 2004 05:37:10 -0000 1.4 +++ vtk_surf.m 28 Nov 2004 03:25:26 -0000 1.5 @@ -23,7 +23,18 @@ ## Optional @var{prop},@var{val} arguments can be used to change ## properties of the plot. Currently, valid properties are ## ";Opacity;Color;". -## +## +## Example: Spherical harmonics +## @example +## [phi,theta] = meshgrid(0:pi/250:pi,0:pi/250:2*pi); +## m0 = 4; m1 = 3; m2 = 2; m3 = 3; m4 = 6; m5 = 2; m6 = 6; m7 = 4; +## r = sin(m0*phi).^m1 + cos(m2*phi).^m3 + sin(m4*theta).^m5 + cos(m6*theta).^m7; +## x = r .* sin(phi) .* cos(theta); +## y = r .* cos(phi); +## z = r .* sin(phi) .* sin(theta); +## vtk_surf(x,y,z); +## @end example +## ## @end deftypefn ## @seealso{vtk_trisurf, vtk_mesh} Index: vtk_line3.m =================================================================== RCS file: /cvsroot/octaviz/octaviz/Scripts/vtk_line3.m,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- vtk_line3.m 23 Oct 2004 18:47:58 -0000 1.2 +++ vtk_line3.m 28 Nov 2004 03:25:26 -0000 1.3 @@ -22,6 +22,15 @@ ## specification"; e.g. "r" would cause the lines to be plotted in color ## red. The optional @var{prop},@var{val} is a property,value pair ## argument. Valid properties are Color, Radius, and Opacity. +## Example: Knot (torus) +## nmeridian = 6; nlongitude = 11; +## phi = 0:pi/1000:2*pi; +## mu = phi * nmeridian; +## x = cos(mu) .* (1 + cos(nlongitude*mu/nmeridian) / 2.0); +## y = sin(mu) .* (1 + cos(nlongitude*mu/nmeridian) / 2.0); +## z = sin(nlongitude*mu/nmeridian) / 2.0; +## vtk_line3(x',y',z','Radius',0.05); +## ## @end deftypefn ## @seealso{vtk_plot3,vtk_arrows3,vtk_get_line_spec} |