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 
48 #ifndef vtkRAdapter_h
49 #define vtkRAdapter_h
50 
51 #include "vtkFiltersStatisticsGnuRModule.h" // For export macro
52 #include "vtkObject.h"
53 
54 #ifndef VTK_BUILDING_FILTERS_STATISTICSGNUR
55 #define R_NO_REMAP /* Don't pollute the namespace (some of which conflict). DO NOT REMOVE. */
56 #endif
57 
58 #include "Rinternals.h" // Needed for Rinternals.h SEXP data structure
59 
60 class vtkInformation;
62 class vtkDataArray;
63 class vtkArray;
64 class vtkTable;
65 class vtkTree;
67 class vtkArrayData;
69 
70 class VTKFILTERSSTATISTICSGNUR_EXPORT vtkRAdapter : public vtkObject
71 {
72 
73 public:
74 
75  vtkTypeMacro(vtkRAdapter, vtkObject);
76 
77  void PrintSelf(ostream& os, vtkIndent indent);
78 
79  static vtkRAdapter *New();
80 
85  vtkDataArray* RToVTKDataArray(SEXP variable);
86 
91  vtkArray* RToVTKArray(SEXP variable);
92 
96  SEXP VTKDataArrayToR(vtkDataArray* da);
97 
101  SEXP VTKArrayToR(vtkArray* da);
102 
106  SEXP VTKTableToR(vtkTable* table);
107 
112  vtkTable* RToVTKTable(SEXP variable);
113 
117  SEXP VTKTreeToR(vtkTree* tree);
118 
122  vtkTree* RToVTKTree(SEXP variable);
123 
124 protected:
125  vtkRAdapter();
126  ~vtkRAdapter();
127 
128 private:
129 
130  vtkRAdapter(const vtkRAdapter&) VTK_DELETE_FUNCTION;
131  void operator=(const vtkRAdapter&) VTK_DELETE_FUNCTION;
132 
133  vtkDataArrayCollection* vdac; // Collection of vtkDataArrays that have been converted from R.
134  vtkArrayData* vad; // Collection of vtkArrays that have been converted from R.
135  vtkDataObjectCollection* vdoc; // Collection of vtkTables that have been converted from R.
136 
137 };
138 
139 
140 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:59
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Store vtkAlgorithm input/output information.
maintain an unordered list of data objects
Abstract interface for N-dimensional arrays.
Definition: vtkArray.h:70
Pipeline data object that contains multiple vtkArray objects.
Definition: vtkArrayData.h:52
a simple class to control print indentation
Definition: vtkIndent.h:39
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:68
This is a utility class to convert VTK array data and VTK tables to and from Gnu R S expression (SEXP...
Definition: vtkRAdapter.h:70
maintain an unordered list of dataarray objects
Store zero or more vtkInformation instances.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
A rooted tree data structure.
Definition: vtkTree.h:60