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