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...> - 2006-12-27 05:14:13
|
Update of /cvsroot/octaviz/octaviz/Widgets In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv28112/Widgets Log Message: Directory /cvsroot/octaviz/octaviz/Widgets added to the repository |
From: Dragan T. <dr...@us...> - 2006-12-26 14:18:59
|
Update of /cvsroot/octaviz/octaviz/Common In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv4206 Modified Files: CMakeLists.txt Log Message: Fixed a typo. Index: CMakeLists.txt =================================================================== RCS file: /cvsroot/octaviz/octaviz/Common/CMakeLists.txt,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- CMakeLists.txt 25 Dec 2006 20:12:50 -0000 1.5 +++ CMakeLists.txt 26 Dec 2006 14:18:54 -0000 1.6 @@ -10,7 +10,7 @@ LINK_DIRECTORIES(${OCT_LIB_DIR}) ADD_CUSTOM_COMMAND( OUTPUT vtk_init.oct COMMAND mkoctfile ${oct_flags} ${oct_link_flags} -Wno-deprecated -loctaviz -L. vtk_init.cc ) -ADD_CUSTOM_COMMAND( OUTPUT vtkInitializeInteractor.oct COMMAND mkoctfile ${oct_flags} ${oct_link_flags} -Wno-deprecated -loctaviz -L. vtkInitializeInteractor.cc z) +ADD_CUSTOM_COMMAND( OUTPUT vtkInitializeInteractor.oct COMMAND mkoctfile ${oct_flags} ${oct_link_flags} -Wno-deprecated -loctaviz -L. vtkInitializeInteractor.cc) ADD_CUSTOM_COMMAND( OUTPUT vtkRaiseWindow.oct COMMAND mkoctfile ${oct_flags} ${oct_link_flags} -Wno-deprecated -loctaviz -L. vtkRaiseWindow.cc ) ADD_CUSTOM_COMMAND( OUTPUT vtk_print_ref_table.oct COMMAND mkoctfile ${oct_flags} ${oct_link_flags} -Wno-deprecated -loctaviz -L. vtk_print_ref_table.cc ) ADD_CUSTOM_COMMAND( OUTPUT vtk_get_pointer.oct COMMAND mkoctfile ${oct_flags} ${oct_link_flags} -Wno-deprecated -loctaviz -L. vtk_get_pointer.cc ) |
From: Dragan T. <dr...@us...> - 2006-12-25 20:12:59
|
Update of /cvsroot/octaviz/octaviz/Scripts In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv30548/Scripts Modified Files: vtk_arrows3.m vtk_cone3.m vtk_contour.m vtk_contourf.m vtk_line3.m vtk_mesh.m vtk_meshc.m vtk_parse_params.m vtk_pcolor.m vtk_plot.m vtk_plot3.m vtk_poly3.m vtk_surf.m vtk_surfc.m vtk_trimesh.m vtk_trisurf.m Log Message: Fixed segfaults due to the reference counting in octave_value (octave 2.9.x) Fixed varargin issue (hope so) Fixed (somewhat) the build system. This version should not be used for anything but testing. Index: vtk_plot.m =================================================================== RCS file: /cvsroot/octaviz/octaviz/Scripts/vtk_plot.m,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- vtk_plot.m 20 Oct 2004 05:25:56 -0000 1.2 +++ vtk_plot.m 25 Dec 2006 20:12:50 -0000 1.3 @@ -30,7 +30,7 @@ function vtk_plot( varargin ) valid_props = ";MarkerColor;MarkerSize;LineColor;"; - [no_numerical_params, first_prop_index, line_spec_index] = vtk_parse_params(valid_props, all_va_args); + [no_numerical_params, first_prop_index, line_spec_index] = vtk_parse_params(valid_props, varargin{:}); if ( no_numerical_params == 0 | no_numerical_params > 2 ) error("Syntax is vtk_plot(X[,Y])"); Index: vtk_pcolor.m =================================================================== RCS file: /cvsroot/octaviz/octaviz/Scripts/vtk_pcolor.m,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- vtk_pcolor.m 5 Dec 2004 05:23:11 -0000 1.1 +++ vtk_pcolor.m 25 Dec 2006 20:12:50 -0000 1.2 @@ -33,7 +33,7 @@ valid_props = ";;"; - [no_numerical_params, first_prop_index, line_spec_index] = vtk_parse_params(valid_props, all_va_args); + [no_numerical_params, first_prop_index, line_spec_index] = vtk_parse_params(valid_props, varargin{:}); if ( no_numerical_params < 3 | no_numerical_params > 3 ) error("Syntax is vtk_surf( x, y, c )"); Index: vtk_cone3.m =================================================================== RCS file: /cvsroot/octaviz/octaviz/Scripts/vtk_cone3.m,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- vtk_cone3.m 7 Mar 2005 02:05:00 -0000 1.3 +++ vtk_cone3.m 25 Dec 2006 20:12:50 -0000 1.4 @@ -32,7 +32,7 @@ function vtk_cone3(varargin) valid_props = ";Color;Height;Radius;"; - [no_numerical_params, first_prop_index, line_spec_index] = vtk_parse_params(valid_props, all_va_args); + [no_numerical_params, first_prop_index, line_spec_index] = vtk_parse_params(valid_props, varargin{:}); if ( no_numerical_params < 6 ) error("Syntax is vtk_plot3(x,y,z,nx,ny,nz)"); Index: vtk_line3.m =================================================================== RCS file: /cvsroot/octaviz/octaviz/Scripts/vtk_line3.m,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- vtk_line3.m 7 Mar 2005 02:05:00 -0000 1.5 +++ vtk_line3.m 25 Dec 2006 20:12:50 -0000 1.6 @@ -44,7 +44,7 @@ function vtk_line3(varargin) valid_props = ";Color;Radius;Opacity;"; - [no_numerical_params, first_prop_index, line_spec_index] = vtk_parse_params(valid_props, all_va_args); + [no_numerical_params, first_prop_index, line_spec_index] = vtk_parse_params(valid_props, varargin{:}); if ( no_numerical_params < 3 ) error("Syntax is vtk_plot3(x,y,z)"); Index: vtk_surf.m =================================================================== RCS file: /cvsroot/octaviz/octaviz/Scripts/vtk_surf.m,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- vtk_surf.m 28 Nov 2004 03:25:26 -0000 1.5 +++ vtk_surf.m 25 Dec 2006 20:12:50 -0000 1.6 @@ -44,7 +44,7 @@ valid_props = ";Opacity;Color;"; - [no_numerical_params, first_prop_index, line_spec_index] = vtk_parse_params(valid_props, all_va_args); + [no_numerical_params, first_prop_index, line_spec_index] = vtk_parse_params(valid_props, varargin{:}); if ( no_numerical_params < 1 | no_numerical_params > 4 ) error("Syntax is vtk_surf( x, (y), (z), (c) )"); Index: vtk_plot3.m =================================================================== RCS file: /cvsroot/octaviz/octaviz/Scripts/vtk_plot3.m,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- vtk_plot3.m 7 Mar 2005 02:05:00 -0000 1.6 +++ vtk_plot3.m 25 Dec 2006 20:12:50 -0000 1.7 @@ -43,7 +43,7 @@ function vtk_plot3(varargin) valid_props = ";MarkerColor;MarkerSize;Opacity;"; - [no_numerical_params, first_prop_index, line_spec_index] = vtk_parse_params(valid_props, all_va_args); + [no_numerical_params, first_prop_index, line_spec_index] = vtk_parse_params(valid_props, varargin{:}); if ( no_numerical_params < 3 ) error("Syntax is vtk_plot3(x,y,z)"); Index: vtk_contourf.m =================================================================== RCS file: /cvsroot/octaviz/octaviz/Scripts/vtk_contourf.m,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- vtk_contourf.m 24 Jul 2005 04:35:31 -0000 1.1 +++ vtk_contourf.m 25 Dec 2006 20:12:50 -0000 1.2 @@ -35,7 +35,7 @@ valid_props = ";NConts;"; - [no_numerical_params, first_prop_index, line_spec_index] = vtk_parse_params(valid_props, all_va_args); + [no_numerical_params, first_prop_index, line_spec_index] = vtk_parse_params(valid_props, varargin{:}); if ( first_prop_index > 0 ) properties = struct(varargin{first_prop_index:length(varargin)}); ncts = properties.NConts; # number of contours; Index: vtk_surfc.m =================================================================== RCS file: /cvsroot/octaviz/octaviz/Scripts/vtk_surfc.m,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- vtk_surfc.m 24 Jul 2005 04:35:31 -0000 1.4 +++ vtk_surfc.m 25 Dec 2006 20:12:50 -0000 1.5 @@ -34,7 +34,7 @@ valid_props = ";Opacity;Color;NConts;"; - [no_numerical_params, first_prop_index, line_spec_index] = vtk_parse_params(valid_props, all_va_args); + [no_numerical_params, first_prop_index, line_spec_index] = vtk_parse_params(valid_props, varargin{:}); if ( no_numerical_params < 1 | no_numerical_params > 4 ) error("Syntax is vtk_surfc( x, (y), (z), (c) )"); Index: vtk_trimesh.m =================================================================== RCS file: /cvsroot/octaviz/octaviz/Scripts/vtk_trimesh.m,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- vtk_trimesh.m 7 Mar 2005 02:05:00 -0000 1.7 +++ vtk_trimesh.m 25 Dec 2006 20:12:50 -0000 1.8 @@ -40,7 +40,7 @@ ## evaluate input arguments valid_props = ";BallRadius;LineRadius;Fancy;"; - [no_numerical_params, first_prop_index, line_spec_index] = vtk_parse_params(valid_props, all_va_args); + [no_numerical_params, first_prop_index, line_spec_index] = vtk_parse_params(valid_props, varargin{:}); if ( no_numerical_params < 2 | no_numerical_params > 5 ) error("Syntax is trimesh( t, x, y, z, c )"); Index: vtk_parse_params.m =================================================================== RCS file: /cvsroot/octaviz/octaviz/Scripts/vtk_parse_params.m,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- vtk_parse_params.m 20 Oct 2004 05:25:56 -0000 1.3 +++ vtk_parse_params.m 25 Dec 2006 20:12:50 -0000 1.4 @@ -28,12 +28,12 @@ %% Properties begin with the first string parameter. Each property needs a value. %% Get the types - no_params = length(varargin); + no_params = length(varargin) num_type = zeros(1,no_params); str_type = zeros(1,no_params); for i = 1:no_params - num_type(i) = isnumeric(varargin{i}); + num_type(i) = isnumeric(varargin{i}) str_type(i) = ischar(varargin{i}); end Index: vtk_trisurf.m =================================================================== RCS file: /cvsroot/octaviz/octaviz/Scripts/vtk_trisurf.m,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- vtk_trisurf.m 11 May 2005 05:11:49 -0000 1.9 +++ vtk_trisurf.m 25 Dec 2006 20:12:50 -0000 1.10 @@ -37,7 +37,7 @@ function f = vtk_trisurf( varargin ) valid_props = ";Opacity;Color;Interpolation;"; - [no_numerical_params, first_prop_index, line_spec_index] = vtk_parse_params(valid_props, all_va_args); + [no_numerical_params, first_prop_index, line_spec_index] = vtk_parse_params(valid_props, varargin{:}); if ( first_prop_index > 0 ) properties = struct(varargin{first_prop_index:length(varargin)}); else Index: vtk_poly3.m =================================================================== RCS file: /cvsroot/octaviz/octaviz/Scripts/vtk_poly3.m,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- vtk_poly3.m 27 Oct 2004 05:34:45 -0000 1.1 +++ vtk_poly3.m 25 Dec 2006 20:12:50 -0000 1.2 @@ -30,7 +30,7 @@ function vtk_poly3(varargin) valid_props = ";Color;Opacity;"; - [no_numerical_params, first_prop_index, line_spec_index] = vtk_parse_params(valid_props, all_va_args); + [no_numerical_params, first_prop_index, line_spec_index] = vtk_parse_params(valid_props, varargin{:}); if ( no_numerical_params < 3 ) error("Syntax is vtk_poly3(x,y,z)"); Index: vtk_contour.m =================================================================== RCS file: /cvsroot/octaviz/octaviz/Scripts/vtk_contour.m,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- vtk_contour.m 24 Jul 2005 04:35:31 -0000 1.1 +++ vtk_contour.m 25 Dec 2006 20:12:50 -0000 1.2 @@ -33,7 +33,7 @@ valid_props = ";NConts;"; - [no_numerical_params, first_prop_index, line_spec_index] = vtk_parse_params(valid_props, all_va_args); + [no_numerical_params, first_prop_index, line_spec_index] = vtk_parse_params(valid_props, varargin{:}); if ( first_prop_index > 0 ) properties = struct(varargin{first_prop_index:length(varargin)}); ncts = properties.NConts; # number of contours; Index: vtk_mesh.m =================================================================== RCS file: /cvsroot/octaviz/octaviz/Scripts/vtk_mesh.m,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- vtk_mesh.m 4 Dec 2004 21:37:50 -0000 1.7 +++ vtk_mesh.m 25 Dec 2006 20:12:50 -0000 1.8 @@ -43,7 +43,7 @@ valid_props = ";BallRadius;LineRadius;Fancy;"; - [no_numerical_params, first_prop_index, line_spec_index] = vtk_parse_params(valid_props, all_va_args); + [no_numerical_params, first_prop_index, line_spec_index] = vtk_parse_params(valid_props, varargin{:}); if ( no_numerical_params < 1 | no_numerical_params > 4 ) error("Syntax is vtk_mesh( x, (y), (z), (c) )"); Index: vtk_meshc.m =================================================================== RCS file: /cvsroot/octaviz/octaviz/Scripts/vtk_meshc.m,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- vtk_meshc.m 24 Jul 2005 04:35:31 -0000 1.2 +++ vtk_meshc.m 25 Dec 2006 20:12:50 -0000 1.3 @@ -34,7 +34,7 @@ valid_props = ";BallRadius;LineRadius;Fancy;NConts;"; - [no_numerical_params, first_prop_index, line_spec_index] = vtk_parse_params(valid_props, all_va_args); + [no_numerical_params, first_prop_index, line_spec_index] = vtk_parse_params(valid_props, varargin{:}); if ( no_numerical_params < 1 | no_numerical_params > 4 ) error("Syntax is vtk_meshc( x, (y), (z), (c) )"); Index: vtk_arrows3.m =================================================================== RCS file: /cvsroot/octaviz/octaviz/Scripts/vtk_arrows3.m,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- vtk_arrows3.m 7 Mar 2005 02:05:00 -0000 1.4 +++ vtk_arrows3.m 25 Dec 2006 20:12:50 -0000 1.5 @@ -32,7 +32,7 @@ function vtk_arrows3(varargin) valid_props = ";Color;TipLength;TipRadius;ShaftRadius;"; - [no_numerical_params, first_prop_index, line_spec_index] = vtk_parse_params(valid_props, all_va_args); + [no_numerical_params, first_prop_index, line_spec_index] = vtk_parse_params(valid_props, varargin{:}); if ( no_numerical_params < 6 ) error("Syntax is vtk_plot3(x,y,z,nx,ny,nz)"); |
From: Dragan T. <dr...@us...> - 2006-12-25 20:12:54
|
Update of /cvsroot/octaviz/octaviz/Parallel In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv30548/Parallel Modified Files: CMakeLists.txt Log Message: Fixed segfaults due to the reference counting in octave_value (octave 2.9.x) Fixed varargin issue (hope so) Fixed (somewhat) the build system. This version should not be used for anything but testing. Index: CMakeLists.txt =================================================================== RCS file: /cvsroot/octaviz/octaviz/Parallel/CMakeLists.txt,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- CMakeLists.txt 21 Sep 2004 22:50:38 -0000 1.1.1.1 +++ CMakeLists.txt 25 Dec 2006 20:12:50 -0000 1.2 @@ -1,4 +1,5 @@ -SET(KIT_WRAP_DEPS Rendering) -OCTAVE_WRAP_VTK(Parallel PARALLEL "${KIT_WRAP_DEPS}") +SET( KIT_WRAP_DEPS Rendering ) +OCTAVE_WRAP_VTK( Parallel PARALLEL "${KIT_WRAP_DEPS}") +ADD_CUSTOM_TARGET( Parallel ALL COMMAND touch Parallel DEPENDS ${all_oct} ) +INSTALL_PROGRAMS( ${OCT_INST_DIR}/octaviz ${all_oct} ) #INSTALL_PROGRAMS(${OCT_INST_DIR}/octaviz vtkRendering.oct) -INSTALL_PROGRAMS(${OCT_INST_DIR}/octaviz ${all_oct}) |
From: Dragan T. <dr...@us...> - 2006-12-25 20:12:54
|
Update of /cvsroot/octaviz/octaviz/Rendering In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv30548/Rendering Modified Files: CMakeLists.txt Log Message: Fixed segfaults due to the reference counting in octave_value (octave 2.9.x) Fixed varargin issue (hope so) Fixed (somewhat) the build system. This version should not be used for anything but testing. Index: CMakeLists.txt =================================================================== RCS file: /cvsroot/octaviz/octaviz/Rendering/CMakeLists.txt,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- CMakeLists.txt 21 Sep 2004 22:50:39 -0000 1.1.1.1 +++ CMakeLists.txt 25 Dec 2006 20:12:50 -0000 1.2 @@ -1,4 +1,5 @@ SET(KIT_WRAP_DEPS Graphics Imaging IO) -OCTAVE_WRAP_VTK(Rendering RENDERING "${KIT_WRAP_DEPS}") -INSTALL_PROGRAMS(${OCT_INST_DIR}/octaviz ${all_oct}) +OCTAVE_WRAP_VTK( Rendering RENDERING "${KIT_WRAP_DEPS}" ) +ADD_CUSTOM_TARGET( Rendering ALL COMMAND touch Rendering DEPENDS ${all_oct} ) +INSTALL_PROGRAMS( ${OCT_INST_DIR}/octaviz ${all_oct} ) #INSTALL_PROGRAMS(${OCT_INST_DIR}/octaviz vtkRendering.oct) \ No newline at end of file |
From: Dragan T. <dr...@us...> - 2006-12-25 20:12:54
|
Update of /cvsroot/octaviz/octaviz/IO In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv30548/IO Modified Files: CMakeLists.txt Log Message: Fixed segfaults due to the reference counting in octave_value (octave 2.9.x) Fixed varargin issue (hope so) Fixed (somewhat) the build system. This version should not be used for anything but testing. Index: CMakeLists.txt =================================================================== RCS file: /cvsroot/octaviz/octaviz/IO/CMakeLists.txt,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- CMakeLists.txt 21 Sep 2004 22:50:38 -0000 1.1.1.1 +++ CMakeLists.txt 25 Dec 2006 20:12:50 -0000 1.2 @@ -1,4 +1,5 @@ -SET(KIT_WRAP_DEPS Filtering) -OCTAVE_WRAP_VTK(IO IO "${KIT_WRAP_DEPS}") -INSTALL_PROGRAMS(${OCT_INST_DIR}/octaviz ${all_oct}) +SET( KIT_WRAP_DEPS Filtering ) +OCTAVE_WRAP_VTK( IO IO "${KIT_WRAP_DEPS}") +ADD_CUSTOM_TARGET( IO ALL COMMAND touch IO DEPENDS ${all_oct} ) +INSTALL_PROGRAMS( ${OCT_INST_DIR}/octaviz ${all_oct} ) #INSTALL_PROGRAMS(${OCT_INST_DIR}/octaviz vtkIO.oct) |
From: Dragan T. <dr...@us...> - 2006-12-25 20:12:53
|
Update of /cvsroot/octaviz/octaviz In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv30548 Modified Files: CMakeLists.txt Log Message: Fixed segfaults due to the reference counting in octave_value (octave 2.9.x) Fixed varargin issue (hope so) Fixed (somewhat) the build system. This version should not be used for anything but testing. Index: CMakeLists.txt =================================================================== RCS file: /cvsroot/octaviz/octaviz/CMakeLists.txt,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- CMakeLists.txt 23 Oct 2006 01:01:33 -0000 1.4 +++ CMakeLists.txt 25 Dec 2006 20:12:49 -0000 1.5 @@ -16,7 +16,7 @@ OPTION(USE_PREC_HEADERS "Use precompiled headers" OFF) STRING(COMPARE EQUAL ${USE_PREC_HEADERS} "OFF" PCH_ON) IF(PCH_ON) - SET(CXX_COMPILER_PCH "g++-3.4" CACHE STRING "CMake overides compiler environment varibles. Put the compiler name here.") + SET(CXX_COMPILER_PCH "g++" CACHE STRING "CMake overides compiler environment varibles. Put the compiler name here.") ENDIF(PCH_ON) SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} /usr/local/lib/vtk /usr/lib/vtk) @@ -54,44 +54,23 @@ SET(OCT_PREFIX ${OCT_PREFIX_EXEC} CACHE INTERNAL "" FORCE) ENDIF(OCT_PREFIX_EXEC MATCHES "^OCT_PREFIX_EXEC$") SET(CMAKE_INSTALL_PREFIX ${OCT_PREFIX} CACHE PATH "Specifies the directory where .oct files will be installed." FORCE) - + # Build the vtkOctave wrapping utility first. - SUBDIRS(Wrapping) + ADD_SUBDIRECTORY(Wrapping) - # Build octave wrappers for VTK kits. - SUBDIRS(Common Filtering Imaging Graphics IO) - SET(vtk_kits Common Filtering Imaging Graphics IO) - IF(VTK_USE_RENDERING) - SUBDIRS(Rendering) - SET(vtk_kits ${vtk_kits} Rendering) - ENDIF(VTK_USE_RENDERING) - IF(VTK_USE_HYBRID) - SUBDIRS(Hybrid) - SET(vtk_kits ${vtk_kits} Hybrid) - ENDIF(VTK_USE_HYBRID) - IF(VTK_USE_PATENTED) - SUBDIRS(Patented) - SET(vtk_kits ${vtk_kits} Patented) - ENDIF(VTK_USE_PATENTED) - IF(VTK_USE_PARALLEL) - SUBDIRS(Parallel) - SET(vtk_kits ${vtk_kits} Parallel) - ENDIF(VTK_USE_PARALLEL) - # Hack that creates symbolic links to functions #ADD_CUSTOM_TARGET(create_links echo "Symbolic links created.") #FOREACH(kit ${vtk_kits}) # ADD_CUSTOM_TARGET(create_links_${kit} cd ${kit}\; ${CMAKE_MAKE_PROGRAM} create_links) # ADD_DEPENDENCIES(create_links create_links_${kit}) #ENDFOREACH(kit) - + # Macro to create Octave wrapper functions MACRO(OCTAVE_WRAP_VTK kit ukit deps) # Hack for symbolic links # ADD_CUSTOM_TARGET(create_links echo "Symlinked ${kit}") INCLUDE(${VTK_KITS_DIR}/vtk${kit}Kit.cmake) - INCLUDE(${VTK_KITS_DIR}/vtk${kit}Kit.cmake) # what we don't want or can't build; # this is an ugly hack[TM] and should be fixed by e.g. @@ -101,12 +80,12 @@ SET(VTK_CLASS_WRAP_EXCLUDE_vtkSignedCharArray 1) SET(VTK_CLASS_WRAP_EXCLUDE_vtkUnsignedLongLongArray 1) - SET(all_oct) - FOREACH(class ${VTK_${ukit}_CLASSES}) - IF(NOT VTK_CLASS_WRAP_EXCLUDE_${class}) - SET(all_oct ${all_oct} ${class}.oct) - ENDIF(NOT VTK_CLASS_WRAP_EXCLUDE_${class}) - ENDFOREACH(class) +# SET(all_oct) +# FOREACH(class ${VTK_${ukit}_CLASSES}) +# IF(NOT VTK_CLASS_WRAP_EXCLUDE_${class}) +# SET(all_oct ${all_oct} ${class}.oct) +# ENDIF(NOT VTK_CLASS_WRAP_EXCLUDE_${class}) +# ENDFOREACH(class) # ADD_CUSTOM_TARGET(vtk${kit}.cc ALL cat ${all_ccs} > vtk${kit}.cc) @@ -117,27 +96,15 @@ # Precompiled headers IF(USE_PREC_HEADERS) # Which flags will mkoctfile use? - SET (PCHFLAGS "") + SET (PCHFLAGS "") - EXEC_PROGRAM("mkoctfile" ARGS "-p CXXPICFLAG" OUTPUT_VARIABLE MKOCT_FLAGS_EXEC) - STRING(REGEX MATCHALL "[^ ]+" MKOCT_FLAGS_LIST ${MKOCT_FLAGS_EXEC}) - FOREACH (flag ${MKOCT_FLAGS_LIST}) - SET (PCHFLAGS ${PCHFLAGS} ${flag}) - ENDFOREACH (flag ${MKOCT_FLAGS_LIST}) - - EXEC_PROGRAM("mkoctfile" ARGS "-p INCFLAGS" OUTPUT_VARIABLE MKOCT_FLAGS_EXEC) - STRING(REGEX MATCHALL "[^ ]+" MKOCT_FLAGS_LIST ${MKOCT_FLAGS_EXEC}) - FOREACH (flag ${MKOCT_FLAGS_LIST}) - SET (PCHFLAGS ${PCHFLAGS} ${flag}) - ENDFOREACH (flag ${MKOCT_FLAGS_LIST}) - - EXEC_PROGRAM("mkoctfile" ARGS "-p XTRA_CXXFLAGS" OUTPUT_VARIABLE MKOCT_FLAGS_EXEC) + EXEC_PROGRAM("mkoctfile" ARGS "-p ALL_CXXFLAGS" OUTPUT_VARIABLE MKOCT_FLAGS_EXEC) STRING(REGEX MATCHALL "[^ ]+" MKOCT_FLAGS_LIST ${MKOCT_FLAGS_EXEC}) - FOREACH (flag ${MKOCT_FLAGS_LIST}) - SET (PCHFLAGS ${PCHFLAGS} ${flag}) - ENDFOREACH (flag ${MKOCT_FLAGS_LIST}) - - #MESSAGE(${PCHFLAGS}) + FOREACH (flag ${MKOCT_FLAGS_LIST}) + SET (PCHFLAGS ${PCHFLAGS} ${flag}) + ENDFOREACH (flag ${MKOCT_FLAGS_LIST}) + +# MESSAGE(${PCHFLAGS}) ADD_CUSTOM_TARGET(OctavizCommon.h.gch ALL ${CXX_COMPILER_PCH} "-c" ${PCHFLAGS} ${oct_flags} ../Common/OctavizCommon.h) ENDIF(USE_PREC_HEADERS) @@ -146,11 +113,16 @@ # Remove prefix from oct install dir STRING(REGEX REPLACE "${CMAKE_INSTALL_PREFIX}" "" OCT_INST_DIR ${OCT_INST_DIR_EXEC}) + SET ( all_oct "" ) FOREACH(class ${VTK_${ukit}_CLASSES}) +# LIST( GET VTK_${ukit}_CLASSES 10 class ) SET(full_name "${VTK_${ukit}_HEADER_DIR}/${class}.h") IF(NOT VTK_CLASS_WRAP_EXCLUDE_${class}) - ADD_CUSTOM_TARGET(${class}.cc ALL ../Wrapping/vtkWrapOctave ${full_name} ../Wrapping/hints 1 ${class}.cc) - ADD_CUSTOM_TARGET(${class}.oct ALL sleep 0 \; mkoctfile ${oct_flags} ${oct_link_flags} -L../Common -loctaviz ${class}.cc) + ADD_CUSTOM_COMMAND( OUTPUT ${class}.cc COMMAND ../Wrapping/vtkWrapOctave ${full_name} ../Wrapping/hints 1 ${class}.cc ) + ADD_CUSTOM_COMMAND( OUTPUT ${class}.oct COMMAND mkoctfile ${oct_flags} -Wno-deprecated ${oct_link_flags} -L../Common -loctaviz ${class}.cc DEPENDS ${class}.cc ) + SET ( all_oct ${all_oct} ${class}.oct ) +# ADD_CUSTOM_TARGET(${class}.cc ALL ../Wrapping/vtkWrapOctave ${full_name} ../Wrapping/hints 1 ${class}.cc) +# ADD_CUSTOM_TARGET(${class}.oct ALL sleep 0 \; mkoctfile ${oct_flags} ${oct_link_flags} -L../Common -loctaviz ${class}.cc) # ADD_DEPENDENCIES(vtk${kit}.cc ${class}.cc) # Hack for symbolic links # ADD_CUSTOM_TARGET(${class}_link echo Symlinking ${class}\; ln -s ${CMAKE_INSTALL_PREFIX}${OCT_INST_DIR}/octaviz/vtk${kit}.oct ${CMAKE_INSTALL_PREFIX}${OCT_INST_DIR}/octaviz/${class}.oct) @@ -161,5 +133,30 @@ # MARK_AS_ADVANCED(CMAKE_INSTALL_PREFIX) - SUBDIRS(Scripts) - SUBDIRS(Examples) + # Build octave wrappers for VTK kits. + ADD_SUBDIRECTORY(Common) + ADD_SUBDIRECTORY(Filtering) + ADD_SUBDIRECTORY(Imaging) + ADD_SUBDIRECTORY(Graphics) + ADD_SUBDIRECTORY(IO) + + SET(vtk_kits Common Filtering Imaging Graphics IO) + IF(VTK_USE_RENDERING) + ADD_SUBDIRECTORY(Rendering) + SET(vtk_kits ${vtk_kits} Rendering) + ENDIF(VTK_USE_RENDERING) + IF(VTK_USE_HYBRID) + ADD_SUBDIRECTORY(Hybrid) + SET(vtk_kits ${vtk_kits} Hybrid) + ENDIF(VTK_USE_HYBRID) + IF(VTK_USE_PATENTED) + ADD_SUBDIRECTORY(Patented) + SET(vtk_kits ${vtk_kits} Patented) + ENDIF(VTK_USE_PATENTED) + IF(VTK_USE_PARALLEL) + ADD_SUBDIRECTORY(Parallel) + SET(vtk_kits ${vtk_kits} Parallel) + ENDIF(VTK_USE_PARALLEL) + + ADD_SUBDIRECTORY(Scripts) + ADD_SUBDIRECTORY(Examples) |
From: Dragan T. <dr...@us...> - 2006-12-25 20:12:53
|
Update of /cvsroot/octaviz/octaviz/Hybrid In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv30548/Hybrid Modified Files: CMakeLists.txt Log Message: Fixed segfaults due to the reference counting in octave_value (octave 2.9.x) Fixed varargin issue (hope so) Fixed (somewhat) the build system. This version should not be used for anything but testing. Index: CMakeLists.txt =================================================================== RCS file: /cvsroot/octaviz/octaviz/Hybrid/CMakeLists.txt,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- CMakeLists.txt 21 Sep 2004 22:50:39 -0000 1.1.1.1 +++ CMakeLists.txt 25 Dec 2006 20:12:50 -0000 1.2 @@ -1,4 +1,5 @@ -SET(KIT_WRAP_DEPS Rendering) -OCTAVE_WRAP_VTK(Hybrid HYBRID "${KIT_WRAP_DEPS}") -INSTALL_PROGRAMS(${OCT_INST_DIR}/octaviz ${all_oct}) +SET( KIT_WRAP_DEPS Rendering ) +OCTAVE_WRAP_VTK( Hybrid HYBRID "${KIT_WRAP_DEPS}") +ADD_CUSTOM_TARGET( Hybrid ALL COMMAND touch Hybrid DEPENDS ${all_oct} ) +INSTALL_PROGRAMS( ${OCT_INST_DIR}/octaviz ${all_oct} ) #INSTALL_PROGRAMS(${OCT_INST_DIR}/octaviz vtkHybrid.oct) \ No newline at end of file |
From: Dragan T. <dr...@us...> - 2006-12-25 20:12:53
|
Update of /cvsroot/octaviz/octaviz/Filtering In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv30548/Filtering Modified Files: CMakeLists.txt Log Message: Fixed segfaults due to the reference counting in octave_value (octave 2.9.x) Fixed varargin issue (hope so) Fixed (somewhat) the build system. This version should not be used for anything but testing. Index: CMakeLists.txt =================================================================== RCS file: /cvsroot/octaviz/octaviz/Filtering/CMakeLists.txt,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- CMakeLists.txt 21 Sep 2004 22:50:44 -0000 1.1.1.1 +++ CMakeLists.txt 25 Dec 2006 20:12:50 -0000 1.2 @@ -1,4 +1,5 @@ -SET(KIT_WRAP_DEPS Common) -OCTAVE_WRAP_VTK(Filtering FILTERING "${KIT_WRAP_DEPS}") -INSTALL_PROGRAMS(${OCT_INST_DIR}/octaviz ${all_oct}) +SET( KIT_WRAP_DEPS Common ) +OCTAVE_WRAP_VTK( Filtering FILTERING "${KIT_WRAP_DEPS}") +ADD_CUSTOM_TARGET( Filtering ALL COMMAND touch Filtering DEPENDS ${all_oct} ) +INSTALL_PROGRAMS( ${OCT_INST_DIR}/octaviz ${all_oct} ) #INSTALL_PROGRAMS(${OCT_INST_DIR}/octaviz vtkFiltering.oct) |
From: Dragan T. <dr...@us...> - 2006-12-25 20:12:53
|
Update of /cvsroot/octaviz/octaviz/Imaging In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv30548/Imaging Modified Files: CMakeLists.txt Log Message: Fixed segfaults due to the reference counting in octave_value (octave 2.9.x) Fixed varargin issue (hope so) Fixed (somewhat) the build system. This version should not be used for anything but testing. Index: CMakeLists.txt =================================================================== RCS file: /cvsroot/octaviz/octaviz/Imaging/CMakeLists.txt,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- CMakeLists.txt 21 Sep 2004 22:50:39 -0000 1.1.1.1 +++ CMakeLists.txt 25 Dec 2006 20:12:50 -0000 1.2 @@ -1,4 +1,5 @@ -SET(KIT_WRAP_DEPS Filtering) -OCTAVE_WRAP_VTK(Imaging IMAGING "${KIT_WRAP_DEPS}") -INSTALL_PROGRAMS(${OCT_INST_DIR}/octaviz ${all_oct}) +SET( KIT_WRAP_DEPS Filtering ) +OCTAVE_WRAP_VTK( Imaging IMAGING "${KIT_WRAP_DEPS}") +ADD_CUSTOM_TARGET( Imaging ALL COMMAND touch Imaging DEPENDS ${all_oct} ) +INSTALL_PROGRAMS( ${OCT_INST_DIR}/octaviz ${all_oct} ) #INSTALL_PROGRAMS(${OCT_INST_DIR}/octaviz vtkImaging.oct) \ No newline at end of file |
From: Dragan T. <dr...@us...> - 2006-12-25 20:12:53
|
Update of /cvsroot/octaviz/octaviz/Common In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv30548/Common Modified Files: CMakeLists.txt octaviz.cc vtk_print_ref_table.cc Log Message: Fixed segfaults due to the reference counting in octave_value (octave 2.9.x) Fixed varargin issue (hope so) Fixed (somewhat) the build system. This version should not be used for anything but testing. Index: octaviz.cc =================================================================== RCS file: /cvsroot/octaviz/octaviz/Common/octaviz.cc,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- octaviz.cc 23 Oct 2006 01:01:33 -0000 1.5 +++ octaviz.cc 25 Dec 2006 20:12:50 -0000 1.6 @@ -1,29 +1,29 @@ /* - + Copyright (C) 1996 John W. Eaton Copyright (C) 2004 Paul Kienzle Copyright (C) 2004 Dragan Tubic - + This file is part of Octave. - + Octave 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. - + Octave 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 Octave; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - + */ -#include <vtkObjectBase.h> -#include <vtkObject.h> +#include <vtkObjectBase.h> +#include <vtkObject.h> // The following must be defined for recent versions of Octave. #define TYPEID_HAS_CLASS @@ -59,279 +59,278 @@ /// Main vtk event loop int vtk_event_loop() { - std::vector<Atom> to_close; - - while ( XtAppPending(vtk_app_context) ) - { - XEvent event; - XtAppNextEvent( vtk_app_context, &event); - if ( event.type != ClientMessage ) - { - XtDispatchEvent( &event); - } else - { - // Ignore WM_DELETE_WINDOW. We will close the windows below. - Atom wm = event.xclient.data.l[0]; - if ( vtk_delete_window_atoms.find(wm) == vtk_delete_window_atoms.end() ) - { - XtDispatchEvent( &event); - } else - { - to_close.push_back( wm ); - } - } - } - // close figures if there's any pending - bool clear_wm = to_close.size() > 0; - - for ( unsigned int i = 0; i < to_close.size(); i++ ) - { - std::map<Atom, unsigned int>::iterator wm; - wm = vtk_delete_window_atoms.find( to_close[i] ); - if ( wm != vtk_delete_window_atoms.end() ) - { - Matrix A(2,2); - A(0,0) = wm->second; - A(0,1) = wm->second; - A(1,0) = wm->second; - A(1,1) = wm->second; - octave_value x = A; - feval("vtk_close",x); - } - } - if ( clear_wm ) - { - vtk_delete_window_atoms.clear(); - } + std::vector<Atom> to_close; + + while ( XtAppPending(vtk_app_context) ) + { + XEvent event; + XtAppNextEvent( vtk_app_context, &event); + if ( event.type != ClientMessage ) + { + XtDispatchEvent( &event); + } + else + { + // Ignore WM_DELETE_WINDOW. We will close the windows below. + Atom wm = event.xclient.data.l[0]; + if ( vtk_delete_window_atoms.find(wm) == vtk_delete_window_atoms.end() ) + { + XtDispatchEvent( &event); + } + else + { + to_close.push_back( wm ); + } + } + } + // close figures if there's any pending + bool clear_wm = to_close.size() > 0; + + for ( unsigned int i = 0; i < to_close.size(); i++ ) + { + std::map<Atom, unsigned int>::iterator wm; + wm = vtk_delete_window_atoms.find( to_close[i] ); + if ( wm != vtk_delete_window_atoms.end() ) + { + Matrix A(2,2); + A(0,0) = wm->second; + A(0,1) = wm->second; + A(1,0) = wm->second; + A(1,1) = wm->second; + octave_value x = A; + feval("vtk_close",x); + } + } + if ( clear_wm ) + { + vtk_delete_window_atoms.clear(); + } } /// End of X window and threading stuff vtk_object::vtk_object ( vtkObjectBase *pointer, bool belongs_to_octave ) - : octave_base_value (), - vtk_pointer ( pointer ) + : octave_base_value (), + vtk_pointer ( pointer ) { - //std::cout << "Creating.\n" << std::flush; - std::map<uintptr_t, int>& reference_count = get_reference_map(); + std::map<uintptr_t, int>& reference_count = get_reference_map(); - uintptr_t key = reinterpret_cast<uintptr_t>( pointer ); - - if ( belongs_to_octave ) - { - // This is a newly created vtk object that belongs to octave - // we need to reference count it - if ( reference_count.find(key) != reference_count.end() ) - { - error("Panic: creating vtk object that already exists!\n"); - } - reference_count[key] = 1; - return; - } - - // If this is a clone than it exists in reference count map - if ( reference_count.find(key) == reference_count.end() ) return; - // It belongs to octave, increase reference count - //std::cout << "Increasing reference count2.\n" << std::flush; - reference_count[key]++; + uintptr_t key = reinterpret_cast<uintptr_t>( pointer ); + + if ( belongs_to_octave ) + { + // This is a newly created vtk object that belongs to octave + // we need to reference count it + if ( reference_count.find(key) != reference_count.end() ) + { + error("Panic: creating vtk object that already exists!\n"); + } + reference_count[key] = 1; + return; + } + + // If this is a clone than it exists in reference count map + if ( reference_count.find(key) == reference_count.end() ) return; + // It belongs to octave, increase reference count + reference_count[key]++; } vtk_object::vtk_object (void) - : octave_base_value (), - vtk_pointer (NULL) + : octave_base_value (), + vtk_pointer (NULL) { - //std::cout << "Creating null.\n" << std::flush; + } vtk_object::vtk_object (const vtk_object& s ) - : octave_base_value (s), - vtk_pointer (s.vtk_pointer) + : octave_base_value (s), + vtk_pointer (s.vtk_pointer) { - //std::cout << "Creating copy.\n" << std::flush; - std::map<uintptr_t, int>& reference_count = get_reference_map(); + std::map<uintptr_t, int>& reference_count = get_reference_map(); - 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; - // It belongs to octave, increase reference count - //std::cout << "Increasing reference count3.\n" << std::flush; - reference_count[key]++; + 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; + // It belongs to octave, increase reference count + reference_count[key]++; } -vtk_object::~vtk_object (void) -{ - //std::cout << "Destroying.\n" << std::flush; - 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; - - // It belongs to octave, decrease reference count - reference_count[key]--; - // If the count is larger than 0 we don't care, there is another - // octave variable that references this vtk object. - if ( reference_count[key] > 0 ) return; - // Delete the vtk object, nobody references it anymore - //std::cout << "Destroying vtk object.\n" << std::flush; - vtk_pointer->Delete(); - vtk_pointer = NULL; - reference_count.erase( reference_count.find(key) ); +vtk_object::~vtk_object (void) +{ + 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; + + // It belongs to octave, decrease reference count + reference_count[key]--; + // If the count is larger than 0 we don't care, there is another + // octave variable that references this vtk object. + if ( reference_count[key] > 0 ) return; + // Delete the vtk object, nobody references it anymore + vtk_pointer->Delete(); + vtk_pointer = NULL; + reference_count.erase( reference_count.find(key) ); } unsigned int vtk_object::uint_value (bool req_int, bool frc_str_conv ) const { - return reinterpret_cast<uintptr_t>(vtk_pointer); + return reinterpret_cast<uintptr_t>(vtk_pointer); } octave_uint64 vtk_object::uint64_scalar_value (void) const { - return reinterpret_cast<octave_uint64_t>(vtk_pointer); + return reinterpret_cast<uint64_t>(vtk_pointer); } -octave_uint32 vtk_object::uint32_scalar_value (void) const +octave_uint32 vtk_object::uint32_scalar_value (void) const { - return reinterpret_cast<uintptr_t>(vtk_pointer); + return reinterpret_cast<uintptr_t>(vtk_pointer); } - -bool vtk_object::is_defined (void) const -{ - return true; + +bool vtk_object::is_defined (void) const +{ + return true; } // since we are a function, we won't see do_index_op octave_value vtk_object::do_index_op (const octave_value_list &, int) { - error("octave_object: do_index_op(idx,can_resize)"); - return octave_value(); + error("octave_object: do_index_op(idx,can_resize)"); + return octave_value(); } // x.v = y x(idx).v = y x{idx}.v = y octave_value vtk_object::subsasgn (const std::string& type, - const LIST<octave_value_list>& idx, - const octave_value& rhs) + const LIST<octave_value_list>& idx, + const octave_value& rhs) { - error("octave_object: subsasgn(type,idx,rhs)"); - return octave_value (); + error("octave_object: subsasgn(type,idx,rhs)"); + return octave_value (); } // x.v x(idx).v x{idx}.v octave_value vtk_object::subsref (const std::string SUBSREF_STRREF type, - const LIST<octave_value_list>& idx) + const LIST<octave_value_list>& idx) { - //octave_stdout << "octave_object: subsref(type,idx)" << std::endl; - return subsref (type, idx, 1)(0); + octave_stdout << "octave_object: subsref(type,idx)" << std::endl; + return subsref (type, idx, 1)(0); } // [i,j] = x(i) octave_value_list vtk_object::do_multi_index_op (int, const octave_value_list&) { - error("octave_object: do_multi_index_op(nargout,args)"); - return octave_value_list(); + error("octave_object: do_multi_index_op(nargout,args)"); + return octave_value_list(); } static bool any_arg_is_magic_colon (const octave_value_list& args) { - int nargin = args.length (); + int nargin = args.length (); - for (int i = 0; i < nargin; i++) - if (args(i).is_magic_colon ()) - return true; + for (int i = 0; i < nargin; i++) + if (args(i).is_magic_colon ()) + return true; - return false; + return false; } // [i,j] = x.v(...) octave_value_list vtk_object::subsref (const std::string SUBSREF_STRREF type, - const LIST<octave_value_list>& idx, - int nargout) + const LIST<octave_value_list>& idx, + int nargout) { - octave_value_list retval; - size_t skip = 1; + octave_value_list retval; + size_t skip = 1; - switch (type[0]) + switch (type[0]) { case '.': - { - std::string class_name = vtk_pointer->GetClassName(); - - octave_value_list args; - args(0) = octave_value( new vtk_object(*this) ); - args(1) = idx.front()(0).string_value (); - if (idx.LISTSIZE () < 2 || type[1] != '(') - { - octave_value res; - retval = feval(class_name,args,nargout); - } - else - { - skip = 2; - LIST<octave_value_list>::const_iterator pidx = idx.begin(); - octave_value_list args; - args(0) = octave_value( new vtk_object(*this) ); - args(1) = (*pidx)(0).string_value (); - pidx++; - - int n = args.length (); - for ( int i = 0; i < (*pidx).length (); i++ ) args(i+2) = (*pidx)(i); + { + std::string class_name = vtk_pointer->GetClassName(); + octave_value_list args; + // I don't thik it is logical to initialize the reference caounter in octave_value_base + // to 1 and not to increase it whenever an octave_value is created using it. I guess there is + // a reason behind it so we will increase the counter here and there as needed. + count++; + args(0) = octave_value( this ); + args(1) = idx.front()(0).string_value(); + if (idx.LISTSIZE () < 2 || type[1] != '(') + { + octave_value res; + retval = feval(class_name,args,nargout); + } + else + { + skip = 2; + LIST<octave_value_list>::const_iterator pidx = idx.begin(); + octave_value_list args; + count++; + args(0) = octave_value( this ); + args(1) = (*pidx)(0).string_value (); + pidx++; + int n = args.length (); + for ( int i = 0; i < (*pidx).length (); i++ ) args(i+2) = (*pidx)(i); - if (any_arg_is_magic_colon (*pidx)) - { - error ("invalid use of colon in method argument list"); - } - else - { - retval = feval(class_name,args,nargout); - } - } - } - break; + if (any_arg_is_magic_colon (*pidx)) + { + error ("invalid use of colon in method argument list"); + } + else + { + retval = feval(class_name,args,nargout); + } + } + } + break; case '(': case '{': - { - std::string nm = type_name (); - error ("%s cannot be indexed with %c", nm.c_str (), type[0]); - } - break; + { + std::string nm = type_name (); + } + break; default: - panic_impossible (); + panic_impossible (); } - if (!error_state && idx.LISTSIZE () > skip) - retval = retval(0).next_subsref (type, idx, skip); + if (!error_state && idx.LISTSIZE () > skip) + retval = retval(0).next_subsref (type, idx, skip); - return retval; -} + return retval; +} void vtk_object::print (std::ostream& os, bool pr_as_read_syntax) const { - if ( vtk_pointer == NULL ) - { - os << "NULL"; - } else - { - vtk_pointer->Print(os); - } -} + if ( vtk_pointer == NULL ) + { + os << "NULL"; + } + else + { + vtk_pointer->Print(os); + } +} std::map<uintptr_t, int>& vtk_object::get_reference_map() { - static std::map<uintptr_t, int> reference_count; - return 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<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; - } +// octave_stdout << "vtk_object::print_ref_table\n" << std::flush; + 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; + } } DEFINE_OCTAVE_ALLOCATOR (vtk_object); @@ -345,47 +344,41 @@ //-------------------------------------------------------------------- vtkOctaveCommand::vtkOctaveCommand() -{ - this->obj = NULL; +{ + this->obj = NULL; } //-------------------------------------------------------------------- vtkOctaveCommand::~vtkOctaveCommand() -{ - if (this->obj) - { +{ + if (this->obj) + { // this->Delete(); - } - this->obj = NULL; + } + this->obj = NULL; } //-------------------------------------------------------------------- void vtkOctaveCommand::SetObject(vtk_object *o) -{ - this->obj = o; +{ + this->obj = o; } //-------------------------------------------------------------------- void vtkOctaveCommand::SetFunctionName(const char* function_name ) -{ - this->function = function_name; +{ + this->function = function_name; } //-------------------------------------------------------------------- void vtkOctaveCommand::Execute(vtkObject *ptr, unsigned long eventtype, void *CallData) { - const char *eventname; - eventname = this->GetStringFromEventId(eventtype); - //std::cout << "Executing " << this->function << " for " << eventname << "\n" << std::flush; - //std::cout << this->obj << endl; - //this->obj->print_ref_table(); - - octave_value_list x; - //std::cout << "Assigning parameters 1" << std::flush << std::endl; - - x(0) = octave_value( new vtk_object( ptr, false ) ); - //std::cout << "Assigning parameters 2" << std::flush << std::endl; - x(1) = octave_value(eventname); - //std::cout << "Evaluating observer function" << std::flush << std::endl; - - feval(this->function,x); + const char *eventname; + eventname = this->GetStringFromEventId(eventtype); + + octave_value_list x; + + x(0) = octave_value( new vtk_object( ptr, false ) ); + x(1) = octave_value(eventname); + + feval(this->function,x); } //-------------------------------------------------------------------- @@ -397,4 +390,4 @@ ;;; mode: C++ *** ;;; End: *** */ - + Index: vtk_print_ref_table.cc =================================================================== RCS file: /cvsroot/octaviz/octaviz/Common/vtk_print_ref_table.cc,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- vtk_print_ref_table.cc 24 Oct 2004 02:09:13 -0000 1.1 +++ vtk_print_ref_table.cc 25 Dec 2006 20:12:50 -0000 1.2 @@ -21,7 +21,7 @@ #define TYPEID_HAS_CLASS #include <octave/oct.h> #include "octaviz.h" - +// DEFUN_DLD (vtk_print_ref_table, args, , "") { Index: CMakeLists.txt =================================================================== RCS file: /cvsroot/octaviz/octaviz/Common/CMakeLists.txt,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- CMakeLists.txt 28 Oct 2004 01:58:52 -0000 1.4 +++ CMakeLists.txt 25 Dec 2006 20:12:50 -0000 1.5 @@ -1,17 +1,21 @@ SET(KIT_WRAP_DEPS) +ADD_LIBRARY( octaviz SHARED octaviz.cc ) + OCTAVE_WRAP_VTK(Common COMMON "${KIT_WRAP_DEPS}") EXEC_PROGRAM(${OCTAVE_CONFIG} ARGS "-p OCTINCLUDEDIR" OUTPUT_VARIABLE OCT_INC_DIR) EXEC_PROGRAM(${OCTAVE_CONFIG} ARGS "-p OCTLIBDIR" OUTPUT_VARIABLE OCT_LIB_DIR) INCLUDE_DIRECTORIES(${OCT_INC_DIR} "${OCT_INC_DIR}/octave" ) LINK_LIBRARIES(octinterp octave cruft vtkCommon) LINK_DIRECTORIES(${OCT_LIB_DIR}) -ADD_LIBRARY(octaviz SHARED octaviz.cc) -ADD_CUSTOM_TARGET(vtk_init.oct ALL mkoctfile ${oct_flags} ${oct_link_flags} -loctaviz -L. vtk_init.cc) -ADD_CUSTOM_TARGET(vtkInitializeInteractor.oct ALL mkoctfile ${oct_flags} ${oct_link_flags} -loctaviz -L. vtkInitializeInteractor.cc) -ADD_CUSTOM_TARGET(vtkRaiseWindow.oct ALL mkoctfile ${oct_flags} ${oct_link_flags} -loctaviz -L. vtkRaiseWindow.cc) -ADD_CUSTOM_TARGET(vtk_print_ref_table.oct ALL mkoctfile ${oct_flags} ${oct_link_flags} -loctaviz -L. vtk_print_ref_table.cc) -ADD_CUSTOM_TARGET(vtk_get_pointer.oct ALL mkoctfile ${oct_flags} ${oct_link_flags} -loctaviz -L. vtk_get_pointer.cc) + +ADD_CUSTOM_COMMAND( OUTPUT vtk_init.oct COMMAND mkoctfile ${oct_flags} ${oct_link_flags} -Wno-deprecated -loctaviz -L. vtk_init.cc ) +ADD_CUSTOM_COMMAND( OUTPUT vtkInitializeInteractor.oct COMMAND mkoctfile ${oct_flags} ${oct_link_flags} -Wno-deprecated -loctaviz -L. vtkInitializeInteractor.cc z) +ADD_CUSTOM_COMMAND( OUTPUT vtkRaiseWindow.oct COMMAND mkoctfile ${oct_flags} ${oct_link_flags} -Wno-deprecated -loctaviz -L. vtkRaiseWindow.cc ) +ADD_CUSTOM_COMMAND( OUTPUT vtk_print_ref_table.oct COMMAND mkoctfile ${oct_flags} ${oct_link_flags} -Wno-deprecated -loctaviz -L. vtk_print_ref_table.cc ) +ADD_CUSTOM_COMMAND( OUTPUT vtk_get_pointer.oct COMMAND mkoctfile ${oct_flags} ${oct_link_flags} -Wno-deprecated -loctaviz -L. vtk_get_pointer.cc ) + +ADD_CUSTOM_TARGET( Common ALL COMMAND touch Common DEPENDS octaviz ${all_oct} vtk_init.oct vtkInitializeInteractor.oct vtkRaiseWindow.oct vtk_print_ref_table.oct vtk_get_pointer.oct ) #ADD_CUSTOM_TARGET(vtkWindow.oct ALL mkoctfile ${oct_flags} ${oct_link_flags} vtkWindow.cc) |
From: Dragan T. <dr...@us...> - 2006-12-25 20:12:53
|
Update of /cvsroot/octaviz/octaviz/Graphics In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv30548/Graphics Modified Files: CMakeLists.txt Log Message: Fixed segfaults due to the reference counting in octave_value (octave 2.9.x) Fixed varargin issue (hope so) Fixed (somewhat) the build system. This version should not be used for anything but testing. Index: CMakeLists.txt =================================================================== RCS file: /cvsroot/octaviz/octaviz/Graphics/CMakeLists.txt,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- CMakeLists.txt 21 Sep 2004 22:50:44 -0000 1.1.1.1 +++ CMakeLists.txt 25 Dec 2006 20:12:50 -0000 1.2 @@ -1,4 +1,5 @@ -SET(KIT_WRAP_DEPS Filtering) -OCTAVE_WRAP_VTK(Graphics GRAPHICS "${KIT_WRAP_DEPS}") +SET( KIT_WRAP_DEPS Filtering ) +OCTAVE_WRAP_VTK( Graphics GRAPHICS "${KIT_WRAP_DEPS}") +ADD_CUSTOM_TARGET( Graphics ALL COMMAND touch Graphics DEPENDS ${all_oct} ) INSTALL_PROGRAMS(${OCT_INST_DIR}/octaviz ${all_oct}) #INSTALL_PROGRAMS(${OCT_INST_DIR}/octaviz vtkGraphics.oct) \ No newline at end of file |
From: Jonathan S. <jjs...@us...> - 2006-11-10 03:45:45
|
Update of /cvsroot/octaviz/octaviz In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv19103 Modified Files: README Log Message: update general readme Index: README =================================================================== RCS file: /cvsroot/octaviz/octaviz/README,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- README 12 Nov 2004 00:32:26 -0000 1.3 +++ README 10 Nov 2006 03:45:44 -0000 1.4 @@ -1,18 +1,50 @@ -Octaviz is a visualization system for Octave. It is a wrapper that makes all VTK classes accessible from within Octave using the same object-oriented syntax as in C++ or Python. Octaviz also provides high-level functions for 2D and 3D visualization. Using those functions, most common visualization tasks (3D surface plots, contour plots, meshes etc) can be accomplished without any knowledge about VTK. +Octaviz is a visualization system for Octave. It is a wrapper that +makes all VTK classes accessible from within Octave using the same +object-oriented syntax as in C++ or Python. Octaviz also provides +high-level functions for 2D and 3D visualization. Using those +functions, most common visualization tasks (3D surface plots, contour +plots, meshes etc) can be accomplished without any knowledge about +VTK. -Although Octaviz is in active development, it already quite usable and stable. All major features of the wrapper are implemented: all VTK classes are wrapped, array exchange between Octave and VTK works, callbacks work and finally there is experimental CygWin support. Excluding language specific constructs, Python examples (included in VTK) can be used in octave without any modification. To help you get started, about 70 Python examples are converted to Octave and included in Octaviz. +Although Octaviz is in active development, it already quite usable and +stable. All major features of the wrapper are implemented: all VTK +classes are wrapped, array exchange between Octave and VTK works, +callbacks work and finally there is experimental CygWin +support. Excluding language specific constructs, Python examples +(included in VTK) can be used in octave without any modification. To +help you get started, about 70 Python examples are converted to Octave +and included in Octaviz. -Octaviz consists of two parts: -wrappers for all VTK classes and high-level Octave scripts that hide VTK internals and provide visualization capabilities without requiring any VTK knowledge. -VTK classes can be used in Octave as easily as they are used in Python and with the same syntax. Unlike other scripts or toolboxes for octave, octaviz uses object-oriented syntax. Octaviz wraps each VTK class into an Octave function of the same name. Those function are used as objects: An instance of a VTK class are created by calling corresponding octave function without parameters. For example, command "ren =vtkRenderer();" creates an instance of vtkRenderer class that is kept in octave variable "ren". Methods within a class are accessed directly using C++ (or Python) syntax. For example, using the above created object ren, the method Render is accessible as "ren.Render()". Online help is available for each class and method: vtkClass("Help") displays the description of vtkClass, while vtkClass("MethodName","Help") displays help for the method vtkClass.MethodName. List of available methods for a class can be obtained as vtkClass("List"). +Octaviz consists of two parts: wrappers for all VTK classes and +high-level Octave scripts that hide VTK internals and provide +visualization capabilities without requiring any VTK knowledge. VTK +classes can be used in Octave as easily as they are used in Python and +with the same syntax. Unlike other scripts or toolboxes for octave, +octaviz uses object-oriented syntax. Octaviz wraps each VTK class into +an Octave function of the same name. Those function are used as +objects: An instance of a VTK class are created by calling +corresponding octave function without parameters. For example, command +"ren =vtkRenderer();" creates an instance of vtkRenderer class that is +kept in octave variable "ren". Methods within a class are accessed +directly using C++ (or Python) syntax. For example, using the above +created object ren, the method Render is accessible as +"ren.Render()". Online help is available for each class and method: +vtkClass("Help") displays the description of vtkClass, while +vtkClass("MethodName","Help") displays help for the method +vtkClass.MethodName. List of available methods for a class can be +obtained as vtkClass("List"). -Octaviz has been developed for Linux with X-Window System and OpenGL but it should work on any platform that supports X and VTK. Octaviz should work under CygWin too but this port requires more testing. Any feedback regarding Octaviz in CygWin is welcome. +Octaviz has been developed for Linux with X-Window System and OpenGL +but it should work on any platform that supports X and VTK. Octaviz +should work under CygWin too but this port requires more testing. Any +feedback regarding Octaviz in CygWin is welcome. BUILDING INSTRUCTIONS Linux: -You'll need octave 2.1.53 or later and VTK CVS to build octaviz. +You'll need octave 2.1.53 or later and VTK-5.0 or later to build +octaviz. - run ccmake . in Octaviz root directory - press "c" to configure - press "g" to generate Makefiles |
From: Jonathan S. <jjs...@us...> - 2006-11-10 03:15:06
|
Update of /cvsroot/octaviz/octaviz/gentoo In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv7023/gentoo Modified Files: readme.gentoo Removed Files: vtk_ebuild_files.tar.gz Log Message: updated gentoo information Index: readme.gentoo =================================================================== RCS file: /cvsroot/octaviz/octaviz/gentoo/readme.gentoo,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- readme.gentoo 6 Nov 2004 01:12:26 -0000 1.2 +++ readme.gentoo 10 Nov 2006 03:15:01 -0000 1.3 @@ -1,40 +1,13 @@ -To build Octaviz for Gentoo Linux, you will need to get ebuilds for -VTK and Octaviz. In addition to the ebuilds provided here, you may -also find them at bugs.gentoo.org. Specifically, - -http://bugs.gentoo.org/show_bug.cgi?id=25335 - -for VTK and - -http://bugs.gentoo.org/show_bug.cgi?id=70085 - -for Octaviz. - -You will need >=vtk-4.4 for Octaviz to work. Exporting PS/PDF from -Octaviz will require VTK to be built with gl2ps support. Therefore -you should Choose your VTK ebuild carefully. The ebuild provided here -is currently the recommended version, but other acceptable ebuilds may -appear at bugs.gentoo.org in the future. - -To use the ebuilds provided here, expand the tar.gz files into -/usr/local/portage. Add these lines to /etc/portage/package.keywords - -dev-libs/vtk ~x86 -app-sci/octaviz ~x86 +You will need >=vtk-5.0 for Octaviz to work. Exporting PS/PDF from +Octaviz requires VTK to be built with gl2ps support. Here is a link +to patch the current ebuild (sci-libs/vtk-5.0.1) to include gl2ps: -Then you may emerge. Compile times will be very long! The USE flags -"doc" and "data" will install extra documentation, examples, and -example data for VTK. If you get "no manifest" or "no digest" errors, -do +http://bugs.gentoo.org/show_bug.cgi?id=146019 -# ebuild [location/name].ebuild digest -to (re)generate the necessary manifest and digest files. +The octaviz ebuild found here and on the gentoo bugs site at -There is now a Gentoo binary package available for Octaviz at the -sourceforge project page. You will still need the ebuild to install -the binary package. +http://bugs.gentoo.org/show_bug.cgi?id=70085 -Comments, suggestions, bug repports and patches are welcome (you can -use mailing lists at SourceForge or send to -jj...@us...). +is for version 0.4.0 and probably will no longer work. Submissions of +new and improved ebuilds are most welcome! --- vtk_ebuild_files.tar.gz DELETED --- |
From: Jonathan S. <jjs...@us...> - 2006-10-23 01:01:38
|
Update of /cvsroot/octaviz/octaviz/Wrapping In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv31562/Wrapping Modified Files: vtkWrapOctave.c Log Message: patches for vtk 5 and gcc 4.1 Index: vtkWrapOctave.c =================================================================== RCS file: /cvsroot/octaviz/octaviz/Wrapping/vtkWrapOctave.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- vtkWrapOctave.c 7 Mar 2005 02:06:54 -0000 1.4 +++ vtkWrapOctave.c 23 Oct 2006 01:01:33 -0000 1.5 @@ -57,6 +57,16 @@ j++; } else { + // double escape everything that is escaped; + // gcc doesn't like things like \$, \frac, \sum, ... + // in strings; luckily, this happens only in + // the 'Descriptions:' field + if (wrappedFunctions[i]->Comment[j] == '\\') + { + fprintf(fp, "\\\\"); + j++; + } + fprintf(fp,"%c",wrappedFunctions[i]->Comment[j++]); } } @@ -576,6 +586,7 @@ void vtkParseOutput(FILE *fp, FileInfo *data) { int i,j; + int in_example; fprintf(fp,"// Octave wrapper for %s object\n//\n",data->ClassName); @@ -623,19 +634,62 @@ /* Make the function that is callable from octave */ /* Add class description into the function. */ /* This will displayed as help in octave */ - fprintf(fp,"\nDEFUN_DLD ( %s, args, nargout, \n \"%s \\n\\\n \\n\\\n ",data->ClassName,data->ClassName); + fprintf(fp,"\nDEFUN_DLD ( %s, args, nargout, \n", data->ClassName); + fprintf(fp," \"-*- texinfo -*-\\n\\\n"); + fprintf(fp,"@deftypefn {Built-in Function} {} %s\\n\\\n\\n\\\n", data->ClassName); i = 0; + in_example = 0; if ( data->Description != NULL ) while ( data->Description[i] != 0 ) { if ( data->Description[i] == '"' ) fprintf(fp,"\\"); - + + /* Curly braces are special characters in Texinfo. Quote them. */ + if ( data->Description[i] == '{' || data->Description[i] == '}' ) + fprintf(fp,"@"); + + /* Replace `\code [...] \endcode' constructs by the texinfo equivalent + @example [..] @end example' */ + if (strncmp (data->Description + i, "\\code", 5) == 0) { + fprintf(fp,"@example"); + in_example = 1; + i += 5; + } + if (strncmp (data->Description + i, "\\endcode", 8) == 0) { + fprintf(fp,"@end example"); + in_example = 0; + i += 8; + } + /* Skip emphasis markup. This could be replaced by @emph, + but it is trick because @emph needs a bracketed argument */ + if (strncmp (data->Description + i, "\\em", 3) == 0) { + i += 3; + } + /* Unscape \sum macro */ + if (strncmp (data->Description + i, "\\sum", 4) == 0) { + i += 1; + } + + /* Unscape \pre macro -- this will probably look like shit in the final .oct files */ + if (strncmp (data->Description + i, "\\pre", 4) == 0) { + i += 1; + } + + /* Unscape \post macro -- this will probably look like shit in the final .oct files */ + if (strncmp (data->Description + i, "\\post", 5) == 0) { + i += 1; + } + if ( data->Description[i] == '\n' ) { /* Don't want the last newline */ if ( i + 2 < strlen(data->Description) ) { - fprintf(fp,"\\n\\\n "); + fprintf(fp,"\\n\\\n"); + /* Eat spaces at beginning of lines */ + if (in_example != 1) + while (data->Description[i + 1] == ' ') + i++; } i++; } else @@ -643,7 +697,7 @@ fprintf(fp,"%c",data->Description[i++]); } } - fprintf(fp,"\")\n{\n" ); + fprintf(fp,"\\n\\\n@end deftypefn\")\n{\n" ); fprintf(fp," octave_value retval;\n" ); /* This associative map holds help for each method (if avaliable) */ |
From: Jonathan S. <jjs...@us...> - 2006-10-23 01:01:38
|
Update of /cvsroot/octaviz/octaviz/Common In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv31562/Common Modified Files: octaviz.cc Log Message: patches for vtk 5 and gcc 4.1 Index: octaviz.cc =================================================================== RCS file: /cvsroot/octaviz/octaviz/Common/octaviz.cc,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- octaviz.cc 7 Mar 2005 02:06:53 -0000 1.4 +++ octaviz.cc 23 Oct 2006 01:01:33 -0000 1.5 @@ -180,7 +180,7 @@ unsigned int vtk_object::uint_value (bool req_int, bool frc_str_conv ) const { - return reinterpret_cast<unsigned int>(vtk_pointer); + return reinterpret_cast<uintptr_t>(vtk_pointer); } octave_uint64 vtk_object::uint64_scalar_value (void) const @@ -190,7 +190,7 @@ octave_uint32 vtk_object::uint32_scalar_value (void) const { - return reinterpret_cast<octave_uint32_t>(vtk_pointer); + return reinterpret_cast<uintptr_t>(vtk_pointer); } |
From: Jonathan S. <jjs...@us...> - 2006-10-23 01:01:38
|
Update of /cvsroot/octaviz/octaviz In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv31562 Modified Files: CMakeLists.txt Added Files: cmake_uninstall.cmake.in Log Message: patches for vtk 5 and gcc 4.1 Index: CMakeLists.txt =================================================================== RCS file: /cvsroot/octaviz/octaviz/CMakeLists.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- CMakeLists.txt 28 Oct 2004 01:58:52 -0000 1.3 +++ CMakeLists.txt 23 Oct 2006 01:01:33 -0000 1.4 @@ -3,6 +3,16 @@ PROJECT(OCTAVIZ) + ## added from cmake FAQ, JJS 3/29/05; also needs the file cmake_uninstall.cmake.in + CONFIGURE_FILE( + "${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in" + "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" + IMMEDIATE @ONLY) + + ADD_CUSTOM_TARGET(uninstall + "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake") + ## + OPTION(USE_PREC_HEADERS "Use precompiled headers" OFF) STRING(COMPARE EQUAL ${USE_PREC_HEADERS} "OFF" PCH_ON) IF(PCH_ON) @@ -82,7 +92,15 @@ INCLUDE(${VTK_KITS_DIR}/vtk${kit}Kit.cmake) INCLUDE(${VTK_KITS_DIR}/vtk${kit}Kit.cmake) - + + # what we don't want or can't build; + # this is an ugly hack[TM] and should be fixed by e.g. + # including a list of not-to-be-built-functions shipped with + # Octaviz + SET(VTK_CLASS_WRAP_EXCLUDE_vtkLongLongArray 1) + SET(VTK_CLASS_WRAP_EXCLUDE_vtkSignedCharArray 1) + SET(VTK_CLASS_WRAP_EXCLUDE_vtkUnsignedLongLongArray 1) + SET(all_oct) FOREACH(class ${VTK_${ukit}_CLASSES}) IF(NOT VTK_CLASS_WRAP_EXCLUDE_${class}) --- NEW FILE: cmake_uninstall.cmake.in --- IF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") MESSAGE(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"") ENDIF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") FILE(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files) STRING(REGEX REPLACE "\n" ";" files "${files}") FOREACH(file ${files}) MESSAGE(STATUS "Uninstalling \"${file}\"") IF(NOT EXISTS "${file}") MESSAGE(FATAL_ERROR "File \"${file}\" does not exists.") ENDIF(NOT EXISTS "${file}") EXEC_PROGRAM("@CMAKE_COMMAND@" ARGS "-E remove \"${file}\"" OUTPUT_VARIABLE rm_out RETURN_VARIABLE rm_retval) IF("${rm_retval}" GREATER 0) MESSAGE(FATAL_ERROR "Problem when removing \"${file}\"") ENDIF("${rm_retval}" GREATER 0) ENDFOREACH(file) |
From: Jonathan S. <jjs...@us...> - 2005-09-09 19:53:21
|
Update of /cvsroot/octaviz/octaviz/Scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14970 Modified Files: vtk_blackonwhite.m Log Message: change title and colorbar text color Index: vtk_blackonwhite.m =================================================================== RCS file: /cvsroot/octaviz/octaviz/Scripts/vtk_blackonwhite.m,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- vtk_blackonwhite.m 7 Jul 2005 23:42:28 -0000 1.1 +++ vtk_blackonwhite.m 9 Sep 2005 19:53:13 -0000 1.2 @@ -34,6 +34,25 @@ f.axes.GetAxisTitleTextProperty.SetColor(0,0,0) f.axes.GetAxisTitleTextProperty.ShadowOff + ## change color of title (assume it is the only textactor) + nprops = f.renderer.GetProps.GetNumberOfItems; + for i = 0:nprops-1; + if ( f.renderer.GetProps.GetItemAsObject(i).IsA("vtkTextActor") ) + f.renderer.GetProps.GetItemAsObject(i).GetTextProperty.SetColor(0,0,0) + break + endif + endfor + + ## change color of text of color bar, if it exists + nprops = f.renderer.GetProps.GetNumberOfItems; + for i = 0:nprops-1; + if ( f.renderer.GetProps.GetItemAsObject(i).IsA("vtkScalarBarActor") ) + f.renderer.GetProps.GetItemAsObject(i).GetTitleTextProperty.SetColor(0,0,0) + f.renderer.GetProps.GetItemAsObject(i).GetLabelTextProperty.SetColor(0,0,0) + break + endif + endfor + vtk_update(f); endfunction |
From: Jonathan S. <jjs...@us...> - 2005-07-24 04:35:45
|
Update of /cvsroot/octaviz/octaviz/Scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24715 Modified Files: vtk_meshc.m vtk_surfc.m Added Files: vtk_contour.m vtk_contourf.m Removed Files: vtk_contour3.m Log Message: contour function improvements --- NEW FILE: vtk_contour.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_contour(@var{x},@var{y},@var{z},[@var{prop},@var{val}]) ## Displays a contour plot defined by @var{x},@var{y},@var{z} matrices, ## where @var{x} and @var{y} are typically formed by meshgrid. ## ## Optional @var{prop},@var{val} arguments can be used to change ## properties of the plot. Currently, valid properties are ## ";NConts;". ## ## @end deftypefn ## @seealso{vtk_contourf, vtk_surf} ## Author: Dragan Tubic function vtk_contour( varargin ) valid_props = ";NConts;"; [no_numerical_params, first_prop_index, line_spec_index] = vtk_parse_params(valid_props, all_va_args); if ( first_prop_index > 0 ) properties = struct(varargin{first_prop_index:length(varargin)}); ncts = properties.NConts; # number of contours; else properties.empty = 1; ncts=10; end if ( no_numerical_params < 1 | no_numerical_params > 3 ) error("Syntax is vtk_contour( x, (y), (z))"); end if ( no_numerical_params == 1 ) z = nth (varargin,1); [nr nc] = size(z); [x y] = meshgrid(1:nr,1:nc); c = z; elseif ( no_numerical_params == 2 ) z = nth (varargin,1); [nr nc] = size(z); [x y] = meshgrid(1:nr,1:nc); c = nth (varargin,1); elseif ( no_numerical_params == 3 ) x = nth (varargin,1); y = nth (varargin,2); z = nth (varargin,3); c = z; end ## form the array that specifies connecting points [nr nc] = size(x); 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+1)*n+j,(i+1)*n+(j+1) ; (i+1)*n+(j+1),i*n+(j+1),i*n+j]; x = x(:); y = y(:); z = z(:); c = c(:); vtk_init; if ( length(x) != length(y) | length(x) != length(z) | length(x) != length(c) ) error("Lengths of all three coordinates have to be the same."); end %% We'll create the building blocks of polydata including data attributes. surface = vtkPolyData(); points = vtkPoints(); polys = vtkCellArray(); scalars = vtkFloatArray(); %% Load the point, cell, and data attributes. %% for (i=0; i<8; i++) points->InsertPoint(i,x[i]); coords = vtkFloatArray; coords.SetNumberOfTuples( length(x) ); coords.SetNumberOfComponents(3); pts = [x y z]'; pts(3,:) = min(z) - max( [max(x)-min(x) max(y)-min(y) max(z)-min(z) ] )/4; #puts the contour lines in one plane coords.SetArray( pts(:), 3*length(x), 0 ); points.SetData(coords); no_tris = length(t); t = [ones(no_tris,1)*3 t]'; ptids = vtkIdTypeArray; ptids.SetArray( t(:), no_tris*4, 0 ); polys.SetCells( no_tris, ptids ); ## manually create color map table instead; a must if later add a scalar bar lut = vtkLookupTable(); lut.SetHueRange(0.66667, 0.0); lut.SetNumberOfColors(256); lut.SetRampToLinear(); lut.Build(); scalars.SetArray( c, length(c) , 0 ); %% We now assign the pieces to the vtkPolyData. surface.SetPoints(points); surface.SetPolys(polys); surface.GetPointData().SetScalars(scalars); contours = vtkContourFilter(); contours.SetInput(surface) contours.GenerateValues(ncts, min(c), max(c)) %% The contour lines are mapped to the graphics library. contMapper = vtkPolyDataMapper(); contMapper.SetInput(contours.GetOutput()) contMapper.SetLookupTable(lut); % use manually created color map table contMapper.SetScalarRange(min(c),max(c)); % relative scaling contActor = vtkActor(); contActor.SetMapper(contMapper) f = vtk_figure(0); f.renderer.AddActor(contActor); %f.axes.YAxisVisibilityOff(); # turn off the "Z" axes (but use YAxis command!?) - must be a bug, JJS 7/23/05 vtk_update(f); endfunction Index: vtk_surfc.m =================================================================== RCS file: /cvsroot/octaviz/octaviz/Scripts/vtk_surfc.m,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- vtk_surfc.m 25 Oct 2004 05:37:10 -0000 1.3 +++ vtk_surfc.m 24 Jul 2005 04:35:31 -0000 1.4 @@ -26,7 +26,7 @@ ## ";Opacity;Color;NConts;". ## ## @end deftypefn -## @seealso{vtk_surf, vtk_contour3, vtk_meshc} +## @seealso{vtk_surf, vtk_contour, vtk_meshc} ## Author: Jonathan Stickel @@ -68,14 +68,14 @@ error("input has to be at least 2xN or Nx2 matrix"); end - ## complicated assessment of passed properties in order to call vtk_surf and vtk_contour3 correctly... + ## complicated assessment of passed properties in order to call vtk_surf and vtk_contour correctly... if ( first_prop_index > 0 ) properties = struct(varargin{first_prop_index:length(varargin)}); if isfield(properties,"NConts") - vtk_contour3(x,y,z,c,"NConts",properties.NConts) + vtk_contour(x,y,z,"NConts",properties.NConts) properties = rmfield(properties,"NConts"); else - vtk_contour3(x,y,z,c); + vtk_contour(x,y,z); endif if size(fieldnames(properties),1) # returns 0 if no fieldnames @@ -94,11 +94,11 @@ endif else - vtk_contour3(x,y,z,c); + vtk_contour(x,y,z); vtk_surf(x,y,z,c); endif f = vtk_figure(0); - f.axes.YAxisVisibilityOn(); # turn back on the "Z" axes (vtk_contour3 call turns it off) + f.axes.YAxisVisibilityOn(); # turn back on the "Z" axes (vtk_contour call turns it off) endfunction --- vtk_contour3.m DELETED --- --- NEW FILE: vtk_contourf.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_contourf(@var{x},@var{y},@var{z},[@var{prop},@var{val}]) ## Displays a filled contour plot defined by @var{x},@var{y},@var{z} matrices, ## where @var{x} and @var{y} are typically formed by meshgrid. ## ## Optional @var{prop},@var{val} arguments can be used to change ## properties of the plot. Currently, valid properties are ## ";NConts;". ## ## @end deftypefn ## @seealso{vtk_contour, vtk_surf} ## Author: Dragan Tubic, Jonathan Stickel ## TBD: allow options for the contour lines through the line spec interface function vtk_contourf( varargin ) valid_props = ";NConts;"; [no_numerical_params, first_prop_index, line_spec_index] = vtk_parse_params(valid_props, all_va_args); if ( first_prop_index > 0 ) properties = struct(varargin{first_prop_index:length(varargin)}); ncts = properties.NConts; # number of contours; else properties.empty = 1; ncts=10; end if ( no_numerical_params < 1 | no_numerical_params > 3 ) error("Syntax is vtk_contourf( x, (y), (z))"); end if ( no_numerical_params == 1 ) z = nth (varargin,1); [nr nc] = size(z); [x y] = meshgrid(1:nr,1:nc); c = z; elseif ( no_numerical_params == 2 ) z = nth (varargin,1); [nr nc] = size(z); [x y] = meshgrid(1:nr,1:nc); c = nth (varargin,1); elseif ( no_numerical_params == 3 ) x = nth (varargin,1); y = nth (varargin,2); z = nth (varargin,3); c = z; end [nr nc] = size(x); if ( nr < 2 | nc < 2 ) error("input has to be at least 2xN or Nx2 matrix"); end ## make a contour plot with black contour lines if ( first_prop_index > 0 ) properties = struct(varargin{first_prop_index:length(varargin)}); vtk_contour(x,y,z,"NConts",properties.NConts) else vtk_contour(x,y,z); endif f = vtk_figure(0); ctractor = f.renderer.GetActors.GetLastActor; ctractor.GetMapper.ScalarVisibilityOff ctractor.GetProperty().SetColor( 0, 0, 0 ) ## now make a surface plot with z axis the same level as the contour render plane ctrbnds = ctractor.GetMapper.GetInput.GetBounds; z = (ctrbnds(end)+0.01*ctrbnds(end))*ones(size(z)); 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+1)*n+(j+1),(i+1)*n+j,i*n+j]; %1; one way to construct the triangles t = [i*n+j,(i+1)*n+j,(i+1)*n+(j+1) ; (i+1)*n+(j+1),i*n+(j+1),i*n+j]; %2; another way, seems a bit better ## could pass some properties to surf, e.g. opacity; this tbd, JJS 7/23/05 ##if ( first_prop_index > 0 ) ## f = vtk_trisurf(t+1,x(:),y(:),z(:),c(:),varargin{first_prop_index:length(varargin)}); ##else f = vtk_trisurf(t+1,x(:),y(:),z(:),c(:)); ##end endfunction Index: vtk_meshc.m =================================================================== RCS file: /cvsroot/octaviz/octaviz/Scripts/vtk_meshc.m,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- vtk_meshc.m 25 Oct 2004 05:37:10 -0000 1.1 +++ vtk_meshc.m 24 Jul 2005 04:35:31 -0000 1.2 @@ -26,7 +26,7 @@ ## ";BallRadius;LineRadius;Fancy;NConts;". ## ## @end deftypefn -## @seealso{vtk_mesh, vtk_contour3, vtk_surfc} +## @seealso{vtk_mesh, vtk_contour, vtk_surfc} ## Author: Jonathan Stickel @@ -68,14 +68,14 @@ error("input has to be at least 2xN or Nx2 matrix"); end - ## complicated assessment of passed properties in order to call vtk_mesh and vtk_contour3 correctly... + ## complicated assessment of passed properties in order to call vtk_mesh and vtk_contour correctly... if ( first_prop_index > 0 ) properties = struct(varargin{first_prop_index:length(varargin)}); if isfield(properties,"NConts") - vtk_contour3(x,y,z,c,"NConts",properties.NConts) + vtk_contour(x,y,z,"NConts",properties.NConts) properties = rmfield(properties,"NConts"); else - vtk_contour3(x,y,z,c); + vtk_contour(x,y,z); endif if size(fieldnames(properties),1) # returns 0 if no fieldnames @@ -98,11 +98,11 @@ endif else - vtk_contour3(x,y,z,c); + vtk_contour(x,y,z); vtk_mesh(x,y,z,c); endif f = vtk_figure(0); - f.axes.YAxisVisibilityOn(); # turn back on the "Z" axes (vtk_contour3 call turns it off) + f.axes.YAxisVisibilityOn(); # turn back on the "Z" axes (vtk_contour call turns it off) endfunction |
From: Jonathan S. <jjs...@us...> - 2005-07-07 23:42:36
|
Update of /cvsroot/octaviz/octaviz/Scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16948 Added Files: vtk_blackonwhite.m vtk_colorbar.m Removed Files: vtk_scalarbar.m Log Message: rename scalarbar, new function to use white background --- vtk_scalarbar.m DELETED --- --- NEW FILE: vtk_blackonwhite.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_blackonwhite() ## Changes the background to be white with black axes and outline. To ## change the color of the background and axes to something else, please ## refer to the source code of this function. ## @end deftypefn ## Author: Jonathan Stickel function vtk_blackonwhite() f=vtk_figure(0); f.renderer.SetBackground(1,1,1) f.outline_actor.GetProperty.SetColor(0,0,0) f.axes.GetProperty.SetColor(0,0,0) f.axes.GetAxisTitleTextProperty.SetColor(0,0,0) f.axes.GetAxisTitleTextProperty.ShadowOff vtk_update(f); endfunction --- NEW FILE: vtk_colorbar.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_colorbar(@var{string}) ## Adds a color scalar bar to the side of a vtk figure. The input ## @var{string} will be the title of the scalar bar. If ## @var{string}="remove", the bar will be removed. This is a work ## in progress. It doesn't update automatically (although it can be ## called again), and only works on the last actor rendered. ## @end deftypefn ## @seealso{vtk_title,vtk_clear} ## Author: Jonathan Stickel function vtk_colorbar(string) f=vtk_figure(0); ## clear existing bar, if it exists nprops = f.renderer.GetProps.GetNumberOfItems; for i = 0:nprops-1; if ( f.renderer.GetProps.GetItemAsObject(i).IsA("vtkScalarBarActor") ) f.renderer.RemoveViewProp( f.renderer.GetProps.GetItemAsObject(i) ); break endif endfor if ( !strcmp(string, "remove") ) scalarBar = vtkScalarBarActor; for i = f.renderer.GetActors.GetNumberOfItems-1:-1:0; mapper = f.renderer.GetActors.GetItemAsObject(i).GetMapper; ## a test to see if this actor is a real object (might be corner points generated in vtk_axis) if ( mapper.GetInput.GetNumberOfPolys ) ## will be zero if an unintersting actor scalarBar.SetLookupTable( mapper.GetLookupTable ); break endif endfor scalarBar.SetTitle( string ); scalarBar.GetPositionCoordinate.SetCoordinateSystemToNormalizedViewport; 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 scalarBar.GetTitleTextProperty.ShadowOff scalarBar.GetLabelTextProperty.ShadowOff endif vtk_update(f); endfunction |
From: Jonathan S. <jjs...@us...> - 2005-06-19 03:31:59
|
Update of /cvsroot/octaviz/octaviz/Scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15853 Modified Files: vtk_axis.m vtk_scalarbar.m Added Files: vtk_xlabel.m vtk_xlim.m vtk_ylabel.m vtk_ylim.m vtk_zlabel.m vtk_zlim.m Log Message: new and improved axes functions --- NEW FILE: vtk_zlim.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_zlim([@var{zlimits}]) ## ## Set z-axis limits for plots. ## ## The argument @var{zlimits} should be a 2 element vector, [zmin, zmax]. ## ## @end deftypefn ## @seealso{vtk_axis,vtk_xlim,vtk_ylim,vtk_zlabel,vtk_scalarbar} ## Author: Jonathan Stickel function vtk_zlim(zlimits) f = vtk_figure(0); if (f.axes.GetUseRanges) limits = f.axes.GetRanges; else limits = f.outline.GetBounds; endif limits(5:6) = zlimits; vtk_axis(limits); endfunction Index: vtk_scalarbar.m =================================================================== RCS file: /cvsroot/octaviz/octaviz/Scripts/vtk_scalarbar.m,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- vtk_scalarbar.m 31 Mar 2005 17:40:21 -0000 1.5 +++ vtk_scalarbar.m 19 Jun 2005 03:31:50 -0000 1.6 @@ -25,6 +25,9 @@ ## Author: Jonathan Stickel +## bugs / todo: +## - doesn't seem to work after vtk_axis(LIMITS) has been used + function vtk_scalarbar(scalarname) --- NEW FILE: vtk_zlabel.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_xlabel (@var{string}) ## @deftypefnx {Function File} {} vtk_ylabel (@var{string}) ## @deftypefnx {Function File} {} vtk_zlabel (@var{string}) ## Specify x, y, and z axis labels for the plot. ## @end deftypefn ## ## @seealso{vtk_title,vtk_scalarbar,vtk_axis,vtk_xlim} ## Author: Jonathan Stickel function vtk_zlabel(string) f = vtk_figure(0); f.axes.SetZLabel(string) vtk_update(f); endfunction --- NEW FILE: vtk_ylabel.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_xlabel (@var{string}) ## @deftypefnx {Function File} {} vtk_ylabel (@var{string}) ## @deftypefnx {Function File} {} vtk_zlabel (@var{string}) ## Specify x, y, and z axis labels for the plot. ## @end deftypefn ## ## @seealso{vtk_title,vtk_scalarbar,vtk_axis,vtk_xlim} ## Author: Jonathan Stickel function vtk_ylabel(string) f = vtk_figure(0); f.axes.SetYLabel(string) vtk_update(f); endfunction --- NEW FILE: vtk_ylim.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_ylim([@var{ylimits}]) ## ## Set y-axis limits for plots. ## ## The argument @var{ylimits} should be a 2 element vector, [ymin, ymax]. ## ## @end deftypefn ## @seealso{vtk_axis,vtk_xlim,vtk_zlim,vtk_ylabel,vtk_scalarbar} ## Author: Jonathan Stickel function vtk_ylim(ylimits) f = vtk_figure(0); if (f.axes.GetUseRanges) limits = f.axes.GetRanges; else limits = f.outline.GetBounds; endif limits(3:4) = ylimits; vtk_axis(limits); endfunction --- NEW FILE: vtk_xlabel.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_xlabel (@var{string}) ## @deftypefnx {Function File} {} vtk_ylabel (@var{string}) ## @deftypefnx {Function File} {} vtk_zlabel (@var{string}) ## Specify x, y, and z axis labels for the plot. ## @end deftypefn ## ## @seealso{vtk_title,vtk_scalarbar,vtk_axis,vtk_xlim} ## Author: Jonathan Stickel function vtk_xlabel(string) f = vtk_figure(0); f.axes.SetXLabel(string) vtk_update(f); endfunction Index: vtk_axis.m =================================================================== RCS file: /cvsroot/octaviz/octaviz/Scripts/vtk_axis.m,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- vtk_axis.m 13 May 2005 05:14:31 -0000 1.10 +++ vtk_axis.m 19 Jun 2005 03:31:50 -0000 1.11 @@ -15,19 +15,38 @@ ## 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ## -*- texinfo -*- -## @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. +## @deftypefn {Function File} {} vtk_axis([@var{limits}],[@var{options}]) +## +## Set or alter axis limits for plots. +## +## The argument @var{limits} should be a 6 element vector. The first +## and second elements specify the lower and upper limits for the x +## axis, the third and fourth specify the limits for the y axis, and the +## fifth and sixth specify the limits for the z axis. +## +## The following are valid options: +## +## @table @code +## @item "square" +## Set a square aspect ratio. +## @item "equal" +## Set x, y, and z scaling to be equal. +## @item "auto" +## Set limits so that all the data is visible. +## @item "tight" +## Take up any extra space so that the axes are "tight" around the plot. +## @item "default" +## Set axes limits and scales to vtk default ("auto" and "equal") +## @item "on" +## Turn tic marks and labels on for all axes. +## @item "off" +## Turn tic marks and labels off for all axes. +## @end table +## ## @end deftypefn -## @seealso{vtk_scalarbar} - -## Author: Jonathan Stickel, Dragan Tubic +## @seealso{vtk_xlim,vtk_xlabel,vtk_scalarbar} -## almost there... clipping now works on multiple actors, even keeping coloring correct -## to do: -## - fix inconsistency where vtk_axis(square), then vtk_axis(limits) ends up with wrong axes -## - add "tight" option? -## - update help +## Author: Jonathan Stickel function vtk_axis(varargin) @@ -36,20 +55,26 @@ 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, "normal") ) ## defaults in vtk - vtk_axis("auto") + + elseif ( strcmp(arg, "default") ) ## default of vtk vtk_axis("equal") + vtk_axis("auto") + elseif ( strcmp(arg, "equal") ) ## reset scaling for i = 1:f.renderer.GetActors.GetNumberOfItems-1 # outline actor is i=0 f.renderer.GetActors.GetItemAsObject(i).SetScale(1,1,1) endfor f.axes.UseRangesOff + elseif ( strcmp(arg, "square") ) vtk_axis("equal") # get to a known scale dlims = f.outline.GetBounds; @@ -61,9 +86,11 @@ for i = 1:f.renderer.GetActors.GetNumberOfItems-1 f.renderer.GetActors.GetItemAsObject(i).SetScale(1/span(1),1/span(2),1/span(3)) endfor - 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 + + elseif ( strcmp(arg, "auto") ) ## reset axes bounds to limits of actors + ## first determine if square option has been used + rescale = f.axes.GetUseRanges; + ## check if there has been clipping (as determined by some actors not being visible), clipping = 0; for i = 1:f.renderer.GetActors.GetNumberOfItems-1 # vtk counting starts at 0 actor = f.renderer.GetActors.GetItemAsObject(i); @@ -72,7 +99,6 @@ 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; @@ -87,15 +113,44 @@ ++i; endwhile endif + if (rescale) + vtk_axis("square") + endif + + elseif ( strcmp(arg, "tight") ) ## keep cuts, but otherwise bring axes tight + ## find current limits and limits for "auto" + if (f.axes.GetUseRanges) + limits1 = f.axes.GetRanges; + else + limits1 = f.outline.GetBounds; + endif + vtk_axis("auto") + if (f.axes.GetUseRanges) + limits2 = f.axes.GetRanges; + else + limits2 = f.outline.GetBounds; + endif + ## reduce, but do not expand, the limits from what they were + for i = 1:2:5 + limits(i) = max( limits1(i),limits2(i) ); + endfor + for i = 2:2:6 + limits(i) = min( limits1(i),limits2(i) ); + endfor + vtk_axis(limits) + else printf("Option '%s' is not implemented;\n", arg) disp("If you would like it to be, please contact the authors.") endif - else # force the specified axes limits - vtk_axis("auto") # return to original state + else # input is not a string; force the specified axes limits + ## first determine if square option has been used + rescale = f.axes.GetUseRanges; + ## return to original state + vtk_axis("default") ## clip everything to desired axes limits; how to do this elegently? - ## this seems to be a hack, but it works; however, it may lead to a memory leak + ## this works, but it is slow and may lead to a memory leak limits = arg; for i = 1:f.renderer.GetActors.GetNumberOfItems-1 clipmapper{i} = vtkPolyDataMapper; @@ -127,6 +182,9 @@ cornermapper.SetInput(cornerpoly); corneractor.SetMapper(cornermapper); f.renderer.AddActor(corneractor); + if (rescale) + vtk_axis("square") + endif endif endfor @@ -179,19 +237,3 @@ 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) - -## to set arbitrary scaling -##f.renderer.GetProps.GetLastProp.SetScale(xscale,yscale,zscale) - - -## probably best option to implement "tight" is: -## - find current limits -## - vtk_axis("auto") -## - reduce, but do not expand, the limits from what they were (series of if statements) -## - vtk_axis(limits) --- NEW FILE: vtk_xlim.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_xlim([@var{xlimits}]) ## ## Set x-axis limits for plots. ## ## The argument @var{xlimits} should be a 2 element vector, [xmin, xmax]. ## ## @end deftypefn ## @seealso{vtk_axis,vtk_ylim,vtk_zlim,vtk_xlabel,vtk_scalarbar} ## Author: Jonathan Stickel function vtk_xlim(xlimits) f = vtk_figure(0); if (f.axes.GetUseRanges) limits = f.axes.GetRanges; else limits = f.outline.GetBounds; endif limits(1:2) = xlimits; vtk_axis(limits); endfunction |
From: Jonathan S. <jjs...@us...> - 2005-06-01 19:40:49
|
Update of /cvsroot/octaviz/octaviz/Scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7134 Modified Files: vtk_update.m Log Message: small change to vtk_update Index: vtk_update.m =================================================================== RCS file: /cvsroot/octaviz/octaviz/Scripts/vtk_update.m,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- vtk_update.m 23 Oct 2004 18:47:58 -0000 1.2 +++ vtk_update.m 1 Jun 2005 19:40:40 -0000 1.3 @@ -20,7 +20,7 @@ ## @end deftypefn ## @seealso{vtk_clear} -## Author: Dragan Tubic +## Author: Dragan Tubic, Jonathan Stickel function vtk_update(f) @@ -30,6 +30,7 @@ if ( f.axes_on ) b = f.renderer.ComputeVisiblePropBounds(); f.outline.SetBounds( b(1), b(2), b(3), b(4), b(5), b(6) ); + f.axes.SetInput( f.outline_actor.GetMapper.GetInput ); f.outline_actor.VisibilityOn(); f.axes.VisibilityOn(); end |
From: Jonathan S. <jjs...@us...> - 2005-05-24 05:31:01
|
Update of /cvsroot/octaviz/octaviz/Scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20792 Added Files: vtk_colormap.m Log Message: added a colormap function --- NEW FILE: vtk_colormap.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_colormap(@var{cmap}) ## @deftypefnx {Function File} {} vtk_colormap ("default") ## @deftypefnx {Function File} {@var{cmap}} = colormap ## ## @code{vtk_colormap (@var{cmap})} sets the colormap of the current ## actor to @var{cmap}. The color map should be an @var{n} row by 3 ## column matrix. The columns contain red, green, and blue intensities ## respectively. All entries should be between 0 and 1 inclusive. ## @var{cmap} can be created by several colormap generation functions ## available in Octave-forge (jet, gray, hot, etc.). ## ## @code{colormap ("default")} restores the default colormap (spectral). ## ## @code{@var{cmap} = colormap} returns the current colormap. (not implemented yet). ## ## Example: set colormap to 'jet' with 256 values ## @example ## vtk_sombsurf ## vtk_colormap (jet(256)) ## @end example ## ## @end deftypefn ## @seealso{vtk_scalarbar} ## Author: Jonathan Stickel ## to do: ## - impliment cmap = colormap ## - change existing code (e.g. vtk_surf) to call vtk_colormap to get the LookupTable function vtk_colormap(varargin) f = vtk_figure(0); lut = f.renderer.GetActors.GetLastActor.GetMapper.GetLookupTable; if isstr(varargin{1}) # will assume that string = "default" lut.SetHueRange(0.66667, 0.0); lut.SetNumberOfTableValues(1); # for some reason, the table is not being rebuilt if table already has 256 values lut.SetNumberOfTableValues(256); lut.SetRampToLinear(); lut.ForceBuild(); else # the input is a color map cmap = varargin{1}; n = size(cmap,1); lut.SetNumberOfTableValues(n) for i = 1:n lut.SetTableValue(i-1,[cmap(i,:),1]); # remember, vtk counting starts at zero; # 4th value is transparancy, which is not dealt with here endfor endif vtk_update(f); endfunction |
From: Jonathan S. <jjs...@us...> - 2005-05-24 05:30:04
|
Update of /cvsroot/octaviz/octaviz/Examples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20632 Added Files: vtk_rainbow.m Removed Files: rainbow.m Log Message: rainbow conflicted with rainbow in octave-forge --- NEW FILE: vtk_rainbow.m --- % This example demonstrates the use and manipulation of lookup tables. vtk_init; VTK_DATA_ROOT = vtkGetDataRoot(); % First create pipeline a simple pipeline that reads a structure grid % and then extracts a plane % differently by using different lookup tables. % % Note: the Update method is manually invoked because it causes the % reader to read; later on we use the output of the reader to set % a range for the scalar values. pl3d = vtkPLOT3DReader(); 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(); plane = vtkStructuredGridGeometryFilter(); plane.SetInput(pl3d.GetOutput()); plane.SetExtent(1, 100, 1, 100, 7, 7); lut = vtkLookupTable(); planeMapper = vtkPolyDataMapper(); planeMapper.SetLookupTable(lut); planeMapper.SetInput(plane.GetOutput()); planeMapper.SetScalarRange(pl3d.GetOutput().GetScalarRange()); planeActor = vtkActor(); planeActor.SetMapper(planeMapper); % This creates an outline around the data. outline = vtkStructuredGridOutlineFilter(); outline.SetInput(pl3d.GetOutput()); outlineMapper = vtkPolyDataMapper(); outlineMapper.SetInput(outline.GetOutput()); outlineActor = vtkActor(); outlineActor.SetMapper(outlineMapper); % Much of the following is commented out. To try different lookup tables, % uncommented the appropriate portions. % This creates a black to white lut. % lut.SetHueRange(0, 0) % lut.SetSaturationRange(0, 0) % lut.SetValueRange(0.2, 1.0) % This creates a red to blue lut. % lut.SetHueRange(0.0, 0.667) % This creates a blue to red lut. % lut.SetHueRange(0.667, 0.0) % This creates a wierd effect. The Build() method causes the lookup % table to allocate memory and create a table based on the currect % hue, saturation, value, and alpha (transparency) range. Here we then % manually overwrite the values generated by the Build() method. lut.SetNumberOfColors(256); lut.Build(); for i = 0:15 lut.SetTableValue(i*16, 1, 0, 0, 1); lut.SetTableValue(i*16+1, 0, 1, 0, 1); lut.SetTableValue(i*16+2, 0, 0, 1, 1); lut.SetTableValue(i*16+3, 0, 0, 0, 1); end % Create the RenderWindow, Renderer and both Actors ren = vtkRenderer(); renWin = vtkRenderWindow(); renWin.AddRenderer(ren); iren = vtkRenderWindowInteractor(); iren.SetRenderWindow(renWin); % Add the actors to the renderer, set the background and size ren.AddActor(outlineActor); ren.AddActor(planeActor); ren.SetBackground(0.1, 0.2, 0.4); ren.TwoSidedLightingOff(); renWin.SetSize(250, 250); cam1 = ren.GetActiveCamera(); cam1.SetClippingRange(3.95297, 50); cam1.SetFocalPoint(8.88908, 0.595038, 29.3342); cam1.SetPosition(-12.3332, 31.7479, 41.2387); cam1.SetViewUp(0.060772, -0.319905, 0.945498); % renWin.Render(); vtkInitializeInteractor(iren); --- rainbow.m DELETED --- |
From: Jonathan S. <jjs...@us...> - 2005-05-13 05:14:41
|
Update of /cvsroot/octaviz/octaviz/Scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21581 Modified Files: vtk_axis.m Log Message: more axis improvements Index: vtk_axis.m =================================================================== RCS file: /cvsroot/octaviz/octaviz/Scripts/vtk_axis.m,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- vtk_axis.m 11 May 2005 05:11:49 -0000 1.9 +++ vtk_axis.m 13 May 2005 05:14:31 -0000 1.10 @@ -25,9 +25,8 @@ ## 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 +## - fix inconsistency where vtk_axis(square), then vtk_axis(limits) ends up with wrong axes +## - add "tight" option? ## - update help @@ -42,11 +41,14 @@ f.axes_on = 1; 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) + elseif ( strcmp(arg, "normal") ) ## defaults in vtk + vtk_axis("auto") + vtk_axis("equal") + elseif ( strcmp(arg, "equal") ) ## reset scaling - f.renderer.GetProps.GetLastProp.SetScale(1,1,1) + for i = 1:f.renderer.GetActors.GetNumberOfItems-1 # outline actor is i=0 + f.renderer.GetActors.GetItemAsObject(i).SetScale(1,1,1) + endfor f.axes.UseRangesOff elseif ( strcmp(arg, "square") ) vtk_axis("equal") # get to a known scale @@ -56,9 +58,9 @@ 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)) - + for i = 1:f.renderer.GetActors.GetNumberOfItems-1 + f.renderer.GetActors.GetItemAsObject(i).SetScale(1/span(1),1/span(2),1/span(3)) + endfor 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 @@ -66,7 +68,7 @@ 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 + clipping = 1; break endif endfor @@ -85,25 +87,46 @@ ++i; endwhile endif + else + printf("Option '%s' is not implemented;\n", arg) + disp("If you would like it to be, please contact the authors.") endif - else ## clip everything to desired axes limits - ## how to do this elegently? + else # force the specified axes limits + vtk_axis("auto") # return to original state + ## clip everything to desired axes limits; how to do this elegently? ## this seems to be a hack, but it works; however, it may lead to a memory leak limits = arg; - nactors = f.renderer.GetActors().GetNumberOfItems(); - for i = 1:nactors-1 # outline actor is i=0 + for i = 1:f.renderer.GetActors.GetNumberOfItems-1 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 + 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 + ## add an actor that contains only corner points for the specified limits + ## this will force axes as wide as specified + cornerpoints = vtkPoints; + cornerpoly = vtkPolyData; + cornermapper = vtkPolyDataMapper; + corneractor = vtkActor; + limvals = reshape (limits,2,3)'; + for i = 1:2 + for j = 1:2 + for k = 1:2 + cornerpoints.InsertNextPoint(limvals(1,i),limvals(2,j),limvals(3,k)); + endfor + endfor + endfor + cornerpoly.SetPoints(cornerpoints); + cornermapper.SetInput(cornerpoly); + corneractor.SetMapper(cornermapper); + f.renderer.AddActor(corneractor); endif endfor @@ -165,3 +188,10 @@ ## to set arbitrary scaling ##f.renderer.GetProps.GetLastProp.SetScale(xscale,yscale,zscale) + + +## probably best option to implement "tight" is: +## - find current limits +## - vtk_axis("auto") +## - reduce, but do not expand, the limits from what they were (series of if statements) +## - vtk_axis(limits) |