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
60class vtkInformation;
62class vtkDataArray;
63class vtkArray;
64class vtkTable;
65class vtkTree;
67class vtkArrayData;
69
70class VTKFILTERSSTATISTICSGNUR_EXPORT vtkRAdapter : public vtkObject
71{
72
73public:
74
75 vtkTypeMacro(vtkRAdapter, vtkObject);
76
77 void PrintSelf(ostream& os, vtkIndent indent);
78
79 static vtkRAdapter *New();
80
86
91 vtkArray* RToVTKArray(SEXP variable);
92
97
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
124protected:
127
128private:
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
Pipeline data object that contains multiple vtkArray objects.
Definition: vtkArrayData.h:53
Abstract interface for N-dimensional arrays.
Definition: vtkArray.h:71
maintain an unordered list of dataarray objects
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
maintain an unordered list of data objects
a simple class to control print indentation
Definition: vtkIndent.h:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
abstract base class for most VTK objects
Definition: vtkObject.h:60
This is a utility class to convert VTK array data and VTK tables to and from Gnu R S expression (SEXP...
Definition: vtkRAdapter.h:71
vtkDataArray * RToVTKDataArray(SEXP variable)
Create a vtkDataArray copy of GNU R input matrix vaiable (deep copy, allocates memory) Input is a R m...
vtkTable * RToVTKTable(SEXP variable)
Create a vtkTable copy of the GNU R input matrix variable (deep copy, allocates memory) Input is R li...
vtkArray * RToVTKArray(SEXP variable)
Create a vtkArray copy of the GNU R input variable multi-dimensional array (deep copy,...
vtkTree * RToVTKTree(SEXP variable)
Create a vtkTree copy of the GNU R input phylo tree variable (deep copy, allocates memory)
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
SEXP VTKTableToR(vtkTable *table)
Create a GNU R matrix copy of the input vtkTable table (deep copy, allocates memory)
SEXP VTKDataArrayToR(vtkDataArray *da)
Create a GNU R matrix copy of the input vtkDataArray da (deep copy, allocates memory)
SEXP VTKArrayToR(vtkArray *da)
Create a GNU R multi-dimensional array copy of the input vtkArray da (deep copy, allocates memory)
static vtkRAdapter * New()
SEXP VTKTreeToR(vtkTree *tree)
Create a GNU R phylo tree copy of the input vtkTree tree (deep copy, allocates memory)
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:69
A rooted tree data structure.
Definition: vtkTree.h:61