8#include "vtkInfovisCoreModule.h"  
  172VTK_ABI_NAMESPACE_BEGIN
 
  189  using PairType = std::tuple<std::string, std::string>;
 
  202#define SetStdContainerMacro(name, container)                                                      \ 
  203  virtual void Set##name(container arg)                                                            \ 
  205    bool changed = false;                                                                          \ 
  206    if (arg.size() != name.size())                                                                 \ 
  212      auto a = arg.begin();                                                                        \ 
  213      for (auto r : name)                                                                          \ 
  236    if (arg != BackgroundColorName)
 
  239      BackgroundColorName = arg;
 
  270    if (ColorSchemeName != arg)
 
  273      ColorSchemeName = arg;
 
  286  vtkSetMacro(DPI, 
int);
 
  287  vtkGetMacro(DPI, 
int);
 
  303  virtual std::string 
GetFileName() VTK_FUTURE_CONST { 
return FileName; }
 
  314    if (FontFileName != arg)
 
  328  vtkSetMacro(Gap, 
int);
 
  329  vtkGetMacro(Gap, 
int);
 
  340    if (MaskColorName != arg)
 
  361    if (MaskFileName != arg)
 
  374  vtkSetMacro(MaxFontSize, 
int);
 
  375  vtkGetMacro(MaxFontSize, 
int);
 
  382  vtkSetMacro(MinFontSize, 
int);
 
  383  vtkGetMacro(MinFontSize, 
int);
 
  392  vtkSetMacro(MinFrequency, 
int);
 
  393  vtkGetMacro(MinFrequency, 
int);
 
  401  vtkSetMacro(FontMultiplier, 
int);
 
  402  vtkGetMacro(FontMultiplier, 
int);
 
  433    return OrientationDistribution;
 
  446    Orientations.push_back(arg);
 
  461    ReplacementPairs.push_back(arg);
 
  485    StopWords.insert(word);
 
  503    if (StopListFileName != arg)
 
  506      StopListFileName = arg;
 
  536    if (WordColorName != arg)
 
  610  typedef std::function<bool(std::pair<std::string, int>, std::pair<std::string, int>)> Comparator;
 
  612  std::multiset<std::pair<std::string, int>, Comparator> FindWordsSortedByFrequency(
 
  616    ExtentOffset(
int _x = 0.0, 
int _y = 0.0)
 
Generic algorithm superclass for image algs.
 
a simple class to control print indentation
 
virtual void Modified()
Update the modification time for this object.
 
Hold a reference to a vtkObjectBase instance.
 
generate a word cloud visualization of a text document
 
virtual OrientationsContainer GetOrientations()
 
virtual OffsetDistributionContainer GetOffsetDistribution()
 
virtual void SetWordColorName(std::string arg)
Set/Get WordColorName, the name of the color for the words().
 
virtual std::string GetMaskFileName() VTK_FUTURE_CONST
 
virtual void SetBackgroundColorName(std::string arg)
Set/Get the vtkNamedColors name for the background(MidNightBlue).
 
virtual SizesContainer GetAdjustedSizes()
Return the AdjustedSizes of the resized mask file.
 
static vtkWordCloud * New()
Construct object with vertex cell generation turned off.
 
virtual void SetFileName(VTK_FILEPATH std::string arg)
Set/Get FileName, the name of the file that contains the text to be processed.
 
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called in response to a REQUEST_DATA request from the executive.
 
std::vector< PairType > ReplacementPairsContainer
 
virtual void SetTitle(std::string arg)
Set/Get Title, add this word to the document's words and set a high frequency, so that is will be ren...
 
virtual std::string GetFontFileName() VTK_FUTURE_CONST
 
std::string StopListFileName
 
vtkSmartPointer< vtkImageData > ImageData
 
std::array< int, 2 > OffsetDistributionContainer
 
std::string ColorSchemeName
 
SetStdContainerMacro(Orientations, OrientationsContainer)
Set/Add/Get Orientations, a vector of discrete orientations ().
 
virtual std::vector< std::string > & GetKeptWords()
Get a vector of words that are kept in the final image.
 
virtual void SetColorSchemeName(std::string arg)
Set/Get ColorSchemeName, the name of a color scheme from vtkColorScheme to be used to select colors f...
 
virtual std::string GetWordColorName()
 
virtual void SetMaskColorName(std::string arg)
Set/Get MaskColorName, the name of the color for the mask (black).
 
std::tuple< std::string, std::string > PairType
 
SetStdContainerMacro(StopWords, StopWordsContainer)
Set/Add/Get StopWords, a set of user provided stop words().
 
std::string WordColorName
 
std::string BackgroundColorName
 
SetStdContainerMacro(ColorDistribution, ColorDistributionContainer)
Set/Get ColorDistribution, the distribution of random colors(.6 1.0), if WordColorName is empty.
 
std::array< double, 2 > ColorDistributionContainer
 
virtual std::vector< std::string > & GetStoppedWords()
Get a vector of words that were stopped in the final image.
 
std::set< std::string > StopWordsContainer
 
ReplacementPairsContainer ReplacementPairs
 
virtual std::string GetStopListFileName() VTK_FUTURE_CONST
 
virtual void SetStopListFileName(VTK_FILEPATH VTK_FUTURE_CONST std::string arg)
Set/Get StopListFileName, the name of the file that contains the stop words, one per line.
 
std::array< double, 2 > OrientationDistributionContainer
 
std::vector< std::string > StringContainer
 
SizesContainer AdjustedSizes
 
virtual std::vector< std::string > & GetSkippedWords()
Get a vector of words that are skipped.
 
virtual std::string GetFileName() VTK_FUTURE_CONST
 
virtual void SetMaskFileName(VTK_FILEPATH VTK_FUTURE_CONST std::string arg)
Set/Get MaskFileName, the mask file name().
 
SetStdContainerMacro(Sizes, SizesContainer)
Set/Get Sizes, the size of the output image(640 480).
 
OrientationsContainer Orientations
 
virtual std::string GetTitle()
 
virtual SizesContainer GetSizes()
 
OrientationDistributionContainer OrientationDistribution
 
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Subclasses can reimplement this method to collect information from their inputs and set information f...
 
virtual StopWordsContainer GetStopWords()
 
SetStdContainerMacro(OffsetDistribution, OffsetDistributionContainer)
Set/Get OffsetDistribution, the range of uniform random offsets(-size[0]/100.0 -size{1]/100....
 
virtual std::string GetMaskColorName()
 
std::vector< std::string > SkippedWords
 
std::vector< std::string > KeptWords
 
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
 
ColorDistributionContainer ColorDistribution
 
SetStdContainerMacro(OrientationDistribution, OrientationDistributionContainer)
Set/Get OrientationDistribution, ranges of random orientations(-20 20).
 
virtual ColorDistributionContainer GetColorDistribution()
 
virtual std::string GetBackgroundColorName()
 
virtual ReplacementPairsContainer GetReplacementPairs()
 
virtual std::string GetColorSchemeName()
 
StopWordsContainer StopWords
 
~vtkWordCloud() override=default
 
virtual OrientationDistributionContainer GetOrientationDistribution()
 
std::vector< double > OrientationsContainer
 
void AddReplacementPair(PairType arg)
 
std::vector< std::string > StoppedWords
 
void AddStopWord(std::string word)
 
OffsetDistributionContainer OffsetDistribution
 
virtual void SetBWMask(bool arg)
Set/Get boolean that indicates the mask image is a single channel(false).
 
virtual void SetFontFileName(VTK_FILEPATH VTK_FUTURE_CONST std::string arg)
Set/Get FontFileName, If empty, the built-in Arial font is used().
 
SetStdContainerMacro(ReplacementPairs, ReplacementPairsContainer)
Set/Add/Get ReplacementPairs, a vector of words that replace the first word with another second word ...
 
std::string MaskColorName
 
std::array< int, 2 > SizesContainer
 
void AddOrientation(double arg)