VTK  9.6.20260706
vtkSurfaceLICInterface.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
46
47#ifndef vtkSurfaceLICInterface_h
48#define vtkSurfaceLICInterface_h
49
50#include "vtkObject.h"
51#include "vtkRenderingLICOpenGL2Module.h" // For export macro
52#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
53
54VTK_ABI_NAMESPACE_BEGIN
55class vtkRenderWindow;
56class vtkRenderer;
57class vtkActor;
58class vtkImageData;
59class vtkDataObject;
60class vtkDataArray;
63class vtkWindow;
64
65class VTKRENDERINGLICOPENGL2_EXPORT VTK_MARSHALAUTO vtkSurfaceLICInterface : public vtkObject
66{
67public:
70 void PrintSelf(ostream& os, vtkIndent indent) override;
71
73
76 void SetNumberOfSteps(int val);
77 vtkGetMacro(NumberOfSteps, int);
79
81
84 void SetStepSize(double val);
85 vtkGetMacro(StepSize, double);
87
89
100 void SetNormalizeVectors(int val);
101 vtkBooleanMacro(NormalizeVectors, int);
102 vtkGetMacro(NormalizeVectors, int);
104
106
111 void SetMaskOnSurface(int val);
112 vtkBooleanMacro(MaskOnSurface, int);
113 vtkGetMacro(MaskOnSurface, int);
115
117
133 void SetMaskThreshold(double val);
134 vtkGetMacro(MaskThreshold, double);
136
138
143 void SetMaskColor(double* val);
144 void SetMaskColor(double r, double g, double b)
145 {
146 double rgb[3] = { r, g, b };
147 this->SetMaskColor(rgb);
148 }
149 vtkGetVector3Macro(MaskColor, double);
151
153
161 void SetMaskIntensity(double val);
162 vtkGetMacro(MaskIntensity, double);
164
166
172 void SetOrientedLIC(bool val);
173 vtkGetMacro(OrientedLIC, bool);
174 vtkBooleanMacro(OrientedLIC, bool);
176
178
183 void SetEnhancedLIC(int val);
184 vtkGetMacro(EnhancedLIC, int);
185 vtkBooleanMacro(EnhancedLIC, int);
187
189
222 enum
223 {
228 };
229 void SetEnhanceContrast(int val);
230 vtkGetMacro(EnhanceContrast, int);
232
234
254 //
260
262
268 void SetAntiAlias(int val);
269 vtkBooleanMacro(AntiAlias, int);
270 vtkGetMacro(AntiAlias, int);
272
274
283 enum
284 {
287 };
288 void SetColorMode(int val);
289 vtkGetMacro(ColorMode, int);
291
293
302 void SetLICIntensity(double val);
303 vtkGetMacro(LICIntensity, double);
305
307
314 void SetMapModeBias(double val);
315 vtkGetMacro(MapModeBias, double);
317
319
327
329
348 void SetGenerateNoiseTexture(int shouldGenerate);
349 vtkGetMacro(GenerateNoiseTexture, int);
351
353
358 enum
359 {
363 };
364 void SetNoiseType(int type);
365 vtkGetMacro(NoiseType, int);
367
369
373 void SetNoiseTextureSize(int length);
374 vtkGetMacro(NoiseTextureSize, int);
376
378
381 void SetNoiseGrainSize(int val);
382 vtkGetMacro(NoiseGrainSize, int);
384
386
392 void SetMinNoiseValue(double val);
393 void SetMaxNoiseValue(double val);
394 vtkGetMacro(MinNoiseValue, double);
395 vtkGetMacro(MaxNoiseValue, double);
397
399
404 vtkGetMacro(NumberOfNoiseLevels, int);
406
408
413 vtkGetMacro(ImpulseNoiseProbability, double);
415
417
421 vtkGetMacro(ImpulseNoiseBackgroundValue, double);
423
425
429 vtkGetMacro(NoiseGeneratorSeed, int);
431
433
436 enum
437 {
442 };
443 void SetCompositeStrategy(int val);
444 vtkGetMacro(CompositeStrategy, int);
446
451 static bool IsSupported(vtkRenderWindow* context);
452
459 virtual void WriteTimerLog(const char*) {}
460
465
472
477
482
490
496
498
503 void UpdateCommunicator(vtkRenderer* renderer, vtkActor* actor, vtkDataObject* data);
504
506
509 void SetHasVectors(bool val);
512
517
521 void ApplyLIC();
524
530 virtual void GetGlobalMinMax(vtkPainterCommunicator*, float&, float&) {}
531
533
536 vtkSetMacro(Enable, int);
537 vtkGetMacro(Enable, int);
538 vtkBooleanMacro(Enable, int);
540
541protected:
544
549
551
561
563
564 // Unit is a pixel length.
566 double StepSize;
568
576
580 double MaskColor[3];
581
585
596
599
601
602private:
604 void operator=(const vtkSurfaceLICInterface&) = delete;
605
606 bool OrientedLIC;
607};
608
609VTK_ABI_NAMESPACE_END
610#endif
represents an object (geometry & properties) in a rendered scene
Definition vtkActor.h:151
general representation of visualization data
topologically and geometrically regular array of data
a simple class to control print indentation
Definition vtkIndent.h:108
A communicator that can safely be used inside a painter.
create a window for renderers to draw into
abstract specification for renderers
A small collection of noise routines for LIC.
void SetNormalizeVectors(int val)
Normalize vectors during integration.
virtual void GetGlobalMinMax(vtkPainterCommunicator *, float &, float &)
Get the min/max across all ranks.
void SetCompositeStrategy(int val)
Control the screen space decomposition where LIC is computed.
void SetNoiseTextureSize(int length)
Set/Get the side length in pixels of the noise texture.
void SetHasVectors(bool val)
Does the data have vectors which we require.
void SetNoiseGeneratorSeed(int val)
Set/Get the seed value used by the random number generator.
void InitializeResources()
resoucre allocators
void SetAntiAlias(int val)
Enable/Disable the anti-aliasing pass.
virtual bool NeedToUpdateCommunicator()
Return false if stage can be skipped.
void SetImpulseNoiseBackgroundValue(double val)
The color to use for untouched pixels when impulse noise probability < 1.
vtkImageData * GetNoiseDataSet()
Set the data containing a noise array as active scalars.
void UpdateCommunicator(vtkRenderer *renderer, vtkActor *actor, vtkDataObject *data)
Called from a mapper, does what is needed to make sure the communicators are ready.
vtkSurfaceLICHelper * Internals
void SetMapModeBias(double val)
Factor used when blend mode is set to COLOR_MODE_MAP.
bool NeedToComputeLIC()
Return false if stage can be skipped.
void SetLICIntensity(double val)
Factor used when blend mode is set to COLOR_MODE_BLEND.
void SetNumberOfSteps(int val)
Get/Set the number of integration steps in each direction.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
bool NeedToColorLIC()
Return false if stage can be skipped.
void SetLowColorContrastEnhancementFactor(double val)
This feature is used to fine tune the contrast enhancement.
~vtkSurfaceLICInterface() override
void ShallowCopy(vtkSurfaceLICInterface *m)
Make a shallow copy of this interface.
void SetMaxNoiseValue(double val)
Set/Get the minimum and mximum gray scale values that the generated noise can take on.
void SetOrientedLIC(bool val)
Enable Oriented LIC (OLIC).
virtual vtkPainterCommunicator * CreateCommunicator(int)
Creates a new communicator with/without the calling processes as indicated by the passed in flag,...
void SetNoiseGrainSize(int val)
Each noise value will be length^2 pixels in area.
bool GetHasVectors()
Does the data have vectors which we require.
void SetUpdateAll()
Return false if stage can be skipped.
static bool IsSupported(vtkRenderWindow *context)
Returns true if the rendering context supports extensions needed by this painter.
void SetImpulseNoiseProbability(double val)
Control the density of the noise.
bool NeedToRenderGeometry(vtkRenderer *renderer, vtkActor *actor)
Return false if stage can be skipped.
bool NeedToGatherVectors()
Return false if stage can be skipped.
void SetMaskColor(double r, double g, double b)
The MaskColor is used on masked fragments.
static vtkSurfaceLICInterface * New()
void SetEnhancedLIC(int val)
EnhancedLIC mean compute the LIC twice with the second pass using the edge-enhanced result of the fir...
void SetHighColorContrastEnhancementFactor(double val)
This feature is used to fine tune the contrast enhancement.
vtkPainterCommunicator * GetCommunicator()
void SetColorMode(int val)
Set/Get the color mode.
virtual void ReleaseGraphicsResources(vtkWindow *win)
Release any graphics resources that are being consumed by this mapper.
void SetStepSize(double val)
Get/Set the step size (in pixels).
bool CanRenderSurfaceLIC(vtkActor *actor)
Returns true when rendering LIC is possible.
void SetNoiseType(int type)
Select the statistical distribution of randomly generated noise values.
void SetHighLICContrastEnhancementFactor(double val)
This feature is used to fine tune the contrast enhancement.
void SetEnhanceContrast(int val)
Enable/Disable contrast and dynamic range correction stages.
void SetNoiseDataSet(vtkImageData *data)
Set the data containing a noise array as active scalars.
void SetLowLICContrastEnhancementFactor(double val)
This feature is used to fine tune the contrast enhancement.
void SetNumberOfNoiseLevels(int val)
Set/Get the number of discrete values a noise pixel may take on.
void ValidateContext(vtkRenderer *renderer)
Look for changes that would trigger stage updates.
void SetMinNoiseValue(double val)
Set/Get the minimum and mximum gray scale values that the generated noise can take on.
virtual void WriteTimerLog(const char *)
Methods used for parallel benchmarks.
void SetMaskColor(double *val)
The MaskColor is used on masked fragments.
void SetMaskIntensity(double val)
The MaskIntensity controls the blending of the mask color and the geometry color.
void SetGenerateNoiseTexture(int shouldGenerate)
Set/Get the noise texture source.
void SetMaskThreshold(double val)
The MaskThreshold controls the rendering of fragments in stagnant regions of flow.
void CreateCommunicator(vtkRenderer *, vtkActor *, vtkDataObject *data)
Creates a new communicator for internal use based on this rank's visible data.
void UpdateNoiseImage(vtkRenderWindow *renWin)
Updates the noise texture, downsampling by the requested sample rate.
void SetMaskOnSurface(int val)
When set MaskOnSurface computes |V| for use in the fragment masking tests on the surface.
window superclass for vtkRenderWindow
Definition vtkWindow.h:61
#define vtkDataArray
#define VTK_MARSHALAUTO