VTK  9.2.6
vtkProteinRibbonFilter.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkProteinRibbonFilter.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
15
16#ifndef vtkProteinRibbonFilter_h
17#define vtkProteinRibbonFilter_h
18
49#include "vtkDomainsChemistryModule.h" // for export macro
51
52#include "vtkColor.h" // For vtkColor3ub.
53#include <map> // For element to color map.
54
55class vtkVector3f;
56class vtkStringArray;
57
58class VTKDOMAINSCHEMISTRY_EXPORT vtkProteinRibbonFilter : public vtkPolyDataAlgorithm
59{
60public:
62 void PrintSelf(ostream& os, vtkIndent indent) override;
63
65
67
70 vtkGetMacro(CoilWidth, float);
71 vtkSetMacro(CoilWidth, float);
73
75
78 vtkGetMacro(HelixWidth, float);
79 vtkSetMacro(HelixWidth, float);
81
83
86 vtkGetMacro(SubdivideFactor, int);
87 vtkSetMacro(SubdivideFactor, int);
89
91
94 vtkGetMacro(DrawSmallMoleculesAsSpheres, bool);
95 vtkSetMacro(DrawSmallMoleculesAsSpheres, bool);
97
99
102 vtkGetMacro(SphereResolution, int);
103 vtkSetMacro(SphereResolution, int);
105
106protected:
109
111
113
115 std::vector<std::pair<vtkVector3f, bool>>& p1, std::vector<std::pair<vtkVector3f, bool>>& p2,
116 std::vector<vtkColor3ub>& colors);
117
118 void CreateAtomAsSphere(vtkPolyData* poly, vtkUnsignedCharArray* pointsColors, double* pos,
119 const vtkColor3ub& color, float radius, float scale);
120
121 static std::vector<vtkVector3f>* Subdivide(std::vector<std::pair<vtkVector3f, bool>>& p, int div);
122
123 void SetColorByAtom(std::vector<vtkColor3ub>& colors, vtkStringArray* atomTypes);
124
125 void SetColorByStructure(std::vector<vtkColor3ub>& colors, vtkStringArray* atomTypes,
126 vtkUnsignedCharArray* ss, const vtkColor3ub& helixColor, const vtkColor3ub& sheetColor);
127
128 std::map<std::string, vtkColor3ub> ElementColors;
129
135
136private:
138 void operator=(const vtkProteinRibbonFilter&) = delete;
139};
140
141#endif // vtkProteinRibbonFilter_h
Some derived classes for the different colors commonly used.
Definition: vtkColor.h:304
a simple class to control print indentation
Definition: vtkIndent.h:119
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate 3D points
Definition: vtkPoints.h:149
Superclass for algorithms that produce only polydata as output.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:200
generates protein ribbons
~vtkProteinRibbonFilter() override
void SetColorByStructure(std::vector< vtkColor3ub > &colors, vtkStringArray *atomTypes, vtkUnsignedCharArray *ss, const vtkColor3ub &helixColor, const vtkColor3ub &sheetColor)
void SetColorByAtom(std::vector< vtkColor3ub > &colors, vtkStringArray *atomTypes)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static std::vector< vtkVector3f > * Subdivide(std::vector< std::pair< vtkVector3f, bool > > &p, int div)
void CreateThinStrip(vtkPolyData *poly, vtkUnsignedCharArray *pointsColors, vtkPoints *p, std::vector< std::pair< vtkVector3f, bool > > &p1, std::vector< std::pair< vtkVector3f, bool > > &p2, std::vector< vtkColor3ub > &colors)
std::map< std::string, vtkColor3ub > ElementColors
int FillInputPortInformation(int, vtkInformation *) override
Fill the input port information objects for this algorithm.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
static vtkProteinRibbonFilter * New()
void CreateAtomAsSphere(vtkPolyData *poly, vtkUnsignedCharArray *pointsColors, double *pos, const vtkColor3ub &color, float radius, float scale)
a vtkAbstractArray subclass for strings
dynamic, self-adjusting array of unsigned char
@ vector
Definition: vtkX3D.h:243
@ scale
Definition: vtkX3D.h:235
@ color
Definition: vtkX3D.h:227
@ radius
Definition: vtkX3D.h:258