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 
75 
76  void PrintSelf(ostream& os, vtkIndent indent);
77 
78  static vtkRAdapter *New();
79 
80 //BTX
85 
90 
94 
97  SEXP VTKArrayToR(vtkArray* da);
98 
102 
107 
110  SEXP VTKTreeToR(vtkTree* tree);
111 
113 
116 //ETX
118 
119 protected:
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
vtkRAdapter::RToVTKTree
vtkTree * RToVTKTree(SEXP variable)
vtkRAdapter::RToVTKArray
vtkArray * RToVTKArray(SEXP variable)
vtkRAdapter
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
vtkDataObjectCollection
maintain an unordered list of data objects
Definition: vtkDataObjectCollection.h:34
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkTable
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:68
vtkDataArrayCollection
maintain an unordered list of dataarray objects
Definition: vtkDataArrayCollection.h:31
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkRAdapter::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:62
vtkRAdapter::vtkRAdapter
vtkRAdapter()
vtkgl::table
GLenum GLsizei GLenum GLenum const GLvoid * table
Definition: vtkgl.h:11332
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
vtkArrayData
Pipeline data object that contains multiple vtkArray objects.
Definition: vtkArrayData.h:52
vtkTree
A rooted tree data structure.
Definition: vtkTree.h:60
vtkRAdapter::~vtkRAdapter
~vtkRAdapter()
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkRAdapter::VTKArrayToR
SEXP VTKArrayToR(vtkArray *da)
vtkArray
Abstract interface for N-dimensional arrays.
Definition: vtkArray.h:70
vtkObject.h
vtkRAdapter::VTKDataArrayToR
SEXP VTKDataArrayToR(vtkDataArray *da)
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkRAdapter::New
static vtkRAdapter * New()
vtkRAdapter::VTKTableToR
SEXP VTKTableToR(vtkTable *table)
vtkgl::variable
GLenum GLenum variable
Definition: vtkgl.h:15941
vtkRAdapter::VTKTreeToR
SEXP VTKTreeToR(vtkTree *tree)
vtkRAdapter::RToVTKTable
vtkTable * RToVTKTable(SEXP variable)
vtkRAdapter::RToVTKDataArray
vtkDataArray * RToVTKDataArray(SEXP variable)