/usr/include/vtk-7.1/vtkPeriodicDataArray.h is in libvtk7-dev 7.1.1+dfsg1-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 | /*=========================================================================
Program: Visualization Toolkit
Module: vtkPeriodicDataArray.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
/**
* @class vtkPeriodicDataArray
* @brief Map native an Array into an angulat
* periodic array
*
*
* Map an array into a periodic array. Data from the original array aare
* rotated (on the fly) by the specified angle along the specified axis
* around the specified point. Lookup is not implemented.
* Creating the array is virtually free, accessing a tuple require some
* computation.
*/
#ifndef vtkPeriodicDataArray_h
#define vtkPeriodicDataArray_h
#include "vtkGenericDataArray.h" // Parent
#include "vtkAOSDataArrayTemplate.h" // Template
template <class Scalar>
class vtkPeriodicDataArray:
public vtkGenericDataArray<vtkPeriodicDataArray<Scalar>, Scalar>
{
typedef vtkGenericDataArray<vtkPeriodicDataArray<Scalar>, Scalar> GenericBase;
public:
vtkTemplateTypeMacro(vtkPeriodicDataArray<Scalar>, GenericBase)
typedef typename Superclass::ValueType ValueType;
void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
/**
* Initialize the mapped array with the original input data array.
*/
void InitializeArray(vtkAOSDataArrayTemplate<Scalar>* inputData);
/**
* Initialize array with zero values
*/
void Initialize() VTK_OVERRIDE;
/**
* Copy tuples values, selected by ptIds into provided array
*/
void GetTuples(vtkIdList *ptIds, vtkAbstractArray *output) VTK_OVERRIDE;
/**
* Copy tuples from id p1 to id p2 included into provided array
*/
void GetTuples(vtkIdType p1, vtkIdType p2, vtkAbstractArray *output) VTK_OVERRIDE;
/**
* No effect
*/
void Squeeze() VTK_OVERRIDE;
/**
* Not implemented
*/
VTK_NEWINSTANCE vtkArrayIterator *NewIterator() VTK_OVERRIDE;
/**
* Not implemented
*/
vtkIdType LookupValue(vtkVariant value) VTK_OVERRIDE;
/**
* Not implemented
*/
void LookupValue(vtkVariant value, vtkIdList *ids) VTK_OVERRIDE;
/**
* Not implemented
*/
vtkVariant GetVariantValue(vtkIdType idx) VTK_OVERRIDE;
/**
* Not implemented
*/
void ClearLookup() VTK_OVERRIDE;
/**
* Return tuple at location i.
* Pointer valid until next call to this object
*/
double* GetTuple(vtkIdType i) VTK_OVERRIDE;
/**
* Copy tuple at location i into user provided array
*/
void GetTuple(vtkIdType i, double *tuple) VTK_OVERRIDE;
/**
* Not implemented
*/
vtkIdType LookupTypedValue(Scalar value) VTK_OVERRIDE;
/**
* Not implemented
*/
void LookupTypedValue(Scalar value, vtkIdList *ids) VTK_OVERRIDE;
/**
* Get value at index idx.
* Warning, it internally call GetTypedTuple,
* so it is an inneficcient way if reading all data
*/
ValueType GetValue(vtkIdType idx) const ;
/**
* Get value at index idx as reference.
* Warning, it internally call GetTypedTuple,
* so it is an inneficcient way if reading all data
*/
ValueType& GetValueReference(vtkIdType idx);
/**
* Copy tuple value at location idx into provided array
*/
void GetTypedTuple(vtkIdType idx, Scalar *t) const;
/**
* Return the requested component of the specified tuple.
* Warning, this internally calls GetTypedTuple, so it is an inefficient way
* of reading all data.
*/
ValueType GetTypedComponent(vtkIdType tupleIdx, int compIdx) const;
/**
* Return the memory in kilobytes consumed by this data array.
*/
unsigned long GetActualMemorySize() VTK_OVERRIDE;
/**
* Read only container, not supported.
*/
int Allocate(vtkIdType sz, vtkIdType ext) VTK_OVERRIDE;
/**
* Read only container, not supported.
*/
int Resize(vtkIdType numTuples) VTK_OVERRIDE;
/**
* Read only container, not supported.
*/
void SetNumberOfTuples(vtkIdType number) VTK_OVERRIDE;
/**
* Read only container, not supported.
*/
void SetTuple(vtkIdType i, vtkIdType j, vtkAbstractArray *source) VTK_OVERRIDE;
/**
* Read only container, not supported.
*/
void SetTuple(vtkIdType i, const float *source) VTK_OVERRIDE;
/**
* Read only container, not supported.
*/
void SetTuple(vtkIdType i, const double *source) VTK_OVERRIDE;
/**
* Read only container, not supported.
*/
void InsertTuple(vtkIdType i, vtkIdType j, vtkAbstractArray *source) VTK_OVERRIDE;
/**
* Read only container, not supported.
*/
void InsertTuple(vtkIdType i, const float *source) VTK_OVERRIDE;
/**
* Read only container, not supported.
*/
void InsertTuple(vtkIdType i, const double *source) VTK_OVERRIDE;
/**
* Read only container, not supported.
*/
void InsertTuples(vtkIdList *dstIds, vtkIdList *srcIds,
vtkAbstractArray *source) VTK_OVERRIDE;
/**
* Read only container, not supported.
*/
void InsertTuples(vtkIdType dstStart, vtkIdType n, vtkIdType srcStart,
vtkAbstractArray* source) VTK_OVERRIDE;
/**
* Read only container, error.
*/
vtkIdType InsertNextTuple(vtkIdType j, vtkAbstractArray *source) VTK_OVERRIDE;
/**
* Read only container, not supported.
*/
vtkIdType InsertNextTuple(const float *source) VTK_OVERRIDE;
/**
* Read only container, not supported.
*/
vtkIdType InsertNextTuple(const double *source) VTK_OVERRIDE;
/**
* Read only container, not supported.
*/
void DeepCopy(vtkAbstractArray *aa) VTK_OVERRIDE;
/**
* Read only container, not supported.
*/
void DeepCopy(vtkDataArray *da) VTK_OVERRIDE;
/**
* Read only container, not supported.
*/
void InterpolateTuple(vtkIdType i, vtkIdList *ptIndices,
vtkAbstractArray* source, double* weights) VTK_OVERRIDE;
/**
* Read only container, not supported.
*/
void InterpolateTuple(vtkIdType i, vtkIdType id1, vtkAbstractArray *source1,
vtkIdType id2, vtkAbstractArray *source2, double t) VTK_OVERRIDE;
/**
* Read only container, not supported.
*/
void SetVariantValue(vtkIdType idx, vtkVariant value) VTK_OVERRIDE;
/**
* Read only container, not supported.
*/
void InsertVariantValue(vtkIdType idx, vtkVariant value) VTK_OVERRIDE;
/**
* Read only container, not supported.
*/
void RemoveTuple(vtkIdType id) VTK_OVERRIDE;
/**
* Read only container, not supported.
*/
void RemoveFirstTuple() VTK_OVERRIDE;
/**
* Read only container, not supported.
*/
void RemoveLastTuple() VTK_OVERRIDE;
/**
* Read only container, not supported.
*/
void SetTypedTuple(vtkIdType i, const Scalar *t);
/**
* Read only container, not supported.
*/
void SetTypedComponent(vtkIdType t, int c, Scalar v);
/**
* Read only container, not supported.
*/
void InsertTypedTuple(vtkIdType i, const Scalar *t);
/**
* Read only container, not supported.
*/
vtkIdType InsertNextTypedTuple(const Scalar *t);
/**
* Read only container, not supported.
*/
void SetValue(vtkIdType idx, Scalar value);
/**
* Read only container, not supported.
*/
vtkIdType InsertNextValue(Scalar v);
/**
* Read only container, not supported.
*/
void InsertValue(vtkIdType idx, Scalar v);
//@{
/**
* Set/Get normalize flag. Default: false
*/
vtkSetMacro(Normalize, bool);
vtkGetMacro(Normalize, bool);
//@}
protected:
vtkPeriodicDataArray();
~vtkPeriodicDataArray();
//@{
/**
* Read only container, not supported.
*/
bool AllocateTuples(vtkIdType numTuples);
bool ReallocateTuples(vtkIdType numTuples);
//@}
/**
* Transform the provided tuple
*/
virtual void Transform(Scalar* tuple) const = 0;
/**
* Get the transformed range by components
*/
bool ComputeScalarRange(double* range) VTK_OVERRIDE;
/**
* Get the transformed range on all components
*/
bool ComputeVectorRange(double range[2]) VTK_OVERRIDE;
/**
* Update the transformed periodic range
*/
virtual void ComputePeriodicRange();
/**
* Set the invalid range flag to false
*/
void InvalidateRange();
bool Normalize; // If transformed vector must be normalized
private:
vtkPeriodicDataArray(const vtkPeriodicDataArray &) VTK_DELETE_FUNCTION;
void operator=(const vtkPeriodicDataArray &) VTK_DELETE_FUNCTION;
friend class vtkGenericDataArray<vtkPeriodicDataArray<Scalar>, Scalar>;
Scalar* TempScalarArray; // Temporary array used by GetTypedTuple methods
double* TempDoubleArray; // Temporary array used by GetTuple vethods
vtkIdType TempTupleIdx; // Location of currently stored Temp Tuple to use as cache
vtkAOSDataArrayTemplate<Scalar>* Data; // Original data
bool InvalidRange;
double PeriodicRange[6]; // Transformed periodic range
};
#include "vtkPeriodicDataArray.txx"
#endif //vtkPeriodicDataArray_h
// VTK-HeaderTest-Exclude: vtkPeriodicDataArray.h
|