CSharp
I just started to maintain this page. So stay tuned. In the near future you will find useful examples here from time to time.
A tutorial on how to setup a Windows Forms Application utilizing ActiViz.NET can be found here: [http://www.vtk.org/Wiki/VTK/CSharp/ActiViz.NET Setup a Windows Forms Application to use ActiViz.NET]
Simple Operations
| Example Name |
Classes Demonstrated |
Description |
| ConvertFile |
|
Convert a file from one type to another |
| XGMLReader |
{{VTKDoxygenURL |
vtkXGMLReader}} |
| Example Name |
Classes Demonstrated |
Description |
| SimplePointsReader | {{VTKDoxygenURL|vtkSimplePointsReader}} | Read a simple "xyz" file of points
| ParticleReader|{{VTKDoxygenURL|vtkParticleReader}} || This example reads ascii files where each line consists of points with its position (x,y,z) and (optionally) one scalar or binary files in RAW 3d file forma Read an "xyza" file
| ReadPlainText | {{VTKDoxygenURL|vtkPolyData}} || Manually read a file using a streamreade Read a plain text file into a polydata
| ReadOBJ | {{VTKDoxygenURL|vtkOBJReader}} | Read an OBJ (.obj) File
| ReadDICOMSeries | {{VTKDoxygenURL|vtkDICOMImageReader}} || This example demonstates how to read a series of DICOM images and scroll through slice Convert a series of DICOM files into a VTI File
| VRML|{{VTKDoxygenURL|vtkVRMLImporter}} | Read a VRML (WRL) file
| DumpXMLFile|{{VTKDoxygenURL|vtkDataSetReader}} | Report the contents of a VTK XML or legacy file
| DEMReader | {{VTKDoxygenURL|vtkDEMReader}} || Read DEM (elevation map) files
| ReadSTL | {{VTKDoxygenURL|vtkSTLReader}} | Read stereo lithography STL (.stl) files
| ReadPLY | {{VTKDoxygenURL|vtkPLYReader}} | Read PLY (.ply) files
| ReadPLOT3D | {{VTKDoxygenURL|vtkPLOT3DReader}} || Read CFD (computational fluid dynamics) data produced by PLOT3D Read PLOT3D (.bin) files
| ReadPDB | {{VTKDoxygenURL|vtkPDBReader}} || Read Protein Data Bank Files Read Protein Data Bank files (.pdb) files
Output
| Example Name |
Classes Demonstrated |
Description |
| SimplePointsWriter | {{VTKDoxygenURL|vtkSimplePointsWriter}} | Write a simple ".xyz" file
| WriteSTL | {{VTKDoxygenURL|vtkSTLWriter}} | Write stereo lithography STL (.stl) files
| WritePLY | {{VTKDoxygenURL|vtkPLYWriter}} | Write PLY (.ply) files
| DelimitedTextWriter | {{VTKDoxygenURL|vtkDelimitedTextWriter}} | Write data to a delimited file
Output
| Example Name |
Classes Demonstrated |
Description |
| WriteVTU |
{{VTKDoxygenURL |
vtkXMLUnstructuredGridWriter}} |
| WriteVTP |
{{VTKDoxygenURL |
vtkXMLPolyDataWriter}} |
| WriteVTI |
{{VTKDoxygenURL |
vtkXMLImageDataWriter}} |
| XMLStructuredGridWriter |
{{VTKDoxygenURL |
vtkXMLStructuredGridWriter}} |
Output
| Example Name |
Classes Demonstrated |
Description |
| WriteBMP |
{{VTKDoxygenURL |
vtkBMPWriter}} |
| JPEGWriter |
{{VTKDoxygenURL |
vtkJPEGWriter}} |
| WritePNG |
{{VTKDoxygenURL |
vtkPNGWriter}} |
| WritePNM |
{{VTKDoxygenURL |
vtkPNMWriter}} |
| WriteTIFF |
{{VTKDoxygenURL |
vtkTIFFWriter}} |
| MetaImageWriter |
{{VTKDoxygenURL |
vtkMetaImageWriter}} |
Geometric Objects
| Example Name |
Classes Demonstrated |
Description |
| PolygonIntersection |
{{VTKDoxygenURL |
vtkPolygon}} |
| GeometricObjectsDemo |
|
A demonstration of all geometric objects that work the same way |
| Arrow |
{{VTKDoxygenURL |
vtkArrowSource}} |
| Axes |
{{VTKDoxygenURL |
vtkAxesActor}} |
| ColoredLines |
{{VTKDoxygenURL |
vtkCellData}} {{VTKDoxygenURL |
| Cone |
{{VTKDoxygenURL |
vtkConeSource}} |
| Cube |
{{VTKDoxygenURL |
vtkCubeSource}} |
| Cylinder |
{{VTKDoxygenURL |
vtkCylinderSource}} |
| Disk |
{{VTKDoxygenURL |
vtkDiskSource}} |
| Frustum |
{{VTKDoxygenURL |
vtkFrustumSource}} |
| Line |
{{VTKDoxygenURL |
vtkLineSource}} |
| LongLine |
{{VTKDoxygenURL |
vtkLine}} |
| Hexahedron |
{VTKDoxygenURL |
vtkHexahedron}} |
| OrientedArrow |
{{VTKDoxygenURL |
vtkArrowSource}} |
| Plane |
{VTKDoxygenURL |
vtkPlaneSource}} |
| Planes |
{VTKDoxygenURL |
vtkPlanes}} |
| PlanesIntersection |
{VTKDoxygenURL |
vtkPlanesIntersection}} |
| PlatonicSolid |
{{VTKDoxygenURL |
vtkPlatonicSolidSource}} |
| Point |
{{VTKDoxygenURL |
vtkPoints}} |
| Polygon |
{{VTKDoxygenURL |
vtkPolygon}} |
| Pyramid |
{{VTKDoxygenURL |
vtkPyramid}} |
| PolyLine |
{{VTKDoxygenURL |
vtkPolyLine}} |
| Quad |
{{VTKDoxygenURL |
vtkQuad}} |
| RegularPolygonSource |
{{VTKDoxygenURL |
vtkRegularPolygonSource}} |
| Sphere |
{{VTKDoxygenURL |
vtkSphereSource}} |
| Triangle |
{{VTKDoxygenURL |
vtkTriangle}} |
| TriangleStrip |
{{VTKDoxygenURL |
vtkTriangleStrip}} |
| Tetrahedron |
{{VTKDoxygenURL |
vtkTetra}} |
| Vertex |
{{VTKDoxygenURL |
vtkVertex}} |
Parametric Objects
These examples demonstrate how to create an display one of the many vtkParametric* objects. All of the classes listed can be used in an identical fashion.
| Example Name |
Classes Demonstrated |
Description |
| ParametricObjects | {{VTKDoxygenURL|vtkParametricBoy}}, {{VTKDoxygenURL|vtkParametricConicSpiral}}, {{VTKDoxygenURL|vtkParametricCrossCap}}, {{VTKDoxygenURL|vtkParametricDini}}, {{VTKDoxygenURL|vtkParametricEllipsoid}}, {{VTKDoxygenURL|vtkParametricEnneper}}, {{VTKDoxygenURL|vtkParametricFigure8Klein}}, {{VTKDoxygenURL|vtkParametricKlein}}, {{VTKDoxygenURL|vtkParametricMobius}}, {{VTKDoxygenURL|vtkParametricRandomHills}}, {{VTKDoxygenURL|vtkParametricRoman}}, {{VTKDoxygenURL|vtkParametricSpline}}, {{VTKDoxygenURL|vtkParametricSuperEllipsoid}}, {{VTKDoxygenURL|vtkParametricSuperToroid}}, {{VTKDoxygenURL|vtkParametricTorus}} | Create and display a parametric object
| ParametricObjectsDemo | | Demonstration of all of the vtkParametric* classes
Implicit Functions and Iso-surfaces
Working with 3D Data
Working with Meshes
Working with Structured 3D Data
This section includes vtkImageData, vtkStructuredGrid, and vtkRectilinearGrid.
"ImageData" is not the traditional "flat, 2D image" you are used to. It is a special VTK data structure in the collection of 3D data structures provided by VTK. Here is an overview of these data structures: [http://vtk.org/Wiki/VTK/Tutorials/3DDataTypes]. Image data can represent at typical 2D image, but also, a 3D volume.