Commit d9a4daca authored by Andrew Maclean's avatar Andrew Maclean
Browse files

Moving old GeoVis files into deprecated folder

The other remaining files moved into other folders
parent 41178111
......@@ -77,9 +77,7 @@ if(VTK_USE_MYSQL)
add_subdirectory(src/Cxx/Databases)
endif()
add_subdirectory(src/Cxx/DataStructures)
if(${VTK_VERSION} VERSION_GREATER "6.10")
add_subdirectory(src/Cxx/Developers)
endif()
add_subdirectory(src/Cxx/Developers)
add_subdirectory(src/Cxx/Filtering)
add_subdirectory(src/Cxx/GeometricObjects)
if(VTK_USE_INFOVIS)
......@@ -89,7 +87,6 @@ if(VTK_USE_INFOVIS)
endif()
add_subdirectory(src/Cxx/Annotation)
add_subdirectory(src/Cxx/ImageData)
add_subdirectory(src/Cxx/Geovis)
add_subdirectory(src/Cxx/HyperTreeGrid)
add_subdirectory(src/Cxx/ImageProcessing)
add_subdirectory(src/Cxx/Images)
......
......@@ -207,6 +207,7 @@ These are fully independent, compilable examples. There is significant overlap i
[ConeDemo](/Cxx/GeometricObjects/ConeDemo) | vtkConeSource | Disolay four different resolution cones.
[Cylinder](/Cxx/GeometricObjects/Cylinder) | vtkCylinderSource |
[Disk](/Cxx/GeometricObjects/Disk) | vtkDiskSource | A circle with a hole in it.
[EarthSource](/Cxx/GeometricObjects/EarthSource) | vtkEarthSource | Create the Earth.
[Frustum](/Cxx/GeometricObjects/Frustum) | vtkFrustumSource |
[Line](/Cxx/GeometricObjects/Line) | vtkLineSource |
[OrientedArrow](/Cxx/GeometricObjects/OrientedArrow) | vtkArrowSource | Orient an arrow along an arbitrary vector.
......@@ -1290,6 +1291,7 @@ See [this tutorial](http://www.vtk.org/Wiki/VTK/Tutorials/3DDataTypes) for a bri
[BoxWidget2](/Cxx/Widgets/BoxWidget2) | vtkBoxWidget2 |
[CaptionWidget](/Cxx/Widgets/CaptionWidget) | vtkCaptionWidget |
[CheckerboardWidget](/Cxx/Widgets/CheckerboardWidget) | vtkCheckerboardWidget vtkCheckerboardRepresentation | Compare two images using a checkerboard.
[CompassWidget](/Cxx/Widgets/CompassWidget) | vtkCompassWidget vtkCompassRepresentation | Draws an interactive compass.
[ContourWidget](/Cxx/Widgets/ContourWidget) | vtkContourWidget | Create a contour from a set of points and dynamically change the contour using the points as control points.
[Cursor2D](/Cxx/Visualization/Cursor2D) | vtkCursor2D |
[DistanceWidget](/Cxx/Widgets/DistanceWidget) | vtkDistanceWidget |
......@@ -1353,14 +1355,7 @@ See [this tutorial](http://www.vtk.org/Wiki/VTK/Tutorials/3DDataTypes) for a bri
[DataAnimationSubclass](/Cxx/Utilities/DataAnimationSubclass) | vtkCommand vtkProgrammableFilter | Update points in a dataset every specified interval (using a vtkCommand subclass instead of a callback function.
[RotatingSphere](/Cxx/Animation/RotatingSphere) | vtkSphereSource | A rotating sphere.
## Geographic Visualization (Geovis)
| Example Name | Classes Demonstrated | Description | Image |
| -------------- | ---------------------- | ------------- | ------- |
[CompassWidget](/Cxx/Geovis/CompassWidget) | vtkCompassWidget | Compass Widget.
[EarthSource](/Cxx/Geovis/EarthSource) | vtkEarthSource | Create the Earth.
[GeoAssignCoordinates](/Cxx/Geovis/GeoAssignCoordinates) | vtkGeoAssignCoordinates | Convert lat/long coordinates to world coordinates.
[GeoGraticle](/Cxx/Geovis/GeoGraticle) | vtkGeoGraticle | Show lat/long lines that have been distorted.
## InfoVis
| Example Name | Classes Demonstrated | Description | Image |
| -------------- | ---------------------- | ------------- | ------- |
......
#include <vtkSmartPointer.h>
#include <vtkDataSetAttributes.h>
#include <vtkGeoAssignCoordinates.h>
#include <vtkDoubleArray.h>
#include <vtkGraphMapper.h>
#include <vtkNew.h>
#include <vtkRenderer.h>
#include <vtkRenderWindow.h>
#include <vtkRenderWindowInteractor.h>
......@@ -12,15 +11,12 @@
int main(int, char* [])
{
vtkSmartPointer<vtkMutableDirectedGraph> g =
vtkSmartPointer<vtkMutableDirectedGraph>::New();
vtkNew<vtkMutableDirectedGraph> g;
vtkSmartPointer<vtkDoubleArray> latitude =
vtkSmartPointer<vtkDoubleArray>::New();
vtkNew<vtkDoubleArray> latitude;
latitude->SetName("latitude");
vtkSmartPointer<vtkDoubleArray> longitude =
vtkSmartPointer<vtkDoubleArray>::New();
vtkNew<vtkDoubleArray> longitude;
longitude->SetName("longitude");
for(int lat = -90; lat <= 90; lat += 10)
......@@ -36,30 +32,24 @@ int main(int, char* [])
g->GetVertexData()->AddArray(latitude);
g->GetVertexData()->AddArray(longitude);
vtkSmartPointer<vtkGeoAssignCoordinates> assign =
vtkSmartPointer<vtkGeoAssignCoordinates>::New();
vtkNew<vtkGeoAssignCoordinates> assign;
assign->SetInputData(g);
assign->SetLatitudeArrayName("latitude");
assign->SetLongitudeArrayName("longitude");
assign->SetGlobeRadius(1.0);
assign->Update();
vtkSmartPointer<vtkGraphMapper> mapper =
vtkSmartPointer<vtkGraphMapper>::New();
vtkNew<vtkGraphMapper> mapper;
mapper->SetInputConnection(assign->GetOutputPort());
vtkSmartPointer<vtkActor> actor =
vtkSmartPointer<vtkActor>::New();
vtkNew<vtkActor> actor;
actor->SetMapper(mapper);
vtkSmartPointer<vtkRenderer> ren =
vtkSmartPointer<vtkRenderer>::New();
vtkNew<vtkRenderer> ren;
ren->AddActor(actor);
vtkSmartPointer<vtkRenderWindowInteractor> iren =
vtkSmartPointer<vtkRenderWindowInteractor>::New();
vtkNew<vtkRenderWindowInteractor> iren;
vtkSmartPointer<vtkRenderWindow> win =
vtkSmartPointer<vtkRenderWindow>::New();
vtkNew<vtkRenderWindow> win;
win->AddRenderer(ren);
win->SetInteractor(iren);
ren->ResetCamera();
......
#include <vtkSmartPointer.h>
#include <vtkGeoGraticule.h>
#include <vtkActor.h>
#include <vtkGeoGraticule.h>
#include <vtkGeoProjection.h>
#include <vtkGeoTransform.h>
#include <vtkNew.h>
#include <vtkNamedColors.h>
#include <vtkPolyDataMapper.h>
#include <vtkRenderer.h>
#include <vtkRenderWindow.h>
......@@ -10,39 +11,25 @@
#include <vtkTransformFilter.h>
#include <vtkXMLPolyDataReader.h>
#include <vtkNamedColors.h>
int main( int argc, char* argv[] )
{
vtkSmartPointer<vtkNamedColors> colors =
vtkSmartPointer<vtkNamedColors>::New();
vtkNew<vtkNamedColors> colors;
int latLevel = 2;
int lngLevel = 2;
const char* pname = "rouss";
vtkSmartPointer<vtkGeoGraticule> geoGraticle =
vtkSmartPointer<vtkGeoGraticule>::New();
vtkSmartPointer<vtkGeoTransform> transformProjection =
vtkSmartPointer<vtkGeoTransform>::New();
vtkSmartPointer<vtkGeoProjection> destinationProjection =
vtkSmartPointer<vtkGeoProjection>::New();
vtkSmartPointer<vtkGeoProjection> sourceProjection =
vtkSmartPointer<vtkGeoProjection>::New();
vtkSmartPointer<vtkTransformFilter> transformGraticle =
vtkSmartPointer<vtkTransformFilter>::New();
vtkSmartPointer<vtkXMLPolyDataReader> reader =
vtkSmartPointer<vtkXMLPolyDataReader>::New();
vtkSmartPointer<vtkTransformFilter> transformReader =
vtkSmartPointer<vtkTransformFilter>::New();
vtkSmartPointer<vtkPolyDataMapper> graticleMapper =
vtkSmartPointer<vtkPolyDataMapper>::New();
vtkSmartPointer<vtkPolyDataMapper> readerMapper =
vtkSmartPointer<vtkPolyDataMapper>::New();
vtkSmartPointer<vtkActor> graticleActor =
vtkSmartPointer<vtkActor>::New();
vtkSmartPointer<vtkActor> readerActor =
vtkSmartPointer<vtkActor>::New();
vtkNew<vtkGeoGraticule> geoGraticle;
vtkNew<vtkGeoTransform> transformProjection;
vtkNew<vtkGeoProjection> destinationProjection;
vtkNew<vtkGeoProjection> sourceProjection;
vtkNew<vtkTransformFilter> transformGraticle;
vtkNew<vtkXMLPolyDataReader> reader;
vtkNew<vtkTransformFilter> transformReader;
vtkNew<vtkPolyDataMapper> graticleMapper;
vtkNew<vtkPolyDataMapper> readerMapper;
vtkNew<vtkActor> graticleActor;
vtkNew<vtkActor> readerActor;
geoGraticle->SetGeometryType( vtkGeoGraticule::POLYLINES );
geoGraticle->SetLatitudeLevel( latLevel );
......@@ -66,12 +53,9 @@ int main( int argc, char* argv[] )
readerMapper->SetInputConnection( transformReader->GetOutputPort() );
readerActor->SetMapper( readerMapper );
vtkSmartPointer<vtkRenderWindow> renderWindow =
vtkSmartPointer<vtkRenderWindow>::New();
vtkSmartPointer<vtkRenderer> renderer =
vtkSmartPointer<vtkRenderer>::New();
vtkSmartPointer<vtkRenderWindowInteractor> interactor =
vtkSmartPointer<vtkRenderWindowInteractor>::New();
vtkNew<vtkRenderWindow> renderWindow;
vtkNew<vtkRenderer> renderer;
vtkNew<vtkRenderWindowInteractor> interactor;
renderWindow->SetInteractor( interactor );
renderWindow->AddRenderer( renderer );
renderWindow->SetSize(640, 480);
......@@ -84,5 +68,6 @@ int main( int argc, char* argv[] )
interactor->Initialize();
interactor->Start();
return EXIT_SUCCESS;
};
}
......@@ -11,6 +11,7 @@ if(NOT VTK_BINARY_DIR)
vtkCommonTransforms
vtkFiltersCore
vtkFiltersGeneral
vtkFiltersHybrid
vtkFiltersModeling
vtkFiltersSources
vtkIOImage
......
......@@ -9,6 +9,7 @@ if(NOT VTK_BINARY_DIR)
vtkCommonTransforms
vtkFiltersCore
vtkFiltersSources
vtkGeovisCore
vtkIOImage
vtkIOXML
vtkImagingGeneral
......
......@@ -129,6 +129,7 @@ It would be appreciated if there are any Python VTK experts who could convert an
[Cube1](/Python/GeometricObjects/Cube1) | vtkCubeSource | A nice simple example that demonstrates the operation of the VTK pipeline.
[Cylinder](/Python/GeometricObjects/Cylinder) | vtkCylinderSource |
[Disk](/Python/GeometricObjects/Disk) | vtkDiskSource | A circle with a hole in it.
[EarthSource](/Python/GeometricObjects/EarthSource) | vtkEarthSource | Create the Earth.
[Frustum](/Python/GeometricObjects/Frustum) | vtkFrustumSource |
[Line](/Python/GeometricObjects/Line) | vtkLineSource |
[OrientedArrow](/Python/GeometricObjects/OrientedArrow) | vtkArrowSource | Orient an arrow along an arbitrary vector.
......@@ -599,6 +600,7 @@ See [this tutorial](http://www.vtk.org/Wiki/VTK/Tutorials/3DDataTypes) for a bri
| -------------- | ---------------------- | ------------- | ------- |
[BalloonWidget](/Python/Widgets/BalloonWidget) | vtkBalloonWidget vtkBalloonRepresentation | Uses a vtkBalloonWidget to draw labels when the mouse stays above an actor.
[BoxWidget](/Python/Widgets/BoxWidget) | vtkBoxWidget | This 3D widget defines a region of interest that is represented by an arbitrarily oriented hexahedron with interior face angles of 90 degrees (orthogonal faces). The object creates 7 handles that can be moused on and manipulated.
[CompassWidget](/Python/Widgets/CompassWidget) | vtkCompassWidget vtkCompassRepresentation | Draws an interactive compass.
[ContourWidget](/Python/Widgets/ContourWidget) | vtkContourWidget vtkOrientedGlyphContourRepresentation | Draw a contour (line) which can be deformed by the user
[OrientationMarkerWidget](/Python/Widgets/OrientationMarkerWidget) | vtkAnnotatedCubeActor vtkOrientationWidget | Draws two cubes. One of them can be clicked to be rotated, and will rotate the second one. The second one has annotations on it, and can also be moved.
[ScalarBarWidget](/Python/Widgets/ScalarBarWidget) | vtkScalarBarWidget | The ScalarBarWidget displays a scalar bar that is movable and changes orientation automatically when close to the borders of the image. It needs a ScalarBarActor
......@@ -626,17 +628,6 @@ See [this tutorial](http://www.vtk.org/Wiki/VTK/Tutorials/3DDataTypes) for a bri
[MultiLineText](/Python/Annotation/MultiLineText) | vtkTextMapper | Display multiline text.
[TextOrigin](/Python/Annotation/TextOrigin) | | This example demonstrates the use of vtkVectorText and vtkFollower. vtkVectorText is used to create 3D annotation.
## Geographic Visualization (Geovis)
| Example Name | Classes Demonstrated | Description | Image |
| -------------- | ---------------------- | ------------- | ------- |
[CompassWidget](/Python/Widgets/CompassWidget) | vtkCompassWidget vtkCompassRepresentation | Draws an interactive compass.
[CompassWidget](/Python/Geovis/CompassWidget) | vtkCompassWidget | Compass Widget.
[EarthSource](/Python/Geovis/EarthSource) | vtkEarthSource | Create the Earth.
[GeoGraticle](/Python/Geovis/GeoGraticle) | vtkGeoGraticle | Show lat/long lines that have been distorted.
[GeoAssignCoordinates](/Python/Geovis/GeoAssignCoordinates) | vtkGeoAssignCoordinates vtkMutableDirectedGraph vtkGraphMapper | Draws a sphere, based on longituds and latitudes.
[ParallelCoordinatesView](/Python/InfoVis/ParallelCoordinatesView) | vtkRTAnalyticSource vtkParallelCoordinatesView vtkParallelCoordinatesRepresentation | Plotting data attributes in a Parallel Coordinates View
## InfoVis
| Example Name | Classes Demonstrated | Description | Image |
......
### Description
This example creates a compass in the top right corner of the window.
#!/usr/bin/env python
import vtk
def main():
colors = vtk.vtkNamedColors()
arrowSource = vtk.vtkArrowSource()
mapper = vtk.vtkPolyDataMapper()
mapper.SetInputConnection(arrowSource.GetOutputPort())
actor = vtk.vtkActor()
actor.SetMapper(mapper)
actor.GetProperty().SetColor(colors.GetColor3d('PeachPuff'))
# a renderer and render window
renderer = vtk.vtkRenderer()
renderWindow = vtk.vtkRenderWindow()
renderWindow.AddRenderer(renderer)
# an interactor
renderWindowInteractor = vtk.vtkRenderWindowInteractor()
renderWindowInteractor.SetRenderWindow(renderWindow)
# Create the widget and its representation
compassRepresentation = vtk.vtkCompassRepresentation()
compassWidget = vtk.vtkCompassWidget()
compassWidget.SetInteractor(renderWindowInteractor)
compassWidget.SetRepresentation(compassRepresentation)
# add the actors to the scene
renderer.AddActor(actor)
renderer.SetBackground(colors.GetColor3d('MidnightBlue'))
renderWindow.SetSize(640, 480)
renderWindow.SetWindowName('CompassWidget')
renderWindow.Render()
compassWidget.EnabledOn()
style = vtk.vtkInteractorStyleTrackballCamera()
renderWindowInteractor.SetInteractorStyle(style)
# begin interaction
renderWindowInteractor.Start()
if __name__ == '__main__':
main()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment