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_h
48 #define vtkRAdapter_h
49 
50 #include "vtkFiltersStatisticsGnuRModule.h" // For export macro
51 #include "vtkObject.h"
52 
53 #ifndef VTK_BUILDING_FILTERS_STATISTICSGNUR
54 #define R_NO_REMAP /* Don't pollute the namespace (some of which conflict). DO NOT REMOVE. */
55 #endif
56 
57 #include "Rinternals.h" // Needed for Rinternals.h SEXP data structure
58 
59 class vtkInformation;
61 class vtkDataArray;
62 class vtkArray;
63 class vtkTable;
64 class vtkTree;
66 class vtkArrayData;
68 
69 class VTKFILTERSSTATISTICSGNUR_EXPORT vtkRAdapter : public vtkObject
70 {
71 
72 public:
73 
74  vtkTypeMacro(vtkRAdapter, vtkObject);
75 
76  void PrintSelf(ostream& os, vtkIndent indent);
77 
78  static vtkRAdapter *New();
79 
80 //BTX
84  vtkDataArray* RToVTKDataArray(SEXP variable);
85 
89  vtkArray* RToVTKArray(SEXP variable);
90 
93  SEXP VTKDataArrayToR(vtkDataArray* da);
94 
97  SEXP VTKArrayToR(vtkArray* da);
98 
101  SEXP VTKTableToR(vtkTable* table);
102 
106  vtkTable* RToVTKTable(SEXP variable);
107 
110  SEXP VTKTreeToR(vtkTree* tree);
111 
113 
115  vtkTree* RToVTKTree(SEXP variable);
116 //ETX
118 
119 protected:
120  vtkRAdapter();
121  ~vtkRAdapter();
122 
123 private:
124 
125  vtkRAdapter(const vtkRAdapter&); // Not implemented
126  void operator=(const vtkRAdapter&); // Not implemented
127 
128  vtkDataArrayCollection* vdac; // Collection of vtkDataArrays that have been converted from R.
129  vtkArrayData* vad; // Collection of vtkArrays that have been converted from R.
130  vtkDataObjectCollection* vdoc; // Collection of vtkTables that have been converted from R.
131 
132 };
133 
134 
135 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:61
Store vtkAlgorithm input/output information.
maintain an unordered list of data objects
Abstract interface for N-dimensional arrays.
Definition: vtkArray.h:69
Pipeline data object that contains multiple vtkArray objects.
Definition: vtkArrayData.h:51
virtual void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
Definition: vtkIndent.h:38
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:67
This is a utility class to convert VTK array data and VTK tables to and from Gnu R S expression (SEXP...
Definition: vtkRAdapter.h:69
maintain an unordered list of dataarray objects
Store zero or more vtkInformation instances.
static vtkObject * New()
A rooted tree data structure.
Definition: vtkTree.h:59