VTK
vtkRAdapter.h
Go to the documentation of this file.
1 
2 /*=========================================================================
3 
4  Program: Visualization Toolkit
5  Module: vtkRAdapter.h
6 
7  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
8  All rights reserved.
9  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
10 
11  This software is distributed WITHOUT ANY WARRANTY; without even
12  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
13  PURPOSE. See the above copyright notice for more information.
14 
15 =========================================================================*/
16 /*-------------------------------------------------------------------------
17  Copyright 2009 Sandia Corporation.
18  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
19  the U.S. Government retains certain rights in this software.
20 -------------------------------------------------------------------------*/
21 
47 #ifndef __vtkRAdapter
48 #define __vtkRAdapter
49 
50 #include "vtkObject.h"
51 #include "Rinternals.h" // Needed for Rinternals.h SEXP data structure
52 
53 class vtkInformation;
55 class vtkDataArray;
56 class vtkArray;
57 class vtkTable;
59 class vtkArrayData;
61 
63 {
64 
65 public:
66 
67  vtkTypeMacro(vtkRAdapter, vtkObject);
68 
69  void PrintSelf(ostream& os, vtkIndent indent);
70 
71  static vtkRAdapter *New();
72 
73 //BTX
77  vtkDataArray* RToVTKDataArray(SEXP variable);
78 
82  vtkArray* RToVTKArray(SEXP variable);
83 
86  SEXP VTKDataArrayToR(vtkDataArray* da);
87 
90  SEXP VTKArrayToR(vtkArray* da);
91 
94  SEXP VTKTableToR(vtkTable* table);
95 
97 
100  vtkTable* RToVTKTable(SEXP variable);
101 //ETX
103 
104 protected:
105  vtkRAdapter();
106  ~vtkRAdapter();
107 
108 private:
109 
110  vtkRAdapter(const vtkRAdapter&); // Not implemented
111  void operator=(const vtkRAdapter&); // Not implemented
112 
113  vtkDataArrayCollection* vdac; // Collection of vtkDataArrays that have been converted from R.
114  vtkArrayData* vad; // Collection of vtkArrays that have been converted from R.
115  vtkDataObjectCollection* vdoc; // Collection of vtkTables that have been converted from R.
116 
117 };
118 
119 
120 #endif
121 
122 
123 
#define VTK_GRAPHICS_EXPORT
abstract base class for most VTK objects
Definition: vtkObject.h:60
Store vtkAlgorithm input/output information.
maintain an unordered list of data objects
Abstract interface for N-dimensional arrays.
Definition: vtkArray.h:68
Pipeline data object that contains multiple vtkArray objects.
Definition: vtkArrayData.h:50
virtual void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
Definition: vtkIndent.h:37
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:53
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:66
This is a utility class to convert VTK array data and VTK tables to and from Gnu R S expression (SEXP...
Definition: vtkRAdapter.h:62
maintain an unordered list of dataarray objects
Store zero or more vtkInformation instances.
static vtkObject * New()