vtkLagrangianSeedHelper.h 2.68 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
/*=========================================================================

  Program:   Visualization Toolkit
  Module:    vtkLagrangianSeedHelper.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   vtkLagrangianSeedHelper
 * @brief   Filter to generate
 * seed data for a lagrangian integration model
 *
 *
 * This filter enable to generate point data, array by array
 * from constant value or by interpolating from a volumic input
23
 */
24 25 26 27 28

#ifndef vtkLagrangianSeedHelper_h
#define vtkLagrangianSeedHelper_h

#include "vtkLagrangianHelperBase.h"
29
#include "vtkLagrangianParticleTrackerModule.h" // for export macro
30

31
class VTKLAGRANGIANPARTICLETRACKER_EXPORT vtkLagrangianSeedHelper : public vtkLagrangianHelperBase
32 33 34 35
{
public:
  static vtkLagrangianSeedHelper* New();
  vtkTypeMacro(vtkLagrangianSeedHelper, vtkLagrangianHelperBase);
36
  void PrintSelf(ostream& os, vtkIndent indent) override;
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56

  enum FlowOrConstant
  {
    FLOW = 0,
    CONSTANT = 1
  };

  /**
   * Set/Get the seed source input
   */
  void SetSourceData(vtkDataObject* source);

  /**
   * Set the seed source connection
   */
  void SetSourceConnection(vtkAlgorithmOutput* algOutput);

  /**
   * Remove all arrays to generate, no more array will be generated
   */
57
  void RemoveAllArraysToGenerate() override;
58 59 60 61

  /**
   * Set the number of arrays to generate
   */
62
  void SetNumberOfArrayToGenerate(int i) override;
63 64 65 66 67

  /**
   * Add an array to generate, eiher from a constant value or by interpolation from the flow
   */
  void SetArrayToGenerate(int i, const char* arrayName, int type, int flowOrConstant,
68
    int numberOfComponents, const char* arrayValues) override;
69 70 71

protected:
  vtkLagrangianSeedHelper();
72
  ~vtkLagrangianSeedHelper() override;
73 74 75 76 77 78

  /**
   * Creates the same output type as the input type for non composite dataset
   * In case of composite, the output will have the same type of the first block
   * of the input
   */
79
  int RequestDataObject(vtkInformation* request, vtkInformationVector** inputVector,
80
    vtkInformationVector* outputVector) override;
81

82
  int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
83 84 85 86 87

  class vtkInternals;
  vtkInternals* Internals;

private:
88 89
  vtkLagrangianSeedHelper(const vtkLagrangianSeedHelper&) = delete;
  void operator=(const vtkLagrangianSeedHelper&) = delete;
90 91 92
};

#endif