VTK
dox/Filters/StatisticsGnuR/vtkRAdapter.h
Go to the documentation of this file.
00001 
00002 /*=========================================================================
00003 
00004   Program:   Visualization Toolkit
00005   Module:    vtkRAdapter.h
00006 
00007   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00008   All rights reserved.
00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00010 
00011      This software is distributed WITHOUT ANY WARRANTY; without even
00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00013      PURPOSE.  See the above copyright notice for more information.
00014 
00015 =========================================================================*/
00016 /*-------------------------------------------------------------------------
00017   Copyright 2009 Sandia Corporation.
00018   Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
00019   the U.S. Government retains certain rights in this software.
00020 -------------------------------------------------------------------------*/
00021 
00047 #ifndef __vtkRAdapter
00048 #define __vtkRAdapter
00049 
00050 #include "vtkFiltersStatisticsGnuRModule.h" // For export macro
00051 #include "vtkObject.h"
00052 #include "Rinternals.h" // Needed for Rinternals.h SEXP data structure
00053 
00054 class vtkInformation;
00055 class vtkInformationVector;
00056 class vtkDataArray;
00057 class vtkArray;
00058 class vtkTable;
00059 class vtkTree;
00060 class vtkDataArrayCollection;
00061 class vtkArrayData;
00062 class vtkDataObjectCollection;
00063 
00064 class VTKFILTERSSTATISTICSGNUR_EXPORT vtkRAdapter : public vtkObject
00065 {
00066 
00067 public:
00068 
00069   vtkTypeMacro(vtkRAdapter, vtkObject);
00070 
00071   void PrintSelf(ostream& os, vtkIndent indent);
00072 
00073   static vtkRAdapter *New();
00074 
00075 //BTX
00079   vtkDataArray* RToVTKDataArray(SEXP variable);
00080 
00084   vtkArray* RToVTKArray(SEXP variable);
00085 
00088   SEXP VTKDataArrayToR(vtkDataArray* da);
00089 
00092   SEXP VTKArrayToR(vtkArray* da);
00093 
00096   SEXP VTKTableToR(vtkTable* table);
00097 
00101   vtkTable* RToVTKTable(SEXP variable);
00102 
00105   SEXP VTKTreeToR(vtkTree* tree);
00106 
00108 
00110   vtkTree* RToVTKTree(SEXP variable);
00111 //ETX
00113 
00114 protected:
00115   vtkRAdapter();
00116   ~vtkRAdapter();
00117 
00118 private:
00119 
00120   vtkRAdapter(const vtkRAdapter&); // Not implemented
00121   void operator=(const vtkRAdapter&); // Not implemented
00122 
00123   vtkDataArrayCollection* vdac;  // Collection of vtkDataArrays that have been converted from R.
00124   vtkArrayData* vad;  // Collection of vtkArrays that have been converted from R.
00125   vtkDataObjectCollection* vdoc; // Collection of vtkTables that have been converted from R.
00126 
00127 };
00128 
00129 
00130 #endif
00131 
00132 
00133