diff --git a/Accelerators/Piston/vtkDataSetToPiston.h b/Accelerators/Piston/vtkDataSetToPiston.h index 9da195a95196b62af3d54779661403272bf39bec..47baa4dc7a8949bb626a86a71ab2dca8347ac0ec 100644 --- a/Accelerators/Piston/vtkDataSetToPiston.h +++ b/Accelerators/Piston/vtkDataSetToPiston.h @@ -12,14 +12,17 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkDataSetToPiston - converts a DataSet to a PistonDataObject -// .SECTION Description -// Converts vtkDataSets that reside on the CPU into piston data that -// resides on the GPU. Afterward vtkPistonAlgorithms will processed -// it there. -// -// .SECTION See Also -// vtkPistonToDataSet +/** + * @class vtkDataSetToPiston + * @brief converts a DataSet to a PistonDataObject + * + * Converts vtkDataSets that reside on the CPU into piston data that + * resides on the GPU. Afterward vtkPistonAlgorithms will processed + * it there. + * + * @sa + * vtkPistonToDataSet +*/ #ifndef vtkDataSetToPiston_h #define vtkDataSetToPiston_h @@ -39,14 +42,16 @@ protected: vtkDataSetToPiston(); ~vtkDataSetToPiston(); - // Description: - // Method that does the actual calculation. Funnels down to ExecuteData. + /** + * Method that does the actual calculation. Funnels down to ExecuteData. + */ virtual int RequestData(vtkInformation* request, vtkInformationVector** inputVector, vtkInformationVector* outputVector); - // Description: - // Overridden to say that we require vtkDataSet inputs + /** + * Overridden to say that we require vtkDataSet inputs + */ virtual int FillInputPortInformation(int, vtkInformation*); private: diff --git a/Accelerators/Piston/vtkPistonAlgorithm.h b/Accelerators/Piston/vtkPistonAlgorithm.h index 6f96f12ea39f86e2aa7418322dad55df012141a2..2e24d5e071cb40fc4f9f2524217ee8ec52346bd9 100644 --- a/Accelerators/Piston/vtkPistonAlgorithm.h +++ b/Accelerators/Piston/vtkPistonAlgorithm.h @@ -12,23 +12,26 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkPistonAlgorithm - Superclass for algorithms that produce only -// PistonDataObjects -// .SECTION Description -// vtkPistonAlgorithm is a convenience class to make writing algorithms -// that operate in piston space easer. Basically one does that by subclassing -// this class and overriding Execute() to call into a method that calls into -// an external function compiled with the cuda compiler. -// -// There are some assumptions and defaults made by this -// class you should be aware of. This class defaults such that your filter -// will have one input port and one output port. If that is not the case -// simply change it with SetNumberOfInputPorts etc. See this class -// constructor for the default. This class also provides a FillInputPortInfo -// method that by default says that all inputs will be PistonDataObject. If that -// isn't the case then please override this method in your subclass. This -// class breaks out the downstream requests into separate functions such as -// ExecuteData and ExecuteInformation. +/** + * @class vtkPistonAlgorithm + * @brief Superclass for algorithms that produce only + * PistonDataObjects + * + * vtkPistonAlgorithm is a convenience class to make writing algorithms + * that operate in piston space easer. Basically one does that by subclassing + * this class and overriding Execute() to call into a method that calls into + * an external function compiled with the cuda compiler. + * + * There are some assumptions and defaults made by this + * class you should be aware of. This class defaults such that your filter + * will have one input port and one output port. If that is not the case + * simply change it with SetNumberOfInputPorts etc. See this class + * constructor for the default. This class also provides a FillInputPortInfo + * method that by default says that all inputs will be PistonDataObject. If that + * isn't the case then please override this method in your subclass. This + * class breaks out the downstream requests into separate functions such as + * ExecuteData and ExecuteInformation. +*/ #ifndef vtkPistonAlgorithm_h #define vtkPistonAlgorithm_h @@ -45,62 +48,75 @@ public: vtkTypeMacro(vtkPistonAlgorithm,vtkAlgorithm); void PrintSelf(ostream& os, vtkIndent indent); - // Description: - // Interface the algorithm to the Pipeline's passes. + /** + * Interface the algorithm to the Pipeline's passes. + */ virtual int ProcessRequest(vtkInformation*, vtkInformationVector**, vtkInformationVector*); - // Description: - // A convenience method to reduce code duplication that gets - // the output as the expected type or NULL. + /** + * A convenience method to reduce code duplication that gets + * the output as the expected type or NULL. + */ vtkPistonDataObject *GetPistonDataObjectOutput(int port); - // Description: - // Assign a data object as input. Note that this method does not - // establish a pipeline connection. Use SetInputConnection() to - // setup a pipeline connection. + //@{ + /** + * Assign a data object as input. Note that this method does not + * establish a pipeline connection. Use SetInputConnection() to + * setup a pipeline connection. + */ void SetInputData(int num, vtkDataObject *input); void SetInputData(vtkDataObject *input) { this->SetInputData(0, input); }; + //@} protected: vtkPistonAlgorithm(); ~vtkPistonAlgorithm(); - // Description: - // Overridden to say that we take in and produce vtkPistonDataObjects + //@{ + /** + * Overridden to say that we take in and produce vtkPistonDataObjects + */ virtual int FillInputPortInformation(int port, vtkInformation* info); virtual int FillOutputPortInformation(int port, vtkInformation* info); + //@} - // Description: - // Produce empty output of the proper type for RequestData to fill in. + /** + * Produce empty output of the proper type for RequestData to fill in. + */ virtual int RequestDataObject(vtkInformation* request, vtkInformationVector** inputVector, vtkInformationVector* outputVector); - // Description: - // Produce meta-data about what RequestData will produce. + /** + * Produce meta-data about what RequestData will produce. + */ virtual int RequestInformation(vtkInformation* request, vtkInformationVector** inputVector, vtkInformationVector* outputVector); - // Description: - // Participate in pipeline's sub extent determination. + /** + * Participate in pipeline's sub extent determination. + */ virtual int RequestUpdateExtent(vtkInformation*, vtkInformationVector**, vtkInformationVector*); - // Description: - // Method that does the actual calculation. + /** + * Method that does the actual calculation. + */ virtual int RequestData(vtkInformation* request, vtkInformationVector** inputVector, vtkInformationVector* outputVector); - // Description: - // Typically Execute uses this to copy input bounds to output. - // Algorithms for which this heuristic is poor, should override and - // do it exactly, perhaps by asking the GPU to calculate it, + /** + * Typically Execute uses this to copy input bounds to output. + * Algorithms for which this heuristic is poor, should override and + * do it exactly, perhaps by asking the GPU to calculate it, + */ virtual void PassBoundsForward(vtkPistonDataObject *id, vtkPistonDataObject *od); diff --git a/Accelerators/Piston/vtkPistonContour.h b/Accelerators/Piston/vtkPistonContour.h index 6c3d9812f693b044ed991b57025f49a21592c37e..14eb505ba916d140c6ba1b867fc9350f925bf7b8 100644 --- a/Accelerators/Piston/vtkPistonContour.h +++ b/Accelerators/Piston/vtkPistonContour.h @@ -12,9 +12,12 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkPistonContour - A filter that contours on the GPU -// .SECTION Description -// This filter uses LANL's Piston library to isocontour on the GPU. +/** + * @class vtkPistonContour + * @brief A filter that contours on the GPU + * + * This filter uses LANL's Piston library to isocontour on the GPU. +*/ #ifndef vtkPistonContour_h #define vtkPistonContour_h @@ -28,16 +31,20 @@ public: static vtkPistonContour *New(); void PrintSelf(ostream &os, vtkIndent indent); - //Description: - //Choose the isovalue to contour on. + //@{ + /** + * Choose the isovalue to contour on. + */ vtkSetMacro(IsoValue, float); vtkGetMacro(IsoValue, float); protected: vtkPistonContour(); ~vtkPistonContour(); + //@} - // Description: - // Method that does the actual calculation. Funnels down to ExecuteData. + /** + * Method that does the actual calculation. Funnels down to ExecuteData. + */ virtual int RequestData(vtkInformation* request, vtkInformationVector** inputVector, vtkInformationVector* outputVector); diff --git a/Accelerators/Piston/vtkPistonDataObject.h b/Accelerators/Piston/vtkPistonDataObject.h index 7be96fdc63ce2221ef2539bc69a01dbbff6a7296..907cddf4b3a69fb9b2bd96409d0f3c7f00d52efa 100644 --- a/Accelerators/Piston/vtkPistonDataObject.h +++ b/Accelerators/Piston/vtkPistonDataObject.h @@ -12,18 +12,21 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkPistonDataObject - A GPU resident data set. -// -// .SECTION Description -// vtkPistonDataObject is a basic data structure for storing datasets on -// GPU. This class provides the infrastructure for the VTK pipeline to -// work with the data as it does the rest of the vtkDataObjects. -// The GPU side structures are managed through the internal -// vtkPistonReference instance to keep the GPU/CPU code conceptually -// distinct. -// -// .SECTION See Also -// vtkPistonReference +/** + * @class vtkPistonDataObject + * @brief A GPU resident data set. + * + * + * vtkPistonDataObject is a basic data structure for storing datasets on + * GPU. This class provides the infrastructure for the VTK pipeline to + * work with the data as it does the rest of the vtkDataObjects. + * The GPU side structures are managed through the internal + * vtkPistonReference instance to keep the GPU/CPU code conceptually + * distinct. + * + * @sa + * vtkPistonReference +*/ #ifndef vtkPistonDataObject_h #define vtkPistonDataObject_h @@ -43,67 +46,90 @@ public: vtkTypeMacro(vtkPistonDataObject, vtkDataObject); void PrintSelf(ostream &os, vtkIndent indent); - // Description: - // From vtkType.h, a handle on what type of vtkDataObject this is. + /** + * From vtkType.h, a handle on what type of vtkDataObject this is. + */ int GetDataObjectType() {return VTK_PISTON_DATA_OBJECT;} - // Description: - // A convenience handle to get type of what is stored in the reference. + /** + * A convenience handle to get type of what is stored in the reference. + */ int GetReferredType(); - // Description: - // A convenience handle to get whatever is actually stored in the reference. + /** + * A convenience handle to get whatever is actually stored in the reference. + */ void * GetReferredData(); - // Description: - // GPU level representation and storage this manages. + /** + * GPU level representation and storage this manages. + */ vtkPistonReference *GetReference() { return this->Reference; }; - // Description: - // Shallow/deep copy the data from src into this object. + //@{ + /** + * Shallow/deep copy the data from src into this object. + */ virtual void ShallowCopy(vtkDataObject* src); virtual void DeepCopy(vtkDataObject* src); + //@} - // Description: - // Compute the data bounding box. + /** + * Compute the data bounding box. + */ virtual void ComputeBounds(); - // Description: - // Return a pointer to the geometry bounding box in the form - // (xmin,xmax, ymin,ymax, zmin,zmax). + //@{ + /** + * Return a pointer to the geometry bounding box in the form + * (xmin,xmax, ymin,ymax, zmin,zmax). + */ double *GetBounds(); void GetBounds(double bounds[6]); void SetBounds(const double bounds[6]); + //@} - // Description: + //@{ double *GetOrigin(); void GetOrigin(double origin[3]); void SetOrigin(const double origin[3]); + //@} - // Description: + //@{ double *GetSpacing(); void GetSpacing(double spacing[3]); void SetSpacing(double spacing[3]); + //@} - // Description: - // Get scalars array name + //@{ + /** + * Get scalars array name + */ vtkGetStringMacro(ScalarsArrayName); // Set scalars array name vtkSetStringMacro(ScalarsArrayName); + //@} - // Description: - // Get scalars range - // \NOTE: For now only one scalar is supported in Piston + //@{ + /** + * Get scalars range + * \NOTE: For now only one scalar is supported in Piston + */ double* GetScalarsRange(); void GetScalarsRange(double range[2]); - // Description: - // Set scalars range. + //@} + /** + * Set scalars range. + */ void SetScalarsRange(double range[2]); - // Description: - // Retrieve an instance of this class from an information object. + //@{ + /** + * Retrieve an instance of this class from an information object. + */ static vtkPistonDataObject* GetData(vtkInformation* info); static vtkPistonDataObject* GetData(vtkInformationVector* v, int i=0); + //@} protected: vtkPistonDataObject(); diff --git a/Accelerators/Piston/vtkPistonDataWrangling.h b/Accelerators/Piston/vtkPistonDataWrangling.h index eb4cf1fe965de766d407a8f7f00281da0eb23769..cd0c96082e590381801b1af5c9c015d40580404c 100644 --- a/Accelerators/Piston/vtkPistonDataWrangling.h +++ b/Accelerators/Piston/vtkPistonDataWrangling.h @@ -12,11 +12,14 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkPistonDataWrangling - Miscellaneous conversion code. -// .SECTION Description -// Miscellaneous code that is used in conversion between vtk and piston. -// The vtk_polydata struct is important as that is how piston's polygonal -// results get brought back to the CPU. +/** + * @class vtkPistonDataWrangling + * @brief Miscellaneous conversion code. + * + * Miscellaneous code that is used in conversion between vtk and piston. + * The vtk_polydata struct is important as that is how piston's polygonal + * results get brought back to the CPU. +*/ #ifndef vtkPistonDataWrangling_h #define vtkPistonDataWrangling_h diff --git a/Accelerators/Piston/vtkPistonMapper.h b/Accelerators/Piston/vtkPistonMapper.h index 08e6cd431f07027b6d1861fdf7a175d58eccb4a7..34bd2847e2782a133488730328617e41b0a4ef48 100644 --- a/Accelerators/Piston/vtkPistonMapper.h +++ b/Accelerators/Piston/vtkPistonMapper.h @@ -12,11 +12,14 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkPistonMapper - draws vtkPistonDataObjects to the screen -// .SECTION Description -// vtkPistonMapper is comparable to vtkDataSetMapper for vtkPistonDataObjects. -// The important capability it has is to produce images without bringing -// data back to the CPU. +/** + * @class vtkPistonMapper + * @brief draws vtkPistonDataObjects to the screen + * + * vtkPistonMapper is comparable to vtkDataSetMapper for vtkPistonDataObjects. + * The important capability it has is to produce images without bringing + * data back to the CPU. +*/ #ifndef vtkPistonMapper_h #define vtkPistonMapper_h @@ -38,85 +41,108 @@ public: vtkTypeMacro(vtkPistonMapper,vtkMapper); void PrintSelf(ostream& os, vtkIndent indent); - // Description: - // Manually call this before any cuda filters are created - // to use direct GPU rendering. + /** + * Manually call this before any cuda filters are created + * to use direct GPU rendering. + */ static void InitCudaGL(vtkRenderWindow *rw); - // Description: - // Return true if using cuda interop feature otherwise false. + /** + * Return true if using cuda interop feature otherwise false. + */ inline static bool IsEnabledCudaGL() { return CudaGLInitted; } - // Description: - // A convenience method to reduce code duplication that gets - // the input as the expected type or NULL. + /** + * A convenience method to reduce code duplication that gets + * the input as the expected type or NULL. + */ vtkPistonDataObject *GetPistonDataObjectInput(int port); - // Description: - // Make a shallow copy of this mapper. + /** + * Make a shallow copy of this mapper. + */ void ShallowCopy(vtkAbstractMapper *m); - // Description: - // Method initiates the mapping process. Generally sent by the actor - // as each frame is rendered. + /** + * Method initiates the mapping process. Generally sent by the actor + * as each frame is rendered. + */ virtual void Render(vtkRenderer *ren, vtkActor *a); - // Description: - // Release any graphics resources that are being consumed by this mapper. - // The parameter window could be used to determine which graphic - // resources to release. + /** + * Release any graphics resources that are being consumed by this mapper. + * The parameter window could be used to determine which graphic + * resources to release. + */ virtual void ReleaseGraphicsResources(vtkWindow *) {} - // Description: - // Return bounding box (array of six doubles) of data expressed as - // (xmin,xmax, ymin,ymax, zmin,zmax). + //@{ + /** + * Return bounding box (array of six doubles) of data expressed as + * (xmin,xmax, ymin,ymax, zmin,zmax). + */ virtual double *GetBounds(); virtual void GetBounds(double bounds[6]) {this->vtkAbstractMapper3D::GetBounds(bounds);}; - - // Description: - // WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE - // DO NOT USE THIS METHOD OUTSIDE OF THE RENDERING PROCESS - // Used by vtkHardwareSelector to determine if the prop supports hardware - // selection. + //@} + + /** + * WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE + * DO NOT USE THIS METHOD OUTSIDE OF THE RENDERING PROCESS + * Used by vtkHardwareSelector to determine if the prop supports hardware + * selection. + */ virtual bool GetSupportsSelection() { return false; } - // Description: - // Bring this algorithm's outputs up-to-date. - // Overridden to allow specification on streaming piece. + //@{ + /** + * Bring this algorithm's outputs up-to-date. + * Overridden to allow specification on streaming piece. + */ virtual void Update(); // Use the other overloads of Update. using vtkAlgorithm::Update; + //@} - // Description: - // If you want only a part of the data, specify by setting the piece. + //@{ + /** + * If you want only a part of the data, specify by setting the piece. + */ vtkSetMacro(Piece, int); vtkGetMacro(Piece, int); vtkSetMacro(NumberOfPieces, int); vtkGetMacro(NumberOfPieces, int); + //@} - // Description: - // Set the number of ghost cells to return. + //@{ + /** + * Set the number of ghost cells to return. + */ vtkSetMacro(GhostLevel, int); vtkGetMacro(GhostLevel, int); + //@} protected: vtkPistonMapper(); ~vtkPistonMapper(); - // Description: - // Overridden to say that we take in vtkPistonDataObjects + /** + * Overridden to say that we take in vtkPistonDataObjects + */ virtual int FillInputPortInformation(int port, vtkInformation* info); - // Description: - // Internal render methods + //@{ + /** + * Internal render methods + */ void RenderOnCPU(); void RenderOnGPU(); void RenderImageDataOutline(); + //@} int Piece; int NumberOfPieces; @@ -126,8 +152,9 @@ private: vtkPistonMapper(const vtkPistonMapper&) VTK_DELETE_FUNCTION; void operator=(const vtkPistonMapper&) VTK_DELETE_FUNCTION; - // Description: - // Allocates buffers that are shared between CUDA and GL + /** + * Allocates buffers that are shared between CUDA and GL + */ void PrepareDirectRenderBuffers(int nPoints); static bool CudaGLInitted; diff --git a/Accelerators/Piston/vtkPistonMinMax.h b/Accelerators/Piston/vtkPistonMinMax.h index cd1ef4e29430134521c70157b930ea5102821c38..602228ce180e6a9c95805b66776a03af39ba490f 100644 --- a/Accelerators/Piston/vtkPistonMinMax.h +++ b/Accelerators/Piston/vtkPistonMinMax.h @@ -12,10 +12,13 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkPistonMinMax - computes scalar range on GPU for mapper -// .SECTION Description -// Used in vtkPistonMapper to determine data range as part of color mapping -// process. +/** + * @class vtkPistonMinMax + * @brief computes scalar range on GPU for mapper + * + * Used in vtkPistonMapper to determine data range as part of color mapping + * process. +*/ #ifndef vtkPistonMinMax_h #define vtkPistonMinMax_h diff --git a/Accelerators/Piston/vtkPistonReference.h b/Accelerators/Piston/vtkPistonReference.h index 086693fcc960d2d4cc2709b0faf1488b31e06a10..5a6f13ec2364d3c085cd930be5b3e30e52c498ef 100644 --- a/Accelerators/Piston/vtkPistonReference.h +++ b/Accelerators/Piston/vtkPistonReference.h @@ -12,18 +12,21 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkPistonReference - Lower level handle on GPU resident data. -// -// .SECTION Description -// This class is internal storage for the vtkPistonDataObject class. -// Essentially this is just a handle, in the form of an opaque void -// pointer, with enough contextual information to determine what is -// actually pointed to in order for to cast it back into a usable form. -// The .cu files use this directly instead of vtkPistonDataObject -// to keep the GPU/CPU code conceptually distinct. -// -// .SECTION See Also -// vtkPistonDataObject +/** + * @class vtkPistonReference + * @brief Lower level handle on GPU resident data. + * + * + * This class is internal storage for the vtkPistonDataObject class. + * Essentially this is just a handle, in the form of an opaque void + * pointer, with enough contextual information to determine what is + * actually pointed to in order for to cast it back into a usable form. + * The .cu files use this directly instead of vtkPistonDataObject + * to keep the GPU/CPU code conceptually distinct. + * + * @sa + * vtkPistonDataObject +*/ #ifndef vtkPistonReference_h #define vtkPistonReference_h diff --git a/Accelerators/Piston/vtkPistonScalarsColors.h b/Accelerators/Piston/vtkPistonScalarsColors.h index b263b17b2dbbb644f89a987627b2ed1bf4b98eed..1c700907df91318d58e027eac131f3ba31ee43c6 100644 --- a/Accelerators/Piston/vtkPistonScalarsColors.h +++ b/Accelerators/Piston/vtkPistonScalarsColors.h @@ -12,11 +12,14 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkPistonScalarsColors - Color Mapping for piston results. -// -// .SECTION Description -// vtkPistonMapper uses this class to interface vtkScalarsToColors to GPU -// side code that implements color mapping. +/** + * @class vtkPistonScalarsColors + * @brief Color Mapping for piston results. + * + * + * vtkPistonMapper uses this class to interface vtkScalarsToColors to GPU + * side code that implements color mapping. +*/ #ifndef vtkPistonScalarsColors_h #define vtkPistonScalarsColors_h @@ -33,47 +36,60 @@ class VTKACCELERATORSPISTON_EXPORT vtkPistonScalarsColors : public vtkObject public: vtkTypeMacro(vtkPistonScalarsColors, vtkObject); - // Description: - // Create an object with Debug turned off, modified time initialized - // to zero, and reference counting on. + /** + * Create an object with Debug turned off, modified time initialized + * to zero, and reference counting on. + */ static vtkPistonScalarsColors *New(); - // Description: - // Methods invoked by print to print information about the object - // including superclasses. Typically not called by the user (use - // Print() instead) but used in the hierarchical print process to - // combine the output of several classes. + /** + * Methods invoked by print to print information about the object + * including superclasses. Typically not called by the user (use + * Print() instead) but used in the hierarchical print process to + * combine the output of several classes. + */ virtual void PrintSelf(ostream &os, vtkIndent indent); - // Description: - // Set number of distinct color values + //@{ + /** + * Set number of distinct color values + */ vtkSetMacro(NumberOfValues, int); // Get number of distinct color values vtkGetMacro(NumberOfValues, int); - - // Description: - // Set/Get the minimum/maximum scalar values for scalar mapping. Scalar - // values less than minimum range value are clamped to minimum range value. - // Scalar values greater than maximum range value are clamped to maximum - // range value. + //@} + + //@{ + /** + * Set/Get the minimum/maximum scalar values for scalar mapping. Scalar + * values less than minimum range value are clamped to minimum range value. + * Scalar values greater than maximum range value are clamped to maximum + * range value. + */ void SetTableRange(double range[2]); virtual void SetTableRange(double rmin, double rmax); vtkGetVectorMacro(TableRange, double, 2); + //@} - // Description: - // Set lookup table to be used to map scalars to colors + //@{ + /** + * Set lookup table to be used to map scalars to colors + */ virtual void SetLookupTable(vtkScalarsToColors *); vtkGetObjectMacro(LookupTable, vtkScalarsToColors); + //@} - // Description: - // Compute scalars to colors as unsigned char. Size of the vector returned - // will be NumberOfValues * numberOfChanels + /** + * Compute scalars to colors as unsigned char. Size of the vector returned + * will be NumberOfValues * numberOfChanels + */ virtual std::vector* ComputeScalarsColors( int numberOfChanels); - // Description: - // Compute scalars to colors as floats. Size of the vector returned - // will be NumberOfValues * numberOfChanels + /** + * Compute scalars to colors as floats. Size of the vector returned + * will be NumberOfValues * numberOfChanels + */ virtual std::vector* ComputeScalarsColorsf(int numberOfChanels); @@ -81,8 +97,9 @@ protected: vtkPistonScalarsColors(); ~vtkPistonScalarsColors(); - // Description: - // Internal helper method + /** + * Internal helper method + */ void ComputeValues(float *values); double TableRange[2]; diff --git a/Accelerators/Piston/vtkPistonSlice.h b/Accelerators/Piston/vtkPistonSlice.h index dbd593f3692c3eb8620626ee532ef8844f845f03..fe4fb84ccbf83dcf989e371ef4d85c0f6d92d5aa 100644 --- a/Accelerators/Piston/vtkPistonSlice.h +++ b/Accelerators/Piston/vtkPistonSlice.h @@ -12,9 +12,12 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkPistonSlice - A filter that slices on the GPU -// .SECTION Description -// This filter uses LANL's Piston library to slice on the GPU. +/** + * @class vtkPistonSlice + * @brief A filter that slices on the GPU + * + * This filter uses LANL's Piston library to slice on the GPU. +*/ #ifndef vtkPistonSlice_h #define vtkPistonSlice_h @@ -30,13 +33,17 @@ public: static vtkPistonSlice *New(); void PrintSelf(ostream& os, vtkIndent indent); - //Description: - //An offset from the plane to slice at. + //@{ + /** + * An offset from the plane to slice at. + */ vtkSetMacro(Offset, float); vtkGetMacro(Offset, float); + //@} - // Description: - // Set the clipping plane. + /** + * Set the clipping plane. + */ void SetClippingPlane( vtkPlane * plane ); protected: @@ -48,8 +55,9 @@ protected: vtkInformationVector* outputVector, int requestFromOutputPort, vtkMTimeType* mtime); - // Description: - // Method that does the actual calculation. + /** + * Method that does the actual calculation. + */ virtual int RequestData(vtkInformation* request, vtkInformationVector** inputVector, vtkInformationVector* outputVector); diff --git a/Accelerators/Piston/vtkPistonSort.h b/Accelerators/Piston/vtkPistonSort.h index 29060bf344ef67caf8573bb6cbe89099549cf63b..c869dabb06a8d70bc3553127185473f9e3d8bf3a 100644 --- a/Accelerators/Piston/vtkPistonSort.h +++ b/Accelerators/Piston/vtkPistonSort.h @@ -12,13 +12,16 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkPistonSort - NVidia thrust filter example. -// .SECTION Description -// An example filter that operates on the GPU and produces a result that -// can be processed by another piston filter in the pipeline. -// The implementation simply calls thrust::sort on the scalar array which -// keeps the same data type while producing a result which is verifiably -// correct. +/** + * @class vtkPistonSort + * @brief NVidia thrust filter example. + * + * An example filter that operates on the GPU and produces a result that + * can be processed by another piston filter in the pipeline. + * The implementation simply calls thrust::sort on the scalar array which + * keeps the same data type while producing a result which is verifiably + * correct. +*/ #ifndef vtkPistonSort_h #define vtkPistonSort_h @@ -36,8 +39,9 @@ protected: vtkPistonSort() {VTK_LEGACY_BODY(vtkPistonSort::vtkPistonSort, "VTK 6.3");} ~vtkPistonSort() {} - // Description: - // Method that does the actual calculation. + /** + * Method that does the actual calculation. + */ virtual int RequestData(vtkInformation* request, vtkInformationVector** inputVector, vtkInformationVector* outputVector); diff --git a/Accelerators/Piston/vtkPistonThreshold.h b/Accelerators/Piston/vtkPistonThreshold.h index 8638a597889ec71584e1ffea98e3813a3ad820d7..6ce3a863ea4a995b84725ff7fa3b42b13ddf072b 100644 --- a/Accelerators/Piston/vtkPistonThreshold.h +++ b/Accelerators/Piston/vtkPistonThreshold.h @@ -12,9 +12,12 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkPistonThreshold - A filter that contours on the GPU -// .SECTION Description -// This filter uses LANL's Piston library to isocontour on the GPU. +/** + * @class vtkPistonThreshold + * @brief A filter that contours on the GPU + * + * This filter uses LANL's Piston library to isocontour on the GPU. +*/ #ifndef vtkPistonThreshold_h #define vtkPistonThreshold_h @@ -28,21 +31,28 @@ public: static vtkPistonThreshold *New(); void PrintSelf(ostream& os, vtkIndent indent); - //Description: - //Choose the lower value of the threshold. + //@{ + /** + * Choose the lower value of the threshold. + */ vtkSetMacro(MinValue, float); vtkGetMacro(MinValue, float); + //@} - //Description: - //Choose the upper value of the threshold. + //@{ + /** + * Choose the upper value of the threshold. + */ vtkSetMacro(MaxValue, float); vtkGetMacro(MaxValue, float); protected: vtkPistonThreshold(); ~vtkPistonThreshold(); + //@} - // Description: - // Method that does the actual calculation. + /** + * Method that does the actual calculation. + */ virtual int RequestData(vtkInformation* request, vtkInformationVector** inputVector, vtkInformationVector* outputVector); diff --git a/Accelerators/Piston/vtkPistonToDataSet.h b/Accelerators/Piston/vtkPistonToDataSet.h index 7a4bb8184ad10f91181b97c02ab055ecd305b664..61a5758e15b14fa85d2ba3ecaef5718b7f5eea8b 100644 --- a/Accelerators/Piston/vtkPistonToDataSet.h +++ b/Accelerators/Piston/vtkPistonToDataSet.h @@ -12,14 +12,17 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkPistonToDataSet - converts a PistonDataObject to a DataSet -// .SECTION Description -// Converts piston data that resides on the GPU into a vtkDataSet that -// resides on the CPU. After bringing piston results back to the CPU they -// can be processed abitrarily there with standard vtkAlgorithms. -// -// .SECTION See Also -// vtkDataSetToPiston +/** + * @class vtkPistonToDataSet + * @brief converts a PistonDataObject to a DataSet + * + * Converts piston data that resides on the GPU into a vtkDataSet that + * resides on the CPU. After bringing piston results back to the CPU they + * can be processed abitrarily there with standard vtkAlgorithms. + * + * @sa + * vtkDataSetToPiston +*/ #ifndef vtkPistonToDataSet_h #define vtkPistonToDataSet_h @@ -35,35 +38,42 @@ public: vtkTypeMacro(vtkPistonToDataSet,vtkPistonAlgorithm); void PrintSelf(ostream& os, vtkIndent indent); - // Description: - // Changes the output data set type. - // Range of allowable values are defined in vtkType.h - // At the moment only VTK_IMAGE_DATA and VTK_POLY_DATA from those are - // implemented. + //@{ + /** + * Changes the output data set type. + * Range of allowable values are defined in vtkType.h + * At the moment only VTK_IMAGE_DATA and VTK_POLY_DATA from those are + * implemented. + */ vtkSetMacro(OutputDataSetType, int); vtkGetMacro(OutputDataSetType, int); + //@} - // Description: - // A convenience method to reduce code duplication that gets - // the output as the expected type or NULL. + /** + * A convenience method to reduce code duplication that gets + * the output as the expected type or NULL. + */ vtkDataSet *GetDataSetOutput(int port); protected: vtkPistonToDataSet(); ~vtkPistonToDataSet(); - // Description: - // Overridden to say that we produce vtkDataSet + /** + * Overridden to say that we produce vtkDataSet + */ virtual int FillOutputPortInformation(int, vtkInformation*); - // Description: - // Overriden to create whatever output data set type is selected. + /** + * Overriden to create whatever output data set type is selected. + */ virtual int RequestDataObject(vtkInformation* request, vtkInformationVector** inputVector, vtkInformationVector* outputVector); - // Description: - // Method that does the actual calculation. + /** + * Method that does the actual calculation. + */ virtual int RequestData(vtkInformation* request, vtkInformationVector** inputVector, vtkInformationVector* outputVector); diff --git a/Charts/Core/vtkAxis.h b/Charts/Core/vtkAxis.h index 4cf7f852115bd8dfac3b04ecdde639ca92d9aaed..b5bb5255c1701a81ef2add1aa98737b64172cb6d 100644 --- a/Charts/Core/vtkAxis.h +++ b/Charts/Core/vtkAxis.h @@ -13,37 +13,40 @@ =========================================================================*/ -// .NAME vtkAxis - takes care of drawing 2D axes -// -// .SECTION Description -// The vtkAxis is drawn in screen coordinates. It is usually one of the last -// elements of a chart to be drawn. It renders the axis label, tick marks and -// tick labels. -// The tick marks and labels span the range of values between -// \a Minimum and \a Maximum. -// The \a Minimum and \a Maximum values are not allowed to extend beyond the -// \a MinimumLimit and \a MaximumLimit values, respectively. -// -// Note that many other chart elements (e.g., vtkPlotPoints) refer to -// vtkAxis instances to determine how to scale raw data for presentation. -// In particular, care must be taken with logarithmic scaling. -// The axis Minimum, Maximum, and Limit values are stored both unscaled -// and scaled (with log(x) applied when GetLogScaleActive() returns true). -// User interfaces will most likely present the unscaled values as they -// represent the values provided by the user. -// Other chart elements may need the scaled values in order to draw -// in the same coordinate system. -// -// Just because LogScale is set to true does not guarantee that the axis -// will use logarithmic scaling -- the Minimum and Maximum values for the -// axis must both lie to the same side of origin (and not include the origin). -// Also, this switch from linear- to log-scaling may occur during a rendering -// pass if autoscaling is enabled. -// Because the log and pow functions are not invertible and the axis itself -// decides when to switch between them without offering any external class -// managing the axis a chance to save the old values, it saves -// old Limit values in NonLogUnscaled{Min,Max}Limit so that behavior is -// consistent when LogScale is changed from false to true and back again. +/** + * @class vtkAxis + * @brief takes care of drawing 2D axes + * + * + * The vtkAxis is drawn in screen coordinates. It is usually one of the last + * elements of a chart to be drawn. It renders the axis label, tick marks and + * tick labels. + * The tick marks and labels span the range of values between + * \a Minimum and \a Maximum. + * The \a Minimum and \a Maximum values are not allowed to extend beyond the + * \a MinimumLimit and \a MaximumLimit values, respectively. + * + * Note that many other chart elements (e.g., vtkPlotPoints) refer to + * vtkAxis instances to determine how to scale raw data for presentation. + * In particular, care must be taken with logarithmic scaling. + * The axis Minimum, Maximum, and Limit values are stored both unscaled + * and scaled (with log(x) applied when GetLogScaleActive() returns true). + * User interfaces will most likely present the unscaled values as they + * represent the values provided by the user. + * Other chart elements may need the scaled values in order to draw + * in the same coordinate system. + * + * Just because LogScale is set to true does not guarantee that the axis + * will use logarithmic scaling -- the Minimum and Maximum values for the + * axis must both lie to the same side of origin (and not include the origin). + * Also, this switch from linear- to log-scaling may occur during a rendering + * pass if autoscaling is enabled. + * Because the log and pow functions are not invertible and the axis itself + * decides when to switch between them without offering any external class + * managing the axis a chance to save the old values, it saves + * old Limit values in NonLogUnscaled{Min,Max}Limit so that behavior is + * consistent when LogScale is changed from false to true and back again. +*/ #ifndef vtkAxis_h #define vtkAxis_h @@ -68,9 +71,10 @@ public: vtkTypeMacro(vtkAxis, vtkContextItem); virtual void PrintSelf(ostream &os, vtkIndent indent); - // Description: - // Enumeration of the axis locations in a conventional XY chart. Other - // layouts are possible. + /** + * Enumeration of the axis locations in a conventional XY chart. Other + * layouts are possible. + */ enum Location { LEFT = 0, BOTTOM, @@ -84,222 +88,323 @@ public: TICK_WILKINSON_EXTENDED }; - // Description: - // Creates a 2D Chart object. + /** + * Creates a 2D Chart object. + */ static vtkAxis *New(); - // Description: - // Get/set the position of the axis (LEFT, BOTTOM, RIGHT, TOP, PARALLEL). + //@{ + /** + * Get/set the position of the axis (LEFT, BOTTOM, RIGHT, TOP, PARALLEL). + */ virtual void SetPosition(int position); vtkGetMacro(Position, int); + //@} - // Description: - // Set point 1 of the axis (in pixels), this is usually the origin. + //@{ + /** + * Set point 1 of the axis (in pixels), this is usually the origin. + */ void SetPoint1(const vtkVector2f& pos); void SetPoint1(float x, float y); + //@} - // Description: - // Get point 1 of the axis (in pixels), this is usually the origin. + //@{ + /** + * Get point 1 of the axis (in pixels), this is usually the origin. + */ vtkGetVector2Macro(Point1, float); vtkVector2f GetPosition1(); + //@} - // Description: - // Set point 2 of the axis (in pixels), this is usually the terminus. + //@{ + /** + * Set point 2 of the axis (in pixels), this is usually the terminus. + */ void SetPoint2(const vtkVector2f& pos); void SetPoint2(float x, float y); + //@} - // Description: - // Get point 2 of the axis (in pixels), this is usually the terminus. + //@{ + /** + * Get point 2 of the axis (in pixels), this is usually the terminus. + */ vtkGetVector2Macro(Point2, float); vtkVector2f GetPosition2(); + //@} - // Description: - // Set the number of tick marks for this axis. Default is -1, which leads to - // automatic calculation of nicely spaced tick marks. + /** + * Set the number of tick marks for this axis. Default is -1, which leads to + * automatic calculation of nicely spaced tick marks. + */ virtual void SetNumberOfTicks(int numberOfTicks); - // Description: - // Get the number of tick marks for this axis. + //@{ + /** + * Get the number of tick marks for this axis. + */ vtkGetMacro(NumberOfTicks, int); + //@} - // Description: - // Get the vtkTextProperty that governs how the axis lables are displayed. - // Note that the alignment properties are not used. + //@{ + /** + * Get the vtkTextProperty that governs how the axis lables are displayed. + * Note that the alignment properties are not used. + */ vtkGetObjectMacro(LabelProperties, vtkTextProperty); + //@} - // Description: - // Set the logical minimum value of the axis, in plot coordinates. - // If LogScaleActive is true (not just LogScale), then this - // sets the minimum base-10 exponent. + /** + * Set the logical minimum value of the axis, in plot coordinates. + * If LogScaleActive is true (not just LogScale), then this + * sets the minimum base-10 exponent. + */ virtual void SetMinimum(double minimum); - // Description: - // Get the logical minimum value of the axis, in plot coordinates. - // If LogScaleActive is true (not just LogScale), then this - // returns the minimum base-10 exponent. + //@{ + /** + * Get the logical minimum value of the axis, in plot coordinates. + * If LogScaleActive is true (not just LogScale), then this + * returns the minimum base-10 exponent. + */ vtkGetMacro(Minimum, double); + //@} - // Description: - // Set the logical maximum value of the axis, in plot coordinates. - // If LogScaleActive is true (not just LogScale), then this - // sets the maximum base-10 exponent. + /** + * Set the logical maximum value of the axis, in plot coordinates. + * If LogScaleActive is true (not just LogScale), then this + * sets the maximum base-10 exponent. + */ virtual void SetMaximum(double maximum); - // Description: - // Get the logical maximum value of the axis, in plot coordinates. - // If LogScaleActive is true (not just LogScale), then this - // returns the maximum base-10 exponent. + //@{ + /** + * Get the logical maximum value of the axis, in plot coordinates. + * If LogScaleActive is true (not just LogScale), then this + * returns the maximum base-10 exponent. + */ vtkGetMacro(Maximum, double); + //@} - // Description: - // Set the logical, unscaled minimum value of the axis, in plot coordinates. - // Use this instead of SetMinimum() if you wish to provide the actual minimum - // instead of log10(the minimum) as part of the axis scale. + /** + * Set the logical, unscaled minimum value of the axis, in plot coordinates. + * Use this instead of SetMinimum() if you wish to provide the actual minimum + * instead of log10(the minimum) as part of the axis scale. + */ virtual void SetUnscaledMinimum(double minimum); - // Description: - // Get the logical minimum value of the axis, in plot coordinates. + //@{ + /** + * Get the logical minimum value of the axis, in plot coordinates. + */ vtkGetMacro(UnscaledMinimum, double); + //@} - // Description: - // Set the logical maximum value of the axis, in plot coordinates. + /** + * Set the logical maximum value of the axis, in plot coordinates. + */ virtual void SetUnscaledMaximum(double maximum); - // Description: - // Get the logical maximum value of the axis, in plot coordinates. + //@{ + /** + * Get the logical maximum value of the axis, in plot coordinates. + */ vtkGetMacro(UnscaledMaximum, double); - - // Description: - // Set the logical range of the axis, in plot coordinates. - // - // The unscaled range will always be in the same coordinate system of - // the data being plotted, regardless of whether LogScale is true or false. - // When calling SetRange() and LogScale is true, the range must be specified - // in logarithmic coordinates. - // Using SetUnscaledRange(), you may ignore the value of LogScale. + //@} + + //@{ + /** + * Set the logical range of the axis, in plot coordinates. + + * The unscaled range will always be in the same coordinate system of + * the data being plotted, regardless of whether LogScale is true or false. + * When calling SetRange() and LogScale is true, the range must be specified + * in logarithmic coordinates. + * Using SetUnscaledRange(), you may ignore the value of LogScale. + */ virtual void SetRange(double minimum, double maximum); virtual void SetRange(double range[2]); virtual void SetUnscaledRange(double minimum, double maximum); virtual void SetUnscaledRange(double range[2]); + //@} + + //@{ + /** + * Get the logical range of the axis, in plot coordinates. - // Description: - // Get the logical range of the axis, in plot coordinates. - // - // The unscaled range will always be in the same coordinate system of - // the data being plotted, regardless of whether LogScale is true or false. - // Calling GetRange() when LogScale is true will return the log10({min, max}). + * The unscaled range will always be in the same coordinate system of + * the data being plotted, regardless of whether LogScale is true or false. + * Calling GetRange() when LogScale is true will return the log10({min, max}). + */ virtual void GetRange(double *range); virtual void GetUnscaledRange(double *range); + //@} - // Description: - // Set the logical lowest possible value for \a Minimum, in plot coordinates. + /** + * Set the logical lowest possible value for \a Minimum, in plot coordinates. + */ virtual void SetMinimumLimit(double lowest); - // Description: - // Get the logical lowest possible value for \a Minimum, in plot coordinates. + //@{ + /** + * Get the logical lowest possible value for \a Minimum, in plot coordinates. + */ vtkGetMacro(MinimumLimit, double); + //@} - // Description: - // Set the logical highest possible value for \a Maximum, in plot coordinates. + /** + * Set the logical highest possible value for \a Maximum, in plot coordinates. + */ virtual void SetMaximumLimit(double highest); - // Description: - // Get the logical highest possible value for \a Maximum, in plot coordinates. + //@{ + /** + * Get the logical highest possible value for \a Maximum, in plot coordinates. + */ vtkGetMacro(MaximumLimit, double); + //@} - // Description: - // Set the logical lowest possible value for \a Minimum, in plot coordinates. + /** + * Set the logical lowest possible value for \a Minimum, in plot coordinates. + */ virtual void SetUnscaledMinimumLimit(double lowest); - // Description: - // Get the logical lowest possible value for \a Minimum, in plot coordinates. + //@{ + /** + * Get the logical lowest possible value for \a Minimum, in plot coordinates. + */ vtkGetMacro(UnscaledMinimumLimit, double); + //@} - // Description: - // Set the logical highest possible value for \a Maximum, in plot coordinates. + /** + * Set the logical highest possible value for \a Maximum, in plot coordinates. + */ virtual void SetUnscaledMaximumLimit(double highest); - // Description: - // Get the logical highest possible value for \a Maximum, in plot coordinates. + //@{ + /** + * Get the logical highest possible value for \a Maximum, in plot coordinates. + */ vtkGetMacro(UnscaledMaximumLimit, double); + //@} - // Description: - // Get the margins of the axis, in pixels. + //@{ + /** + * Get the margins of the axis, in pixels. + */ vtkGetVector2Macro(Margins, int); + //@} - // Description: - // Set the margins of the axis, in pixels. + //@{ + /** + * Set the margins of the axis, in pixels. + */ vtkSetVector2Macro(Margins, int); + //@} - // Description: - // Get/set the title text of the axis. + //@{ + /** + * Get/set the title text of the axis. + */ virtual void SetTitle(const vtkStdString &title); virtual vtkStdString GetTitle(); + //@} - // Description: - // Get the vtkTextProperty that governs how the axis title is displayed. + //@{ + /** + * Get the vtkTextProperty that governs how the axis title is displayed. + */ vtkGetObjectMacro(TitleProperties, vtkTextProperty); - - // Description: - // Get whether the axis is using a log scale. - // This will always be false when LogScale is false. - // It is only true when LogScale is true and the \a UnscaledRange - // does not cross or include the origin (zero). - // - // The limits (\a MinimumLimit, \a MaximumLimit, and their - // unscaled counterparts) do not prevent LogScaleActive from becoming - // true; they are adjusted if they cross or include the origin - // and the original limits are preserved for when LogScaleActive - // becomes false again. + //@} + + //@{ + /** + * Get whether the axis is using a log scale. + * This will always be false when LogScale is false. + * It is only true when LogScale is true and the \a UnscaledRange + * does not cross or include the origin (zero). + + * The limits (\a MinimumLimit, \a MaximumLimit, and their + * unscaled counterparts) do not prevent LogScaleActive from becoming + * true; they are adjusted if they cross or include the origin + * and the original limits are preserved for when LogScaleActive + * becomes false again. + */ vtkGetMacro(LogScaleActive, bool); + //@} + + //@{ + /** + * Get/set whether the axis should attempt to use a log scale. - // Description: - // Get/set whether the axis should attempt to use a log scale. - // - // The default is false. - // \sa{LogScaleActive}. + * The default is false. + * \sa{LogScaleActive}. + */ vtkGetMacro(LogScale, bool); virtual void SetLogScale(bool logScale); vtkBooleanMacro(LogScale,bool); + //@} - // Description: - // Get/set whether the axis grid lines should be drawn, default is true. + //@{ + /** + * Get/set whether the axis grid lines should be drawn, default is true. + */ vtkSetMacro(GridVisible, bool); vtkGetMacro(GridVisible, bool); + //@} - // Description: - // Get/set whether the axis labels should be visible. + //@{ + /** + * Get/set whether the axis labels should be visible. + */ vtkSetMacro(LabelsVisible, bool); vtkGetMacro(LabelsVisible, bool); + //@} - // Description: - // Get/set whether the labels for the range should be visible. + //@{ + /** + * Get/set whether the labels for the range should be visible. + */ vtkSetMacro(RangeLabelsVisible, bool); vtkGetMacro(RangeLabelsVisible, bool); + //@} - // Description: - // Get/set the offset (in pixels) of the label text position from the axis + //@{ + /** + * Get/set the offset (in pixels) of the label text position from the axis + */ vtkSetMacro(LabelOffset, float); vtkGetMacro(LabelOffset, float); + //@} - // Description: - // Get/set whether the tick marks should be visible. + //@{ + /** + * Get/set whether the tick marks should be visible. + */ vtkSetMacro(TicksVisible, bool); vtkGetMacro(TicksVisible, bool); + //@} - // Description: - // Get/set whether the axis line should be visible. + //@{ + /** + * Get/set whether the axis line should be visible. + */ vtkSetMacro(AxisVisible, bool); vtkGetMacro(AxisVisible, bool); + //@} - // Description: - // Get/set the numerical precision to use, default is 2. This is ignored - // when Notation is STANDARD_NOTATION or PRINTF_NOTATION. + //@{ + /** + * Get/set the numerical precision to use, default is 2. This is ignored + * when Notation is STANDARD_NOTATION or PRINTF_NOTATION. + */ virtual void SetPrecision(int precision); vtkGetMacro(Precision, int); + //@} - // Description: - // Enumeration of the axis notations available. + /** + * Enumeration of the axis notations available. + */ enum { STANDARD_NOTATION = 0, SCIENTIFIC_NOTATION, @@ -307,198 +412,243 @@ public: PRINTF_NOTATION }; - // Description: - // Get/Set the printf-style format string used when TickLabelAlgorithm is - // TICK_SIMPLE and Notation is PRINTF_NOTATION. The default is "%g". + //@{ + /** + * Get/Set the printf-style format string used when TickLabelAlgorithm is + * TICK_SIMPLE and Notation is PRINTF_NOTATION. The default is "%g". + */ virtual void SetLabelFormat(const std::string &fmt); vtkGetMacro(LabelFormat, std::string); - - // Description: - // Get/Set the printf-style format string used for range labels. - // This format is always used regardless of TickLabelAlgorithm and - // Notation. Default is "%g". + //@} + + //@{ + /** + * Get/Set the printf-style format string used for range labels. + * This format is always used regardless of TickLabelAlgorithm and + * Notation. Default is "%g". + */ vtkSetMacro(RangeLabelFormat, std::string); vtkGetMacro(RangeLabelFormat, std::string); - - // Description: - // Get/set the numerical notation, standard, scientific, fixed, or a - // printf-style format string. - // \sa SetPrecision SetLabelFormat + //@} + + //@{ + /** + * Get/set the numerical notation, standard, scientific, fixed, or a + * printf-style format string. + * \sa SetPrecision SetLabelFormat + */ virtual void SetNotation(int notation); vtkGetMacro(Notation, int); + //@} - // Description: - // Enumeration of the axis behaviors. + /** + * Enumeration of the axis behaviors. + */ enum { AUTO = 0, // Automatically scale the axis to view all data that is visible. FIXED, // Use a fixed axis range and make no attempt to rescale. CUSTOM // Deprecated, use the tick label settings instead. }; - // Description: - // Get/set the behavior of the axis (auto or fixed). The default is 0 (auto). + //@{ + /** + * Get/set the behavior of the axis (auto or fixed). The default is 0 (auto). + */ vtkSetMacro(Behavior, int); vtkGetMacro(Behavior, int); + //@} - // Description: - // Get a pointer to the vtkPen object that controls the way this axis is drawn. + //@{ + /** + * Get a pointer to the vtkPen object that controls the way this axis is drawn. + */ vtkGetObjectMacro(Pen, vtkPen); + //@} - // Description: - // Get a pointer to the vtkPen object that controls the way this axis is drawn. + //@{ + /** + * Get a pointer to the vtkPen object that controls the way this axis is drawn. + */ vtkGetObjectMacro(GridPen, vtkPen); - - // Description: - // Get/set the tick label algorithm that is used to calculate the min, max - // and tick spacing. There are currently two algoriths, vtkAxis::TICK_SIMPLE - // is the default and uses a simple algorithm. The second option is - // vtkAxis::TICK_WILKINSON which uses an extended Wilkinson algorithm to find - // the optimal range, spacing and font parameters. + //@} + + //@{ + /** + * Get/set the tick label algorithm that is used to calculate the min, max + * and tick spacing. There are currently two algoriths, vtkAxis::TICK_SIMPLE + * is the default and uses a simple algorithm. The second option is + * vtkAxis::TICK_WILKINSON which uses an extended Wilkinson algorithm to find + * the optimal range, spacing and font parameters. + */ vtkSetMacro(TickLabelAlgorithm, int) vtkGetMacro(TickLabelAlgorithm, int) + //@} - // Description: - // Get/set the scaling factor used for the axis, this defaults to 1.0 (no - // scaling), and is used to coordinate scaling with the plots, charts, etc. + //@{ + /** + * Get/set the scaling factor used for the axis, this defaults to 1.0 (no + * scaling), and is used to coordinate scaling with the plots, charts, etc. + */ vtkSetMacro(ScalingFactor, double) vtkGetMacro(ScalingFactor, double) vtkSetMacro(Shift, double) vtkGetMacro(Shift, double) + //@} - // Description: - // Update the geometry of the axis. Takes care of setting up the tick mark - // locations etc. Should be called by the scene before rendering. + /** + * Update the geometry of the axis. Takes care of setting up the tick mark + * locations etc. Should be called by the scene before rendering. + */ virtual void Update(); - // Description: - // Paint event for the axis, called whenever the axis needs to be drawn. + /** + * Paint event for the axis, called whenever the axis needs to be drawn. + */ virtual bool Paint(vtkContext2D *painter); - // Description: - // Use this function to autoscale the axes after setting the minimum and - // maximum values. This will cause the axes to select the nicest numbers - // that enclose the minimum and maximum values, and to select an appropriate - // number of tick marks. + /** + * Use this function to autoscale the axes after setting the minimum and + * maximum values. This will cause the axes to select the nicest numbers + * that enclose the minimum and maximum values, and to select an appropriate + * number of tick marks. + */ virtual void AutoScale(); - // Description: - // Recalculate the spacing of the tick marks - typically useful to do after - // scaling the axis. + /** + * Recalculate the spacing of the tick marks - typically useful to do after + * scaling the axis. + */ virtual void RecalculateTickSpacing(); - // Description: - // An array with the positions of the tick marks along the axis line. - // The positions are specified in the plot coordinates of the axis. + /** + * An array with the positions of the tick marks along the axis line. + * The positions are specified in the plot coordinates of the axis. + */ virtual vtkDoubleArray* GetTickPositions(); - // Description: - // An array with the positions of the tick marks along the axis line. - // The positions are specified in scene coordinates. + /** + * An array with the positions of the tick marks along the axis line. + * The positions are specified in scene coordinates. + */ virtual vtkFloatArray* GetTickScenePositions(); - // Description: - // A string array containing the tick labels for the axis. + /** + * A string array containing the tick labels for the axis. + */ virtual vtkStringArray* GetTickLabels(); - // Description: - // Set the tick positions, and optionally custom tick labels. If the labels - // and positions are null then automatic tick labels will be assigned. If - // only positions are supplied then appropriate labels will be generated - // according to the axis settings. If positions and labels are supplied they - // must be of the same length. Returns true on success, false on failure. + /** + * Set the tick positions, and optionally custom tick labels. If the labels + * and positions are null then automatic tick labels will be assigned. If + * only positions are supplied then appropriate labels will be generated + * according to the axis settings. If positions and labels are supplied they + * must be of the same length. Returns true on success, false on failure. + */ virtual bool SetCustomTickPositions(vtkDoubleArray* positions, vtkStringArray* labels = 0); - // Description: - // Request the space the axes require to be drawn. This is returned as a - // vtkRectf, with the corner being the offset from Point1, and the width/ - // height being the total width/height required by the axis. In order to - // ensure the numbers are correct, Update() should be called on the axis. + /** + * Request the space the axes require to be drawn. This is returned as a + * vtkRectf, with the corner being the offset from Point1, and the width/ + * height being the total width/height required by the axis. In order to + * ensure the numbers are correct, Update() should be called on the axis. + */ vtkRectf GetBoundingRect(vtkContext2D* painter); - // Description: - // Return a "nice number", often defined as 1, 2 or 5. If roundUp is true then - // the nice number will be rounded up, false it is rounded down. The supplied - // number should be between 0.0 and 9.9. + /** + * Return a "nice number", often defined as 1, 2 or 5. If roundUp is true then + * the nice number will be rounded up, false it is rounded down. The supplied + * number should be between 0.0 and 9.9. + */ static double NiceNumber(double number, bool roundUp); - // Description: - // Static function to calculate "nice" minimum, maximum, and tick spacing - // values. + /** + * Static function to calculate "nice" minimum, maximum, and tick spacing + * values. + */ static double NiceMinMax(double &min, double &max, float pixelRange, float tickPixelSpacing); - // Description: - // Generate a single label using the current settings when TickLabelAlgorithm - // is TICK_SIMPLE. + /** + * Generate a single label using the current settings when TickLabelAlgorithm + * is TICK_SIMPLE. + */ vtkStdString GenerateSimpleLabel(double val); protected: vtkAxis(); ~vtkAxis(); - // Description: - // Update whether log scaling will be used for layout and rendering. - // - // Log scaling is only active when LogScaling is true and the closed, - // unscaled range does not contain the origin. - // The boolean parameter determines whether the minimum and maximum values - // are set from their unscaled counterparts. + /** + * Update whether log scaling will be used for layout and rendering. + + * Log scaling is only active when LogScaling is true and the closed, + * unscaled range does not contain the origin. + * The boolean parameter determines whether the minimum and maximum values + * are set from their unscaled counterparts. + */ void UpdateLogScaleActive(bool updateMinMaxFromUnscaled); - // Description: - // Calculate and assign nice labels/logical label positions. + /** + * Calculate and assign nice labels/logical label positions. + */ void GenerateTickLabels(double min, double max); - // Description: - // Generate tick labels from the supplied double array of tick positions. + /** + * Generate tick labels from the supplied double array of tick positions. + */ void GenerateTickLabels(); void GenerateLabelFormat(int notation, double n); - // Description: - // Generate label using a printf-style format string. + /** + * Generate label using a printf-style format string. + */ vtkStdString GenerateSprintfLabel(double value, const std::string & format); - // Description: - // Calculate the next "nicest" numbers above and below the current minimum. - // \return the "nice" spacing of the numbers. + /** + * Calculate the next "nicest" numbers above and below the current minimum. + * \return the "nice" spacing of the numbers. + */ double CalculateNiceMinMax(double &min, double &max); - // Description: - // Return a tick mark for a logarithmic axis. - // If roundUp is true then the upper tick mark is returned. - // Otherwise the lower tick mark is returned. - // Tick marks will be: ... 0.1 0.2 .. 0.9 1 2 .. 9 10 20 .. 90 100 ... - // Parameter nicevalue will be set to true if tick mark is in: - // ... 0.1 0.2 0.5 1 2 5 10 20 50 100 ... - // Parameter order is set to the detected order of magnitude of the number. + /** + * Return a tick mark for a logarithmic axis. + * If roundUp is true then the upper tick mark is returned. + * Otherwise the lower tick mark is returned. + * Tick marks will be: ... 0.1 0.2 .. 0.9 1 2 .. 9 10 20 .. 90 100 ... + * Parameter nicevalue will be set to true if tick mark is in: + * ... 0.1 0.2 0.5 1 2 5 10 20 50 100 ... + * Parameter order is set to the detected order of magnitude of the number. + */ double LogScaleTickMark(double number, bool roundUp, bool &niceValue, int &order); - // Description: - // Generate logarithmically-spaced tick marks with linear-style labels. - // - // This is for the case when log scaling is active, but the axis min and max - // span less than an order of magnitude. - // In this case, the most significant digit that varies is identified and - // ticks generated for each value that digit may take on. If that results - // in only 2 tick marks, the next-most-significant digit is varied. - // If more than 20 tick marks would result, the stride for the varying digit - // is increased. + /** + * Generate logarithmically-spaced tick marks with linear-style labels. + + * This is for the case when log scaling is active, but the axis min and max + * span less than an order of magnitude. + * In this case, the most significant digit that varies is identified and + * ticks generated for each value that digit may take on. If that results + * in only 2 tick marks, the next-most-significant digit is varied. + * If more than 20 tick marks would result, the stride for the varying digit + * is increased. + */ void GenerateLogSpacedLinearTicks(int order, double min, double max); - // Description: - // Generate tick marks for logarithmic scale for specific order of magnitude. - // Mark generation is limited by parameters min and max. - // Tick marks will be: ... 0.1 0.2 .. 0.9 1 2 .. 9 10 20 .. 90 100 ... - // Tick labels will be: ... 0.1 0.2 0.5 1 2 5 10 20 50 100 ... - // If Parameter detaillabels is disabled tick labels will be: - // ... 0.1 1 10 100 ... - // If min/max is not in between 1.0 and 9.0 defaults will be used. - // If min and max do not differ 1 defaults will be used. + /** + * Generate tick marks for logarithmic scale for specific order of magnitude. + * Mark generation is limited by parameters min and max. + * Tick marks will be: ... 0.1 0.2 .. 0.9 1 2 .. 9 10 20 .. 90 100 ... + * Tick labels will be: ... 0.1 0.2 0.5 1 2 5 10 20 50 100 ... + * If Parameter detaillabels is disabled tick labels will be: + * ... 0.1 1 10 100 ... + * If min/max is not in between 1.0 and 9.0 defaults will be used. + * If min and max do not differ 1 defaults will be used. + */ void GenerateLogScaleTickMarks(int order, double min = 1.0, double max = 9.0, @@ -541,64 +691,79 @@ protected: bool TitleAppended; // Track if the title is updated when the label formats // are changed in the Extended Axis Labeling algorithm - // Description: - // Scaling factor used on this axis, this is used to accurately render very - // small/large numbers accurately by converting the underlying range by the - // scaling factor. + //@{ + /** + * Scaling factor used on this axis, this is used to accurately render very + * small/large numbers accurately by converting the underlying range by the + * scaling factor. + */ double ScalingFactor; double Shift; + //@} - // Description: - // Are we using custom tick labels, or should the axis generate them? + /** + * Are we using custom tick labels, or should the axis generate them? + */ bool CustomTickLabels; - // Description: - // This object stores the vtkPen that controls how the axis is drawn. + /** + * This object stores the vtkPen that controls how the axis is drawn. + */ vtkPen* Pen; - // Description: - // This object stores the vtkPen that controls how the grid lines are drawn. + /** + * This object stores the vtkPen that controls how the grid lines are drawn. + */ vtkPen* GridPen; - // Description: - // Position of tick marks in screen coordinates + /** + * Position of tick marks in screen coordinates + */ vtkSmartPointer TickPositions; - // Description: - // Position of tick marks in screen coordinates + /** + * Position of tick marks in screen coordinates + */ vtkSmartPointer TickScenePositions; - // Description: - // The labels for the tick marks + /** + * The labels for the tick marks + */ vtkSmartPointer TickLabels; - // Description: - // Hint as to whether a nice min/max was set, otherwise labels may not be - // present at the top/bottom of the axis. + /** + * Hint as to whether a nice min/max was set, otherwise labels may not be + * present at the top/bottom of the axis. + */ bool UsingNiceMinMax; - // Description: - // Mark the tick labels as dirty when the min/max value is changed. + /** + * Mark the tick labels as dirty when the min/max value is changed. + */ bool TickMarksDirty; - // Description: - // Flag to indicate that the axis has been resized. + /** + * Flag to indicate that the axis has been resized. + */ bool Resized; - // Description: - // The algorithm being used to tick label placement. + /** + * The algorithm being used to tick label placement. + */ int TickLabelAlgorithm; - // Description: - // The point cache is marked dirty until it has been initialized. + /** + * The point cache is marked dirty until it has been initialized. + */ vtkTimeStamp BuildTime; private: vtkAxis(const vtkAxis &) VTK_DELETE_FUNCTION; void operator=(const vtkAxis &) VTK_DELETE_FUNCTION; - // Description: - // Return true if the value is in range, false otherwise. + /** + * Return true if the value is in range, false otherwise. + */ bool InRange(double value); }; diff --git a/Charts/Core/vtkAxisExtended.h b/Charts/Core/vtkAxisExtended.h index b56a830a1e6cdc663ad4ee5197ecc1854583dc68..af2840dec8757182add2f2a773e071528e8949d9 100644 --- a/Charts/Core/vtkAxisExtended.h +++ b/Charts/Core/vtkAxisExtended.h @@ -12,15 +12,17 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkAxisExtended - octree-based spatial search object to quickly locate cells -// .SECTION Description -// This implements the optimization based tick position calculating algorithm in the paper "An Extension of Wilkinson's Algorithm -// for Positioning Tick Labels on Axes" by Junstin Talbot, Sharon Lin and Pat Hanrahan - -// .SECTION Caveats - -// .SECTION See Also -// vtkAxis +/** + * @class vtkAxisExtended + * @brief octree-based spatial search object to quickly locate cells + * + * This implements the optimization based tick position calculating algorithm in the paper "An Extension of Wilkinson's Algorithm + * for Positioning Tick Labels on Axes" by Junstin Talbot, Sharon Lin and Pat Hanrahan + * + * + * @sa + * vtkAxis +*/ #ifndef vtkAxisExtended_h #define vtkAxisExtended_h @@ -37,56 +39,68 @@ public: static vtkAxisExtended *New(); void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE; - // Description: - // This method return a value to make step sizes corresponding to low q - // and j values more preferable + /** + * This method return a value to make step sizes corresponding to low q + * and j values more preferable + */ static double Simplicity(int qIndex, int qLength, int j, double lmin, double lmax, double lstep); - // Description: - // This method returns the maximum possible value of simplicity value given - // q and j + /** + * This method returns the maximum possible value of simplicity value given + * q and j + */ static double SimplicityMax(int qIndex, int qLength, int j); - // Description: - // This method makes the data range approximately same as the labeling - // range more preferable + /** + * This method makes the data range approximately same as the labeling + * range more preferable + */ static double Coverage(double dmin, double dmax, double lmin, double lmax); - // Description: - //This gives the maximum possible value of coverage given the step size + /** + * This gives the maximum possible value of coverage given the step size + */ static double CoverageMax(double dmin, double dmax, double span); - // Description: - // This method return a value to make the density of the labels close to - // the user given value + /** + * This method return a value to make the density of the labels close to + * the user given value + */ static double Density(int k, double m, double dmin, double dmax, double lmin, double lmax); - // Description: - // Derives the maximum values for density given k (number of ticks) and - // m (user given) + /** + * Derives the maximum values for density given k (number of ticks) and + * m (user given) + */ static double DensityMax(int k, double m); - // Description: - // This methods return the legibility score of different formats + /** + * This methods return the legibility score of different formats + */ static double FormatLegibilityScore(double n, int format); - // Description: - // This method returns the string length of different format notations. + /** + * This method returns the string length of different format notations. + */ static int FormatStringLength(int format, double n, int precision); - // Description: - // This method implements the algorithm given in the paper - // The method return the minimum tick position, maximum tick position and - // the tick spacing + /** + * This method implements the algorithm given in the paper + * The method return the minimum tick position, maximum tick position and + * the tick spacing + */ vtkVector3d GenerateExtendedTickLabels(double dmin, double dmax, double m, double scaling); - // Description: - // Set/Get methods for variables + //@{ + /** + * Set/Get methods for variables + */ vtkGetMacro(FontSize, int); vtkSetMacro(FontSize, int); + //@} vtkGetMacro(DesiredFontSize, int); vtkSetMacro(DesiredFontSize, int); @@ -106,8 +120,9 @@ protected: vtkAxisExtended(); ~vtkAxisExtended(); - // Description: - // This method implements an exhaustive search of the legibilty parameters. + /** + * This method implements an exhaustive search of the legibilty parameters. + */ double Legibility(double lmin, double lmax, double lstep, double scaling, vtkVector& parameters); diff --git a/Charts/Core/vtkCategoryLegend.h b/Charts/Core/vtkCategoryLegend.h index 97d05c11534668df1b523cae9a963ad61f48607a..89d320678b5bdc95489e6c60d22d54c442440fe0 100644 --- a/Charts/Core/vtkCategoryLegend.h +++ b/Charts/Core/vtkCategoryLegend.h @@ -13,14 +13,17 @@ =========================================================================*/ -// .NAME vtkCategoryLegend - Legend item to display categorical data. -// .SECTION Description -// vtkCategoryLegend will display a label and color patch for each value -// in a categorical data set. To use this class, you must first populate -// a vtkScalarsToColors by using the SetAnnotation() method. The other -// input to this class is a vtkVariantArray. This should contain the -// annotated values from the vtkScalarsToColors that you wish to include -// within the legend. +/** + * @class vtkCategoryLegend + * @brief Legend item to display categorical data. + * + * vtkCategoryLegend will display a label and color patch for each value + * in a categorical data set. To use this class, you must first populate + * a vtkScalarsToColors by using the SetAnnotation() method. The other + * input to this class is a vtkVariantArray. This should contain the + * annotated values from the vtkScalarsToColors that you wish to include + * within the legend. +*/ #ifndef vtkCategoryLegend_h #define vtkCategoryLegend_h @@ -41,46 +44,61 @@ public: vtkTypeMacro(vtkCategoryLegend, vtkChartLegend); static vtkCategoryLegend* New(); - // Description: - // Enum of legend orientation types + /** + * Enum of legend orientation types + */ enum { VERTICAL = 0, HORIZONTAL }; - // Description: - // Paint the legend into a rectangle defined by the bounds. + /** + * Paint the legend into a rectangle defined by the bounds. + */ virtual bool Paint(vtkContext2D *painter); - // Description: - // Compute and return the lower left corner of this legend, along - // with its width and height. + /** + * Compute and return the lower left corner of this legend, along + * with its width and height. + */ virtual vtkRectf GetBoundingRect(vtkContext2D* painter); - // Description: - // Get/Set the vtkScalarsToColors used to draw this legend. - // Since this legend represents categorical data, this - // vtkScalarsToColors must have been populated using SetAnnotation(). + //@{ + /** + * Get/Set the vtkScalarsToColors used to draw this legend. + * Since this legend represents categorical data, this + * vtkScalarsToColors must have been populated using SetAnnotation(). + */ virtual void SetScalarsToColors(vtkScalarsToColors* stc); virtual vtkScalarsToColors * GetScalarsToColors(); - - // Description: - // Get/Set the array of values that will be represented by this legend. - // This array must contain distinct annotated values from the ScalarsToColors. - // Each value in this array will be drawn as a separate entry within this - // legend. + //@} + + //@{ + /** + * Get/Set the array of values that will be represented by this legend. + * This array must contain distinct annotated values from the ScalarsToColors. + * Each value in this array will be drawn as a separate entry within this + * legend. + */ vtkGetMacro(Values, vtkVariantArray*); vtkSetMacro(Values, vtkVariantArray*); + //@} - // Description: - // Get/set the title text of the legend. + //@{ + /** + * Get/set the title text of the legend. + */ virtual void SetTitle(const vtkStdString &title); virtual vtkStdString GetTitle(); + //@} - // Description: - // Get/set the label to use for outlier data. + //@{ + /** + * Get/set the label to use for outlier data. + */ vtkGetMacro(OutlierLabel, vtkStdString); vtkSetMacro(OutlierLabel, vtkStdString); + //@} protected: vtkCategoryLegend(); diff --git a/Charts/Core/vtkChart.h b/Charts/Core/vtkChart.h index eca930bcc5ad843e0b448b97ab5a2bbeb3560821..bb9b735b59d4483afbc24f2dac03837a7e3ba3e6 100644 --- a/Charts/Core/vtkChart.h +++ b/Charts/Core/vtkChart.h @@ -13,10 +13,13 @@ =========================================================================*/ -// .NAME vtkChart - Factory class for drawing 2D charts -// -// .SECTION Description -// This defines the interface for a chart. +/** + * @class vtkChart + * @brief Factory class for drawing 2D charts + * + * + * This defines the interface for a chart. +*/ #ifndef vtkChart_h #define vtkChart_h @@ -44,8 +47,9 @@ public: vtkTypeMacro(vtkChart, vtkContextItem); virtual void PrintSelf(ostream &os, vtkIndent indent); - // Description: - // Enum of the available chart types + /** + * Enum of the available chart types + */ enum { LINE, POINTS, @@ -55,16 +59,17 @@ public: FUNCTIONALBAG, AREA}; - // Description: - // Enum of valid chart action types. - // - // PAN - moves the axis range - // ZOOM - zooms to a selected rectangle - // ZOOM_AXIS - zooms the x and y axis range - // SELECT_RECTANGLE - selects points within a rectangle - // SELECT_POLYGON - selects points within a polygon - // SELECT - alias for SELECT_RECTANGLE - // NOTIFY - Post vtkCommand::InteractionEvent on selection of a point + /** + * Enum of valid chart action types. + + * PAN - moves the axis range + * ZOOM - zooms to a selected rectangle + * ZOOM_AXIS - zooms the x and y axis range + * SELECT_RECTANGLE - selects points within a rectangle + * SELECT_POLYGON - selects points within a polygon + * SELECT - alias for SELECT_RECTANGLE + * NOTIFY - Post vtkCommand::InteractionEvent on selection of a point + */ enum { PAN = 0, ZOOM, @@ -75,164 +80,215 @@ public: NOTIFY }; - // Description: - // Enum of event type that are triggered by the charts + /** + * Enum of event type that are triggered by the charts + */ enum EventIds { UpdateRange = 1002 }; - // Description: - // Paint event for the chart, called whenever the chart needs to be drawn + /** + * Paint event for the chart, called whenever the chart needs to be drawn + */ virtual bool Paint(vtkContext2D *painter) = 0; - // Description: - // Add a plot to the chart, defaults to using the name of the y column + /** + * Add a plot to the chart, defaults to using the name of the y column + */ virtual vtkPlot* AddPlot(int type); - // Description: - // Add a plot to the chart. Return the index of the plot, -1 if it failed. + /** + * Add a plot to the chart. Return the index of the plot, -1 if it failed. + */ virtual vtkIdType AddPlot(vtkPlot* plot); - // Description: - // Remove the plot at the specified index, returns true if successful, - // false if the index was invalid. + /** + * Remove the plot at the specified index, returns true if successful, + * false if the index was invalid. + */ virtual bool RemovePlot(vtkIdType index); - // Description: - // Remove the given plot. Returns true if successful, false if the plot - // was not contained in this chart. Note, the base implementation of - // this method performs a linear search to locate the plot. + /** + * Remove the given plot. Returns true if successful, false if the plot + * was not contained in this chart. Note, the base implementation of + * this method performs a linear search to locate the plot. + */ virtual bool RemovePlotInstance(vtkPlot* plot); - // Description: - // Remove all plots from the chart. + /** + * Remove all plots from the chart. + */ virtual void ClearPlots(); - // Description: - // Get the plot at the specified index, returns null if the index is invalid. + /** + * Get the plot at the specified index, returns null if the index is invalid. + */ virtual vtkPlot* GetPlot(vtkIdType index); - // Description: - // Get the number of plots the chart contains. + /** + * Get the number of plots the chart contains. + */ virtual vtkIdType GetNumberOfPlots(); - // Description: - // Get the axis specified by axisIndex. 0 is x, 1 is y. This should probably - // be improved either using a string or enum to select the axis. + /** + * Get the axis specified by axisIndex. 0 is x, 1 is y. This should probably + * be improved either using a string or enum to select the axis. + */ virtual vtkAxis* GetAxis(int axisIndex); - // Description: - // Get the number of axes in the current chart. + /** + * Get the number of axes in the current chart. + */ virtual vtkIdType GetNumberOfAxes(); - // Description: - // Request that the chart recalculates the range of its axes. Especially - // useful in applications after the parameters of plots have been modified. + /** + * Request that the chart recalculates the range of its axes. Especially + * useful in applications after the parameters of plots have been modified. + */ virtual void RecalculateBounds(); - // Description: - // Enumeration of the possible selection methods in a chart. SELECTION_ROWS - // is the default and simply selects the row in a table in all plots showing - // that table. SELECTION_PLOTS will make a selection in each plot, and that - // selection remains specific to the plot object. SELECTION_COLUMNS selects - // the plots that use as input the selected columns of a table. + /** + * Enumeration of the possible selection methods in a chart. SELECTION_ROWS + * is the default and simply selects the row in a table in all plots showing + * that table. SELECTION_PLOTS will make a selection in each plot, and that + * selection remains specific to the plot object. SELECTION_COLUMNS selects + * the plots that use as input the selected columns of a table. + */ enum { SELECTION_ROWS, SELECTION_PLOTS, SELECTION_COLUMNS }; - // Description: - // Set the selection method, which controls how selections are handled by the - // chart. The default is SELECTION_ROWS which selects all points in all plots - // in a chart that have values in the rows selected. SELECTION_PLOTS allows - // for finer-grained selections specific to each plot, and so to each XY - // column pair. SELECTION_COLUMNS selects all points of plots that - // correspond to selected columns. + //@{ + /** + * Set the selection method, which controls how selections are handled by the + * chart. The default is SELECTION_ROWS which selects all points in all plots + * in a chart that have values in the rows selected. SELECTION_PLOTS allows + * for finer-grained selections specific to each plot, and so to each XY + * column pair. SELECTION_COLUMNS selects all points of plots that + * correspond to selected columns. + */ virtual void SetSelectionMethod(int method); virtual int GetSelectionMethod(); + //@} - // Description: - // Set the vtkAnnotationLink for the chart. + /** + * Set the vtkAnnotationLink for the chart. + */ virtual void SetAnnotationLink(vtkAnnotationLink *link); - // Description: - // Get the vtkAnnotationLink for the chart. + //@{ + /** + * Get the vtkAnnotationLink for the chart. + */ vtkGetObjectMacro(AnnotationLink, vtkAnnotationLink); + //@} - // Description: - // Set/get the width and the height of the chart. + //@{ + /** + * Set/get the width and the height of the chart. + */ vtkSetVector2Macro(Geometry, int); vtkGetVector2Macro(Geometry, int); + //@} - // Description: - // Set/get the first point in the chart (the bottom left). + //@{ + /** + * Set/get the first point in the chart (the bottom left). + */ vtkSetVector2Macro(Point1, int); vtkGetVector2Macro(Point1, int); + //@} - // Description: - // Set/get the second point in the chart (the top right). + //@{ + /** + * Set/get the second point in the chart (the top right). + */ vtkSetVector2Macro(Point2, int); vtkGetVector2Macro(Point2, int); + //@} - // Description: - // Set/get whether the chart should draw a legend. + //@{ + /** + * Set/get whether the chart should draw a legend. + */ virtual void SetShowLegend(bool visible); virtual bool GetShowLegend(); + //@} - // Description: - // Get the legend for the chart, if available. Can return NULL if there is no - // legend. + /** + * Get the legend for the chart, if available. Can return NULL if there is no + * legend. + */ virtual vtkChartLegend * GetLegend(); - // Description: - // Get/set the title text of the chart. + //@{ + /** + * Get/set the title text of the chart. + */ virtual void SetTitle(const vtkStdString &title); virtual vtkStdString GetTitle(); + //@} - // Description: - // Get the vtkTextProperty that governs how the chart title is displayed. + //@{ + /** + * Get the vtkTextProperty that governs how the chart title is displayed. + */ vtkGetObjectMacro(TitleProperties, vtkTextProperty); + //@} - // Description: - // Set/get the borders of the chart (space in pixels around the chart). + //@{ + /** + * Set/get the borders of the chart (space in pixels around the chart). + */ void SetBottomBorder(int border); void SetTopBorder(int border); void SetLeftBorder(int border); void SetRightBorder(int border); + //@} - // Description: - // Set/get the borders of the chart (space in pixels around the chart). + /** + * Set/get the borders of the chart (space in pixels around the chart). + */ void SetBorders(int left, int bottom, int right, int top); - // Description: - // Set the size of the chart. The rect argument specifies the bottom corner, - // width and height of the chart. The borders will be laid out within the - // specified rectangle. + /** + * Set the size of the chart. The rect argument specifies the bottom corner, + * width and height of the chart. The borders will be laid out within the + * specified rectangle. + */ void SetSize(const vtkRectf &rect); - // Description: - // Get the current size of the chart. + /** + * Get the current size of the chart. + */ vtkRectf GetSize(); - // Description: - // Enum of the available layout strategies for the charts. + /** + * Enum of the available layout strategies for the charts. + */ enum { FILL_SCENE, // Attempt to fill the entire scene. FILL_RECT, // Attempt to supply the supplied vtkRectf in Size. AXES_TO_RECT // Put the corners of the axes on the vtkRectf in Size. }; - // Description: - // Set/get the layout strategy that should be used by the chart. As we don't - // support enums this can take any value in the integer range, but the only - // valid enums are FILL_SCENE, FILL_RECT and AXES_TO_RECT. + //@{ + /** + * Set/get the layout strategy that should be used by the chart. As we don't + * support enums this can take any value in the integer range, but the only + * valid enums are FILL_SCENE, FILL_RECT and AXES_TO_RECT. + */ vtkSetMacro(LayoutStrategy, int); vtkGetMacro(LayoutStrategy, int); + //@} - // Description: - // Set/get whether the chart should automatically resize to fill the current - // render window. Default is true. + //@{ + /** + * Set/get whether the chart should automatically resize to fill the current + * render window. Default is true. + */ virtual void SetAutoSize(bool isAutoSized) { this->LayoutStrategy = isAutoSized ? vtkChart::FILL_SCENE : @@ -242,106 +298,130 @@ public: { return this->LayoutStrategy == vtkChart::FILL_SCENE ? true : false; } + //@} - // Description: - // Set/get whether the chart should still render its axes and decorations - // even if the chart has no visible plots. Default is false (do not render - // an empty plot). - // - // Note that if you wish to render axes for an empty plot you should also - // set AutoSize to false, as that will hide all axes for an empty plot. + //@{ + /** + * Set/get whether the chart should still render its axes and decorations + * even if the chart has no visible plots. Default is false (do not render + * an empty plot). + + * Note that if you wish to render axes for an empty plot you should also + * set AutoSize to false, as that will hide all axes for an empty plot. + */ vtkSetMacro(RenderEmpty, bool); vtkGetMacro(RenderEmpty, bool); - - // Description: - // Assign action types to mouse buttons. Available action types are PAN, ZOOM - // and SELECT in the chart enum, the default assigns the LEFT_BUTTON to - // PAN, MIDDLE_BUTTON to ZOOM and RIGHT_BUTTON to SELECT. Valid mouse enums - // are in the vtkContextMouseEvent class. - // - // Note that only one mouse button can be assigned to each action, an action - // will have -1 (invalid button) assigned if it had the same button as the one - // assigned to a different action. + //@} + + /** + * Assign action types to mouse buttons. Available action types are PAN, ZOOM + * and SELECT in the chart enum, the default assigns the LEFT_BUTTON to + * PAN, MIDDLE_BUTTON to ZOOM and RIGHT_BUTTON to SELECT. Valid mouse enums + * are in the vtkContextMouseEvent class. + + * Note that only one mouse button can be assigned to each action, an action + * will have -1 (invalid button) assigned if it had the same button as the one + * assigned to a different action. + */ virtual void SetActionToButton(int action, int button); - // Description: - // Get the mouse button associated with the supplied action. The mouse button - // enum is from vtkContextMouseEvent, and the action enum is from vtkChart. + /** + * Get the mouse button associated with the supplied action. The mouse button + * enum is from vtkContextMouseEvent, and the action enum is from vtkChart. + */ virtual int GetActionToButton(int action); - // Description: - // Assign action types to single mouse clicks. Available action types are - // SELECT and NOTIFY in the chart enum. The default assigns the LEFT_BUTTON - // to NOTIFY, and the RIGHT_BUTTON to SELECT. + /** + * Assign action types to single mouse clicks. Available action types are + * SELECT and NOTIFY in the chart enum. The default assigns the LEFT_BUTTON + * to NOTIFY, and the RIGHT_BUTTON to SELECT. + */ virtual void SetClickActionToButton(int action, int button); - // Description: - // Get the mouse button associated with the supplied click action. The mouse - // button enum is from vtkContextMouseEvent, and the action enum is from - // vtkChart. + /** + * Get the mouse button associated with the supplied click action. The mouse + * button enum is from vtkContextMouseEvent, and the action enum is from + * vtkChart. + */ virtual int GetClickActionToButton(int action); - // Description: - // Set/Get the brush to use for the background color. + //@{ + /** + * Set/Get the brush to use for the background color. + */ void SetBackgroundBrush(vtkBrush *brush); vtkBrush* GetBackgroundBrush(); - - // Description: - // Set/get the Selection Mode that will be used by the chart while doing - // selection. The only valid enums are vtkContextScene::SELECTION_NONE, - // SELECTION_DEFAULT, SELECTION_ADDITION, SELECTION_SUBTRACTION, SELECTION_TOGGLE + //@} + + //@{ + /** + * Set/get the Selection Mode that will be used by the chart while doing + * selection. The only valid enums are vtkContextScene::SELECTION_NONE, + * SELECTION_DEFAULT, SELECTION_ADDITION, SELECTION_SUBTRACTION, SELECTION_TOGGLE + */ virtual void SetSelectionMode(int); vtkGetMacro(SelectionMode, int); + //@} protected: vtkChart(); ~vtkChart(); - // Description: - // Given the x and y vtkAxis, and a transform, calculate the transform that - // the points in a chart would need to be drawn within the axes. This assumes - // that the axes have the correct start and end positions, and that they are - // perpendicular. + /** + * Given the x and y vtkAxis, and a transform, calculate the transform that + * the points in a chart would need to be drawn within the axes. This assumes + * that the axes have the correct start and end positions, and that they are + * perpendicular. + */ bool CalculatePlotTransform(vtkAxis *x, vtkAxis *y, vtkTransform2D *transform); - // Description: - // Calculate the unshifted, and unscaled plot transform for the x and y axis. + /** + * Calculate the unshifted, and unscaled plot transform for the x and y axis. + */ bool CalculateUnscaledPlotTransform(vtkAxis *x, vtkAxis *y, vtkTransform2D *transform); - // Description: - // Attach axis range listener so we can forward those events at the chart level + /** + * Attach axis range listener so we can forward those events at the chart level + */ void AttachAxisRangeListener(vtkAxis*); void AxisRangeForwarderCallback(vtkObject*,unsigned long, void*); - // Description: - // Our annotation link, used for sharing selections etc. + /** + * Our annotation link, used for sharing selections etc. + */ vtkAnnotationLink *AnnotationLink; - // Description: - // The width and the height of the chart. + /** + * The width and the height of the chart. + */ int Geometry[2]; - // Description: - // The position of the lower left corner of the chart. + /** + * The position of the lower left corner of the chart. + */ int Point1[2]; - // Description: - // The position of the upper right corner of the chart. + /** + * The position of the upper right corner of the chart. + */ int Point2[2]; - // Description: - // Display the legend? + /** + * Display the legend? + */ bool ShowLegend; - // Description: - // The title of the chart + /** + * The title of the chart + */ vtkStdString Title; - // Description: - // The text properties associated with the chart + /** + * The text properties associated with the chart + */ vtkTextProperty* TitleProperties; vtkRectf Size; @@ -349,8 +429,9 @@ protected: int LayoutStrategy; bool RenderEmpty; - // Description: - // Brush to use for drawing the background. + /** + * Brush to use for drawing the background. + */ vtkSmartPointer BackgroundBrush; // The mode when the chart is doing selection. @@ -360,8 +441,10 @@ protected: // SELECTION_PLOTS - based on the plot that created the selection. int SelectionMethod; - // Description: - // Hold mouse action mappings. + //@{ + /** + * Hold mouse action mappings. + */ class MouseActions { public: @@ -384,6 +467,7 @@ protected: short& operator[](int index) { return Data[index]; } short Data[2]; }; + //@} MouseActions Actions; MouseClickActions ActionsClick; diff --git a/Charts/Core/vtkChartBox.h b/Charts/Core/vtkChartBox.h index 9be8e4856e98f544d1c6d88edec3af77d968764f..a50ad12bb64a82869de8b81114a168c5bde0971d 100644 --- a/Charts/Core/vtkChartBox.h +++ b/Charts/Core/vtkChartBox.h @@ -13,10 +13,13 @@ =========================================================================*/ -// .NAME vtkChartBox - Factory class for drawing box plot charts -// -// .SECTION Description -// This defines the interface for a box plot chart. +/** + * @class vtkChartBox + * @brief Factory class for drawing box plot charts + * + * + * This defines the interface for a box plot chart. +*/ #ifndef vtkChartBox_h #define vtkChartBox_h @@ -36,98 +39,125 @@ public: vtkTypeMacro(vtkChartBox, vtkChart); virtual void PrintSelf(ostream &os, vtkIndent indent); - // Description: - // Creates a parallel coordinates chart + /** + * Creates a parallel coordinates chart + */ static vtkChartBox* New(); - // Description: - // Perform any updates to the item that may be necessary before rendering. - // The scene should take care of calling this on all items before their - // Paint function is invoked. + /** + * Perform any updates to the item that may be necessary before rendering. + * The scene should take care of calling this on all items before their + * Paint function is invoked. + */ virtual void Update(); - // Description: - // Paint event for the chart, called whenever the chart needs to be drawn + /** + * Paint event for the chart, called whenever the chart needs to be drawn + */ virtual bool Paint(vtkContext2D *painter); - // Description: - // Set the visibility of the specified column. + //@{ + /** + * Set the visibility of the specified column. + */ void SetColumnVisibility(const vtkStdString& name, bool visible); void SetColumnVisibility(vtkIdType column, bool visible); + //@} - // Description: - // Set the visibility of all columns (true will make them all visible, false - // will remove all visible columns). + /** + * Set the visibility of all columns (true will make them all visible, false + * will remove all visible columns). + */ void SetColumnVisibilityAll(bool visible); - // Description: - // Get the visibility of the specified column. + //@{ + /** + * Get the visibility of the specified column. + */ bool GetColumnVisibility(const vtkStdString& name); bool GetColumnVisibility(vtkIdType column); + //@} - // Description: - // Get the input table column id of a column by its name. + /** + * Get the input table column id of a column by its name. + */ vtkIdType GetColumnId(const vtkStdString& name); - // Description: - // Get a list of the columns, and the order in which they are displayed. + //@{ + /** + * Get a list of the columns, and the order in which they are displayed. + */ vtkGetObjectMacro(VisibleColumns, vtkStringArray); + //@} // Index of the selected column in the visible columns list. vtkGetMacro(SelectedColumn, int); vtkSetMacro(SelectedColumn, int); - // Description: - // Get the plot at the specified index, returns null if the index is invalid. + /** + * Get the plot at the specified index, returns null if the index is invalid. + */ virtual vtkPlot* GetPlot(vtkIdType index); - // Description: - // Get the number of plots the chart contains. + /** + * Get the number of plots the chart contains. + */ virtual vtkIdType GetNumberOfPlots(); - // Description: - // Get the chart Y axis + /** + * Get the chart Y axis + */ virtual vtkAxis* GetYAxis(); - // Description: - // Get the column X position by index in the visible set. + /** + * Get the column X position by index in the visible set. + */ virtual float GetXPosition(int index); - // Description: - // Get the number of visible box plots in the current chart. + /** + * Get the number of visible box plots in the current chart. + */ virtual vtkIdType GetNumberOfVisibleColumns(); - // Description - // Set plot to use for the chart. Since this type of chart can - // only contain one plot, this will replace the previous plot. + /** + * Set plot to use for the chart. Since this type of chart can + * only contain one plot, this will replace the previous plot. + */ virtual void SetPlot(vtkPlotBox *plot); - // Description: - // Return true if the supplied x, y coordinate is inside the item. + /** + * Return true if the supplied x, y coordinate is inside the item. + */ virtual bool Hit(const vtkContextMouseEvent &mouse); - // Description: - // Mouse move event. + /** + * Mouse move event. + */ virtual bool MouseMoveEvent(const vtkContextMouseEvent &mouse); - // Description: - // Mouse button down event + /** + * Mouse button down event + */ virtual bool MouseButtonPressEvent(const vtkContextMouseEvent &mouse); - // Description: - // Mouse button release event. + /** + * Mouse button release event. + */ virtual bool MouseButtonReleaseEvent(const vtkContextMouseEvent &mouse); - // Description: - // Set the vtkTooltipItem object that will be displayed by the chart. + /** + * Set the vtkTooltipItem object that will be displayed by the chart. + */ virtual void SetTooltip(vtkTooltipItem *tooltip); - // Description: - // Get the vtkTooltipItem object that will be displayed by the chart. + /** + * Get the vtkTooltipItem object that will be displayed by the chart. + */ virtual vtkTooltipItem* GetTooltip(); - // Description: - // Set the information passed to the tooltip. + /** + * Set the information passed to the tooltip. + */ virtual void SetTooltipInfo(const vtkContextMouseEvent &, const vtkVector2d &, vtkIdType, vtkPlot*, @@ -137,32 +167,42 @@ protected: vtkChartBox(); ~vtkChartBox(); - // Description: - // Private storage object - where we hide all of our STL objects... + //@{ + /** + * Private storage object - where we hide all of our STL objects... + */ class Private; Private *Storage; + //@} bool GeometryValid; - // Description: - // Selected indices for the table the plot is rendering + /** + * Selected indices for the table the plot is rendering + */ vtkIdTypeArray *Selection; - // Description: - // A list of the visible columns in the chart. + /** + * A list of the visible columns in the chart. + */ vtkStringArray *VisibleColumns; - // Description: - // Index of the selected column in the visible columns list. + //@{ + /** + * Index of the selected column in the visible columns list. + */ int SelectedColumn; float SelectedColumnDelta; + //@} - // Description: - // The point cache is marked dirty until it has been initialized. + /** + * The point cache is marked dirty until it has been initialized. + */ vtkTimeStamp BuildTime; - // Description: - // The tooltip item for the chart - can be used to display extra information. + /** + * The tooltip item for the chart - can be used to display extra information. + */ vtkSmartPointer Tooltip; void ResetSelection(); @@ -170,10 +210,11 @@ protected: void CalculatePlotTransform(); void SwapAxes(int a1, int a2); - // Description: - // Try to locate a point within the plots to display in a tooltip. - // If invokeEvent is greater than 0, then an event will be invoked if a point - // is at that mouse position. + /** + * Try to locate a point within the plots to display in a tooltip. + * If invokeEvent is greater than 0, then an event will be invoked if a point + * is at that mouse position. + */ bool LocatePointInPlots(const vtkContextMouseEvent &mouse, int invokeEvent = -1); @@ -187,10 +228,12 @@ private: }; -// Description: -// Small struct used by InvokeEvent to send some information about the point -// that was clicked on. This is an experimental part of the API, subject to -// change. +//@{ +/** + * Small struct used by InvokeEvent to send some information about the point + * that was clicked on. This is an experimental part of the API, subject to + * change. + */ struct vtkChartBoxData { vtkStdString SeriesName; @@ -198,5 +241,6 @@ struct vtkChartBoxData vtkVector2i ScreenPosition; int Index; }; +//@} #endif //vtkChartBox_h diff --git a/Charts/Core/vtkChartHistogram2D.h b/Charts/Core/vtkChartHistogram2D.h index 2b4d237a8def4e55db7cb7850ebb68842ddb0d9c..1f14c27a2c3b810eb74dec87c60e8044fb375926 100644 --- a/Charts/Core/vtkChartHistogram2D.h +++ b/Charts/Core/vtkChartHistogram2D.h @@ -13,10 +13,13 @@ =========================================================================*/ -// .NAME vtkChart2DHistogram - Chart for 2D histograms. -// -// .SECTION Description -// This defines the interface for a 2D histogram chart. +/** + * @class vtkChart2DHistogram + * @brief Chart for 2D histograms. + * + * + * This defines the interface for a 2D histogram chart. +*/ #ifndef vtkChartHistogram2D_h #define vtkChartHistogram2D_h @@ -36,25 +39,29 @@ public: vtkTypeMacro(vtkChartHistogram2D, vtkChartXY); virtual void PrintSelf(ostream &os, vtkIndent indent); - // Description: - // Creates a 2D histogram chart + /** + * Creates a 2D histogram chart + */ static vtkChartHistogram2D* New(); - // Description: - // Perform any updates to the item that may be necessary before rendering. - // The scene should take care of calling this on all items before their - // Paint function is invoked. + /** + * Perform any updates to the item that may be necessary before rendering. + * The scene should take care of calling this on all items before their + * Paint function is invoked. + */ virtual void Update(); virtual void SetInputData(vtkImageData *data, vtkIdType z = 0); virtual void SetTransferFunction(vtkScalarsToColors *function); - // Description: - // Return true if the supplied x, y coordinate is inside the item. + /** + * Return true if the supplied x, y coordinate is inside the item. + */ virtual bool Hit(const vtkContextMouseEvent &mouse); - // Description: - // Get the plot at the specified index, returns null if the index is invalid. + /** + * Get the plot at the specified index, returns null if the index is invalid. + */ virtual vtkPlot* GetPlot(vtkIdType index); protected: @@ -63,8 +70,9 @@ protected: vtkSmartPointer Histogram; - // Description: - // The point cache is marked dirty until it has been initialized. + /** + * The point cache is marked dirty until it has been initialized. + */ vtkTimeStamp BuildTime; class Private; diff --git a/Charts/Core/vtkChartLegend.h b/Charts/Core/vtkChartLegend.h index 3dcd51a2025d0821f492b995c454854a568e3953..7ba6b7599513ac01f99f14ecd1fdf8161423b740 100644 --- a/Charts/Core/vtkChartLegend.h +++ b/Charts/Core/vtkChartLegend.h @@ -13,12 +13,15 @@ =========================================================================*/ -// .NAME vtkChartLegend - draw the chart legend -// -// .SECTION Description -// The vtkChartLegend is drawn in screen coordinates. It is usually one of the -// last elements of a chart to be drawn. It renders the the mark/line for each -// plot, and the plot labels. +/** + * @class vtkChartLegend + * @brief draw the chart legend + * + * + * The vtkChartLegend is drawn in screen coordinates. It is usually one of the + * last elements of a chart to be drawn. It renders the the mark/line for each + * plot, and the plot labels. +*/ #ifndef vtkChartLegend_h #define vtkChartLegend_h @@ -39,17 +42,24 @@ public: vtkTypeMacro(vtkChartLegend, vtkContextItem); virtual void PrintSelf(ostream &os, vtkIndent indent); - // Description: - // Creates a 2D Chart object. + /** + * Creates a 2D Chart object. + */ static vtkChartLegend *New(); - // Description: - // Set point the legend box is anchored to. + //@{ + /** + * Set point the legend box is anchored to. + */ vtkSetVector2Macro(Point, float); + //@} - // Description: - // Get point the legend box is anchored to. + //@{ + /** + * Get point the legend box is anchored to. + */ vtkGetVector2Macro(Point, float); + //@} enum { LEFT = 0, @@ -60,132 +70,181 @@ public: CUSTOM }; - // Description: - // Set point the legend box is anchored to. + /** + * Set point the legend box is anchored to. + */ void SetPoint(const vtkVector2f &point); - // Description: - // Get point the legend box is anchored to. + /** + * Get point the legend box is anchored to. + */ const vtkVector2f& GetPointVector(); - // Description: - // Set the horizontal alignment of the legend to the point specified. - // Valid values are LEFT, CENTER and RIGHT. + //@{ + /** + * Set the horizontal alignment of the legend to the point specified. + * Valid values are LEFT, CENTER and RIGHT. + */ vtkSetMacro(HorizontalAlignment, int); + //@} - // Description: - // Get the horizontal alignment of the legend to the point specified. + //@{ + /** + * Get the horizontal alignment of the legend to the point specified. + */ vtkGetMacro(HorizontalAlignment, int); + //@} - // Description: - // Set the vertical alignment of the legend to the point specified. - // Valid values are TOP, CENTER and BOTTOM. + //@{ + /** + * Set the vertical alignment of the legend to the point specified. + * Valid values are TOP, CENTER and BOTTOM. + */ vtkSetMacro(VerticalAlignment, int); + //@} - // Description: - // Get the vertical alignment of the legend to the point specified. + //@{ + /** + * Get the vertical alignment of the legend to the point specified. + */ vtkGetMacro(VerticalAlignment, int); + //@} - // Description: - // Set the padding between legend marks, default is 5. + //@{ + /** + * Set the padding between legend marks, default is 5. + */ vtkSetMacro(Padding, int); + //@} - // Description: - // Get the padding between legend marks. + //@{ + /** + * Get the padding between legend marks. + */ vtkGetMacro(Padding, int); + //@} - // Description: - // Set the symbol width, default is 15. + //@{ + /** + * Set the symbol width, default is 15. + */ vtkSetMacro(SymbolWidth, int); + //@} - // Description: - // Get the legend symbol width. + //@{ + /** + * Get the legend symbol width. + */ vtkGetMacro(SymbolWidth, int); + //@} - // Description: - // Set the point size of the label text. + /** + * Set the point size of the label text. + */ virtual void SetLabelSize(int size); - // Description: - // Get the point size of the label text. + /** + * Get the point size of the label text. + */ virtual int GetLabelSize(); - // Description: - // Get/set if the legend should be drawn inline (inside the chart), or not. - // True would generally request that the chart draws it inside the chart, - // false would adjust the chart axes and make space to draw the axes outside. + //@{ + /** + * Get/set if the legend should be drawn inline (inside the chart), or not. + * True would generally request that the chart draws it inside the chart, + * false would adjust the chart axes and make space to draw the axes outside. + */ vtkSetMacro(Inline, bool); vtkGetMacro(Inline, bool); - - // Description: - // Get/set if the legend can be dragged with the mouse button, or not. - // True results in left click and drag causing the legend to move around the - // scene. False disables response to mouse events. - // The default is true. + //@} + + //@{ + /** + * Get/set if the legend can be dragged with the mouse button, or not. + * True results in left click and drag causing the legend to move around the + * scene. False disables response to mouse events. + * The default is true. + */ vtkSetMacro(DragEnabled, bool); vtkGetMacro(DragEnabled, bool); + //@} - // Description: - // Set the chart that the legend belongs to and will draw the legend for. + /** + * Set the chart that the legend belongs to and will draw the legend for. + */ void SetChart(vtkChart* chart); - // Description: - // Get the chart that the legend belongs to and will draw the legend for. + /** + * Get the chart that the legend belongs to and will draw the legend for. + */ vtkChart* GetChart(); - // Description: - // Update the geometry of the axis. Takes care of setting up the tick mark - // locations etc. Should be called by the scene before rendering. + /** + * Update the geometry of the axis. Takes care of setting up the tick mark + * locations etc. Should be called by the scene before rendering. + */ virtual void Update(); - // Description: - // Paint event for the axis, called whenever the axis needs to be drawn. + /** + * Paint event for the axis, called whenever the axis needs to be drawn. + */ virtual bool Paint(vtkContext2D *painter); - // Description: - // Request the space the legend requires to be drawn. This is returned as a - // vtkRect4f, with the corner being the offset from Point, and the width/ - // height being the total width/height required by the axis. In order to - // ensure the numbers are correct, Update() should be called first. + /** + * Request the space the legend requires to be drawn. This is returned as a + * vtkRect4f, with the corner being the offset from Point, and the width/ + * height being the total width/height required by the axis. In order to + * ensure the numbers are correct, Update() should be called first. + */ virtual vtkRectf GetBoundingRect(vtkContext2D* painter); - // Description: - // Get the pen used to draw the legend outline. + /** + * Get the pen used to draw the legend outline. + */ vtkPen * GetPen(); - // Description: - // Get the brush used to draw the legend background. + /** + * Get the brush used to draw the legend background. + */ vtkBrush * GetBrush(); - // Description: - // Get the vtkTextProperty for the legend's labels. + /** + * Get the vtkTextProperty for the legend's labels. + */ vtkTextProperty * GetLabelProperties(); - // Description: - // Toggle whether or not this legend should attempt to cache its position - // and size. The default value is true. If this value is set to false, - // the legend will recalculate its position and bounds every time it is - // drawn. If users will be able to zoom in or out on your legend, you - // may want to set this to false. Otherwise, the border around the legend - // may not resize appropriately. + //@{ + /** + * Toggle whether or not this legend should attempt to cache its position + * and size. The default value is true. If this value is set to false, + * the legend will recalculate its position and bounds every time it is + * drawn. If users will be able to zoom in or out on your legend, you + * may want to set this to false. Otherwise, the border around the legend + * may not resize appropriately. + */ vtkSetMacro(CacheBounds, bool); vtkGetMacro(CacheBounds, bool); vtkBooleanMacro(CacheBounds, bool); + //@} - // Description: - // Return true if the supplied x, y coordinate is inside the item. + /** + * Return true if the supplied x, y coordinate is inside the item. + */ virtual bool Hit(const vtkContextMouseEvent &mouse); - // Description: - // Mouse move event. + /** + * Mouse move event. + */ virtual bool MouseMoveEvent(const vtkContextMouseEvent &mouse); - // Description: - // Mouse button down event + /** + * Mouse button down event + */ virtual bool MouseButtonPressEvent(const vtkContextMouseEvent &mouse); - // Description: - // Mouse button release event. + /** + * Mouse button release event. + */ virtual bool MouseButtonReleaseEvent(const vtkContextMouseEvent &mouse); protected: @@ -196,29 +255,35 @@ protected: int HorizontalAlignment; // Alignment of the legend to the point it is anchored to. int VerticalAlignment; // Alignment of the legend to the point it is anchored to. - // Description: - // The pen used to draw the legend box. + /** + * The pen used to draw the legend box. + */ vtkNew Pen; - // Description: - // The brush used to render the background of the legend. + /** + * The brush used to render the background of the legend. + */ vtkNew Brush; - // Description: - // The text properties of the labels used in the legend. + /** + * The text properties of the labels used in the legend. + */ vtkNew LabelProperties; - // Description: - // Should we move the legend box around in response to the mouse drag? + /** + * Should we move the legend box around in response to the mouse drag? + */ bool DragEnabled; - // Description: - // Should the legend attempt to avoid recalculating its position & - // bounds unnecessarily? + /** + * Should the legend attempt to avoid recalculating its position & + * bounds unnecessarily? + */ bool CacheBounds; - // Description: - // Last button to be pressed. + /** + * Last button to be pressed. + */ int Button; vtkTimeStamp PlotTime; @@ -226,16 +291,19 @@ protected: vtkRectf Rect; - // Description: - // Padding between symbol and text. + /** + * Padding between symbol and text. + */ int Padding; - // Description: - // Width of the symbols in pixels in the legend. + /** + * Width of the symbols in pixels in the legend. + */ int SymbolWidth; - // Description: - // Should the legend be drawn inline in its chart? + /** + * Should the legend be drawn inline in its chart? + */ bool Inline; // Private storage class diff --git a/Charts/Core/vtkChartMatrix.h b/Charts/Core/vtkChartMatrix.h index ce6a24b18dca1864868389f858439a1de1047885..5da2be06e42e9073208043f415cebfe04cf7fa46 100644 --- a/Charts/Core/vtkChartMatrix.h +++ b/Charts/Core/vtkChartMatrix.h @@ -13,12 +13,15 @@ =========================================================================*/ -// .NAME vtkChartMatrix - container for a matrix of charts. -// -// .SECTION Description -// This class contains a matrix of charts. These charts will be of type -// vtkChartXY by default, but this can be overridden. The class will manage -// their layout and object lifetime. +/** + * @class vtkChartMatrix + * @brief container for a matrix of charts. + * + * + * This class contains a matrix of charts. These charts will be of type + * vtkChartXY by default, but this can be overridden. The class will manage + * their layout and object lifetime. +*/ #ifndef vtkChartMatrix_h #define vtkChartMatrix_h @@ -38,30 +41,37 @@ public: vtkTypeMacro(vtkChartMatrix, vtkAbstractContextItem); virtual void PrintSelf(ostream &os, vtkIndent indent); - // Description: - // Creates a new object. + /** + * Creates a new object. + */ static vtkChartMatrix *New(); - // Description: - // Perform any updates to the item that may be necessary before rendering. + /** + * Perform any updates to the item that may be necessary before rendering. + */ virtual void Update(); - // Description: - // Paint event for the chart matrix. + /** + * Paint event for the chart matrix. + */ virtual bool Paint(vtkContext2D *painter); - // Description: - // Set the width and height of the chart matrix. This will cause an immediate - // resize of the chart matrix, the default size is 0x0 (no charts). No chart - // objects are created until Allocate is called. + /** + * Set the width and height of the chart matrix. This will cause an immediate + * resize of the chart matrix, the default size is 0x0 (no charts). No chart + * objects are created until Allocate is called. + */ virtual void SetSize(const vtkVector2i& size); - // Description: - // Get the width and height of the chart matrix. + /** + * Get the width and height of the chart matrix. + */ virtual vtkVector2i GetSize() const { return this->Size; } - // Description: - // Set/get the borders of the chart matrix (space in pixels around each chart). + //@{ + /** + * Set/get the borders of the chart matrix (space in pixels around each chart). + */ virtual void SetBorders(int left, int bottom, int right, int top); void SetBorderLeft(int value); void SetBorderBottom(int value); @@ -74,53 +84,67 @@ public: borders[i]=this->Borders[i]; } } + //@} - // Description: - // Set the gutter that should be left between the charts in the matrix. + //@{ + /** + * Set the gutter that should be left between the charts in the matrix. + */ virtual void SetGutter(const vtkVector2f& gutter); void SetGutterX(float value); void SetGutterY(float value); + //@} - // Description: - // Set a specific resize that will move the bottom left point of a chart. + //@{ + /** + * Set a specific resize that will move the bottom left point of a chart. + */ virtual void SetSpecificResize(const vtkVector2i& index, const vtkVector2f& resize); virtual void ClearSpecificResizes(); + //@} - // Description: - // Get the gutter that should be left between the charts in the matrix. + /** + * Get the gutter that should be left between the charts in the matrix. + */ virtual vtkVector2f GetGutter() const { return this->Gutter; } - // Description: - // Allocate the charts, this will cause any null chart to be allocated. + /** + * Allocate the charts, this will cause any null chart to be allocated. + */ virtual void Allocate(); - // Description: - // Set the chart element, note that the chart matrix must be large enough to - // accommodate the element being set. Note that this class will take ownership - // of the chart object. - // \return false if the element cannot be set. + /** + * Set the chart element, note that the chart matrix must be large enough to + * accommodate the element being set. Note that this class will take ownership + * of the chart object. + * \return false if the element cannot be set. + */ virtual bool SetChart(const vtkVector2i& position, vtkChart* chart); - // Description: - // Get the specified chart element, if the element does not exist NULL will be - // returned. If the chart element has not yet been allocated it will be at - // this point. + /** + * Get the specified chart element, if the element does not exist NULL will be + * returned. If the chart element has not yet been allocated it will be at + * this point. + */ virtual vtkChart* GetChart(const vtkVector2i& position); - // Description: - // Set the span of a chart in the matrix. This defaults to 1x1, and cannot - // exceed the remaining space in x or y. - // \return false If the span is not possible. + /** + * Set the span of a chart in the matrix. This defaults to 1x1, and cannot + * exceed the remaining space in x or y. + * \return false If the span is not possible. + */ virtual bool SetChartSpan(const vtkVector2i& position, const vtkVector2i& span); - // Description: - // Get the span of the specified chart. + /** + * Get the span of the specified chart. + */ virtual vtkVector2i GetChartSpan(const vtkVector2i& position); - // Description: - // Get the position of the chart in the matrix at the specified location. - // The position should be specified in scene coordinates. + /** + * Get the position of the chart in the matrix at the specified location. + * The position should be specified in scene coordinates. + */ virtual vtkVector2i GetChartIndex(const vtkVector2f& position); protected: diff --git a/Charts/Core/vtkChartParallelCoordinates.h b/Charts/Core/vtkChartParallelCoordinates.h index a29f40cb4665608d3e4083d9929fb82e19d99252..f16d56cae439a5201af0f5ed4e7a4f6019500a69 100644 --- a/Charts/Core/vtkChartParallelCoordinates.h +++ b/Charts/Core/vtkChartParallelCoordinates.h @@ -13,10 +13,13 @@ =========================================================================*/ -// .NAME vtkChartParallelCoordinates - Factory class for drawing 2D charts -// -// .SECTION Description -// This defines the interface for a parallel coordinates chart. +/** + * @class vtkChartParallelCoordinates + * @brief Factory class for drawing 2D charts + * + * + * This defines the interface for a parallel coordinates chart. +*/ #ifndef vtkChartParallelCoordinates_h #define vtkChartParallelCoordinates_h @@ -35,112 +38,140 @@ public: vtkTypeMacro(vtkChartParallelCoordinates, vtkChart); virtual void PrintSelf(ostream &os, vtkIndent indent); - // Description: - // Creates a parallel coordinates chart + /** + * Creates a parallel coordinates chart + */ static vtkChartParallelCoordinates* New(); - // Description: - // Perform any updates to the item that may be necessary before rendering. - // The scene should take care of calling this on all items before their - // Paint function is invoked. + /** + * Perform any updates to the item that may be necessary before rendering. + * The scene should take care of calling this on all items before their + * Paint function is invoked. + */ virtual void Update(); - // Description: - // Paint event for the chart, called whenever the chart needs to be drawn + /** + * Paint event for the chart, called whenever the chart needs to be drawn + */ virtual bool Paint(vtkContext2D *painter); - // Description: - // Set the visibility of the specified column. + /** + * Set the visibility of the specified column. + */ void SetColumnVisibility(const vtkStdString& name, bool visible); - // Description: - // Set the visibility of all columns (true will make them all visible, false - // will remove all visible columns). + /** + * Set the visibility of all columns (true will make them all visible, false + * will remove all visible columns). + */ void SetColumnVisibilityAll(bool visible); - // Description: - // Get the visibility of the specified column. + /** + * Get the visibility of the specified column. + */ bool GetColumnVisibility(const vtkStdString& name); - // Description: - // Get a list of the columns, and the order in which they are displayed. + //@{ + /** + * Get a list of the columns, and the order in which they are displayed. + */ vtkGetObjectMacro(VisibleColumns, vtkStringArray); + //@} - // Description: - // Get the plot at the specified index, returns null if the index is invalid. + /** + * Get the plot at the specified index, returns null if the index is invalid. + */ virtual vtkPlot* GetPlot(vtkIdType index); - // Description: - // Get the number of plots the chart contains. + /** + * Get the number of plots the chart contains. + */ virtual vtkIdType GetNumberOfPlots(); - // Description: - // Get the axis specified by axisIndex. + /** + * Get the axis specified by axisIndex. + */ virtual vtkAxis* GetAxis(int axisIndex); - // Description: - // Get the number of axes in the current chart. + /** + * Get the number of axes in the current chart. + */ virtual vtkIdType GetNumberOfAxes(); - // Description: - // Request that the chart recalculates the range of its axes. Especially - // useful in applications after the parameters of plots have been modified. + /** + * Request that the chart recalculates the range of its axes. Especially + * useful in applications after the parameters of plots have been modified. + */ virtual void RecalculateBounds(); - // Description - // Set plot to use for the chart. Since this type of chart can - // only contain one plot, this will replace the previous plot. + /** + * Set plot to use for the chart. Since this type of chart can + * only contain one plot, this will replace the previous plot. + */ virtual void SetPlot(vtkPlotParallelCoordinates *plot); - // Description: - // Return true if the supplied x, y coordinate is inside the item. + /** + * Return true if the supplied x, y coordinate is inside the item. + */ virtual bool Hit(const vtkContextMouseEvent &mouse); - // Description: - // Mouse enter event. + /** + * Mouse enter event. + */ virtual bool MouseEnterEvent(const vtkContextMouseEvent &mouse); - // Description: - // Mouse move event. + /** + * Mouse move event. + */ virtual bool MouseMoveEvent(const vtkContextMouseEvent &mouse); - // Description: - // Mouse leave event. + /** + * Mouse leave event. + */ virtual bool MouseLeaveEvent(const vtkContextMouseEvent &mouse); - // Description: - // Mouse button down event + /** + * Mouse button down event + */ virtual bool MouseButtonPressEvent(const vtkContextMouseEvent &mouse); - // Description: - // Mouse button release event. + /** + * Mouse button release event. + */ virtual bool MouseButtonReleaseEvent(const vtkContextMouseEvent &mouse); - // Description: - // Mouse wheel event, positive delta indicates forward movement of the wheel. + /** + * Mouse wheel event, positive delta indicates forward movement of the wheel. + */ virtual bool MouseWheelEvent(const vtkContextMouseEvent &mouse, int delta); protected: vtkChartParallelCoordinates(); ~vtkChartParallelCoordinates(); - // Description: - // Private storage object - where we hide all of our STL objects... + //@{ + /** + * Private storage object - where we hide all of our STL objects... + */ class Private; Private *Storage; + //@} bool GeometryValid; - // Description: - // Selected indices for the table the plot is rendering + /** + * Selected indices for the table the plot is rendering + */ vtkIdTypeArray *Selection; - // Description: - // A list of the visible columns in the chart. + /** + * A list of the visible columns in the chart. + */ vtkStringArray *VisibleColumns; - // Description: - // The point cache is marked dirty until it has been initialized. + /** + * The point cache is marked dirty until it has been initialized. + */ vtkTimeStamp BuildTime; void ResetSelection(); diff --git a/Charts/Core/vtkChartPie.h b/Charts/Core/vtkChartPie.h index 92320acfc7eeac3ccbd48b6232385222a7951c73..2d275c996e8c669cb1dd1700e0807078d55e99cc 100644 --- a/Charts/Core/vtkChartPie.h +++ b/Charts/Core/vtkChartPie.h @@ -13,10 +13,13 @@ =========================================================================*/ -// .NAME vtkChartPie - Factory class for drawing pie charts -// -// .SECTION Description -// This class implements an pie chart. +/** + * @class vtkChartPie + * @brief Factory class for drawing pie charts + * + * + * This class implements an pie chart. +*/ #ifndef vtkChartPie_h #define vtkChartPie_h @@ -34,108 +37,131 @@ public: vtkTypeMacro(vtkChartPie, vtkChart); virtual void PrintSelf(ostream &os, vtkIndent indent); - // Description: - // Creates a 2D Chart object. + /** + * Creates a 2D Chart object. + */ static vtkChartPie *New(); - // Description: - // Perform any updates to the item that may be necessary before rendering. - // The scene should take care of calling this on all items before their - // Paint function is invoked. + /** + * Perform any updates to the item that may be necessary before rendering. + * The scene should take care of calling this on all items before their + * Paint function is invoked. + */ virtual void Update(); - // Description: - // Paint event for the chart, called whenever the chart needs to be drawn + /** + * Paint event for the chart, called whenever the chart needs to be drawn + */ virtual bool Paint(vtkContext2D *painter); - // Description: - // Add a plot to the chart. + /** + * Add a plot to the chart. + */ virtual vtkPlot * AddPlot(int type); - // Description: - // Add a plot to the chart. Return the index of the plot, -1 if it failed. + /** + * Add a plot to the chart. Return the index of the plot, -1 if it failed. + */ virtual vtkIdType AddPlot(vtkPlot* plot) { return Superclass::AddPlot(plot); } - // Description: - // Get the plot at the specified index, returns null if the index is invalid. + /** + * Get the plot at the specified index, returns null if the index is invalid. + */ virtual vtkPlot* GetPlot(vtkIdType index); - // Description: - // Get the number of plots the chart contains. + /** + * Get the number of plots the chart contains. + */ virtual vtkIdType GetNumberOfPlots(); - // Description: - // Set whether the chart should draw a legend. + /** + * Set whether the chart should draw a legend. + */ virtual void SetShowLegend(bool visible); - // Description: - // Get the legend for the chart, if available. Can return NULL if there is no - // legend. + /** + * Get the legend for the chart, if available. Can return NULL if there is no + * legend. + */ virtual vtkChartLegend * GetLegend(); - // Description: - // Set the vtkContextScene for the item, always set for an item in a scene. + /** + * Set the vtkContextScene for the item, always set for an item in a scene. + */ virtual void SetScene(vtkContextScene *scene); - // Description: - // Return true if the supplied x, y coordinate is inside the item. + /** + * Return true if the supplied x, y coordinate is inside the item. + */ virtual bool Hit(const vtkContextMouseEvent &mouse); - // Description: - // Mouse enter event. + /** + * Mouse enter event. + */ virtual bool MouseEnterEvent(const vtkContextMouseEvent &mouse); - // Description: - // Mouse move event. + /** + * Mouse move event. + */ virtual bool MouseMoveEvent(const vtkContextMouseEvent &mouse); - // Description: - // Mouse leave event. + /** + * Mouse leave event. + */ virtual bool MouseLeaveEvent(const vtkContextMouseEvent &mouse); - // Description: - // Mouse button down event + /** + * Mouse button down event + */ virtual bool MouseButtonPressEvent(const vtkContextMouseEvent &mouse); - // Description: - // Mouse button release event. + /** + * Mouse button release event. + */ virtual bool MouseButtonReleaseEvent(const vtkContextMouseEvent &mouse); - // Description: - // Mouse wheel event, positive delta indicates forward movement of the wheel. + /** + * Mouse wheel event, positive delta indicates forward movement of the wheel. + */ virtual bool MouseWheelEvent(const vtkContextMouseEvent &mouse, int delta); protected: vtkChartPie(); ~vtkChartPie(); - // Description: - // Recalculate the necessary transforms. + /** + * Recalculate the necessary transforms. + */ void RecalculatePlotTransforms(); - // Description: - // The legend for the chart. + /** + * The legend for the chart. + */ vtkChartLegend *Legend; - // Description: - // The tooltip item for the chart - can be used to display extra information. + /** + * The tooltip item for the chart - can be used to display extra information. + */ vtkTooltipItem *Tooltip; - // Description: - // Does the plot area transform need to be recalculated? + /** + * Does the plot area transform need to be recalculated? + */ bool PlotTransformValid; private: vtkChartPie(const vtkChartPie &) VTK_DELETE_FUNCTION; void operator=(const vtkChartPie &) VTK_DELETE_FUNCTION; - // Description: - // Try to locate a point within the plots to display in a tooltip + /** + * Try to locate a point within the plots to display in a tooltip + */ bool LocatePointInPlots(const vtkContextMouseEvent &mouse); - // Description: - // Private implementation details + /** + * Private implementation details + */ vtkChartPiePrivate *Private; }; diff --git a/Charts/Core/vtkChartSelectionHelper.h b/Charts/Core/vtkChartSelectionHelper.h index d20f54a0408a48cde1393784ee0fa7ecd33c8db3..a325750c1be82661d38bc35f565a8c5e3429ea57 100644 --- a/Charts/Core/vtkChartSelectionHelper.h +++ b/Charts/Core/vtkChartSelectionHelper.h @@ -13,13 +13,16 @@ =========================================================================*/ -// .NAME vtkChartSelectionHelper - helper functions for making selections in -// charts. -// -// .SECTION Description -// This contains several inline methods intended for use inside chart -// implementations to make chart selections easier. This is intended for -// internal use and the API should not be considered stable. +/** + * @class vtkChartSelectionHelper + * @brief helper functions for making selections in + * charts. + * + * + * This contains several inline methods intended for use inside chart + * implementations to make chart selections easier. This is intended for + * internal use and the API should not be considered stable. +*/ #ifndef vtkChartSelectionHelper_h #define vtkChartSelectionHelper_h @@ -42,9 +45,10 @@ namespace vtkChartSelectionHelper { -// Description: -// Populate the annotation link with the supplied selectionIds array, and set -// the appropriate node properties for a standard row based chart selection. +/** + * Populate the annotation link with the supplied selectionIds array, and set + * the appropriate node properties for a standard row based chart selection. + */ static void MakeSelection(vtkAnnotationLink *link, vtkIdTypeArray *selectionIds, vtkPlot *plot) { @@ -90,8 +94,10 @@ static void MakeSelection(vtkAnnotationLink *link, vtkIdTypeArray *selectionIds, } } -// Description: -// Subtract the supplied selection from the oldSelection. +//@{ +/** + * Subtract the supplied selection from the oldSelection. + */ static void MinusSelection(vtkIdTypeArray *selection, vtkIdTypeArray *oldSelection) { // We rely on the selection id arrays being sorted. @@ -104,6 +110,7 @@ static void MinusSelection(vtkIdTypeArray *selection, vtkIdTypeArray *oldSelecti vtkIdType size = selection->GetNumberOfTuples(); vtkIdType i = 0; vtkIdType iOld = 0; +//@} while (i < size && iOld < oldSize) { @@ -134,8 +141,10 @@ static void MinusSelection(vtkIdTypeArray *selection, vtkIdTypeArray *oldSelecti } } -// Description: -// Add the supplied selection from the oldSelection. +//@{ +/** + * Add the supplied selection from the oldSelection. + */ static void AddSelection(vtkIdTypeArray *selection, vtkIdTypeArray *oldSelection) { // Add all unique array indices to create a new combined array. @@ -160,9 +169,12 @@ static void AddSelection(vtkIdTypeArray *selection, vtkIdTypeArray *oldSelection *ptrSelection = *i; } } +//@} -// Description: -// Toggle the supplied selection from the oldSelection. +//@{ +/** + * Toggle the supplied selection from the oldSelection. + */ static void ToggleSelection(vtkIdTypeArray *selection, vtkIdTypeArray *oldSelection) { // We rely on the selection id arrays being sorted. @@ -207,11 +219,13 @@ static void ToggleSelection(vtkIdTypeArray *selection, vtkIdTypeArray *oldSelect *ptrSelection = *it; } } +//@} -// Description: -// Build a selection based on the supplied selectionMode using the new -// plotSelection and combining it with the oldSelection. If link is not NULL -// then the resulting selection will be set on the link. +/** + * Build a selection based on the supplied selectionMode using the new + * plotSelection and combining it with the oldSelection. If link is not NULL + * then the resulting selection will be set on the link. + */ static void BuildSelection(vtkAnnotationLink *link, int selectionMode, vtkIdTypeArray *plotSelection, vtkIdTypeArray *oldSelection, vtkPlot *plot) @@ -245,9 +259,11 @@ static void BuildSelection(vtkAnnotationLink *link, int selectionMode, } } -// Description: -// Combine the SelectionMode with any mouse modifiers to get an effective -// selection mode for this click event. +//@{ +/** + * Combine the SelectionMode with any mouse modifiers to get an effective + * selection mode for this click event. + */ static int GetMouseSelectionMode(const vtkContextMouseEvent &mouse, int selectionMode) { // Mouse modifiers override the current selection mode. @@ -266,6 +282,7 @@ static int GetMouseSelectionMode(const vtkContextMouseEvent &mouse, int selectio } return selectionMode; } +//@} } // End vtkChartSelectionHelper namespace diff --git a/Charts/Core/vtkChartXY.h b/Charts/Core/vtkChartXY.h index 0a7e433df678447f3f9d5fe04e903aa20d0c9600..5161a6f5bfc74cb93fe7e14a15e5296c80a38d3d 100644 --- a/Charts/Core/vtkChartXY.h +++ b/Charts/Core/vtkChartXY.h @@ -13,13 +13,16 @@ =========================================================================*/ -// .NAME vtkChartXY - Factory class for drawing XY charts -// -// .SECTION Description -// This class implements an XY chart. - -// .SECTION See Also -// vtkBarChartActor +/** + * @class vtkChartXY + * @brief Factory class for drawing XY charts + * + * + * This class implements an XY chart. + * + * @sa + * vtkBarChartActor +*/ #ifndef vtkChartXY_h #define vtkChartXY_h @@ -43,315 +46,390 @@ public: vtkTypeMacro(vtkChartXY, vtkChart); virtual void PrintSelf(ostream &os, vtkIndent indent); - // Description: - // Creates a 2D Chart object. + /** + * Creates a 2D Chart object. + */ static vtkChartXY *New(); - // Description: - // Perform any updates to the item that may be necessary before rendering. - // The scene should take care of calling this on all items before their - // Paint function is invoked. + /** + * Perform any updates to the item that may be necessary before rendering. + * The scene should take care of calling this on all items before their + * Paint function is invoked. + */ virtual void Update(); - // Description: - // Paint event for the chart, called whenever the chart needs to be drawn + /** + * Paint event for the chart, called whenever the chart needs to be drawn + */ virtual bool Paint(vtkContext2D *painter); - // Description: - // Add a plot to the chart, defaults to using the name of the y column + /** + * Add a plot to the chart, defaults to using the name of the y column + */ virtual vtkPlot * AddPlot(int type); - // Description: - // Adds a plot to the chart + /** + * Adds a plot to the chart + */ virtual vtkIdType AddPlot(vtkPlot* plot); - // Description: - // Remove the plot at the specified index, returns true if successful, - // false if the index was invalid. + /** + * Remove the plot at the specified index, returns true if successful, + * false if the index was invalid. + */ virtual bool RemovePlot(vtkIdType index); - // Description: - // Remove all plots from the chart. + /** + * Remove all plots from the chart. + */ virtual void ClearPlots(); - // Description: - // Get the plot at the specified index, returns null if the index is invalid. + /** + * Get the plot at the specified index, returns null if the index is invalid. + */ virtual vtkPlot* GetPlot(vtkIdType index); - // Description: - // Get the index of the specified plot, returns -1 if the plot does not - // belong to the chart. + /** + * Get the index of the specified plot, returns -1 if the plot does not + * belong to the chart. + */ virtual vtkIdType GetPlotIndex(vtkPlot*); - // Description: - // Raises the \a plot to the top of the plot's stack. - // \return The new index of the plot - // \sa StackPlotAbove(), LowerPlot(), StackPlotUnder() + /** + * Raises the \a plot to the top of the plot's stack. + * \return The new index of the plot + * \sa StackPlotAbove(), LowerPlot(), StackPlotUnder() + */ vtkIdType RaisePlot(vtkPlot* plot); - // Description: - // Raises the \a plot above the \a under plot. If \a under is null, - // the plot is raised to the top of the plot's stack. - // \return The new index of the plot - // \sa RaisePlot(), LowerPlot(), StackPlotUnder() + /** + * Raises the \a plot above the \a under plot. If \a under is null, + * the plot is raised to the top of the plot's stack. + * \return The new index of the plot + * \sa RaisePlot(), LowerPlot(), StackPlotUnder() + */ virtual vtkIdType StackPlotAbove(vtkPlot* plot, vtkPlot* under); - // Description: - // Lowers the \a plot to the bottom of the plot's stack. - // \return The new index of the plot - // \sa StackPlotUnder(), RaisePlot(), StackPlotAbove() + /** + * Lowers the \a plot to the bottom of the plot's stack. + * \return The new index of the plot + * \sa StackPlotUnder(), RaisePlot(), StackPlotAbove() + */ vtkIdType LowerPlot(vtkPlot* plot); - // Description: - // Lowers the \a plot under the \a above plot. If \a above is null, - // the plot is lowered to the bottom of the plot's stack - // \return The new index of the plot - // \sa StackPlotUnder(), RaisePlot(), StackPlotAbove() + /** + * Lowers the \a plot under the \a above plot. If \a above is null, + * the plot is lowered to the bottom of the plot's stack + * \return The new index of the plot + * \sa StackPlotUnder(), RaisePlot(), StackPlotAbove() + */ virtual vtkIdType StackPlotUnder(vtkPlot* plot, vtkPlot* above); - // Description: - // Get the number of plots the chart contains. + /** + * Get the number of plots the chart contains. + */ virtual vtkIdType GetNumberOfPlots(); - // Description: - // Figure out which quadrant the plot is in. + /** + * Figure out which quadrant the plot is in. + */ int GetPlotCorner(vtkPlot *plot); - // Description: - // Figure out which quadrant the plot is in. + /** + * Figure out which quadrant the plot is in. + */ void SetPlotCorner(vtkPlot *plot, int corner); - // Description: - // Get the axis specified by axisIndex. This is specified with the vtkAxis - // position enum, valid values are vtkAxis::LEFT, vtkAxis::BOTTOM, - // vtkAxis::RIGHT and vtkAxis::TOP. + /** + * Get the axis specified by axisIndex. This is specified with the vtkAxis + * position enum, valid values are vtkAxis::LEFT, vtkAxis::BOTTOM, + * vtkAxis::RIGHT and vtkAxis::TOP. + */ virtual vtkAxis* GetAxis(int axisIndex); - // Description: - // Set whether the chart should draw a legend. + /** + * Set whether the chart should draw a legend. + */ virtual void SetShowLegend(bool visible); - // Description: - // Get the vtkChartLegend object that will be displayed by the chart. + /** + * Get the vtkChartLegend object that will be displayed by the chart. + */ virtual vtkChartLegend* GetLegend(); - // Description: - // Set the vtkTooltipItem object that will be displayed by the chart. + /** + * Set the vtkTooltipItem object that will be displayed by the chart. + */ virtual void SetTooltip(vtkTooltipItem *tooltip); - // Description: - // Get the vtkTooltipItem object that will be displayed by the chart. + /** + * Get the vtkTooltipItem object that will be displayed by the chart. + */ virtual vtkTooltipItem* GetTooltip(); - // Description: - // Get the number of axes in the current chart. + /** + * Get the number of axes in the current chart. + */ virtual vtkIdType GetNumberOfAxes(); - // Description: - // Request that the chart recalculates the range of its axes. Especially - // useful in applications after the parameters of plots have been modified. + /** + * Request that the chart recalculates the range of its axes. Especially + * useful in applications after the parameters of plots have been modified. + */ virtual void RecalculateBounds(); - // Description: - // Set the selection method, which controls how selections are handled by the - // chart. The default is SELECTION_ROWS which selects all points in all plots - // in a chart that have values in the rows selected. SELECTION_PLOTS allows - // for finer-grained selections specific to each plot, and so to each XY - // column pair. + /** + * Set the selection method, which controls how selections are handled by the + * chart. The default is SELECTION_ROWS which selects all points in all plots + * in a chart that have values in the rows selected. SELECTION_PLOTS allows + * for finer-grained selections specific to each plot, and so to each XY + * column pair. + */ virtual void SetSelectionMethod(int method); - // Description: - // If true then the axes will be drawn at the origin (scientific style). + //@{ + /** + * If true then the axes will be drawn at the origin (scientific style). + */ vtkSetMacro(DrawAxesAtOrigin, bool); vtkGetMacro(DrawAxesAtOrigin, bool); vtkBooleanMacro(DrawAxesAtOrigin, bool); + //@} - // Description: - // If true then the axes will be turned on and off depending upon whether - // any plots are in that corner. Defaults to true. + //@{ + /** + * If true then the axes will be turned on and off depending upon whether + * any plots are in that corner. Defaults to true. + */ vtkSetMacro(AutoAxes, bool); vtkGetMacro(AutoAxes, bool); vtkBooleanMacro(AutoAxes, bool); + //@} - // Description: - // Border size of the axes that are hidden (vtkAxis::GetVisible()) + //@{ + /** + * Border size of the axes that are hidden (vtkAxis::GetVisible()) + */ vtkSetMacro(HiddenAxisBorder, int); vtkGetMacro(HiddenAxisBorder, int); - - // Description - // Force the axes to have their Minimum and Maximum properties inside the - // plot boundaries. It constrains pan and zoom interaction. - // False by default. + //@} + + //@{ + /** + * Force the axes to have their Minimum and Maximum properties inside the + * plot boundaries. It constrains pan and zoom interaction. + * False by default. + */ vtkSetMacro(ForceAxesToBounds, bool); vtkGetMacro(ForceAxesToBounds, bool); vtkBooleanMacro(ForceAxesToBounds, bool); - - // Description: - // Set the width fraction for any bar charts drawn in this chart. It is - // assumed that all bar plots will use the same array for the X axis, and that - // this array is regularly spaced. The delta between the first two x values is - // used to calculated the width of the bars, and subdivided between each bar. - // The default value is 0.8, 1.0 would lead to bars that touch. + //@} + + //@{ + /** + * Set the width fraction for any bar charts drawn in this chart. It is + * assumed that all bar plots will use the same array for the X axis, and that + * this array is regularly spaced. The delta between the first two x values is + * used to calculated the width of the bars, and subdivided between each bar. + * The default value is 0.8, 1.0 would lead to bars that touch. + */ vtkSetMacro(BarWidthFraction, float); vtkGetMacro(BarWidthFraction, float); - - // Description: - // Set the behavior of the mouse wheel. If true, the mouse wheel zooms in/out - // on the chart. Otherwise, unless MouseWheelEvent is overridden by a subclass - // the mouse wheel does nothing. - // The default value is true. + //@} + + //@{ + /** + * Set the behavior of the mouse wheel. If true, the mouse wheel zooms in/out + * on the chart. Otherwise, unless MouseWheelEvent is overridden by a subclass + * the mouse wheel does nothing. + * The default value is true. + */ vtkSetMacro(ZoomWithMouseWheel, bool); vtkGetMacro(ZoomWithMouseWheel, bool); vtkBooleanMacro(ZoomWithMouseWheel, bool); - - // Description: - // Adjust the minimum of a logarithmic axis to be greater than 0, regardless - // of the minimum data value. - // False by default. + //@} + + //@{ + /** + * Adjust the minimum of a logarithmic axis to be greater than 0, regardless + * of the minimum data value. + * False by default. + */ vtkSetMacro(AdjustLowerBoundForLogPlot, bool); vtkGetMacro(AdjustLowerBoundForLogPlot, bool); vtkBooleanMacro(AdjustLowerBoundForLogPlot, bool); + //@} - // Description: - // Set the information passed to the tooltip. + /** + * Set the information passed to the tooltip. + */ virtual void SetTooltipInfo(const vtkContextMouseEvent &, const vtkVector2d &, vtkIdType, vtkPlot*, vtkIdType segmentIndex = -1); - // Description: - // Return true if the supplied x, y coordinate is inside the item. + /** + * Return true if the supplied x, y coordinate is inside the item. + */ virtual bool Hit(const vtkContextMouseEvent &mouse); - // Description: - // Mouse enter event. + /** + * Mouse enter event. + */ virtual bool MouseEnterEvent(const vtkContextMouseEvent &mouse); - // Description: - // Mouse move event. + /** + * Mouse move event. + */ virtual bool MouseMoveEvent(const vtkContextMouseEvent &mouse); - // Description: - // Mouse leave event. + /** + * Mouse leave event. + */ virtual bool MouseLeaveEvent(const vtkContextMouseEvent &mouse); - // Description: - // Mouse button down event + /** + * Mouse button down event + */ virtual bool MouseButtonPressEvent(const vtkContextMouseEvent &mouse); - // Description: - // Mouse button release event. + /** + * Mouse button release event. + */ virtual bool MouseButtonReleaseEvent(const vtkContextMouseEvent &mouse); - // Description: - // Mouse wheel event, positive delta indicates forward movement of the wheel. + /** + * Mouse wheel event, positive delta indicates forward movement of the wheel. + */ virtual bool MouseWheelEvent(const vtkContextMouseEvent &mouse, int delta); - // Description: - // Key press event. + /** + * Key press event. + */ virtual bool KeyPressEvent(const vtkContextKeyEvent &key); protected: vtkChartXY(); ~vtkChartXY(); - // Description: - // Recalculate the necessary transforms. + /** + * Recalculate the necessary transforms. + */ void RecalculatePlotTransforms(); - // Description: - // Calculate the optimal zoom level such that all of the points to be plotted - // will fit into the plot area. + /** + * Calculate the optimal zoom level such that all of the points to be plotted + * will fit into the plot area. + */ void RecalculatePlotBounds(); - // Description: - // Update the layout of the chart, this may require the vtkContext2D in order - // to get font metrics etc. Initially this was added to resize the charts - // according in response to the size of the axes. + /** + * Update the layout of the chart, this may require the vtkContext2D in order + * to get font metrics etc. Initially this was added to resize the charts + * according in response to the size of the axes. + */ virtual bool UpdateLayout(vtkContext2D* painter); - // Description: - // Layout for the legend if it is visible. This is run after the axes layout - // and will adjust the borders to account for the legend position. - // \return The required space in the specified border. + /** + * Layout for the legend if it is visible. This is run after the axes layout + * and will adjust the borders to account for the legend position. + * \return The required space in the specified border. + */ virtual int GetLegendBorder(vtkContext2D* painter, int axisPosition); - // Description: - // Called after the edges of the chart are decided, set the position of the - // legend, depends upon its alignment. + /** + * Called after the edges of the chart are decided, set the position of the + * legend, depends upon its alignment. + */ virtual void SetLegendPosition(const vtkRectf& rect); - // Description: - // The legend for the chart. + /** + * The legend for the chart. + */ vtkSmartPointer Legend; - // Description: - // The tooltip item for the chart - can be used to display extra information. + /** + * The tooltip item for the chart - can be used to display extra information. + */ vtkSmartPointer Tooltip; - // Description: - // Does the plot area transform need to be recalculated? + /** + * Does the plot area transform need to be recalculated? + */ bool PlotTransformValid; - // Description: - // The box created as the mouse is dragged around the screen. + /** + * The box created as the mouse is dragged around the screen. + */ vtkRectf MouseBox; - // Description: - // Should the box be drawn (could be selection, zoom etc). + /** + * Should the box be drawn (could be selection, zoom etc). + */ bool DrawBox; - // Description: - // The polygon created as the mouse is dragged around the screen when in - // polygonal selection mode. + /** + * The polygon created as the mouse is dragged around the screen when in + * polygonal selection mode. + */ vtkContextPolygon SelectionPolygon; - // Description: - // Should the selection polygon be drawn. + /** + * Should the selection polygon be drawn. + */ bool DrawSelectionPolygon; - // Description: - // Should we draw the location of the nearest point on the plot? + /** + * Should we draw the location of the nearest point on the plot? + */ bool DrawNearestPoint; - // Description: - // Keep the axes drawn at the origin? This will attempt to keep the axes drawn - // at the origin, i.e. 0.0, 0.0 for the chart. This is often the preferred - // way of drawing scientific/mathematical charts. + /** + * Keep the axes drawn at the origin? This will attempt to keep the axes drawn + * at the origin, i.e. 0.0, 0.0 for the chart. This is often the preferred + * way of drawing scientific/mathematical charts. + */ bool DrawAxesAtOrigin; - // Description: - // Should axes be turned on and off automatically - defaults to on. + /** + * Should axes be turned on and off automatically - defaults to on. + */ bool AutoAxes; - // Description: - // Size of the border when an axis is hidden + /** + * Size of the border when an axis is hidden + */ int HiddenAxisBorder; - // Description: - // The fraction of the interval taken up along the x axis by any bars that are - // drawn on the chart. + /** + * The fraction of the interval taken up along the x axis by any bars that are + * drawn on the chart. + */ float BarWidthFraction; - // Description: - // Indicate if the layout has changed in some way that would require layout - // code to be called. + /** + * Indicate if the layout has changed in some way that would require layout + * code to be called. + */ bool LayoutChanged; - // Description: - // Property to force the axes to have their Minimum and Maximum properties - // inside the plot boundaries. It constrains pan and zoom interaction. - // False by default. + /** + * Property to force the axes to have their Minimum and Maximum properties + * inside the plot boundaries. It constrains pan and zoom interaction. + * False by default. + */ bool ForceAxesToBounds; - // Description: - // Property to enable zooming the chart with the mouse wheel. - // True by default. + /** + * Property to enable zooming the chart with the mouse wheel. + * True by default. + */ bool ZoomWithMouseWheel; - // Description: - // Property to adjust the minimum of a logarithmic axis to be greater than 0, - // regardless of the minimum data value. + /** + * Property to adjust the minimum of a logarithmic axis to be greater than 0, + * regardless of the minimum data value. + */ bool AdjustLowerBoundForLogPlot; private: @@ -360,14 +438,16 @@ private: vtkChartXYPrivate *ChartPrivate; // Private class where I hide my STL containers - // Description: - // Figure out the spacing between the bar chart plots, and their offsets. + /** + * Figure out the spacing between the bar chart plots, and their offsets. + */ void CalculateBarPlots(); - // Description: - // Try to locate a point within the plots to display in a tooltip. - // If invokeEvent is greater than 0, then an event will be invoked if a point - // is at that mouse position. + /** + * Try to locate a point within the plots to display in a tooltip. + * If invokeEvent is greater than 0, then an event will be invoked if a point + * is at that mouse position. + */ bool LocatePointInPlots(const vtkContextMouseEvent &mouse, int invokeEvent = -1); @@ -375,14 +455,16 @@ private: const vtkVector2f &tolerance, vtkVector2f &plotPos, vtkPlot *plot, vtkIdType &segmentIndex); - // Description: - // Remove the plot from the plot corners list. + /** + * Remove the plot from the plot corners list. + */ bool RemovePlotFromCorners(vtkPlot *plot); void ZoomInAxes(vtkAxis *x, vtkAxis *y, float *orign, float *max); - // Description: - // Transform the selection box or polygon. + /** + * Transform the selection box or polygon. + */ void TransformBoxOrPolygon(bool polygonMode, vtkTransform2D *transform, const vtkVector2f &mousePosition, vtkVector2f &min, vtkVector2f &max, @@ -390,10 +472,12 @@ private: }; -// Description: -// Small struct used by InvokeEvent to send some information about the point -// that was clicked on. This is an experimental part of the API, subject to -// change. +//@{ +/** + * Small struct used by InvokeEvent to send some information about the point + * that was clicked on. This is an experimental part of the API, subject to + * change. + */ struct vtkChartPlotData { vtkStdString SeriesName; @@ -401,5 +485,6 @@ struct vtkChartPlotData vtkVector2i ScreenPosition; int Index; }; +//@} #endif //vtkChartXY_h diff --git a/Charts/Core/vtkChartXYZ.h b/Charts/Core/vtkChartXYZ.h index 17eb104d005867a4a386399fb52a957cc3e7e100..e314ed07246eafbf9cb9edb90f6d801487f8cc09 100644 --- a/Charts/Core/vtkChartXYZ.h +++ b/Charts/Core/vtkChartXYZ.h @@ -13,9 +13,12 @@ =========================================================================*/ -// .NAME vtkChartXYZ - Factory class for drawing 3D XYZ charts. -// -// .SECTION Description +/** + * @class vtkChartXYZ + * @brief Factory class for drawing 3D XYZ charts. + * + * +*/ #ifndef vtkChartXYZ_h #define vtkChartXYZ_h @@ -47,366 +50,448 @@ public: static vtkChartXYZ * New(); - // Description: - // Set the geometry in pixel coordinates (origin and width/height). - // This method also sets up the end points of the axes of the chart. - // For this reason, if you call SetAroundX(), you should call SetGeometry() - // afterwards. + /** + * Set the geometry in pixel coordinates (origin and width/height). + * This method also sets up the end points of the axes of the chart. + * For this reason, if you call SetAroundX(), you should call SetGeometry() + * afterwards. + */ void SetGeometry(const vtkRectf &bounds); - // Description: - // Set the rotation angle for the chart (AutoRotate mode only). + /** + * Set the rotation angle for the chart (AutoRotate mode only). + */ void SetAngle(double angle); - // Description: - // Set whether or not we're rotating about the X axis. + /** + * Set whether or not we're rotating about the X axis. + */ void SetAroundX(bool isX); - // Description: - // Set the vtkAnnotationLink for the chart. + /** + * Set the vtkAnnotationLink for the chart. + */ virtual void SetAnnotationLink(vtkAnnotationLink *link); - // Description: - // Get the x (0), y (1) or z (2) axis. + /** + * Get the x (0), y (1) or z (2) axis. + */ vtkAxis * GetAxis(int axis); - // Description: - // Set the color for the axes. + //@{ + /** + * Set the color for the axes. + */ void SetAxisColor(const vtkColor4ub& color); vtkColor4ub GetAxisColor(); + //@} - // Description: - // Set whether or not we're using this chart to rotate on a timer. - // Default value is false. + /** + * Set whether or not we're using this chart to rotate on a timer. + * Default value is false. + */ void SetAutoRotate(bool b); - // Description: - // Set whether or not axes labels & tick marks should be drawn. - // Default value is true. + /** + * Set whether or not axes labels & tick marks should be drawn. + * Default value is true. + */ void SetDecorateAxes(bool b); - // Description: - // Set whether or not the chart should automatically resize itself to fill - // the scene. Default value is true. + /** + * Set whether or not the chart should automatically resize itself to fill + * the scene. Default value is true. + */ void SetFitToScene(bool b); - // Description: - // Perform any updates to the item that may be necessary before rendering. + /** + * Perform any updates to the item that may be necessary before rendering. + */ virtual void Update(); - // Description: - // Paint event for the chart, called whenever the chart needs to be drawn. + /** + * Paint event for the chart, called whenever the chart needs to be drawn. + */ virtual bool Paint(vtkContext2D *painter); - // Description: - // Adds a plot to the chart. + /** + * Adds a plot to the chart. + */ virtual vtkIdType AddPlot(vtkPlot3D* plot); - // Description: - // Remove all the plots from this chart. + /** + * Remove all the plots from this chart. + */ void ClearPlots(); - // Description: - // Determine the XYZ bounds of the plots within this chart. - // This information is then used to set the range of the axes. + /** + * Determine the XYZ bounds of the plots within this chart. + * This information is then used to set the range of the axes. + */ void RecalculateBounds(); - // Description: - // Use this chart's Geometry to set the endpoints of its axes. - // This method also sets up a transformation that is used to - // properly render the data within the chart. + /** + * Use this chart's Geometry to set the endpoints of its axes. + * This method also sets up a transformation that is used to + * properly render the data within the chart. + */ void RecalculateTransform(); - // Description: - // Returns true if the transform is interactive, false otherwise. + /** + * Returns true if the transform is interactive, false otherwise. + */ virtual bool Hit(const vtkContextMouseEvent &mouse); - // Description: - // Mouse press event. Keep track of zoom anchor position. + /** + * Mouse press event. Keep track of zoom anchor position. + */ virtual bool MouseButtonPressEvent(const vtkContextMouseEvent &mouse); - // Description: - // Mouse move event. Perform pan or zoom as specified by the mouse bindings. + /** + * Mouse move event. Perform pan or zoom as specified by the mouse bindings. + */ virtual bool MouseMoveEvent(const vtkContextMouseEvent &mouse); - // Description: - // Mouse wheel event. Zooms in or out. + /** + * Mouse wheel event. Zooms in or out. + */ virtual bool MouseWheelEvent(const vtkContextMouseEvent &mouse, int delta); - // Description: - // Key press event. This allows the user to snap the chart to one of three - // different 2D views. "x" changes the view so we're looking down the X axis. - // Similar behavior occurs for "y" or "z". + /** + * Key press event. This allows the user to snap the chart to one of three + * different 2D views. "x" changes the view so we're looking down the X axis. + * Similar behavior occurs for "y" or "z". + */ virtual bool KeyPressEvent(const vtkContextKeyEvent &key); protected: vtkChartXYZ(); ~vtkChartXYZ(); - // Description: - // Calculate the transformation matrices used to draw data points and axes - // in the scene. This function also sets up clipping planes that determine - // whether or not a data point is within range. + /** + * Calculate the transformation matrices used to draw data points and axes + * in the scene. This function also sets up clipping planes that determine + * whether or not a data point is within range. + */ virtual void CalculateTransforms(); - // Description: - // Given the x, y and z vtkAxis, and a transform, calculate the transform that - // the points in a chart would need to be drawn within the axes. This assumes - // that the axes have the correct start and end positions, and that they are - // perpendicular. + /** + * Given the x, y and z vtkAxis, and a transform, calculate the transform that + * the points in a chart would need to be drawn within the axes. This assumes + * that the axes have the correct start and end positions, and that they are + * perpendicular. + */ bool CalculatePlotTransform(vtkAxis *x, vtkAxis *y, vtkAxis *z, vtkTransform *transform); - // Description: - // Rotate the chart in response to a mouse movement. + /** + * Rotate the chart in response to a mouse movement. + */ bool Rotate(const vtkContextMouseEvent &mouse); - // Description: - // Pan the data within the chart in response to a mouse movement. + /** + * Pan the data within the chart in response to a mouse movement. + */ bool Pan(const vtkContextMouseEvent &mouse); - // Description: - // Zoom in or out on the data in response to a mouse movement. + /** + * Zoom in or out on the data in response to a mouse movement. + */ bool Zoom(const vtkContextMouseEvent &mouse); - // Description: - // Spin the chart in response to a mouse movement. + /** + * Spin the chart in response to a mouse movement. + */ bool Spin(const vtkContextMouseEvent &mouse); - // Description: - // Adjust the rotation of the chart so that we are looking down the X axis. + /** + * Adjust the rotation of the chart so that we are looking down the X axis. + */ void LookDownX(); - // Description: - // Adjust the rotation of the chart so that we are looking down the Y axis. + /** + * Adjust the rotation of the chart so that we are looking down the Y axis. + */ void LookDownY(); - // Description: - // Adjust the rotation of the chart so that we are looking down the Z axis. + /** + * Adjust the rotation of the chart so that we are looking down the Z axis. + */ void LookDownZ(); - // Description: - // Adjust the rotation of the chart so that we are looking up the X axis. + /** + * Adjust the rotation of the chart so that we are looking up the X axis. + */ void LookUpX(); - // Description: - // Adjust the rotation of the chart so that we are looking up the Y axis. + /** + * Adjust the rotation of the chart so that we are looking up the Y axis. + */ void LookUpY(); - // Description: - // Adjust the rotation of the chart so that we are looking up the Z axis. + /** + * Adjust the rotation of the chart so that we are looking up the Z axis. + */ void LookUpZ(); - // Description: - // Check to see if the scene changed size since the last render. + /** + * Check to see if the scene changed size since the last render. + */ bool CheckForSceneResize(); - // Description: - // Scale the axes up or down in response to a scene resize. + /** + * Scale the axes up or down in response to a scene resize. + */ void RescaleAxes(); - // Description: - // Scale up the axes when the scene gets larger. + /** + * Scale up the axes when the scene gets larger. + */ void ScaleUpAxes(); - // Description: - // Scale down the axes when the scene gets smaller. + /** + * Scale down the axes when the scene gets smaller. + */ void ScaleDownAxes(); - // Description: - // Change the scaling of the axes by a specified amount. + /** + * Change the scaling of the axes by a specified amount. + */ void ZoomAxes(int delta); - // Description: - // Initialize a list of "test points". These are used to determine whether - // or not the chart fits completely within the bounds of the current scene. + /** + * Initialize a list of "test points". These are used to determine whether + * or not the chart fits completely within the bounds of the current scene. + */ void InitializeAxesBoundaryPoints(); - // Description: - // Initialize the "future box" transform. This transform is a duplicate of - // the Box transform, which dictates how the chart's axes should be drawn. - // In ScaleUpAxes() and ScaleDownAxes(), we incrementally change the scaling - // of the FutureBox transform to determine how much we need to zoom in or - // zoom out to fit the chart within the newly resized scene. Using a - // separate transform for this process allows us to resize the Box in a - // single step. + /** + * Initialize the "future box" transform. This transform is a duplicate of + * the Box transform, which dictates how the chart's axes should be drawn. + * In ScaleUpAxes() and ScaleDownAxes(), we incrementally change the scaling + * of the FutureBox transform to determine how much we need to zoom in or + * zoom out to fit the chart within the newly resized scene. Using a + * separate transform for this process allows us to resize the Box in a + * single step. + */ void InitializeFutureBox(); - // Description: - // Compute a bounding box for the data that is rendered within the axes. + /** + * Compute a bounding box for the data that is rendered within the axes. + */ void ComputeDataBounds(); - // Description: - // Draw the cube axes of this chart. + /** + * Draw the cube axes of this chart. + */ void DrawAxes(vtkContext3D *context); - // Description: - // For each of the XYZ dimensions, find the axis line that is furthest - // from the rendered data. + /** + * For each of the XYZ dimensions, find the axis line that is furthest + * from the rendered data. + */ void DetermineWhichAxesToLabel(); - // Description: - // Draw tick marks and tick mark labels along the axes. + /** + * Draw tick marks and tick mark labels along the axes. + */ void DrawTickMarks(vtkContext2D *painter); - // Description: - // Label the axes. + /** + * Label the axes. + */ void DrawAxesLabels(vtkContext2D *painter); - // Description: - // Compute how some text should be offset from an axis. The parameter - // bounds contains the bounding box of the text to be rendered. The - // result is stored in the parameter offset. + /** + * Compute how some text should be offset from an axis. The parameter + * bounds contains the bounding box of the text to be rendered. The + * result is stored in the parameter offset. + */ void GetOffsetForAxisLabel(int axis, float *bounds, float *offset); - // Description: - // Calculate the next "nicest" numbers above and below the current minimum. - // \return the "nice" spacing of the numbers. - // This function was mostly copied from vtkAxis. + /** + * Calculate the next "nicest" numbers above and below the current minimum. + * \return the "nice" spacing of the numbers. + * This function was mostly copied from vtkAxis. + */ double CalculateNiceMinMax(double &min, double &max, int axis); - // Description: - // Get the equation for the ith face of our bounding cube. + /** + * Get the equation for the ith face of our bounding cube. + */ void GetClippingPlaneEquation(int i, double *planeEquation); - // Description: - // The size and position of this chart. + /** + * The size and position of this chart. + */ vtkRectf Geometry; - // Description: - // The 3 axes of this chart. + /** + * The 3 axes of this chart. + */ std::vector< vtkSmartPointer > Axes; - // Description: - // This boolean indicates whether or not we're using this chart to rotate - // on a timer. + /** + * This boolean indicates whether or not we're using this chart to rotate + * on a timer. + */ bool AutoRotate; - // Description: - // When we're in AutoRotate mode, this boolean tells us if we should rotate - // about the X axis or the Y axis. + /** + * When we're in AutoRotate mode, this boolean tells us if we should rotate + * about the X axis or the Y axis. + */ bool IsX; - // Description: - // When we're in AutoRotate mode, this value tells the chart how much it - // should be rotated. + /** + * When we're in AutoRotate mode, this value tells the chart how much it + * should be rotated. + */ double Angle; - // Description: - // This boolean indicates whether or not we should draw tick marks - // and axes labels. + /** + * This boolean indicates whether or not we should draw tick marks + * and axes labels. + */ bool DrawAxesDecoration; - // Description: - // This boolean indicates whether or not we should automatically resize the - // chart so that it snugly fills up the scene. + /** + * This boolean indicates whether or not we should automatically resize the + * chart so that it snugly fills up the scene. + */ bool FitToScene; - // Description: - // This is the transform that is applied when rendering data from the plots. + /** + * This is the transform that is applied when rendering data from the plots. + */ vtkNew ContextTransform; - // Description: - // This transform translates and scales the plots' data points so that they - // appear within the axes of this chart. It is one of the factors that - // makes up the ContextTransform. + /** + * This transform translates and scales the plots' data points so that they + * appear within the axes of this chart. It is one of the factors that + * makes up the ContextTransform. + */ vtkNew PlotTransform; - // Description: - // This is the transform that is applied when rendering data from the plots. + /** + * This is the transform that is applied when rendering data from the plots. + */ vtkNew Box; - // Description: - // This transform keeps track of how the chart has been rotated. + /** + * This transform keeps track of how the chart has been rotated. + */ vtkNew Rotation; - // Description: - // This transform keeps track of how the data points have been panned within - // the chart. + /** + * This transform keeps track of how the data points have been panned within + * the chart. + */ vtkNew Translation; - // Description: - // This transform keeps track of how the data points have been scaled - // (zoomed in or zoomed out) within the chart. + /** + * This transform keeps track of how the data points have been scaled + * (zoomed in or zoomed out) within the chart. + */ vtkNew Scale; - // Description: - // This transform keeps track of how the axes have been scaled - // (zoomed in or zoomed out). + /** + * This transform keeps track of how the axes have been scaled + * (zoomed in or zoomed out). + */ vtkNew BoxScale; - // Description: - // This transform is initialized as a copy of Box. It is used within - // ScaleUpAxes() and ScaleDownAxes() to figure out how much we need to - // zoom in or zoom out to fit our chart within the newly resized scene. + /** + * This transform is initialized as a copy of Box. It is used within + * ScaleUpAxes() and ScaleDownAxes() to figure out how much we need to + * zoom in or zoom out to fit our chart within the newly resized scene. + */ vtkNew FutureBox; - // Description: - // This transform keeps track of the Scale of the FutureBox transform. + /** + * This transform keeps track of the Scale of the FutureBox transform. + */ vtkNew FutureBoxScale; - // Description: - // This is the pen that is used to draw data from the plots. + /** + * This is the pen that is used to draw data from the plots. + */ vtkNew Pen; - // Description: - // This is the pen that is used to draw the axes. + /** + * This is the pen that is used to draw the axes. + */ vtkNew AxisPen; - // Description: - // This link is used to share selected points with other classes. + /** + * This link is used to share selected points with other classes. + */ vtkSmartPointer Link; - // Description: - // The plots that are drawn within this chart. + /** + * The plots that are drawn within this chart. + */ std::vector Plots; - // Description: - // The label for the X Axis. + /** + * The label for the X Axis. + */ std::string XAxisLabel; - // Description: - // The label for the Y Axis. + /** + * The label for the Y Axis. + */ std::string YAxisLabel; - // Description: - // The label for the Z Axis. + /** + * The label for the Z Axis. + */ std::string ZAxisLabel; - // Description: - // The six planes that define the bounding cube of our 3D axes. + /** + * The six planes that define the bounding cube of our 3D axes. + */ vtkNew BoundingCube; - // Description: - // Points used to determine whether the axes will fit within the scene as - // currently sized, regardless of rotation. + /** + * Points used to determine whether the axes will fit within the scene as + * currently sized, regardless of rotation. + */ float AxesBoundaryPoints[14][3]; - // Description: - // This member variable stores the size of the tick labels for each axis. - // It is used to determine the position of the axis labels. + /** + * This member variable stores the size of the tick labels for each axis. + * It is used to determine the position of the axis labels. + */ float TickLabelOffset[3][2]; - // Description: - // The height of the scene, as of the most recent call to Paint(). + /** + * The height of the scene, as of the most recent call to Paint(). + */ int SceneHeight; - // Description: - // The weight of the scene, as of the most recent call to Paint(). + /** + * The weight of the scene, as of the most recent call to Paint(). + */ int SceneWidth; - // Description: - // Which line to label. + //@{ + /** + * Which line to label. + */ int XAxisToLabel[3]; int YAxisToLabel[3]; int ZAxisToLabel[3]; + //@} - // Description: - // What direction the data is from each labeled axis line. + /** + * What direction the data is from each labeled axis line. + */ int DirectionToData[3]; - // Description: - // A bounding box surrounding the currently rendered data points. + /** + * A bounding box surrounding the currently rendered data points. + */ double DataBounds[4]; private: diff --git a/Charts/Core/vtkColorLegend.h b/Charts/Core/vtkColorLegend.h index 2b876b015b8a04e7618189780da8ce9496a9beaa..e38187e6c0324aa90b55a26ad0fff98ec400141c 100644 --- a/Charts/Core/vtkColorLegend.h +++ b/Charts/Core/vtkColorLegend.h @@ -13,10 +13,13 @@ =========================================================================*/ -// .NAME vtkColorLegend - Legend item to display vtkScalarsToColors. -// .SECTION Description -// vtkColorLegend is an item that will display the vtkScalarsToColors -// using a 1D texture, and a vtkAxis to show both the color and numerical range. +/** + * @class vtkColorLegend + * @brief Legend item to display vtkScalarsToColors. + * + * vtkColorLegend is an item that will display the vtkScalarsToColors + * using a 1D texture, and a vtkAxis to show both the color and numerical range. +*/ #ifndef vtkColorLegend_h #define vtkColorLegend_h @@ -39,104 +42,131 @@ public: virtual void PrintSelf(ostream &os, vtkIndent indent); static vtkColorLegend* New(); - // Description: - // Enum of legend orientation types + /** + * Enum of legend orientation types + */ enum { VERTICAL = 0, HORIZONTAL }; - // Description: - // Bounds of the item, by default (0, 1, 0, 1) but it mainly depends on the - // range of the vtkScalarsToColors function. + /** + * Bounds of the item, by default (0, 1, 0, 1) but it mainly depends on the + * range of the vtkScalarsToColors function. + */ virtual void GetBounds(double bounds[4]); - // Description: - // Perform any updates to the item that may be necessary before rendering. - // The scene should take care of calling this on all items before their - // Paint function is invoked. + /** + * Perform any updates to the item that may be necessary before rendering. + * The scene should take care of calling this on all items before their + * Paint function is invoked. + */ virtual void Update(); - // Description: - // Paint the texture into a rectangle defined by the bounds. If - // MaskAboveCurve is true and a shape has been provided by a subclass, it - // draws the texture into the shape + /** + * Paint the texture into a rectangle defined by the bounds. If + * MaskAboveCurve is true and a shape has been provided by a subclass, it + * draws the texture into the shape + */ virtual bool Paint(vtkContext2D *painter); - // Description: - // Set/Get the transfer function that is used to draw the scalar bar - // within this legend. + //@{ + /** + * Set/Get the transfer function that is used to draw the scalar bar + * within this legend. + */ virtual void SetTransferFunction(vtkScalarsToColors* transfer); virtual vtkScalarsToColors * GetTransferFunction(); + //@} - // Description: - // Set the point this legend is anchored to. + /** + * Set the point this legend is anchored to. + */ virtual void SetPoint(float x, float y); - // Description: - // Set the size of the scalar bar drawn by this legend. + /** + * Set the size of the scalar bar drawn by this legend. + */ virtual void SetTextureSize(float w, float h); - // Description: - // Set the origin, width, and height of the scalar bar drawn by this legend. - // This method overrides the anchor point, as well as any horizontal and - // vertical alignment that has been set for this legend. If this is a - // problem for you, use SetPoint() and SetTextureSize() instead. + /** + * Set the origin, width, and height of the scalar bar drawn by this legend. + * This method overrides the anchor point, as well as any horizontal and + * vertical alignment that has been set for this legend. If this is a + * problem for you, use SetPoint() and SetTextureSize() instead. + */ virtual void SetPosition(const vtkRectf& pos); - // Description: - // Returns the origin, width, and height of the scalar bar drawn by this - // legend. + /** + * Returns the origin, width, and height of the scalar bar drawn by this + * legend. + */ virtual vtkRectf GetPosition(); - // Description: - // Request the space the legend requires to be drawn. This is returned as a - // vtkRect4f, with the corner being the offset from Point, and the width/ - // height being the total width/height required by the axis. In order to - // ensure the numbers are correct, Update() should be called first. + /** + * Request the space the legend requires to be drawn. This is returned as a + * vtkRect4f, with the corner being the offset from Point, and the width/ + * height being the total width/height required by the axis. In order to + * ensure the numbers are correct, Update() should be called first. + */ vtkRectf GetBoundingRect(vtkContext2D* painter); - // Description: - // Set/get the orientation of the legend. - // Valid orientations are VERTICAL (default) and HORIZONTAL. + //@{ + /** + * Set/get the orientation of the legend. + * Valid orientations are VERTICAL (default) and HORIZONTAL. + */ virtual void SetOrientation(int orientation); vtkGetMacro(Orientation, int); + //@} - // Description: - // Get/set the title text of the legend. + //@{ + /** + * Get/set the title text of the legend. + */ virtual void SetTitle(const vtkStdString &title); virtual vtkStdString GetTitle(); + //@} - // Description: - // Toggle whether or not a border should be drawn around this legend. - // The default behavior is to not draw a border. + //@{ + /** + * Toggle whether or not a border should be drawn around this legend. + * The default behavior is to not draw a border. + */ vtkSetMacro(DrawBorder, bool); vtkGetMacro(DrawBorder, bool); vtkBooleanMacro(DrawBorder, bool); + //@} - // Description: - // Mouse move event. + /** + * Mouse move event. + */ virtual bool MouseMoveEvent(const vtkContextMouseEvent &mouse); protected: vtkColorLegend(); virtual ~vtkColorLegend(); - // Description: - // Need to be reimplemented by subclasses, ComputeTexture() is called at - // paint time if the texture is not up to date compared to vtkColorLegend + /** + * Need to be reimplemented by subclasses, ComputeTexture() is called at + * paint time if the texture is not up to date compared to vtkColorLegend + */ virtual void ComputeTexture(); - // Description: - // Called whenever the ScalarsToColors function(s) is modified. It internally - // calls Modified(). Can be reimplemented by subclasses. + //@{ + /** + * Called whenever the ScalarsToColors function(s) is modified. It internally + * calls Modified(). Can be reimplemented by subclasses. + */ virtual void ScalarsToColorsModified(vtkObject* caller, unsigned long eid, void* calldata); static void OnScalarsToColorsModified(vtkObject* caller, unsigned long eid, void *clientdata, void* calldata); + //@} - // Description: - // Moves the axis whenever the position of this legend changes. + /** + * Moves the axis whenever the position of this legend changes. + */ void UpdateAxisPosition(); vtkScalarsToColors* TransferFunction; diff --git a/Charts/Core/vtkColorTransferControlPointsItem.h b/Charts/Core/vtkColorTransferControlPointsItem.h index 84d94033de492daf1bfd2e520e76c8b65c207bcd..f8ff9c8578386befb64fad2cd31db73cee7971ab 100644 --- a/Charts/Core/vtkColorTransferControlPointsItem.h +++ b/Charts/Core/vtkColorTransferControlPointsItem.h @@ -13,14 +13,17 @@ =========================================================================*/ -// .NAME vtkColorTransferControlPointsItem - Control points for -// vtkColorTransferFunction. -// .SECTION Description -// vtkColorTransferControlPointsItem draws the control points of a vtkColorTransferFunction. -// .SECTION See Also -// vtkControlPointsItem -// vtkColorTransferFunctionItem -// vtkCompositeTransferFunctionItem +/** + * @class vtkColorTransferControlPointsItem + * @brief Control points for + * vtkColorTransferFunction. + * + * vtkColorTransferControlPointsItem draws the control points of a vtkColorTransferFunction. + * @sa + * vtkControlPointsItem + * vtkColorTransferFunctionItem + * vtkCompositeTransferFunctionItem +*/ #ifndef vtkColorTransferControlPointsItem_h #define vtkColorTransferControlPointsItem_h @@ -36,60 +39,74 @@ public: vtkTypeMacro(vtkColorTransferControlPointsItem, vtkControlPointsItem); virtual void PrintSelf(ostream &os, vtkIndent indent); - // Description: - // Creates a piecewise control points object + /** + * Creates a piecewise control points object + */ static vtkColorTransferControlPointsItem* New(); - // Description: - // Set the piecewise function to draw its points + /** + * Set the piecewise function to draw its points + */ void SetColorTransferFunction(vtkColorTransferFunction* function); - // Description - // Get the piecewise function + //@{ + /** + * Get the piecewise function + */ vtkGetObjectMacro(ColorTransferFunction, vtkColorTransferFunction); + //@} - // Description - // Return the number of points in the color transfer function. + /** + * Return the number of points in the color transfer function. + */ virtual vtkIdType GetNumberOfPoints()const; - // Description - // Returns the x and y coordinates as well as the midpoint and sharpness - // of the control point corresponding to the index. - // Note: The y (point[1]) is always 0.5 + /** + * Returns the x and y coordinates as well as the midpoint and sharpness + * of the control point corresponding to the index. + * Note: The y (point[1]) is always 0.5 + */ virtual void GetControlPoint(vtkIdType index, double *point)const; - // Description: - // Sets the x and y coordinates as well as the midpoint and sharpness - // of the control point corresponding to the index. - // Changing the y has no effect, it will always be 0.5 + /** + * Sets the x and y coordinates as well as the midpoint and sharpness + * of the control point corresponding to the index. + * Changing the y has no effect, it will always be 0.5 + */ virtual void SetControlPoint(vtkIdType index, double *point); - // Description: - // Add a point to the function. Returns the index of the point (0 based), - // or -1 on error. - // Subclasses should reimplement this function to do the actual work. + /** + * Add a point to the function. Returns the index of the point (0 based), + * or -1 on error. + * Subclasses should reimplement this function to do the actual work. + */ virtual vtkIdType AddPoint(double* newPos); - // Description: - // Remove a point of the function. Returns the index of the point (0 based), - // or -1 on error. - // Subclasses should reimplement this function to do the actual work. + /** + * Remove a point of the function. Returns the index of the point (0 based), + * or -1 on error. + * Subclasses should reimplement this function to do the actual work. + */ virtual vtkIdType RemovePoint(double* pos); - // Description: - // If ColorFill is true, the control point brush color is set with the - // matching color in the color transfer function. - // False by default. + //@{ + /** + * If ColorFill is true, the control point brush color is set with the + * matching color in the color transfer function. + * False by default. + */ vtkSetMacro(ColorFill, bool); vtkGetMacro(ColorFill, bool); + //@} protected: vtkColorTransferControlPointsItem(); virtual ~vtkColorTransferControlPointsItem(); - // Description: - // Returns true if control points are to be rendered in log-space. This is - // true when vtkScalarsToColors is using log-scale, for example. Default - // implementation always return false. + /** + * Returns true if control points are to be rendered in log-space. This is + * true when vtkScalarsToColors is using log-scale, for example. Default + * implementation always return false. + */ virtual bool UsingLogScale(); virtual void emitEvent(unsigned long event, void* params); @@ -99,9 +116,10 @@ protected: virtual void DrawPoint(vtkContext2D* painter, vtkIdType index); virtual void EditPoint(float tX, float tY); - // Description: - // Compute the bounds for this item. Overridden to use the - // vtkColorTransferFunction range. + /** + * Compute the bounds for this item. Overridden to use the + * vtkColorTransferFunction range. + */ virtual void ComputeBounds(double* bounds); vtkColorTransferFunction* ColorTransferFunction; diff --git a/Charts/Core/vtkCompositeControlPointsItem.h b/Charts/Core/vtkCompositeControlPointsItem.h index ab498a8c63cbdf7332a09bbcfe3c1f5f03ca3790..9b9725fce9b7ea131844e9511e1ef650604533de 100644 --- a/Charts/Core/vtkCompositeControlPointsItem.h +++ b/Charts/Core/vtkCompositeControlPointsItem.h @@ -13,16 +13,19 @@ =========================================================================*/ -// .NAME vtkCompositeControlPointsItem - Control points for -// vtkCompositeFunction. -// .SECTION Description -// vtkCompositeControlPointsItem draws the control points of a vtkPiecewiseFunction -// and a vtkColorTransferFunction. -// .SECTION See Also -// vtkControlPointsItem -// vtkColorTransferControlPointsItem -// vtkCompositeTransferFunctionItem -// vtkPiecewisePointHandleItem +/** + * @class vtkCompositeControlPointsItem + * @brief Control points for + * vtkCompositeFunction. + * + * vtkCompositeControlPointsItem draws the control points of a vtkPiecewiseFunction + * and a vtkColorTransferFunction. + * @sa + * vtkControlPointsItem + * vtkColorTransferControlPointsItem + * vtkCompositeTransferFunctionItem + * vtkPiecewisePointHandleItem +*/ #ifndef vtkCompositeControlPointsItem_h #define vtkCompositeControlPointsItem_h @@ -40,72 +43,89 @@ public: vtkTypeMacro(vtkCompositeControlPointsItem, vtkColorTransferControlPointsItem); virtual void PrintSelf(ostream &os, vtkIndent indent); - // Description: - // Creates a piecewise control points object + /** + * Creates a piecewise control points object + */ static vtkCompositeControlPointsItem* New(); - // Description: - // Set the color transfer function to draw its points + /** + * Set the color transfer function to draw its points + */ virtual void SetColorTransferFunction(vtkColorTransferFunction* function); - // Description - // Utility function that calls SetPiecewiseFunction() + //@{ + /** + * Utility function that calls SetPiecewiseFunction() + */ void SetOpacityFunction(vtkPiecewiseFunction* opacity); vtkGetObjectMacro(OpacityFunction, vtkPiecewiseFunction); + //@} enum PointsFunctionType{ ColorPointsFunction = 1, OpacityPointsFunction = 2, ColorAndOpacityPointsFunction = 3 }; - // Description: - // PointsFunction controls wether the points represent the - // ColorTransferFunction, OpacityTransferFunction or both. - // If ColorPointsFunction, only the points of the ColorTransfer function are - // used. - // If OpacityPointsFunction, only the points of the Opacity function are used - // If ColorAndOpacityPointsFunction, the points of both functions are shared - // by both functions. - // ColorAndOpacityPointsFunction by default. - // Note: Set the mode before the functions are set. ColorPointsFunction is - // not fully supported. + //@{ + /** + * PointsFunction controls wether the points represent the + * ColorTransferFunction, OpacityTransferFunction or both. + * If ColorPointsFunction, only the points of the ColorTransfer function are + * used. + * If OpacityPointsFunction, only the points of the Opacity function are used + * If ColorAndOpacityPointsFunction, the points of both functions are shared + * by both functions. + * ColorAndOpacityPointsFunction by default. + * Note: Set the mode before the functions are set. ColorPointsFunction is + * not fully supported. + */ vtkSetMacro(PointsFunction, int); vtkGetMacro(PointsFunction, int); + //@} - // Description: - // Add a point to the function. Returns the index of the point (0 based), - // or -1 on error. - // Subclasses should reimplement this function to do the actual work. + /** + * Add a point to the function. Returns the index of the point (0 based), + * or -1 on error. + * Subclasses should reimplement this function to do the actual work. + */ virtual vtkIdType AddPoint(double* newPos); - // Description: - // Remove a point of the function. Returns the index of the point (0 based), - // or -1 on error. - // Subclasses should reimplement this function to do the actual work. + /** + * Remove a point of the function. Returns the index of the point (0 based), + * or -1 on error. + * Subclasses should reimplement this function to do the actual work. + */ virtual vtkIdType RemovePoint(double* pos); - // Description: - // If UseOpacityPointHandles is true, when the current point is - // double clicked, a vtkPiecewisePointHandleItem will show up so - // that the sharpness and mid point can be adjusted in the scene - // with those handles - // False by default. + //@{ + /** + * If UseOpacityPointHandles is true, when the current point is + * double clicked, a vtkPiecewisePointHandleItem will show up so + * that the sharpness and mid point can be adjusted in the scene + * with those handles + * False by default. + */ vtkSetMacro(UseOpacityPointHandles, bool); vtkGetMacro(UseOpacityPointHandles, bool); + //@} - // Description: - // Mouse move event. To take care of some special Key stroke + //@{ + /** + * Mouse move event. To take care of some special Key stroke + */ virtual bool MouseMoveEvent(const vtkContextMouseEvent &mouse); virtual bool MouseDoubleClickEvent(const vtkContextMouseEvent &mouse); virtual bool MouseButtonPressEvent(const vtkContextMouseEvent &mouse); + //@} protected: vtkCompositeControlPointsItem(); virtual ~vtkCompositeControlPointsItem(); - // Description: - // Returns true if control points are to be rendered in log-space. This is - // true when vtkScalarsToColors is using log-scale, for example. + /** + * Returns true if control points are to be rendered in log-space. This is + * true when vtkScalarsToColors is using log-scale, for example. + */ virtual bool UsingLogScale(); virtual void emitEvent(unsigned long event, void* params); diff --git a/Charts/Core/vtkContextArea.h b/Charts/Core/vtkContextArea.h index 53741a898dfda0d4d27300f5341cf9f7d68daa6f..1977f9fc00d698cd3cff8e957dbb0f2c8946772b 100644 --- a/Charts/Core/vtkContextArea.h +++ b/Charts/Core/vtkContextArea.h @@ -13,26 +13,29 @@ =========================================================================*/ -// .NAME vtkContextArea - Clipped, transformed area with axes for context items. -// -// .SECTION Description -// vtkContextArea provides an clipped drawing area surrounded by four axes. -// The drawing area is transformed to map the 2D area described by -// DrawAreaBounds into pixel coordinates. DrawAreaBounds is also used to -// configure the axes. Item to be rendered in the draw area should be added -// to the context item returned by GetDrawAreaItem(). -// -// The size and shape of the draw area is configured by the following member -// variables: -// - Geometry: The rect (pixel coordinates) defining the location of the context -// area in the scene. This includes the draw area and axis ticks/labels. -// - FillViewport: If true (default), Geometry is set to span the size returned -// by vtkContextDevice2D::GetViewportSize(). -// - DrawAreaResizeBehavior: Controls how the draw area should be shaped. -// Available options: Expand (default), FixedAspect, FixedRect, FixedMargins. -// - FixedAspect: Aspect ratio to enforce for FixedAspect resize behavior. -// - FixedRect: Rect used to enforce for FixedRect resize behavior. -// - FixedMargins: Margins to enforce for FixedMargins resize behavior. +/** + * @class vtkContextArea + * @brief Clipped, transformed area with axes for context items. + * + * + * vtkContextArea provides an clipped drawing area surrounded by four axes. + * The drawing area is transformed to map the 2D area described by + * DrawAreaBounds into pixel coordinates. DrawAreaBounds is also used to + * configure the axes. Item to be rendered in the draw area should be added + * to the context item returned by GetDrawAreaItem(). + * + * The size and shape of the draw area is configured by the following member + * variables: + * - Geometry: The rect (pixel coordinates) defining the location of the context + * area in the scene. This includes the draw area and axis ticks/labels. + * - FillViewport: If true (default), Geometry is set to span the size returned + * by vtkContextDevice2D::GetViewportSize(). + * - DrawAreaResizeBehavior: Controls how the draw area should be shaped. + * Available options: Expand (default), FixedAspect, FixedRect, FixedMargins. + * - FixedAspect: Aspect ratio to enforce for FixedAspect resize behavior. + * - FixedRect: Rect used to enforce for FixedRect resize behavior. + * - FixedMargins: Margins to enforce for FixedMargins resize behavior. +*/ #ifndef vtkContextArea_h #define vtkContextArea_h @@ -57,31 +60,40 @@ public: static vtkContextArea *New(); - // Description: - // Get the vtkAxis associated with the specified location. + /** + * Get the vtkAxis associated with the specified location. + */ vtkAxis* GetAxis(vtkAxis::Location location); - // Description: - // Returns the vtkAbstractContextItem that will draw in the clipped, - // transformed space. This is the item to add children for. + /** + * Returns the vtkAbstractContextItem that will draw in the clipped, + * transformed space. This is the item to add children for. + */ vtkAbstractContextItem* GetDrawAreaItem(); - // Description: - // Paint event for the item, called whenever the item needs to be drawn. + /** + * Paint event for the item, called whenever the item needs to be drawn. + */ virtual bool Paint(vtkContext2D *painter); - // Description: - // The rect defining the pixel location and size of the entire vtkContextArea, - // including axis labels, title, etc. Note that this will be updated to the - // window geometry if FillWindow is true. + //@{ + /** + * The rect defining the pixel location and size of the entire vtkContextArea, + * including axis labels, title, etc. Note that this will be updated to the + * window geometry if FillWindow is true. + */ vtkGetMacro(Geometry, vtkRecti) vtkSetMacro(Geometry, vtkRecti) + //@} - // Description: - // The data bounds of the clipped and transformed area inside of the axes. - // This is used to configure the axes labels and setup the transform. + //@{ + /** + * The data bounds of the clipped and transformed area inside of the axes. + * This is used to configure the axes labels and setup the transform. + */ vtkGetMacro(DrawAreaBounds, vtkRectd) vtkSetMacro(DrawAreaBounds, vtkRectd) + //@} enum DrawAreaResizeBehaviorType { DARB_Expand, @@ -90,147 +102,183 @@ public: DARB_FixedMargins }; - // Description: - // Set the resize behavior for the draw area: - // - @a Expand: The default behavior. The draw area will automatically resize - // to take up as much of @a Geometry as possible. Margin sizes are - // minimized based on the space required for axis labels/tick marks. - // - FixedAspect: Same as Expand, but a fixed aspected ratio is enforced. - // See SetFixedAspect. - // - FixedRect: Draw area is always constrained to a fixed rectangle. - // See SetFixedRect. - // - FixMargins: The draw area expands to fill @a Geometry, but margins - // (axis labels, etc) are fixed, rather than dynamically sized. - // See SetFixedMargins. + //@{ + /** + * Set the resize behavior for the draw area: + * - @a Expand: The default behavior. The draw area will automatically resize + * to take up as much of @a Geometry as possible. Margin sizes are + * minimized based on the space required for axis labels/tick marks. + * - FixedAspect: Same as Expand, but a fixed aspected ratio is enforced. + * See SetFixedAspect. + * - FixedRect: Draw area is always constrained to a fixed rectangle. + * See SetFixedRect. + * - FixMargins: The draw area expands to fill @a Geometry, but margins + * (axis labels, etc) are fixed, rather than dynamically sized. + * See SetFixedMargins. + */ vtkGetMacro(DrawAreaResizeBehavior, DrawAreaResizeBehaviorType) vtkSetMacro(DrawAreaResizeBehavior, DrawAreaResizeBehaviorType) - - // Description: - // The fixed aspect ratio, if DrawAreaResizeBehavior is FixedAspect. - // Defined as width/height. Default is 1. - // Setting the aspect ratio will also set DrawAreaResizeBehavior to - // FixedAspect. + //@} + + //@{ + /** + * The fixed aspect ratio, if DrawAreaResizeBehavior is FixedAspect. + * Defined as width/height. Default is 1. + * Setting the aspect ratio will also set DrawAreaResizeBehavior to + * FixedAspect. + */ vtkGetMacro(FixedAspect, float) virtual void SetFixedAspect(float aspect); - - // Description: - // The fixed rect to use for the draw area, if DrawAreaResizeBehavior is - // FixedRect. Units are in pixels, default is 300x300+0+0. - // Setting the fixed rect will also set DrawAreaResizeBehavior to - // FixedRect. + //@} + + //@{ + /** + * The fixed rect to use for the draw area, if DrawAreaResizeBehavior is + * FixedRect. Units are in pixels, default is 300x300+0+0. + * Setting the fixed rect will also set DrawAreaResizeBehavior to + * FixedRect. + */ vtkGetMacro(FixedRect, vtkRecti) virtual void SetFixedRect(vtkRecti rect); virtual void SetFixedRect(int x, int y, int width, int height); - - // Description: - // The left, right, bottom, and top margins for the draw area, if - // DrawAreaResizeBehavior is FixedMargins. Units are in pixels, default is - // { 0, 0, 0, 0 }. - // Setting the fixed margins will also set DrawAreaResizeBehavior to - // FixedMargins. + //@} + + //@{ + /** + * The left, right, bottom, and top margins for the draw area, if + * DrawAreaResizeBehavior is FixedMargins. Units are in pixels, default is + * { 0, 0, 0, 0 }. + * Setting the fixed margins will also set DrawAreaResizeBehavior to + * FixedMargins. + */ virtual const Margins& GetFixedMargins() { return this->FixedMargins; } virtual void GetFixedMarginsArray(int margins[4]); virtual const int* GetFixedMarginsArray(); virtual void SetFixedMargins(Margins margins); virtual void SetFixedMargins(int margins[4]); virtual void SetFixedMargins(int left, int right, int bottom, int top); - - // Description: - // If true, Geometry is set to (0, 0, vpSize[0], vpSize[1]) at the start - // of each Paint call. vpSize is vtkContextDevice2D::GetViewportSize. Default - // is true. + //@} + + //@{ + /** + * If true, Geometry is set to (0, 0, vpSize[0], vpSize[1]) at the start + * of each Paint call. vpSize is vtkContextDevice2D::GetViewportSize. Default + * is true. + */ vtkGetMacro(FillViewport, bool) vtkSetMacro(FillViewport, bool) vtkBooleanMacro(FillViewport, bool) + //@} - // Description: - // Turn on/off grid visibility. + //@{ + /** + * Turn on/off grid visibility. + */ virtual void SetShowGrid(bool show); virtual bool GetShowGrid(); virtual void ShowGridOn() { this->SetShowGrid(true); } virtual void ShowGridOff() { this->SetShowGrid(false); } + //@} protected: vtkContextArea(); ~vtkContextArea(); - // Description: - // Sync the Axes locations with Geometry, and update the DrawAreaGeometry - // to account for Axes size (margins). Must be called while the painter - // is active. + /** + * Sync the Axes locations with Geometry, and update the DrawAreaGeometry + * to account for Axes size (margins). Must be called while the painter + * is active. + */ void LayoutAxes(vtkContext2D *painter); - // Description: - // Return the draw area's geometry. + /** + * Return the draw area's geometry. + */ vtkRecti ComputeDrawAreaGeometry(vtkContext2D *painter); - // Description: - // Working implementations for ComputeDrawAreaGeometry. + //@{ + /** + * Working implementations for ComputeDrawAreaGeometry. + */ vtkRecti ComputeExpandedDrawAreaGeometry(vtkContext2D *painter); vtkRecti ComputeFixedAspectDrawAreaGeometry(vtkContext2D *painter); vtkRecti ComputeFixedRectDrawAreaGeometry(vtkContext2D *painter); vtkRecti ComputeFixedMarginsDrawAreaGeometry(vtkContext2D *painter); + //@} - // Description: - // Set the transform to map DrawAreaBounds to DrawAreaGeometry. Should be - // called after LayoutAxes to ensure that DrawAreaGeometry is up to date. + /** + * Set the transform to map DrawAreaBounds to DrawAreaGeometry. Should be + * called after LayoutAxes to ensure that DrawAreaGeometry is up to date. + */ void UpdateDrawArea(); - // Description: - // vtkAxis objects that surround the draw area, indexed by vtkAxis::Location. + /** + * vtkAxis objects that surround the draw area, indexed by vtkAxis::Location. + */ vtkTuple Axes; - // Description: - // The vtkPlotGrid that renders a grid atop the data in the draw area. + /** + * The vtkPlotGrid that renders a grid atop the data in the draw area. + */ vtkNew Grid; - // Description: - // The context item that clips rendered data. + /** + * The context item that clips rendered data. + */ vtkNew Clip; - // Description: - // The context item that clips rendered data. + /** + * The context item that clips rendered data. + */ vtkNew Transform; - // Description: - // The rect defining the pixel location and size of the entire vtkContextArea, - // including axis label, title, etc. + /** + * The rect defining the pixel location and size of the entire vtkContextArea, + * including axis label, title, etc. + */ vtkRecti Geometry; - // Description: - // The data bounds of the clipped and transformed area inside of the axes. - // This is used to configure the axes labels and setup the transform. + /** + * The data bounds of the clipped and transformed area inside of the axes. + * This is used to configure the axes labels and setup the transform. + */ vtkRectd DrawAreaBounds; - // Description: - // The rect defining the pixel location and size of the clipped and - // transformed area inside the axes. Relative to Geometry. + /** + * The rect defining the pixel location and size of the clipped and + * transformed area inside the axes. Relative to Geometry. + */ vtkRecti DrawAreaGeometry; - // Description: - // Controls how the draw area size is determined. + /** + * Controls how the draw area size is determined. + */ DrawAreaResizeBehaviorType DrawAreaResizeBehavior; - // Description: - // The fixed aspect ratio, if DrawAreaResizeBehavior is FixedAspect. - // Defined as width/height. Default is 1. + /** + * The fixed aspect ratio, if DrawAreaResizeBehavior is FixedAspect. + * Defined as width/height. Default is 1. + */ float FixedAspect; - // Description: - // The fixed rect to use for the draw area, if DrawAreaResizeBehavior is - // FixedRect. Units are in pixels, default is 300x300+0+0. + /** + * The fixed rect to use for the draw area, if DrawAreaResizeBehavior is + * FixedRect. Units are in pixels, default is 300x300+0+0. + */ vtkRecti FixedRect; - // Description: - // The left, right, bottom, and top margins for the draw area, if - // DrawAreaResizeBehavior is FixedMargins. Units are in pixels, default is - // { 0, 0, 0, 0 } + /** + * The left, right, bottom, and top margins for the draw area, if + * DrawAreaResizeBehavior is FixedMargins. Units are in pixels, default is + * { 0, 0, 0, 0 } + */ Margins FixedMargins; - // Description: - // If true, Geometry is set to (0, 0, vpSize[0], vpSize[1]) at the start - // of each Paint call. vpSize is vtkContextDevice2D::GetViewportSize. Default - // is true. + /** + * If true, Geometry is set to (0, 0, vpSize[0], vpSize[1]) at the start + * of each Paint call. vpSize is vtkContextDevice2D::GetViewportSize. Default + * is true. + */ bool FillViewport; private: diff --git a/Charts/Core/vtkControlPointsItem.h b/Charts/Core/vtkControlPointsItem.h index 0fa929838bdfbef634fa014b97cac92451f5106e..0ae1bc3085acf3ca17794b81447c2a588246a452 100644 --- a/Charts/Core/vtkControlPointsItem.h +++ b/Charts/Core/vtkControlPointsItem.h @@ -13,14 +13,17 @@ =========================================================================*/ -// .NAME vtkControlPointsItem - Abstract class for control points items. -// .SECTION Description -// vtkControlPointsItem provides control point painting and management for -// subclasses that provide points (typically control points of a transfer -// function) -// .SECTION See Also -// vtkScalarsToColorsItem -// vtkPiecewiseControlPointsItem +/** + * @class vtkControlPointsItem + * @brief Abstract class for control points items. + * + * vtkControlPointsItem provides control point painting and management for + * subclasses that provide points (typically control points of a transfer + * function) + * @sa + * vtkScalarsToColorsItem + * vtkPiecewiseControlPointsItem +*/ #ifndef vtkControlPointsItem_h #define vtkControlPointsItem_h @@ -52,242 +55,309 @@ public: CurrentPointEditEvent }; - // Description: - // Bounds of the item, typically the bound of all the control points - // except if custom bounds have been set \sa SetUserBounds. + /** + * Bounds of the item, typically the bound of all the control points + * except if custom bounds have been set \sa SetUserBounds. + */ virtual void GetBounds(double bounds[4]); - // Description: - // Set custom bounds, except if bounds are invalid, bounds will be - // automatically computed based on the range of the control points - // Invalid bounds by default. + //@{ + /** + * Set custom bounds, except if bounds are invalid, bounds will be + * automatically computed based on the range of the control points + * Invalid bounds by default. + */ vtkSetVector4Macro(UserBounds, double); vtkGetVector4Macro(UserBounds, double); - - // Description: - // Controls the valid range for the values. - // An invalid value (0, -1, 0., -1, 0, -1.) indicates that the valid - // range is the current bounds. It is the default behavior. + //@} + + //@{ + /** + * Controls the valid range for the values. + * An invalid value (0, -1, 0., -1, 0, -1.) indicates that the valid + * range is the current bounds. It is the default behavior. + */ vtkSetVector4Macro(ValidBounds, double); vtkGetVector4Macro(ValidBounds, double); + //@} - // Description: - // Get/set the radius for screen points. - // Default is 6.f + //@{ + /** + * Get/set the radius for screen points. + * Default is 6.f + */ vtkGetMacro(ScreenPointRadius, float); vtkSetMacro(ScreenPointRadius, float); + //@} - // Description: - // Paint the points with a fixed size (cosmetic) which doesn't depend - // on the scene zoom factor. Selected and unselected points are drawn - // with a different color. + /** + * Paint the points with a fixed size (cosmetic) which doesn't depend + * on the scene zoom factor. Selected and unselected points are drawn + * with a different color. + */ virtual bool Paint(vtkContext2D *painter); - // Description: - // Select a point by its ID + /** + * Select a point by its ID + */ void SelectPoint(vtkIdType pointId); - // Description: - // Utility function that selects a point providing its coordinates. - // To be found, the position of the point must be no further away than its - // painted point size + /** + * Utility function that selects a point providing its coordinates. + * To be found, the position of the point must be no further away than its + * painted point size + */ void SelectPoint(double* currentPoint); - // Description: - // Select all the points + /** + * Select all the points + */ void SelectAllPoints(); - // Description: - // Unselect a point by its ID + /** + * Unselect a point by its ID + */ void DeselectPoint(vtkIdType pointId); - // Description: - // Utility function that unselects a point providing its coordinates. - // To be found, the position of the point must be no further away than its - // painted point size + /** + * Utility function that unselects a point providing its coordinates. + * To be found, the position of the point must be no further away than its + * painted point size + */ void DeselectPoint(double* currentPoint); - // Description: - // Unselect all the previously selected points + /** + * Unselect all the previously selected points + */ void DeselectAllPoints(); - // Description: - // Toggle the selection of a point by its ID. If the point was selected then - // unselect it, otherwise select it. + /** + * Toggle the selection of a point by its ID. If the point was selected then + * unselect it, otherwise select it. + */ void ToggleSelectPoint(vtkIdType pointId); - // Description: - // Utility function that toggles the selection a point providing its - // coordinates. To be found, the position of the point must be no further - // away than its painted point size + /** + * Utility function that toggles the selection a point providing its + * coordinates. To be found, the position of the point must be no further + * away than its painted point size + */ void ToggleSelectPoint(double* currentPoint); - // Description: - // Select all points in the specified rectangle. + /** + * Select all points in the specified rectangle. + */ virtual bool SelectPoints(const vtkVector2f& min, const vtkVector2f& max); - // Description: - // Return the number of selected points. + /** + * Return the number of selected points. + */ vtkIdType GetNumberOfSelectedPoints()const; - // Description: - // Returns the vtkIdType of the point given its coordinates and a tolerance - // based on the screen point size. + /** + * Returns the vtkIdType of the point given its coordinates and a tolerance + * based on the screen point size. + */ vtkIdType FindPoint(double* pos); - // Description: - // Returns true if pos is above the pointId point, false otherwise. - // It uses the size of the drawn point. To search what point is under the pos, - // use the more efficient \sa FindPoint() instead. + /** + * Returns true if pos is above the pointId point, false otherwise. + * It uses the size of the drawn point. To search what point is under the pos, + * use the more efficient \sa FindPoint() instead. + */ bool IsOverPoint(double* pos, vtkIdType pointId); - // Description: - // Returns the id of the control point exactly matching pos, -1 if not found. + /** + * Returns the id of the control point exactly matching pos, -1 if not found. + */ vtkIdType GetControlPointId(double* pos); - // Description: - // Utility function that returns an array of all the control points IDs - // Typically: [0, 1, 2, ... n -1] where n is the point count - // Can exclude the first and last point ids from the array. + /** + * Utility function that returns an array of all the control points IDs + * Typically: [0, 1, 2, ... n -1] where n is the point count + * Can exclude the first and last point ids from the array. + */ void GetControlPointsIds(vtkIdTypeArray* ids, bool excludeFirstAndLast = false)const; - // Description: - // Controls whether or not control points are drawn (true) or clicked and - // moved (false). - // False by default. + //@{ + /** + * Controls whether or not control points are drawn (true) or clicked and + * moved (false). + * False by default. + */ vtkGetMacro(StrokeMode, bool); - - // Description: - // If DrawPoints is false, SwitchPoints controls the behavior when a control - // point is dragged past another point. The crossed point becomes current - // (true) or the current point is blocked/stopped (false). - // False by default. + //@} + + //@{ + /** + * If DrawPoints is false, SwitchPoints controls the behavior when a control + * point is dragged past another point. The crossed point becomes current + * (true) or the current point is blocked/stopped (false). + * False by default. + */ vtkSetMacro(SwitchPointsMode, bool); vtkGetMacro(SwitchPointsMode, bool); + //@} - // Description: - // If EndPointsMovable is false, the two end points will not - // be moved. True by default. + //@{ + /** + * If EndPointsMovable is false, the two end points will not + * be moved. True by default. + */ vtkSetMacro(EndPointsXMovable, bool); vtkGetMacro(EndPointsXMovable, bool); vtkSetMacro(EndPointsYMovable, bool); vtkGetMacro(EndPointsYMovable, bool); virtual bool GetEndPointsMovable(); + //@} - // Description: - // If EndPointsRemovable is false, the two end points will not - // be be removed. True by default. + //@{ + /** + * If EndPointsRemovable is false, the two end points will not + * be be removed. True by default. + */ vtkSetMacro(EndPointsRemovable, bool); vtkGetMacro(EndPointsRemovable, bool); + //@} - // Description: - // When set to true, labels are shown on the current control point and the end - // points. Default is false. + //@{ + /** + * When set to true, labels are shown on the current control point and the end + * points. Default is false. + */ vtkSetMacro(ShowLabels, bool); vtkGetMacro(ShowLabels, bool); + //@} - // Description: - // Get/Set the label format. Default is "%.4f, %.4f". + //@{ + /** + * Get/Set the label format. Default is "%.4f, %.4f". + */ vtkSetStringMacro(LabelFormat); vtkGetStringMacro(LabelFormat); + //@} - // Description: - // Add a point to the function. Returns the index of the point (0 based), - // or -1 on error. - // Subclasses should reimplement this function to do the actual work. + /** + * Add a point to the function. Returns the index of the point (0 based), + * or -1 on error. + * Subclasses should reimplement this function to do the actual work. + */ virtual vtkIdType AddPoint(double* newPos) = 0; - // Description: - // Remove a point of the function. Returns the index of the point (0 based), - // or -1 on error. - // Subclasses should reimplement this function to do the actual work. + /** + * Remove a point of the function. Returns the index of the point (0 based), + * or -1 on error. + * Subclasses should reimplement this function to do the actual work. + */ virtual vtkIdType RemovePoint(double* pos) = 0; - // Description: - // Remove a point give its id. It is a utility function that internally call - // the virtual method RemovePoint(double*) and return its result. + /** + * Remove a point give its id. It is a utility function that internally call + * the virtual method RemovePoint(double*) and return its result. + */ vtkIdType RemovePoint(vtkIdType pointId); - // Description: - // Remove the current point. + /** + * Remove the current point. + */ inline void RemoveCurrentPoint(); - // Description: - // Returns the total number of points + /** + * Returns the total number of points + */ virtual vtkIdType GetNumberOfPoints()const = 0; - // Description: - // Returns the x and y coordinates as well as the midpoint and sharpness - // of the control point corresponding to the index. - // point must be a double array of size 4. + /** + * Returns the x and y coordinates as well as the midpoint and sharpness + * of the control point corresponding to the index. + * point must be a double array of size 4. + */ virtual void GetControlPoint(vtkIdType index, double *point)const = 0; - // Description: - // Sets the x and y coordinates as well as the midpoint and sharpness - // of the control point corresponding to the index. + /** + * Sets the x and y coordinates as well as the midpoint and sharpness + * of the control point corresponding to the index. + */ virtual void SetControlPoint(vtkIdType index, double *point) = 0; - // Description: - // Move the points referred by pointIds by a given translation. - // The new positions won't be outside the bounds. - // MovePoints is typically called with GetControlPointsIds() or GetSelection(). - // Warning: if you pass this->GetSelection(), the array is deleted after - // each individual point move. Increase the reference count of the array. - // See also MoveAllPoints() + /** + * Move the points referred by pointIds by a given translation. + * The new positions won't be outside the bounds. + * MovePoints is typically called with GetControlPointsIds() or GetSelection(). + * Warning: if you pass this->GetSelection(), the array is deleted after + * each individual point move. Increase the reference count of the array. + * See also MoveAllPoints() + */ void MovePoints(const vtkVector2f& translation, vtkIdTypeArray* pointIds); - // Description: - // Utility function to move all the control points of the given translation - // If dontMoveFirstAndLast is true, then the first and last points won't be - // moved. + /** + * Utility function to move all the control points of the given translation + * If dontMoveFirstAndLast is true, then the first and last points won't be + * moved. + */ void MovePoints(const vtkVector2f& translation, bool dontMoveFirstAndLast = false); - // Description: - // Spread the points referred by pointIds - // If factor > 0, points are moved away from each other. - // If factor < 0, points are moved closer to each other - // SpreadPoints is typically called with GetControlPointsIds() or GetSelection(). - // Warning: if you pass this->GetSelection(), the array is deleted after - // each individual point move. Increase the reference count of the array. + /** + * Spread the points referred by pointIds + * If factor > 0, points are moved away from each other. + * If factor < 0, points are moved closer to each other + * SpreadPoints is typically called with GetControlPointsIds() or GetSelection(). + * Warning: if you pass this->GetSelection(), the array is deleted after + * each individual point move. Increase the reference count of the array. + */ void SpreadPoints(float factor, vtkIdTypeArray* pointIds); - // Description: - // Utility function to spread all the control points of a given factor - // If dontSpreadFirstAndLast is true, then the first and last points won't be - // spread. + /** + * Utility function to spread all the control points of a given factor + * If dontSpreadFirstAndLast is true, then the first and last points won't be + * spread. + */ void SpreadPoints(float factor, bool dontSpreadFirstAndLast = false); - // Description: - // Returns the current point ID selected or -1 if there is no point current. - // No current point by default. + /** + * Returns the current point ID selected or -1 if there is no point current. + * No current point by default. + */ vtkIdType GetCurrentPoint()const; - // Description: - // Sets the current point selected. + /** + * Sets the current point selected. + */ void SetCurrentPoint(vtkIdType index); - // Description: - // Gets the selected point pen and brush. + //@{ + /** + * Gets the selected point pen and brush. + */ vtkGetObjectMacro(SelectedPointPen, vtkPen); + //@} - // Description: - // Depending on the control points item, the brush might not be taken into - // account. + //@{ + /** + * Depending on the control points item, the brush might not be taken into + * account. + */ vtkGetObjectMacro(SelectedPointBrush, vtkBrush); + //@} - // Description: - // Recompute the bounds next time they are requested. - // You shouldn't have to call it but it is provided for rare cases. + /** + * Recompute the bounds next time they are requested. + * You shouldn't have to call it but it is provided for rare cases. + */ void ResetBounds(); - // Description: - // Mouse button down event. + //@{ + /** + * Mouse button down event. + */ virtual bool MouseButtonPressEvent(const vtkContextMouseEvent &mouse); virtual bool MouseDoubleClickEvent(const vtkContextMouseEvent &mouse); + //@} - // Description: - // Mouse move event. + /** + * Mouse move event. + */ virtual bool MouseMoveEvent(const vtkContextMouseEvent &mouse); virtual bool KeyPressEvent(const vtkContextKeyEvent &key); @@ -308,34 +378,47 @@ protected: static void CallComputePoints(vtkObject* sender, unsigned long event, void* receiver, void* params); - // Description: - // Must be reimplemented by subclasses to calculate the points to draw. - // It's subclass responsibility to call ComputePoints() via the callback + //@{ + /** + * Must be reimplemented by subclasses to calculate the points to draw. + * It's subclass responsibility to call ComputePoints() via the callback + */ virtual void ComputePoints(); virtual vtkMTimeType GetControlPointsMTime() =0; + //@} - // Description: - // Returns true if the supplied x, y coordinate is on a control point. + /** + * Returns true if the supplied x, y coordinate is on a control point. + */ virtual bool Hit(const vtkContextMouseEvent &mouse); - // Description: - // Transform the mouse event in the control-points space. This is needed when - // ColorTransferFunction is using log-scale. + //@{ + /** + * Transform the mouse event in the control-points space. This is needed when + * ColorTransferFunction is using log-scale. + */ virtual void TransformScreenToData(const vtkVector2f& in, vtkVector2f& out); virtual void TransformDataToScreen(const vtkVector2f& in, vtkVector2f& out); + //@} - // Description: - // Clamp the given 2D pos into the bounds of the function. - // Return true if the pos has been clamped, false otherwise. + //@{ + /** + * Clamp the given 2D pos into the bounds of the function. + * Return true if the pos has been clamped, false otherwise. + */ virtual bool ClampPos(double pos[2], double bounds[4]); bool ClampValidPos(double pos[2]); + //@} - // Description: - // Internal function that paints a collection of points and optionally - // excludes some. + //@{ + /** + * Internal function that paints a collection of points and optionally + * excludes some. + */ void DrawUnselectedPoints(vtkContext2D* painter); void DrawSelectedPoints(vtkContext2D* painter); virtual void DrawPoint(vtkContext2D* painter, vtkIdType index); + //@} void SetCurrentPointPos(const vtkVector2f& newPos); vtkIdType SetPointPos(vtkIdType point, const vtkVector2f& newPos); @@ -347,36 +430,42 @@ protected: void Stroke(const vtkVector2f& newPos); virtual void EditPoint(float vtkNotUsed(tX), float vtkNotUsed(tY)); - // Description: - // Mouse button release event. + /** + * Mouse button release event. + */ virtual bool MouseButtonReleaseEvent(const vtkContextMouseEvent &mouse); - // Description: - // Generate label for a control point. + /** + * Generate label for a control point. + */ virtual vtkStdString GetControlPointLabel(vtkIdType index); void AddPointId(vtkIdType addedPointId); - // Description: - // Return true if any of the end points is current point - // or part of the selection + /** + * Return true if any of the end points is current point + * or part of the selection + */ bool IsEndPointPicked(); - // Description: - // Return true if the point is removable + /** + * Return true if the point is removable + */ bool IsPointRemovable(vtkIdType pointId); - // Description: - // Compute the bounds for this item. Typically, the bounds should be aligned - // to the range of the vtkScalarsToColors or vtkPiecewiseFunction that is - // being controlled by the subclasses. - // Default implementation uses the range of the control points themselves. + /** + * Compute the bounds for this item. Typically, the bounds should be aligned + * to the range of the vtkScalarsToColors or vtkPiecewiseFunction that is + * being controlled by the subclasses. + * Default implementation uses the range of the control points themselves. + */ virtual void ComputeBounds(double* bounds); - // Description: - // Returns true if control points are to be rendered in log-space. This is - // true when vtkScalarsToColors is using log-scale, for example. Default - // implementation always return false. + /** + * Returns true if control points are to be rendered in log-space. This is + * true when vtkScalarsToColors is using log-scale, for example. Default + * implementation always return false. + */ virtual bool UsingLogScale() { return false; } vtkCallbackCommand* Callback; diff --git a/Charts/Core/vtkPiecewiseControlPointsItem.h b/Charts/Core/vtkPiecewiseControlPointsItem.h index 66b845b251e548ec098d2673bad7e2df92c0236e..b00683961852751f8f98aa8320a1ef1e5e992244 100644 --- a/Charts/Core/vtkPiecewiseControlPointsItem.h +++ b/Charts/Core/vtkPiecewiseControlPointsItem.h @@ -13,14 +13,17 @@ =========================================================================*/ -// .NAME vtkPiecewiseControlPointsItem - Control points for -// vtkPiecewiseFunction. -// .SECTION Description -// vtkPiecewiseControlPointsItem draws the control points of a vtkPiecewiseFunction. -// .SECTION See Also -// vtkControlPointsItem -// vtkPiecewiseFunctionItem -// vtkCompositeTransferFunctionItem +/** + * @class vtkPiecewiseControlPointsItem + * @brief Control points for + * vtkPiecewiseFunction. + * + * vtkPiecewiseControlPointsItem draws the control points of a vtkPiecewiseFunction. + * @sa + * vtkControlPointsItem + * vtkPiecewiseFunctionItem + * vtkCompositeTransferFunctionItem +*/ #ifndef vtkPiecewiseControlPointsItem_h #define vtkPiecewiseControlPointsItem_h @@ -36,34 +39,44 @@ public: vtkTypeMacro(vtkPiecewiseControlPointsItem, vtkControlPointsItem); virtual void PrintSelf(ostream &os, vtkIndent indent); - // Description: - // Creates a piecewise control points object + /** + * Creates a piecewise control points object + */ static vtkPiecewiseControlPointsItem* New(); - // Description: - // Set the piecewise function to draw its points + /** + * Set the piecewise function to draw its points + */ virtual void SetPiecewiseFunction(vtkPiecewiseFunction* function); - // Description - // Get the piecewise function + //@{ + /** + * Get the piecewise function + */ vtkGetObjectMacro(PiecewiseFunction, vtkPiecewiseFunction); + //@} - // Description: - // Add a point to the function. Returns the index of the point (0 based), - // or -1 on error. - // Subclasses should reimplement this function to do the actual work. + /** + * Add a point to the function. Returns the index of the point (0 based), + * or -1 on error. + * Subclasses should reimplement this function to do the actual work. + */ virtual vtkIdType AddPoint(double* newPos); - // Description: - // Remove a point of the function. Returns the index of the point (0 based), - // or -1 on error. - // Subclasses should reimplement this function to do the actual work. + /** + * Remove a point of the function. Returns the index of the point (0 based), + * or -1 on error. + * Subclasses should reimplement this function to do the actual work. + */ virtual vtkIdType RemovePoint(double* pos); - // Description: - // Controls whether or not control points are drawn (true) or clicked and - // moved (false). - // False by default. + //@{ + /** + * Controls whether or not control points are drawn (true) or clicked and + * moved (false). + * False by default. + */ vtkSetMacro(StrokeMode, bool); + //@} protected: vtkPiecewiseControlPointsItem(); diff --git a/Charts/Core/vtkPiecewisePointHandleItem.h b/Charts/Core/vtkPiecewisePointHandleItem.h index f26bcaef8d8ffba57859a7e6a46c5708dcb75bfb..b4aa597eec9a926961919520af32369e35664000 100644 --- a/Charts/Core/vtkPiecewisePointHandleItem.h +++ b/Charts/Core/vtkPiecewisePointHandleItem.h @@ -13,13 +13,16 @@ =========================================================================*/ -// .NAME vtkPiecewisePointHandleItem - a vtkContextItem that draws handles -// around a point of a piecewise function -// -// .SECTION Description -// This is a vtkContextItem that can be placed into a vtkContextScene. It draws -// handles around a given point of a piecewise function so that the curve can -// be adjusted using these handles. +/** + * @class vtkPiecewisePointHandleItem + * @brief a vtkContextItem that draws handles + * around a point of a piecewise function + * + * + * This is a vtkContextItem that can be placed into a vtkContextScene. It draws + * handles around a given point of a piecewise function so that the curve can + * be adjusted using these handles. +*/ #ifndef vtkPiecewisePointHandleItem_h #define vtkPiecewisePointHandleItem_h @@ -42,51 +45,65 @@ public: static vtkPiecewisePointHandleItem *New(); static void CallRedraw(vtkObject* sender, unsigned long event, void* receiver, void* params); - // Description: - // Set the parent item, which should be a vtkControlPointItem + /** + * Set the parent item, which should be a vtkControlPointItem + */ virtual void SetParent(vtkAbstractContextItem *parent); - // Description: - // Paint event for the item. + /** + * Paint event for the item. + */ virtual bool Paint(vtkContext2D *painter); - // Description: - // The current point id in the piecewise function being handled. + //@{ + /** + * The current point id in the piecewise function being handled. + */ vtkSetMacro(CurrentPointIndex, vtkIdType); vtkGetMacro(CurrentPointIndex, vtkIdType); + //@} - // Description - // Set the PieceWiseFunction the handles will manipulate + //@{ + /** + * Set the PieceWiseFunction the handles will manipulate + */ virtual void SetPiecewiseFunction(vtkPiecewiseFunction* piecewiseFunc); vtkWeakPointer GetPiecewiseFunction(); + //@} - // Description: - // Returns the index of the handle if pos is over any of the handles, - // otherwise return -1; + /** + * Returns the index of the handle if pos is over any of the handles, + * otherwise return -1; + */ int IsOverHandle(float* pos); - // Description: - // Returns true if the supplied x, y coordinate is inside the item. + /** + * Returns true if the supplied x, y coordinate is inside the item. + */ virtual bool Hit(const vtkContextMouseEvent &mouse); - // Description: - // Mouse move event. + /** + * Mouse move event. + */ virtual bool MouseMoveEvent(const vtkContextMouseEvent &mouse); - // Description: - // Mouse button down event. + /** + * Mouse button down event. + */ virtual bool MouseButtonPressEvent(const vtkContextMouseEvent &mouse); - // Description: - // Mouse button release event. + /** + * Mouse button release event. + */ virtual bool MouseButtonReleaseEvent(const vtkContextMouseEvent &mouse); protected: vtkPiecewisePointHandleItem(); ~vtkPiecewisePointHandleItem(); - // Description: - // Redraw all the handles + /** + * Redraw all the handles + */ virtual void Redraw(); int MouseOverHandleIndex; diff --git a/Charts/Core/vtkPlot.h b/Charts/Core/vtkPlot.h index 519c635dd644165cb1c456a92d3ddf6389a66187..fcc8871fc8b04093f48df5105b38709d84dd5349 100644 --- a/Charts/Core/vtkPlot.h +++ b/Charts/Core/vtkPlot.h @@ -13,13 +13,16 @@ =========================================================================*/ -// .NAME vtkPlot - Abstract class for 2D plots. -// -// .SECTION Description -// The base class for all plot types used in vtkChart derived charts. -// -// .SECTION See Also -// vtkPlotPoints vtkPlotLine vtkPlotBar vtkChart vtkChartXY +/** + * @class vtkPlot + * @brief Abstract class for 2D plots. + * + * + * The base class for all plot types used in vtkChart derived charts. + * + * @sa + * vtkPlotPoints vtkPlotLine vtkPlotBar vtkChart vtkChartXY +*/ #ifndef vtkPlot_h #define vtkPlot_h @@ -46,240 +49,311 @@ public: vtkTypeMacro(vtkPlot, vtkContextItem); virtual void PrintSelf(ostream &os, vtkIndent indent); - // Description: - // Set whether the plot renders an entry in the legend. Default is true. - // vtkPlot::PaintLegend will get called to render the legend marker on when - // this is true. + //@{ + /** + * Set whether the plot renders an entry in the legend. Default is true. + * vtkPlot::PaintLegend will get called to render the legend marker on when + * this is true. + */ vtkSetMacro(LegendVisibility, bool); vtkGetMacro(LegendVisibility, bool); vtkBooleanMacro(LegendVisibility, bool); - - // Description: - // Paint legend event for the plot, called whenever the legend needs the - // plot items symbol/mark/line drawn. A rect is supplied with the lower left - // corner of the rect (elements 0 and 1) and with width x height (elements 2 - // and 3). The plot can choose how to fill the space supplied. The index is used - // by Plots that return more than one label. + //@} + + /** + * Paint legend event for the plot, called whenever the legend needs the + * plot items symbol/mark/line drawn. A rect is supplied with the lower left + * corner of the rect (elements 0 and 1) and with width x height (elements 2 + * and 3). The plot can choose how to fill the space supplied. The index is used + * by Plots that return more than one label. + */ virtual bool PaintLegend(vtkContext2D *painter, const vtkRectf& rect, int legendIndex); - // Description: - // Sets/gets a printf-style string to build custom tooltip labels from. - // An empty string generates the default tooltip labels. - // The following case-sensitive format tags (without quotes) are recognized: - // '%x' The X value of the plot element - // '%y' The Y value of the plot element - // '%i' The IndexedLabels entry for the plot element - // '%l' The value of the plot's GetLabel() function - // '%s' (vtkPlotBar only) The Labels entry for the bar segment - // Any other characters or unrecognized format tags are printed in the - // tooltip label verbatim. + //@{ + /** + * Sets/gets a printf-style string to build custom tooltip labels from. + * An empty string generates the default tooltip labels. + * The following case-sensitive format tags (without quotes) are recognized: + * '%x' The X value of the plot element + * '%y' The Y value of the plot element + * '%i' The IndexedLabels entry for the plot element + * '%l' The value of the plot's GetLabel() function + * '%s' (vtkPlotBar only) The Labels entry for the bar segment + * Any other characters or unrecognized format tags are printed in the + * tooltip label verbatim. + */ virtual void SetTooltipLabelFormat(const vtkStdString &label); virtual vtkStdString GetTooltipLabelFormat(); + //@} - // Description: - // Sets/gets the tooltip notation style. + //@{ + /** + * Sets/gets the tooltip notation style. + */ virtual void SetTooltipNotation(int notation); virtual int GetTooltipNotation(); + //@} - // Description: - // Sets/gets the tooltip precision. + //@{ + /** + * Sets/gets the tooltip precision. + */ virtual void SetTooltipPrecision(int precision); virtual int GetTooltipPrecision(); + //@} - // Description: - // Generate and return the tooltip label string for this plot - // The segmentIndex parameter is ignored, except for vtkPlotBar + /** + * Generate and return the tooltip label string for this plot + * The segmentIndex parameter is ignored, except for vtkPlotBar + */ virtual vtkStdString GetTooltipLabel(const vtkVector2d &plotPos, vtkIdType seriesIndex, vtkIdType segmentIndex); - // Description: - // Function to query a plot for the nearest point to the specified coordinate. - // Returns the index of the data series with which the point is associated, or - // -1 if no point was found. + /** + * Function to query a plot for the nearest point to the specified coordinate. + * Returns the index of the data series with which the point is associated, or + * -1 if no point was found. + */ virtual vtkIdType GetNearestPoint(const vtkVector2f& point, const vtkVector2f& tolerance, vtkVector2f* location); - // Description: - // Select all points in the specified rectangle. + /** + * Select all points in the specified rectangle. + */ virtual bool SelectPoints(const vtkVector2f& min, const vtkVector2f& max); - // Description: - // Select all points in the specified polygon. + /** + * Select all points in the specified polygon. + */ virtual bool SelectPointsInPolygon(const vtkContextPolygon &polygon); - // Description: - // Set the plot color + //@{ + /** + * Set the plot color + */ virtual void SetColor(unsigned char r, unsigned char g, unsigned char b, unsigned char a); virtual void SetColor(double r, double g, double b); virtual void GetColor(double rgb[3]); void GetColor(unsigned char rgb[3]); + //@} - // Description: - // Set the width of the line. + /** + * Set the width of the line. + */ virtual void SetWidth(float width); - // Description: - // Get the width of the line. + /** + * Get the width of the line. + */ virtual float GetWidth(); - // Description: - // Set/get the vtkPen object that controls how this plot draws (out)lines. + //@{ + /** + * Set/get the vtkPen object that controls how this plot draws (out)lines. + */ void SetPen(vtkPen *pen); vtkPen* GetPen(); + //@} - // Description: - // Set/get the vtkBrush object that controls how this plot fills shapes. + //@{ + /** + * Set/get the vtkBrush object that controls how this plot fills shapes. + */ void SetBrush(vtkBrush *brush); vtkBrush* GetBrush(); + //@} - // Description: - // Set/get the vtkBrush object that controls how this plot fills selected - // shapes. + //@{ + /** + * Set/get the vtkBrush object that controls how this plot fills selected + * shapes. + */ void SetSelectionPen(vtkPen *pen); vtkPen* GetSelectionPen(); + //@} - // Description: - // Set/get the vtkBrush object that controls how this plot fills selected - // shapes. + //@{ + /** + * Set/get the vtkBrush object that controls how this plot fills selected + * shapes. + */ void SetSelectionBrush(vtkBrush *brush); vtkBrush* GetSelectionBrush(); + //@} - // Description: - // Set the label of this plot. + /** + * Set the label of this plot. + */ virtual void SetLabel(const vtkStdString &label); - // Description: - // Get the label of this plot. + /** + * Get the label of this plot. + */ virtual vtkStdString GetLabel(); - // Description: - // Set the plot labels, these are used for stacked chart variants, with the - // index referring to the stacking index. + /** + * Set the plot labels, these are used for stacked chart variants, with the + * index referring to the stacking index. + */ virtual void SetLabels(vtkStringArray *labels); - // Description: - // Get the plot labels. If this array has a length greater than 1 the index - // refers to the stacked objects in the plot. See vtkPlotBar for example. + /** + * Get the plot labels. If this array has a length greater than 1 the index + * refers to the stacked objects in the plot. See vtkPlotBar for example. + */ virtual vtkStringArray *GetLabels(); - // Description: - // Get the number of labels associated with this plot. + /** + * Get the number of labels associated with this plot. + */ virtual int GetNumberOfLabels(); - // Description: - // Get the label at the specified index. + /** + * Get the label at the specified index. + */ vtkStdString GetLabel(vtkIdType index); - // Description: - // Set indexed labels for the plot. If set, this array can be used to provide - // custom labels for each point in a plot. This array should be the same - // length as the points array. Default is null (no indexed labels). + /** + * Set indexed labels for the plot. If set, this array can be used to provide + * custom labels for each point in a plot. This array should be the same + * length as the points array. Default is null (no indexed labels). + */ void SetIndexedLabels(vtkStringArray *labels); - // Description: - // Get the indexed labels array. + /** + * Get the indexed labels array. + */ virtual vtkStringArray *GetIndexedLabels(); - // Description: - // Get the data object that the plot will draw. + /** + * Get the data object that the plot will draw. + */ vtkContextMapper2D* GetData(); - // Description: - // Use the Y array index for the X value. If true any X column setting will be - // ignored, and the X values will simply be the index of the Y column. + //@{ + /** + * Use the Y array index for the X value. If true any X column setting will be + * ignored, and the X values will simply be the index of the Y column. + */ vtkGetMacro(UseIndexForXSeries, bool); + //@} - // Description: - // Use the Y array index for the X value. If true any X column setting will be - // ignored, and the X values will simply be the index of the Y column. + //@{ + /** + * Use the Y array index for the X value. If true any X column setting will be + * ignored, and the X values will simply be the index of the Y column. + */ vtkSetMacro(UseIndexForXSeries, bool); + //@} - // Description: - // This is a convenience function to set the input table and the x, y column - // for the plot. + //@{ + /** + * This is a convenience function to set the input table and the x, y column + * for the plot. + */ virtual void SetInputData(vtkTable *table); virtual void SetInputData(vtkTable *table, const vtkStdString &xColumn, const vtkStdString &yColumn); void SetInputData(vtkTable *table, vtkIdType xColumn, vtkIdType yColumn); + //@} - // Description: - // Get the input table used by the plot. + /** + * Get the input table used by the plot. + */ virtual vtkTable* GetInput(); - // Description: - // Convenience function to set the input arrays. For most plots index 0 - // is the x axis, and index 1 is the y axis. The name is the name of the - // column in the vtkTable. + /** + * Convenience function to set the input arrays. For most plots index 0 + * is the x axis, and index 1 is the y axis. The name is the name of the + * column in the vtkTable. + */ virtual void SetInputArray(int index, const vtkStdString &name); - // Description: - // Set whether the plot can be selected. True by default. - // If not, then SetSelection(), SelectPoints() or SelectPointsInPolygon() - // won't have any effect. - // \sa SetSelection(), SelectPoints(), SelectPointsInPolygon() + //@{ + /** + * Set whether the plot can be selected. True by default. + * If not, then SetSelection(), SelectPoints() or SelectPointsInPolygon() + * won't have any effect. + * \sa SetSelection(), SelectPoints(), SelectPointsInPolygon() + */ vtkSetMacro(Selectable,bool); vtkGetMacro(Selectable,bool); vtkBooleanMacro(Selectable,bool); - - // Description: - // Sets the list of points that must be selected. - // If Selectable is false, then this method does nothing. - // \sa SetSelectable() + //@} + + //@{ + /** + * Sets the list of points that must be selected. + * If Selectable is false, then this method does nothing. + * \sa SetSelectable() + */ virtual void SetSelection(vtkIdTypeArray *id); vtkGetObjectMacro(Selection, vtkIdTypeArray); + //@} - // Description: - // Get/set the X axis associated with this plot. + //@{ + /** + * Get/set the X axis associated with this plot. + */ vtkGetObjectMacro(XAxis, vtkAxis); virtual void SetXAxis(vtkAxis* axis); + //@} - // Description: - // Get/set the Y axis associated with this plot. + //@{ + /** + * Get/set the Y axis associated with this plot. + */ vtkGetObjectMacro(YAxis, vtkAxis); virtual void SetYAxis(vtkAxis* axis); - - // Description: - // Get/set the origin shift and scaling factor used by the plot, this is - // normally 0.0 offset and 1.0 scaling, but can be used to render data outside - // of the single precision range. The chart that owns the plot should set this - // and ensure the appropriate matrix is used when rendering the plot. + //@} + + //@{ + /** + * Get/set the origin shift and scaling factor used by the plot, this is + * normally 0.0 offset and 1.0 scaling, but can be used to render data outside + * of the single precision range. The chart that owns the plot should set this + * and ensure the appropriate matrix is used when rendering the plot. + */ void SetShiftScale(const vtkRectd &scaling); vtkRectd GetShiftScale(); + //@} - // Description: - // Get the bounds for this plot as (Xmin, Xmax, Ymin, Ymax). - // - // See \a GetUnscaledInputBounds for more information. + /** + * Get the bounds for this plot as (Xmin, Xmax, Ymin, Ymax). + + * See \a GetUnscaledInputBounds for more information. + */ virtual void GetBounds(double bounds[4]) { bounds[0] = bounds[1] = bounds[2] = bounds[3] = 0.0; } - // Description: - // Provide un-log-scaled bounds for the plot inputs. - // - // This function is analogous to GetBounds() with 2 exceptions: - // 1. It will never return log-scaled bounds even when the - // x- and/or y-axes are log-scaled. - // 2. It will always return the bounds along the *input* axes - // rather than the output chart coordinates. Thus GetXAxis() - // returns the axis associated with the first 2 bounds entries - // and GetYAxis() returns the axis associated with the next 2 - // bounds entries. - // - // For example, vtkPlotBar's GetBounds() method - // will swap axis bounds when its orientation is vertical while - // its GetUnscaledInputBounds() will not swap axis bounds. - // - // This method is provided so user interfaces can determine - // whether or not to allow log-scaling of a particular vtkAxis. - // - // Subclasses of vtkPlot are responsible for implementing this - // function to transform input plot data. - // - // The returned \a bounds are stored as (Xmin, Xmax, Ymin, Ymax). + /** + * Provide un-log-scaled bounds for the plot inputs. + + * This function is analogous to GetBounds() with 2 exceptions: + * 1. It will never return log-scaled bounds even when the + * x- and/or y-axes are log-scaled. + * 2. It will always return the bounds along the *input* axes + * rather than the output chart coordinates. Thus GetXAxis() + * returns the axis associated with the first 2 bounds entries + * and GetYAxis() returns the axis associated with the next 2 + * bounds entries. + + * For example, vtkPlotBar's GetBounds() method + * will swap axis bounds when its orientation is vertical while + * its GetUnscaledInputBounds() will not swap axis bounds. + + * This method is provided so user interfaces can determine + * whether or not to allow log-scaling of a particular vtkAxis. + + * Subclasses of vtkPlot are responsible for implementing this + * function to transform input plot data. + + * The returned \a bounds are stored as (Xmin, Xmax, Ymin, Ymax). + */ virtual void GetUnscaledInputBounds(double bounds[4]) { // Implemented here by calling GetBounds() to support plot @@ -287,98 +361,119 @@ public: return this->GetBounds(bounds); } - // Description: - // Subclasses that build data caches to speed up painting should override this - // method to update such caches. This is called on each Paint, hence - // subclasses must add checks to avoid rebuilding of cache, unless necessary. - // Default implementation is empty. + /** + * Subclasses that build data caches to speed up painting should override this + * method to update such caches. This is called on each Paint, hence + * subclasses must add checks to avoid rebuilding of cache, unless necessary. + * Default implementation is empty. + */ virtual void UpdateCache() {} - // Description: - // A General setter/getter that should be overridden. It can silently drop - // options, case is important + //@{ + /** + * A General setter/getter that should be overridden. It can silently drop + * options, case is important + */ virtual void SetProperty(const vtkStdString &property, const vtkVariant &var); virtual vtkVariant GetProperty(const vtkStdString &property); + //@} protected: vtkPlot(); ~vtkPlot(); - // Description: - // Get the properly formatted number for the supplied position and axis. + /** + * Get the properly formatted number for the supplied position and axis. + */ vtkStdString GetNumber(double position, vtkAxis *axis); - // Description: - // This object stores the vtkPen that controls how the plot is drawn. + /** + * This object stores the vtkPen that controls how the plot is drawn. + */ vtkSmartPointer Pen; - // Description: - // This object stores the vtkBrush that controls how the plot is drawn. + /** + * This object stores the vtkBrush that controls how the plot is drawn. + */ vtkSmartPointer Brush; - // Description: - // This object stores the vtkPen that controls how the selected elements - // of the plot are drawn. + /** + * This object stores the vtkPen that controls how the selected elements + * of the plot are drawn. + */ vtkSmartPointer SelectionPen; - // Description: - // This object stores the vtkBrush that controls how the selected elements - // of the plot are drawn. + /** + * This object stores the vtkBrush that controls how the selected elements + * of the plot are drawn. + */ vtkSmartPointer SelectionBrush; - // Description: - // Plot labels, used by legend. + /** + * Plot labels, used by legend. + */ vtkSmartPointer Labels; - // Description: - // Holds Labels when they're auto-created + /** + * Holds Labels when they're auto-created + */ vtkSmartPointer AutoLabels; - // Description: - // Holds Labels when they're auto-created + /** + * Holds Labels when they're auto-created + */ vtkSmartPointer IndexedLabels; - // Description: - // Use the Y array index for the X value. If true any X column setting will be - // ignored, and the X values will simply be the index of the Y column. + /** + * Use the Y array index for the X value. If true any X column setting will be + * ignored, and the X values will simply be the index of the Y column. + */ bool UseIndexForXSeries; - // Description: - // This data member contains the data that will be plotted, it inherits - // from vtkAlgorithm. + /** + * This data member contains the data that will be plotted, it inherits + * from vtkAlgorithm. + */ vtkSmartPointer Data; - // Description: - // Whether plot points can be selected or not. + /** + * Whether plot points can be selected or not. + */ bool Selectable; - // Description: - // Selected indices for the table the plot is rendering + /** + * Selected indices for the table the plot is rendering + */ vtkIdTypeArray *Selection; - // Description: - // The X axis associated with this plot. + /** + * The X axis associated with this plot. + */ vtkAxis* XAxis; - // Description: - // The X axis associated with this plot. + /** + * The X axis associated with this plot. + */ vtkAxis* YAxis; - // Description: - // A printf-style string to build custom tooltip labels from. - // See the accessor/mutator functions for full documentation. + /** + * A printf-style string to build custom tooltip labels from. + * See the accessor/mutator functions for full documentation. + */ vtkStdString TooltipLabelFormat; - // Description: - // The default printf-style string to build custom tooltip labels from. - // See the accessor/mutator functions for full documentation. + /** + * The default printf-style string to build custom tooltip labels from. + * See the accessor/mutator functions for full documentation. + */ vtkStdString TooltipDefaultLabelFormat; int TooltipNotation; int TooltipPrecision; - // Description: - // The current shift in origin and scaling factor applied to the plot. + /** + * The current shift in origin and scaling factor applied to the plot. + */ vtkRectd ShiftScale; bool LegendVisibility; diff --git a/Charts/Core/vtkPlot3D.h b/Charts/Core/vtkPlot3D.h index 25fb2e4a79b518eecf4f3ee7470497c522efe264..78fa34f3c7aa71491f0c7159df975dc5cbce3b6a 100644 --- a/Charts/Core/vtkPlot3D.h +++ b/Charts/Core/vtkPlot3D.h @@ -13,13 +13,16 @@ =========================================================================*/ -// .NAME vtkPlot3D - Abstract class for 3D plots. -// -// .SECTION Description -// The base class for all plot types used in vtkChart derived charts. -// -// .SECTION See Also -// vtkPlot3DPoints vtkPlot3DLine vtkPlot3DBar vtkChart vtkChartXY +/** + * @class vtkPlot3D + * @brief Abstract class for 3D plots. + * + * + * The base class for all plot types used in vtkChart derived charts. + * + * @sa + * vtkPlot3DPoints vtkPlot3DLine vtkPlot3DBar vtkChart vtkChartXY +*/ #ifndef vtkPlot3D_h #define vtkPlot3D_h @@ -44,18 +47,26 @@ public: vtkTypeMacro(vtkPlot3D, vtkContextItem); virtual void PrintSelf(ostream &os, vtkIndent indent); - // Description: - // Set/get the vtkPen object that controls how this plot draws (out)lines. + //@{ + /** + * Set/get the vtkPen object that controls how this plot draws (out)lines. + */ void SetPen(vtkPen *pen); vtkPen* GetPen(); + //@} - // Description: - // Set/get the vtkPen object that controls how this plot draws (out)lines. + //@{ + /** + * Set/get the vtkPen object that controls how this plot draws (out)lines. + */ void SetSelectionPen(vtkPen *pen); vtkPen* GetSelectionPen(); + //@} - // Description: - // Set the input to the plot. + //@{ + /** + * Set the input to the plot. + */ virtual void SetInputData(vtkTable *input); virtual void SetInputData(vtkTable *input, const vtkStdString &xName, const vtkStdString &yName, @@ -66,98 +77,124 @@ public: const vtkStdString &colorName); virtual void SetInputData(vtkTable *input, vtkIdType xColumn, vtkIdType yColumn, vtkIdType zColumn); + //@} - // Description: - // Set the color of each point in the plot. The input is a single component - // scalar array. The values of this array will be passed through a lookup - // table to generate the color for each data point in the plot. + /** + * Set the color of each point in the plot. The input is a single component + * scalar array. The values of this array will be passed through a lookup + * table to generate the color for each data point in the plot. + */ virtual void SetColors(vtkDataArray *colorArr); - // Description: - // Get all the data points within this plot. + /** + * Get all the data points within this plot. + */ std::vector GetPoints(); - // Description: - // Get/set the chart for this plot. + //@{ + /** + * Get/set the chart for this plot. + */ vtkGetObjectMacro(Chart, vtkChartXYZ); virtual void SetChart(vtkChartXYZ* chart); + //@} - // Description: - // Get the label for the X axis. + /** + * Get the label for the X axis. + */ std::string GetXAxisLabel(); - // Description: - // Get the label for the Y axis. + /** + * Get the label for the Y axis. + */ std::string GetYAxisLabel(); - // Description: - // Get the label for the Z axis. + /** + * Get the label for the Z axis. + */ std::string GetZAxisLabel(); - // Description: - // Get the bounding cube surrounding the currently rendered data points. + /** + * Get the bounding cube surrounding the currently rendered data points. + */ std::vector GetDataBounds() { return this->DataBounds; } - // Description: - // Set/get the selection array for the plot. + //@{ + /** + * Set/get the selection array for the plot. + */ virtual void SetSelection(vtkIdTypeArray *id); virtual vtkIdTypeArray* GetSelection(); + //@} protected: vtkPlot3D(); ~vtkPlot3D(); - // Description: - // Generate a bounding cube for our data. + /** + * Generate a bounding cube for our data. + */ virtual void ComputeDataBounds(); - // Description: - // This object stores the vtkPen that controls how the plot is drawn. + /** + * This object stores the vtkPen that controls how the plot is drawn. + */ vtkSmartPointer Pen; - // Description: - // This object stores the vtkPen that controls how the plot is drawn. + /** + * This object stores the vtkPen that controls how the plot is drawn. + */ vtkSmartPointer SelectionPen; - // Description: - // This array assigns a color to each datum in the plot. + /** + * This array assigns a color to each datum in the plot. + */ vtkNew Colors; - // Description: - // Number of components in our color vectors. This value is initialized - // to zero. It's typically set to 3 or 4 if the points are to be colored. + /** + * Number of components in our color vectors. This value is initialized + * to zero. It's typically set to 3 or 4 if the points are to be colored. + */ int NumberOfComponents; - // Description: - // The label for the X Axis. + /** + * The label for the X Axis. + */ std::string XAxisLabel; - // Description: - // The label for the Y Axis. + /** + * The label for the Y Axis. + */ std::string YAxisLabel; - // Description: - // The label for the Z Axis. + /** + * The label for the Z Axis. + */ std::string ZAxisLabel; - // Description: - // The data points read in during SetInputData(). + /** + * The data points read in during SetInputData(). + */ std::vector Points; - // Description: - // When the points were last built. + /** + * When the points were last built. + */ vtkTimeStamp PointsBuildTime; - // Description: - // The chart containing this plot. + /** + * The chart containing this plot. + */ vtkChartXYZ* Chart; - // Description: - // A bounding cube surrounding the currently rendered data points. + /** + * A bounding cube surrounding the currently rendered data points. + */ std::vector DataBounds; - // Description: - // Selected indices for the table the plot is rendering + /** + * Selected indices for the table the plot is rendering + */ vtkSmartPointer Selection; private: diff --git a/Charts/Core/vtkPlotArea.h b/Charts/Core/vtkPlotArea.h index 42c53b6130690f4ecb9ced965da061818ebf8af1..c11f087cee56af32086a47c1833e7383c71299b7 100644 --- a/Charts/Core/vtkPlotArea.h +++ b/Charts/Core/vtkPlotArea.h @@ -12,13 +12,16 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkPlotArea - draws an area plot. -// .SECTION Description -// vtkPlotArea is used to render an area plot. An area plot (sometimes called a -// range plot) renders a filled region between the selected ymin and ymax -// arrays. -// To specify the x array and ymin/ymax arrays, use the SetInputArray method -// with array index as 0, 1, or 2, respectively. +/** + * @class vtkPlotArea + * @brief draws an area plot. + * + * vtkPlotArea is used to render an area plot. An area plot (sometimes called a + * range plot) renders a filled region between the selected ymin and ymax + * arrays. + * To specify the x array and ymin/ymax arrays, use the SetInputArray method + * with array index as 0, 1, or 2, respectively. +*/ #ifndef vtkPlotArea_h #define vtkPlotArea_h @@ -32,72 +35,89 @@ public: vtkTypeMacro(vtkPlotArea, vtkPlot); void PrintSelf(ostream& os, vtkIndent indent); - // Description: - // Convenience method to set the input arrays. vtkPlotArea supports the - // following indices: - // \li 0: x-axis, - // \li 1: y-axis, - // \li 2: y-axis. + /** + * Convenience method to set the input arrays. vtkPlotArea supports the + * following indices: + * \li 0: x-axis, + * \li 1: y-axis, + * \li 2: y-axis. + */ using Superclass::SetInputArray; - // Description: - // Overridden to set the brush color. + //@{ + /** + * Overridden to set the brush color. + */ virtual void SetColor(unsigned char r, unsigned char g, unsigned char b, unsigned char a); virtual void SetColor(double r, double g, double b); + //@} - // Description: - // Get/set the valid point mask array name. + //@{ + /** + * Get/set the valid point mask array name. + */ vtkGetMacro(ValidPointMaskName, vtkStdString) vtkSetMacro(ValidPointMaskName, vtkStdString) + //@} - // Description: - // Perform any updates to the item that may be necessary before rendering. + /** + * Perform any updates to the item that may be necessary before rendering. + */ virtual void Update(); - // Description: - // Get the bounds for this plot as (Xmin, Xmax, Ymin, Ymax). + /** + * Get the bounds for this plot as (Xmin, Xmax, Ymin, Ymax). + */ virtual void GetBounds(double bounds[4]); - // Description: - // Subclasses that build data caches to speed up painting should override this - // method to update such caches. This is called on each Paint, hence - // subclasses must add checks to avoid rebuilding of cache, unless necessary. + /** + * Subclasses that build data caches to speed up painting should override this + * method to update such caches. This is called on each Paint, hence + * subclasses must add checks to avoid rebuilding of cache, unless necessary. + */ virtual void UpdateCache(); - // Description: - // Paint event for the XY plot, called whenever the chart needs to be drawn + /** + * Paint event for the XY plot, called whenever the chart needs to be drawn + */ virtual bool Paint(vtkContext2D *painter); - // Description: - // Paint legend event for the plot, called whenever the legend needs the - // plot items symbol/mark/line drawn. A rect is supplied with the lower left - // corner of the rect (elements 0 and 1) and with width x height (elements 2 - // and 3). The plot can choose how to fill the space supplied. The index is used - // by Plots that return more than one label. + /** + * Paint legend event for the plot, called whenever the legend needs the + * plot items symbol/mark/line drawn. A rect is supplied with the lower left + * corner of the rect (elements 0 and 1) and with width x height (elements 2 + * and 3). The plot can choose how to fill the space supplied. The index is used + * by Plots that return more than one label. + */ virtual bool PaintLegend(vtkContext2D *painter, const vtkRectf& rect, int legendIndex); - // Description: - // Function to query a plot for the nearest point to the specified coordinate. - // Returns the index of the data series with which the point is associated, or - // -1 if no point was found. + /** + * Function to query a plot for the nearest point to the specified coordinate. + * Returns the index of the data series with which the point is associated, or + * -1 if no point was found. + */ virtual vtkIdType GetNearestPoint(const vtkVector2f& point, const vtkVector2f& tolerance, vtkVector2f* location); - // Description: - // Generate and return the tooltip label string for this plot - // The segmentIndex parameter is ignored, except for vtkPlotBar + //@{ + /** + * Generate and return the tooltip label string for this plot + * The segmentIndex parameter is ignored, except for vtkPlotBar + */ virtual vtkStdString GetTooltipLabel(const vtkVector2d &plotPos, vtkIdType seriesIndex, vtkIdType segmentIndex); protected: vtkPlotArea(); ~vtkPlotArea(); + //@} - // Description: - // Name of the valid point mask array. + /** + * Name of the valid point mask array. + */ vtkStdString ValidPointMaskName; private: diff --git a/Charts/Core/vtkPlotBag.h b/Charts/Core/vtkPlotBag.h index 258802410c122fab1c0e3d17c0333faa94f7c782..9a77f98a51ad3687a587482fa7e6b0e4ae39c776 100644 --- a/Charts/Core/vtkPlotBag.h +++ b/Charts/Core/vtkPlotBag.h @@ -13,19 +13,22 @@ =========================================================================*/ -// .NAME vtkPlotBag - Class for drawing an a bagplot. -// -// .SECTION Description -// This class allows to draw a bagplot given three columns from -// a vtkTable. The first two columns will represent X,Y as it is for -// vtkPlotPoints. The third one will have to specify if the density -// assigned to each point (generally obtained by the -// vtkHighestDensityRegionsStatistics filter). -// Points are drawn in a plot points fashion and 2 convex hull polygons -// are drawn around the median and the 3 quartile of the density field. -// -// .SECTION See Also -// vtkHighestDensityRegionsStatistics +/** + * @class vtkPlotBag + * @brief Class for drawing an a bagplot. + * + * + * This class allows to draw a bagplot given three columns from + * a vtkTable. The first two columns will represent X,Y as it is for + * vtkPlotPoints. The third one will have to specify if the density + * assigned to each point (generally obtained by the + * vtkHighestDensityRegionsStatistics filter). + * Points are drawn in a plot points fashion and 2 convex hull polygons + * are drawn around the median and the 3 quartile of the density field. + * + * @sa + * vtkHighestDensityRegionsStatistics +*/ #ifndef vtkPlotBag_h #define vtkPlotBag_h @@ -41,72 +44,88 @@ public: vtkTypeMacro(vtkPlotBag, vtkPlotPoints); virtual void PrintSelf(ostream &os, vtkIndent indent); - // Description: - // Creates a new Bag Plot object. + /** + * Creates a new Bag Plot object. + */ static vtkPlotBag *New(); - // Description: - // Perform any updates to the item that may be necessary before rendering. - // The scene should take care of calling this on all items before their - // Paint function is invoked. + /** + * Perform any updates to the item that may be necessary before rendering. + * The scene should take care of calling this on all items before their + * Paint function is invoked. + */ virtual void Update(); - // Description: - // Paint event for the XY plot, called whenever the chart needs to be drawn. + /** + * Paint event for the XY plot, called whenever the chart needs to be drawn. + */ virtual bool Paint(vtkContext2D *painter); - // Description: - // Paint legend event for the XY plot, called whenever the legend needs the - // plot items symbol/mark/line drawn. A rect is supplied with the lower left - // corner of the rect (elements 0 and 1) and with width x height (elements 2 - // and 3). The plot can choose how to fill the space supplied. + /** + * Paint legend event for the XY plot, called whenever the legend needs the + * plot items symbol/mark/line drawn. A rect is supplied with the lower left + * corner of the rect (elements 0 and 1) and with width x height (elements 2 + * and 3). The plot can choose how to fill the space supplied. + */ virtual bool PaintLegend(vtkContext2D *painter, const vtkRectf& rect, int legendIndex); - // Description: - // Get the plot labels. If this array has a length greater than 1 the index - // refers to the stacked objects in the plot. See vtkPlotBar for example. + /** + * Get the plot labels. If this array has a length greater than 1 the index + * refers to the stacked objects in the plot. See vtkPlotBar for example. + */ virtual vtkStringArray *GetLabels(); - // Description: - // Generate and return the tooltip label string for this plot - // The segmentIndex parameter is ignored, except for vtkPlotBar + /** + * Generate and return the tooltip label string for this plot + * The segmentIndex parameter is ignored, except for vtkPlotBar + */ virtual vtkStdString GetTooltipLabel(const vtkVector2d &plotPos, vtkIdType seriesIndex, vtkIdType segmentIndex); - // Description: - // Set the input, we are expecting a vtkTable with three columns. The first - // column and the second represent the x,y position . The five others - // columns represent the quartiles used to display the box. - // Inherited method will call the last SetInputData method with default - // paramaters. + //@{ + /** + * Set the input, we are expecting a vtkTable with three columns. The first + * column and the second represent the x,y position . The five others + * columns represent the quartiles used to display the box. + * Inherited method will call the last SetInputData method with default + * paramaters. + */ virtual void SetInputData(vtkTable *table); virtual void SetInputData(vtkTable *table, const vtkStdString &yColumn, const vtkStdString &densityColumn); virtual void SetInputData(vtkTable *table, const vtkStdString &xColumn, const vtkStdString &yColumn, const vtkStdString &densityColumn); + //@} virtual void SetInputData(vtkTable *table, vtkIdType xColumn, vtkIdType yColumn, vtkIdType densityColumn); - // Description: - // Set/get the visibility of the bags. - // True by default. + //@{ + /** + * Set/get the visibility of the bags. + * True by default. + */ vtkSetMacro(BagVisible, bool); vtkGetMacro(BagVisible, bool); + //@} - // Description: - // Set/get the vtkPen object that controls how this plot draws boundary lines. + //@{ + /** + * Set/get the vtkPen object that controls how this plot draws boundary lines. + */ void SetLinePen(vtkPen* pen); vtkGetObjectMacro(LinePen, vtkPen); + //@} - // Description: - // Set/get the vtkPen object that controls how this plot draws points. - // Those are just helpers functions: - // this pen is actually the default Plot pen. + /** + * Set/get the vtkPen object that controls how this plot draws points. + * Those are just helpers functions: + * this pen is actually the default Plot pen. + */ void SetPointPen(vtkPen* pen) { this->SetPen(pen); } vtkPen* GetPointPen() { return this->GetPen(); } diff --git a/Charts/Core/vtkPlotBar.h b/Charts/Core/vtkPlotBar.h index e1385909f88e3953bfaeb6eb226add2aef277df3..45dd4df4086c21428eb2de7ab91fa0571c09f545 100644 --- a/Charts/Core/vtkPlotBar.h +++ b/Charts/Core/vtkPlotBar.h @@ -13,11 +13,14 @@ =========================================================================*/ -// .NAME vtkPlotBar - Class for drawing an XY plot given two columns from a -// vtkTable. -// -// .SECTION Description -// +/** + * @class vtkPlotBar + * @brief Class for drawing an XY plot given two columns from a + * vtkTable. + * + * + * +*/ #ifndef vtkPlotBar_h #define vtkPlotBar_h @@ -42,173 +45,221 @@ public: vtkTypeMacro(vtkPlotBar, vtkPlot); virtual void PrintSelf(ostream &os, vtkIndent indent); - // Description: - // Enum of bar chart oritentation types + /** + * Enum of bar chart oritentation types + */ enum { VERTICAL = 0, HORIZONTAL }; - // Description: - // Creates a 2D Chart object. + /** + * Creates a 2D Chart object. + */ static vtkPlotBar *New(); - // Description: - // Perform any updates to the item that may be necessary before rendering. + /** + * Perform any updates to the item that may be necessary before rendering. + */ virtual void Update(); - // Description: - // Paint event for the XY plot, called whenever the chart needs to be drawn + /** + * Paint event for the XY plot, called whenever the chart needs to be drawn + */ virtual bool Paint(vtkContext2D *painter); - // Description: - // Paint legend event for the XY plot, called whenever the legend needs the - // plot items symbol/mark/line drawn. A rect is supplied with the lower left - // corner of the rect (elements 0 and 1) and with width x height (elements 2 - // and 3). The plot can choose how to fill the space supplied. + /** + * Paint legend event for the XY plot, called whenever the legend needs the + * plot items symbol/mark/line drawn. A rect is supplied with the lower left + * corner of the rect (elements 0 and 1) and with width x height (elements 2 + * and 3). The plot can choose how to fill the space supplied. + */ virtual bool PaintLegend(vtkContext2D *painter, const vtkRectf& rect, int legendIndex); - // Description: - // Set the plot color + //@{ + /** + * Set the plot color + */ virtual void SetColor(unsigned char r, unsigned char g, unsigned char b, unsigned char a); virtual void SetColor(double r, double g, double b); virtual void GetColor(double rgb[3]); + //@} - // Description: - // Set the width of the line. + //@{ + /** + * Set the width of the line. + */ vtkSetMacro(Width, float); + //@} - // Description: - // Get the width of the line. + //@{ + /** + * Get the width of the line. + */ vtkGetMacro(Width, float); - - // Description: - // Set/get the horizontal offset of the bars. - // Positive values move the bars leftward. - // For HORIZONTAL orientation, offsets bars vertically, - // with a positive value moving bars downward. + //@} + + //@{ + /** + * Set/get the horizontal offset of the bars. + * Positive values move the bars leftward. + * For HORIZONTAL orientation, offsets bars vertically, + * with a positive value moving bars downward. + */ vtkSetMacro(Offset, float); vtkGetMacro(Offset, float); + //@} - // Description: - // Set/get the orientation of the bars. - // Valid orientations are VERTICAL (default) and HORIZONTAL. + //@{ + /** + * Set/get the orientation of the bars. + * Valid orientations are VERTICAL (default) and HORIZONTAL. + */ virtual void SetOrientation(int orientation); vtkGetMacro(Orientation, int); + //@} - // Description: - // A helper used by both GetUnscaledBounds and GetBounds(double[4]). + /** + * A helper used by both GetUnscaledBounds and GetBounds(double[4]). + */ virtual void GetBounds(double bounds[4], bool unscaled); - // Description: - // Get the bounds for this mapper as (Xmin,Xmax,Ymin,Ymax). + /** + * Get the bounds for this mapper as (Xmin,Xmax,Ymin,Ymax). + */ virtual void GetBounds(double bounds[4]); - // Description: - // Get un-log-scaled bounds for this mapper as (Xmin,Xmax,Ymin,Ymax). + /** + * Get un-log-scaled bounds for this mapper as (Xmin,Xmax,Ymin,Ymax). + */ virtual void GetUnscaledInputBounds(double bounds[4]); - // Description: - // When used to set additional arrays, stacked bars are created. + /** + * When used to set additional arrays, stacked bars are created. + */ virtual void SetInputArray(int index, const vtkStdString &name); - // Description: - // Set the color series to use if this becomes a stacked bar plot. + /** + * Set the color series to use if this becomes a stacked bar plot. + */ void SetColorSeries(vtkColorSeries *colorSeries); - // Description: - // Get the color series used if when this is a stacked bar plot. + /** + * Get the color series used if when this is a stacked bar plot. + */ vtkColorSeries *GetColorSeries(); - // Description: - // Specify a lookup table for the mapper to use. + //@{ + /** + * Specify a lookup table for the mapper to use. + */ virtual void SetLookupTable(vtkScalarsToColors *lut); virtual vtkScalarsToColors *GetLookupTable(); + //@} - // Description: - // Create default lookup table. Generally used to create one when none - // is available with the scalar data. + /** + * Create default lookup table. Generally used to create one when none + * is available with the scalar data. + */ virtual void CreateDefaultLookupTable(); - // Description: - // Turn on/off flag to control whether scalar data is used to color objects. + //@{ + /** + * Turn on/off flag to control whether scalar data is used to color objects. + */ vtkSetMacro(ScalarVisibility, bool); vtkGetMacro(ScalarVisibility, bool); vtkBooleanMacro(ScalarVisibility, bool); - - // Description: - // When ScalarMode is set to UsePointFieldData or UseCellFieldData, - // you can specify which array to use for coloring using these methods. - // The lookup table will decide how to convert vectors to colors. + //@} + + //@{ + /** + * When ScalarMode is set to UsePointFieldData or UseCellFieldData, + * you can specify which array to use for coloring using these methods. + * The lookup table will decide how to convert vectors to colors. + */ void SelectColorArray(vtkIdType arrayNum); void SelectColorArray(const vtkStdString& arrayName); + //@} - // Description: - // Get the array name to color by. + /** + * Get the array name to color by. + */ vtkStdString GetColorArrayName(); - // Description - // Get the plot labels. + /** + * Get the plot labels. + */ virtual vtkStringArray *GetLabels(); - // Description: - // Set the group name of the bar chart - can be displayed on the X axis. + /** + * Set the group name of the bar chart - can be displayed on the X axis. + */ virtual void SetGroupName(const vtkStdString& name); - // Description: - // Get the group name of the bar char - can be displayed on the X axis. + /** + * Get the group name of the bar char - can be displayed on the X axis. + */ virtual vtkStdString GetGroupName(); - // Description: - // Generate and return the tooltip label string for this plot - // The segmentIndex is implemented here. + /** + * Generate and return the tooltip label string for this plot + * The segmentIndex is implemented here. + */ virtual vtkStdString GetTooltipLabel(const vtkVector2d &plotPos, vtkIdType seriesIndex, vtkIdType segmentIndex); - // Description: - // Select all points in the specified rectangle. + /** + * Select all points in the specified rectangle. + */ virtual bool SelectPoints(const vtkVector2f& min, const vtkVector2f& max); - // Description: - // Function to query a plot for the nearest point to the specified coordinate. - // Returns the index of the data series with which the point is associated or - // -1. + /** + * Function to query a plot for the nearest point to the specified coordinate. + * Returns the index of the data series with which the point is associated or + * -1. + */ virtual vtkIdType GetNearestPoint(const vtkVector2f& point, const vtkVector2f& tolerance, vtkVector2f* location); - // Description: - // Function to query a plot for the nearest point to the specified coordinate. - // Returns the index of the data series with which the point is associated or - // -1. - // If a vtkIdType* is passed, its referent will be set to index of the bar - // segment with which a point is associated, or -1. + /** + * Function to query a plot for the nearest point to the specified coordinate. + * Returns the index of the data series with which the point is associated or + * -1. + * If a vtkIdType* is passed, its referent will be set to index of the bar + * segment with which a point is associated, or -1. + */ virtual vtkIdType GetNearestPoint(const vtkVector2f& point, const vtkVector2f&, vtkVector2f* location, vtkIdType* segmentIndex); - // Description: - // Get amount of plotted bars. + /** + * Get amount of plotted bars. + */ int GetBarsCount(); - // Description: - // Get the data bounds for this mapper as (Xmin,Xmax). + /** + * Get the data bounds for this mapper as (Xmin,Xmax). + */ void GetDataBounds(double bounds[2]); protected: vtkPlotBar(); ~vtkPlotBar(); - // Description: - // Update the table cache. + /** + * Update the table cache. + */ bool UpdateTableCache(vtkTable *table); - // Description: - // Store a well packed set of XY coordinates for this data series. + /** + * Store a well packed set of XY coordinates for this data series. + */ vtkPoints2D *Points; float Width; @@ -216,20 +267,25 @@ protected: int Orientation; - // Description: - // The point cache is marked dirty until it has been initialized. + /** + * The point cache is marked dirty until it has been initialized. + */ vtkTimeStamp BuildTime; - // Description: - // The color series to use if this becomes a stacked bar + /** + * The color series to use if this becomes a stacked bar + */ vtkSmartPointer ColorSeries; - // Description: - // Lookup Table for coloring bars by scalar value + //@{ + /** + * Lookup Table for coloring bars by scalar value + */ vtkSmartPointer LookupTable; vtkSmartPointer Colors; bool ScalarVisibility; vtkStdString ColorArrayName; + //@} bool LogX; bool LogY; diff --git a/Charts/Core/vtkPlotBox.h b/Charts/Core/vtkPlotBox.h index becc0836d2082ccee991d507bfc2f238f0b31f41..7760a28b922b76758da1e161a85d9c454eb2fc79 100644 --- a/Charts/Core/vtkPlotBox.h +++ b/Charts/Core/vtkPlotBox.h @@ -13,11 +13,14 @@ =========================================================================*/ -// .NAME vtkPlotBox - Class for drawing box plots. -// -// .SECTION Description -// Plots to draw box plots given columns from a vtkTable that may contains -// 5 lines with quartiles and median. +/** + * @class vtkPlotBox + * @brief Class for drawing box plots. + * + * + * Plots to draw box plots given columns from a vtkTable that may contains + * 5 lines with quartiles and median. +*/ #ifndef vtkPlotBox_h #define vtkPlotBox_h @@ -38,72 +41,92 @@ public: vtkTypeMacro(vtkPlotBox, vtkPlot); virtual void PrintSelf(ostream &os, vtkIndent indent); - // Description: - // Creates a box plot. + /** + * Creates a box plot. + */ static vtkPlotBox* New(); - // Description: - // Perform any updates to the item that may be necessary before rendering. - // The scene should take care of calling this on all items before their - // Paint function is invoked. + /** + * Perform any updates to the item that may be necessary before rendering. + * The scene should take care of calling this on all items before their + * Paint function is invoked. + */ virtual void Update(); - // Description: - // Paint event for the plot, called whenever the chart needs to be drawn + /** + * Paint event for the plot, called whenever the chart needs to be drawn + */ virtual bool Paint(vtkContext2D *painter); - // Description: - // Paint legend event for the plot, called whenever the legend needs the - // plot items symbol/mark/line drawn. A rect is supplied with the lower left - // corner of the rect (elements 0 and 1) and with width x height (elements 2 - // and 3). The plot can choose how to fill the space supplied. + /** + * Paint legend event for the plot, called whenever the legend needs the + * plot items symbol/mark/line drawn. A rect is supplied with the lower left + * corner of the rect (elements 0 and 1) and with width x height (elements 2 + * and 3). The plot can choose how to fill the space supplied. + */ virtual bool PaintLegend(vtkContext2D *painter, const vtkRectf& rect, int legendIndex); - // Description: - // This is a convenience function to set the input table. + //@{ + /** + * This is a convenience function to set the input table. + */ virtual void SetInputData(vtkTable *table); virtual void SetInputData(vtkTable *table, const vtkStdString&, const vtkStdString&) { this->SetInputData(table); } + //@} - // Description: - // Get the plot labels. If this array has a length greater than 1 the index - // refers to the stacked objects in the plot. + /** + * Get the plot labels. If this array has a length greater than 1 the index + * refers to the stacked objects in the plot. + */ virtual vtkStringArray *GetLabels(); - // Description: - // Function to query a plot for the nearest point to the specified coordinate. - // Returns the index of the data series with which the point is associated - // or -1. + /** + * Function to query a plot for the nearest point to the specified coordinate. + * Returns the index of the data series with which the point is associated + * or -1. + */ virtual vtkIdType GetNearestPoint(const vtkVector2f& point, const vtkVector2f& tolerance, vtkVector2f* location); - // Description: - // Specify a lookup table for the mapper to use. + //@{ + /** + * Specify a lookup table for the mapper to use. + */ void SetLookupTable(vtkScalarsToColors *lut); vtkScalarsToColors *GetLookupTable(); + //@} - // Description: - // Helper function to set the color of a given column. + /** + * Helper function to set the color of a given column. + */ void SetColumnColor(const vtkStdString& colName, double *rgb); - // Description: - // Create default lookup table. Generally used to create one when none - // is available with the scalar data. + /** + * Create default lookup table. Generally used to create one when none + * is available with the scalar data. + */ virtual void CreateDefaultLookupTable(); - // Description: - // Get/Set the width of boxes. + //@{ + /** + * Get/Set the width of boxes. + */ vtkGetMacro(BoxWidth, float); vtkSetMacro(BoxWidth, float); + //@} - // Description: - // Get the vtkTextProperty that governs how the plot title is displayed. + //@{ + /** + * Get the vtkTextProperty that governs how the plot title is displayed. + */ vtkGetObjectMacro(TitleProperties, vtkTextProperty); + //@} protected: vtkPlotBox(); @@ -111,29 +134,37 @@ protected: void DrawBoxPlot(int, unsigned char*, double, vtkContext2D*); - // Description: - // Update the table cache. + /** + * Update the table cache. + */ bool UpdateTableCache(vtkTable *table); - // Description: - // Store a well packed set of XY coordinates for this data series. + //@{ + /** + * Store a well packed set of XY coordinates for this data series. + */ class Private; Private* Storage; + //@} - // Description: - // The point cache is marked dirty until it has been initialized. + /** + * The point cache is marked dirty until it has been initialized. + */ vtkTimeStamp BuildTime; - // Description: - // Width of boxes. + /** + * Width of boxes. + */ float BoxWidth; - // Description: - // Lookup Table for coloring points by scalar value + /** + * Lookup Table for coloring points by scalar value + */ vtkScalarsToColors *LookupTable; - // Description: - // Text properties for the plot title + /** + * Text properties for the plot title + */ vtkTextProperty* TitleProperties; private: diff --git a/Charts/Core/vtkPlotFunctionalBag.h b/Charts/Core/vtkPlotFunctionalBag.h index 770395f7425dc3de9ce7f285463100edb1bca2f9..6f6f32382e81833a4f35bd7f307ef641bed7ee93 100644 --- a/Charts/Core/vtkPlotFunctionalBag.h +++ b/Charts/Core/vtkPlotFunctionalBag.h @@ -13,18 +13,21 @@ =========================================================================*/ -// .NAME vtkPlotFunctionalBag - Class for drawing an XY line plot or bag -// given two columns from a vtkTable. -// -// .SECTION Description -// Depending on the number of components, this class will draw either -// a line plot (for 1 component column) or, for two components columns, -// a filled polygonal band (the bag) going from the first to the second -// component on the Y-axis along the X-axis. The filter -// vtkExtractFunctionalBagPlot is intended to create such "bag" columns. -// -// .SECTION See Also -// vtkExtractFunctionalBagPlot +/** + * @class vtkPlotFunctionalBag + * @brief Class for drawing an XY line plot or bag + * given two columns from a vtkTable. + * + * + * Depending on the number of components, this class will draw either + * a line plot (for 1 component column) or, for two components columns, + * a filled polygonal band (the bag) going from the first to the second + * component on the Y-axis along the X-axis. The filter + * vtkExtractFunctionalBagPlot is intended to create such "bag" columns. + * + * @sa + * vtkExtractFunctionalBagPlot +*/ #ifndef vtkPlotFunctionalBag_h #define vtkPlotFunctionalBag_h @@ -45,97 +48,120 @@ public: vtkTypeMacro(vtkPlotFunctionalBag, vtkPlot); virtual void PrintSelf(ostream &os, vtkIndent indent); - // Description: - // Creates a functional bag plot object. + /** + * Creates a functional bag plot object. + */ static vtkPlotFunctionalBag *New(); - // Description: - // Returns true if the plot is a functional bag, false if it is a simple - // line. + /** + * Returns true if the plot is a functional bag, false if it is a simple + * line. + */ virtual bool IsBag(); - // Description: - // Reimplemented to enforce visibility when selected. + /** + * Reimplemented to enforce visibility when selected. + */ virtual bool GetVisible(); - // Description: - // Perform any updates to the item that may be necessary before rendering. - // The scene should take care of calling this on all items before their - // Paint function is invoked. + /** + * Perform any updates to the item that may be necessary before rendering. + * The scene should take care of calling this on all items before their + * Paint function is invoked. + */ virtual void Update(); - // Description: - // Paint event for the plot, called whenever the chart needs to be drawn. + /** + * Paint event for the plot, called whenever the chart needs to be drawn. + */ virtual bool Paint(vtkContext2D *painter); - // Description: - // Paint legend event for the plot, called whenever the legend needs the - // plot items symbol/mark/line drawn. A rect is supplied with the lower left - // corner of the rect (elements 0 and 1) and with width x height (elements 2 - // and 3). The plot can choose how to fill the space supplied. + /** + * Paint legend event for the plot, called whenever the legend needs the + * plot items symbol/mark/line drawn. A rect is supplied with the lower left + * corner of the rect (elements 0 and 1) and with width x height (elements 2 + * and 3). The plot can choose how to fill the space supplied. + */ virtual bool PaintLegend(vtkContext2D *painter, const vtkRectf& rect, int legendIndex); - // Description: - // Get the bounds for this plot as (Xmin, Xmax, Ymin, Ymax). + /** + * Get the bounds for this plot as (Xmin, Xmax, Ymin, Ymax). + */ virtual void GetBounds(double bounds[4]); - // Description: - // Get the non-log-scaled bounds on chart inputs for this plot as - // (Xmin, Xmax, Ymin, Ymax). + /** + * Get the non-log-scaled bounds on chart inputs for this plot as + * (Xmin, Xmax, Ymin, Ymax). + */ virtual void GetUnscaledInputBounds(double bounds[4]); - // Description: - // Specify a lookup table for the mapper to use. + //@{ + /** + * Specify a lookup table for the mapper to use. + */ void SetLookupTable(vtkScalarsToColors *lut); vtkScalarsToColors *GetLookupTable(); + //@} - // Description: - // Create default lookup table. Generally used to create one when none - // is available with the scalar data. + /** + * Create default lookup table. Generally used to create one when none + * is available with the scalar data. + */ virtual void CreateDefaultLookupTable(); - // Description: - // Function to query a plot for the nearest point to the specified coordinate. - // Returns the index of the data series with which the point is associated or - // -1. + /** + * Function to query a plot for the nearest point to the specified coordinate. + * Returns the index of the data series with which the point is associated or + * -1. + */ virtual vtkIdType GetNearestPoint(const vtkVector2f& point, const vtkVector2f& tolerance, vtkVector2f* location); - // Description: - // Select all points in the specified rectangle. + /** + * Select all points in the specified rectangle. + */ virtual bool SelectPoints(const vtkVector2f& min, const vtkVector2f& max); - // Description: - // Select all points in the specified polygon. + //@{ + /** + * Select all points in the specified polygon. + */ virtual bool SelectPointsInPolygon(const vtkContextPolygon &polygon); protected: vtkPlotFunctionalBag(); ~vtkPlotFunctionalBag(); + //@} - // Description: - // Populate the data arrays ready to operate on input data. + /** + * Populate the data arrays ready to operate on input data. + */ bool GetDataArrays(vtkTable *table, vtkDataArray *array[2]); - // Description: - // Update the table cache. + /** + * Update the table cache. + */ bool UpdateTableCache(vtkTable*); - // Description: - // The cache is marked dirty until it has been initialized. + /** + * The cache is marked dirty until it has been initialized. + */ vtkTimeStamp BuildTime; - // Description: - // Lookup Table for coloring points by scalar value + /** + * Lookup Table for coloring points by scalar value + */ vtkScalarsToColors *LookupTable; - // Description: - // The plot line delegate for line series + /** + * The plot line delegate for line series + */ vtkNew Line; - // Description: - // The bag points ordered in quadstrip fashion + /** + * The bag points ordered in quadstrip fashion + */ vtkNew BagPoints; bool LogX, LogY; diff --git a/Charts/Core/vtkPlotGrid.h b/Charts/Core/vtkPlotGrid.h index a55619d6b7d0cddfaf420f57332aab48cffc9b48..2e333873100a2febce28fd25e7aede9a98110278 100644 --- a/Charts/Core/vtkPlotGrid.h +++ b/Charts/Core/vtkPlotGrid.h @@ -13,13 +13,16 @@ =========================================================================*/ -// .NAME vtkPlotGrid - takes care of drawing the plot grid -// -// .SECTION Description -// The vtkPlotGrid is drawn in screen coordinates. It is usually one of the -// first elements of a chart to be drawn, and will generally be obscured -// by all other elements of the chart. It builds up its own plot locations -// from the parameters of the x and y axis of the plot. +/** + * @class vtkPlotGrid + * @brief takes care of drawing the plot grid + * + * + * The vtkPlotGrid is drawn in screen coordinates. It is usually one of the + * first elements of a chart to be drawn, and will generally be obscured + * by all other elements of the chart. It builds up its own plot locations + * from the parameters of the x and y axis of the plot. +*/ #ifndef vtkPlotGrid_h #define vtkPlotGrid_h @@ -38,31 +41,38 @@ public: vtkTypeMacro(vtkPlotGrid, vtkContextItem); virtual void PrintSelf(ostream &os, vtkIndent indent); - // Description: - // Creates a 2D Chart object. + /** + * Creates a 2D Chart object. + */ static vtkPlotGrid *New(); - // Description: - // Set the X axis of the grid. + /** + * Set the X axis of the grid. + */ virtual void SetXAxis(vtkAxis *axis); - // Description: - // Set the X axis of the grid. + /** + * Set the X axis of the grid. + */ virtual void SetYAxis(vtkAxis *axis); - // Description: - // Paint event for the axis, called whenever the axis needs to be drawn + /** + * Paint event for the axis, called whenever the axis needs to be drawn + */ virtual bool Paint(vtkContext2D *painter); protected: vtkPlotGrid(); ~vtkPlotGrid(); - // Description: - // The vtkAxis objects are used to figure out where the grid lines should be - // drawn. + //@{ + /** + * The vtkAxis objects are used to figure out where the grid lines should be + * drawn. + */ vtkAxis *XAxis; vtkAxis *YAxis; + //@} private: vtkPlotGrid(const vtkPlotGrid &) VTK_DELETE_FUNCTION; diff --git a/Charts/Core/vtkPlotHistogram2D.h b/Charts/Core/vtkPlotHistogram2D.h index beef44ebf987f0505fb9801363ede0581a28489e..fec12d3cb3972f4b1eea4854ef83f4f821cd9a0d 100644 --- a/Charts/Core/vtkPlotHistogram2D.h +++ b/Charts/Core/vtkPlotHistogram2D.h @@ -13,10 +13,13 @@ =========================================================================*/ -// .NAME vtk2DHistogramItem - 2D histogram item. -// -// .SECTION Description -// +/** + * @class vtk2DHistogramItem + * @brief 2D histogram item. + * + * + * +*/ #ifndef vtkPlotHistogram2D_h #define vtkPlotHistogram2D_h @@ -35,39 +38,46 @@ public: vtkTypeMacro(vtkPlotHistogram2D, vtkPlot); virtual void PrintSelf(ostream &os, vtkIndent indent); - // Description: - // Creates a new object. + /** + * Creates a new object. + */ static vtkPlotHistogram2D *New(); - // Description: - // Perform any updates to the item that may be necessary before rendering. - // The scene should take care of calling this on all items before their - // Paint function is invoked. + /** + * Perform any updates to the item that may be necessary before rendering. + * The scene should take care of calling this on all items before their + * Paint function is invoked. + */ virtual void Update(); - // Description: - // Paint event for the item, called whenever it needs to be drawn. + /** + * Paint event for the item, called whenever it needs to be drawn. + */ virtual bool Paint(vtkContext2D *painter); - // Description: - // Set the input, we are expecting a vtkImageData with just one component, - // this would normally be a float or a double. It will be passed to the other - // functions as a double to generate a color. + /** + * Set the input, we are expecting a vtkImageData with just one component, + * this would normally be a float or a double. It will be passed to the other + * functions as a double to generate a color. + */ virtual void SetInputData(vtkImageData *data, vtkIdType z = 0); virtual void SetInputData(vtkTable*) { } virtual void SetInputData(vtkTable*, const vtkStdString&, const vtkStdString&) { } - // Description: - // Get the input table used by the plot. + /** + * Get the input table used by the plot. + */ vtkImageData * GetInputImageData(); - // Description: - // Set the color transfer function that will be used to generate the 2D - // histogram. + /** + * Set the color transfer function that will be used to generate the 2D + * histogram. + */ void SetTransferFunction(vtkScalarsToColors *transfer); - // Description: - // Get the color transfer function that is used to generate the histogram. + /** + * Get the color transfer function that is used to generate the histogram. + */ vtkScalarsToColors * GetTransferFunction(); virtual void GetBounds(double bounds[4]); @@ -75,34 +85,36 @@ public: virtual void SetPosition(const vtkRectf& pos); virtual vtkRectf GetPosition(); - // Description: - // Generate and return the tooltip label string for this plot - // The segmentIndex parameter is ignored. - // The member variable TooltipLabelFormat can be set as a - // printf-style string to build custom tooltip labels from, - // and may contain: - // An empty string generates the default tooltip labels. - // The following case-sensitive format tags (without quotes) are recognized: - // '%x' The X position of the histogram cell - // '%y' The Y position of the histogram cell - // '%v' The scalar value of the histogram cell - // Note: the %i and %j tags are valid only if there is a 1:1 correspondence - // between individual histogram cells and axis tick marks - // '%i' The X axis tick label for the histogram cell - // '%j' The Y axis tick label for the histogram cell - // Any other characters or unrecognized format tags are printed in the - // tooltip label verbatim. + /** + * Generate and return the tooltip label string for this plot + * The segmentIndex parameter is ignored. + * The member variable TooltipLabelFormat can be set as a + * printf-style string to build custom tooltip labels from, + * and may contain: + * An empty string generates the default tooltip labels. + * The following case-sensitive format tags (without quotes) are recognized: + * '%x' The X position of the histogram cell + * '%y' The Y position of the histogram cell + * '%v' The scalar value of the histogram cell + * Note: the %i and %j tags are valid only if there is a 1:1 correspondence + * between individual histogram cells and axis tick marks + * '%i' The X axis tick label for the histogram cell + * '%j' The Y axis tick label for the histogram cell + * Any other characters or unrecognized format tags are printed in the + * tooltip label verbatim. + */ virtual vtkStdString GetTooltipLabel(const vtkVector2d &plotPos, vtkIdType seriesIndex, vtkIdType segmentIndex); - // Description: - // Function to query a plot for the nearest point to the specified coordinate. - // Returns an index between 0 and (number of histogram cells - 1), or -1. - // The index 0 is at cell x=0, y=0 of the histogram, and the index increases - // in a minor fashon with x and in a major fashon with y. - // The referent of "location" is set to the x and y integer indices of the - // histogram cell. + /** + * Function to query a plot for the nearest point to the specified coordinate. + * Returns an index between 0 and (number of histogram cells - 1), or -1. + * The index 0 is at cell x=0, y=0 of the histogram, and the index increases + * in a minor fashon with x and in a major fashon with y. + * The referent of "location" is set to the x and y integer indices of the + * histogram cell. + */ virtual vtkIdType GetNearestPoint(const vtkVector2f& point, const vtkVector2f& tolerance, vtkVector2f* location); @@ -111,8 +123,9 @@ protected: vtkPlotHistogram2D(); ~vtkPlotHistogram2D(); - // Description: - // Where all the magic happens... + /** + * Where all the magic happens... + */ void GenerateHistogram(); vtkSmartPointer Input; diff --git a/Charts/Core/vtkPlotLine.h b/Charts/Core/vtkPlotLine.h index 175feff1c2cd59c4744e24ae1324b13fc3d351e7..63eb16127195b51eee3e76eff784993cc265ab84 100644 --- a/Charts/Core/vtkPlotLine.h +++ b/Charts/Core/vtkPlotLine.h @@ -13,11 +13,14 @@ =========================================================================*/ -// .NAME vtkPlotLine - Class for drawing an XY line plot given two columns from -// a vtkTable. -// -// .SECTION Description -// +/** + * @class vtkPlotLine + * @brief Class for drawing an XY line plot given two columns from + * a vtkTable. + * + * + * +*/ #ifndef vtkPlotLine_h #define vtkPlotLine_h @@ -31,38 +34,45 @@ public: vtkTypeMacro(vtkPlotLine, vtkPlotPoints); virtual void PrintSelf(ostream &os, vtkIndent indent); - // Description: - // Creates a 2D Chart object. + /** + * Creates a 2D Chart object. + */ static vtkPlotLine *New(); - // Description: - // Paint event for the XY plot, called whenever the chart needs to be drawn. + /** + * Paint event for the XY plot, called whenever the chart needs to be drawn. + */ virtual bool Paint(vtkContext2D *painter); - // Description: - // Paint legend event for the XY plot, called whenever the legend needs the - // plot items symbol/mark/line drawn. A rect is supplied with the lower left - // corner of the rect (elements 0 and 1) and with width x height (elements 2 - // and 3). The plot can choose how to fill the space supplied. + /** + * Paint legend event for the XY plot, called whenever the legend needs the + * plot items symbol/mark/line drawn. A rect is supplied with the lower left + * corner of the rect (elements 0 and 1) and with width x height (elements 2 + * and 3). The plot can choose how to fill the space supplied. + */ virtual bool PaintLegend(vtkContext2D *painter, const vtkRectf& rect, int legendIndex); - // Description: - // Turn on/off flag to control whether the points define a poly line - // (true) or multiple line segments (false). - // If true (default), a segment is drawn between each points - // (e.g. [P1P2, P2P3, P3P4...].) If false, a segment is drawn for each pair - // of points (e.g. [P1P2, P3P4,...].) + //@{ + /** + * Turn on/off flag to control whether the points define a poly line + * (true) or multiple line segments (false). + * If true (default), a segment is drawn between each points + * (e.g. [P1P2, P2P3, P3P4...].) If false, a segment is drawn for each pair + * of points (e.g. [P1P2, P3P4,...].) + */ vtkSetMacro(PolyLine,bool); vtkGetMacro(PolyLine,bool); vtkBooleanMacro(PolyLine,bool); + //@} protected: vtkPlotLine(); ~vtkPlotLine(); - // Description: - // Poly line (true) or line segments(false). + /** + * Poly line (true) or line segments(false). + */ bool PolyLine; private: diff --git a/Charts/Core/vtkPlotLine3D.h b/Charts/Core/vtkPlotLine3D.h index 0a594e15c12faa5e7daa6ec702486290b61c234f..36842eb789122db16b5970819b8c5dbb2186bd6d 100644 --- a/Charts/Core/vtkPlotLine3D.h +++ b/Charts/Core/vtkPlotLine3D.h @@ -13,17 +13,20 @@ =========================================================================*/ -// .NAME vtkPlotLine3D - Class for drawing an XYZ line plot given three columns from -// a vtkTable. -// -// .SECTION Description -// This class draws points with a line between them given three column from a -// vtkTable in a vtkChartXYZ. -// -// .SECTION See Also -// vtkPlotPoints3D -// vtkPlotLine -// +/** + * @class vtkPlotLine3D + * @brief Class for drawing an XYZ line plot given three columns from + * a vtkTable. + * + * + * This class draws points with a line between them given three column from a + * vtkTable in a vtkChartXYZ. + * + * @sa + * vtkPlotPoints3D + * vtkPlotLine + * +*/ #ifndef vtkPlotLine3D_h #define vtkPlotLine3D_h @@ -37,12 +40,14 @@ public: vtkTypeMacro(vtkPlotLine3D, vtkPlotPoints3D); virtual void PrintSelf(ostream &os, vtkIndent indent); - // Description: - // Creates a 3D Chart object. + /** + * Creates a 3D Chart object. + */ static vtkPlotLine3D *New(); - // Description: - // Paint event for the XYZ plot, called whenever the chart needs to be drawn. + /** + * Paint event for the XYZ plot, called whenever the chart needs to be drawn. + */ virtual bool Paint(vtkContext2D *painter); protected: diff --git a/Charts/Core/vtkPlotParallelCoordinates.h b/Charts/Core/vtkPlotParallelCoordinates.h index bf9e7795789686562d411466801a220e4838ac49..1ea54b3d70a8d224feef8e5a08052c1301b727cc 100644 --- a/Charts/Core/vtkPlotParallelCoordinates.h +++ b/Charts/Core/vtkPlotParallelCoordinates.h @@ -13,11 +13,14 @@ =========================================================================*/ -// .NAME vtkPlotParallelCoordinates - Class for drawing a parallel coordinate -// plot given columns from a vtkTable. -// -// .SECTION Description -// +/** + * @class vtkPlotParallelCoordinates + * @brief Class for drawing a parallel coordinate + * plot given columns from a vtkTable. + * + * + * +*/ #ifndef vtkPlotParallelCoordinates_h #define vtkPlotParallelCoordinates_h @@ -39,99 +42,128 @@ public: vtkTypeMacro(vtkPlotParallelCoordinates, vtkPlot); virtual void PrintSelf(ostream &os, vtkIndent indent); - // Description: - // Creates a parallel coordinates chart + /** + * Creates a parallel coordinates chart + */ static vtkPlotParallelCoordinates* New(); - // Description: - // Perform any updates to the item that may be necessary before rendering. - // The scene should take care of calling this on all items before their - // Paint function is invoked. + /** + * Perform any updates to the item that may be necessary before rendering. + * The scene should take care of calling this on all items before their + * Paint function is invoked. + */ virtual void Update(); - // Description: - // Paint event for the XY plot, called whenever the chart needs to be drawn + /** + * Paint event for the XY plot, called whenever the chart needs to be drawn + */ virtual bool Paint(vtkContext2D *painter); - // Description: - // Paint legend event for the XY plot, called whenever the legend needs the - // plot items symbol/mark/line drawn. A rect is supplied with the lower left - // corner of the rect (elements 0 and 1) and with width x height (elements 2 - // and 3). The plot can choose how to fill the space supplied. + /** + * Paint legend event for the XY plot, called whenever the legend needs the + * plot items symbol/mark/line drawn. A rect is supplied with the lower left + * corner of the rect (elements 0 and 1) and with width x height (elements 2 + * and 3). The plot can choose how to fill the space supplied. + */ virtual bool PaintLegend(vtkContext2D *painter, const vtkRectf& rect, int legendIndex); - // Description: - // Get the bounds for this mapper as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax). + /** + * Get the bounds for this mapper as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax). + */ virtual void GetBounds(double bounds[4]); - // Description: - // Set the selection criteria on the given axis in normalized space (0.0 - 1.0). + /** + * Set the selection criteria on the given axis in normalized space (0.0 - 1.0). + */ bool SetSelectionRange(int Axis, float low, float high); - // Description: - // Reset the selection criteria for the chart. + /** + * Reset the selection criteria for the chart. + */ bool ResetSelectionRange(); - // Description: - // This is a convenience function to set the input table. + //@{ + /** + * This is a convenience function to set the input table. + */ virtual void SetInputData(vtkTable *table); virtual void SetInputData(vtkTable *table, const vtkStdString&, const vtkStdString&) { this->SetInputData(table); } + //@} - // Description: - // Specify a lookup table for the mapper to use. + //@{ + /** + * Specify a lookup table for the mapper to use. + */ void SetLookupTable(vtkScalarsToColors *lut); vtkScalarsToColors *GetLookupTable(); + //@} - // Description: - // Create default lookup table. Generally used to create one when none - // is available with the scalar data. + /** + * Create default lookup table. Generally used to create one when none + * is available with the scalar data. + */ virtual void CreateDefaultLookupTable(); - // Description: - // Turn on/off flag to control whether scalar data is used to color objects. + //@{ + /** + * Turn on/off flag to control whether scalar data is used to color objects. + */ vtkSetMacro(ScalarVisibility,int); vtkGetMacro(ScalarVisibility,int); vtkBooleanMacro(ScalarVisibility,int); - - // Description: - // When ScalarMode is set to UsePointFieldData or UseCellFieldData, - // you can specify which array to use for coloring using these methods. - // The lookup table will decide how to convert vectors to colors. + //@} + + //@{ + /** + * When ScalarMode is set to UsePointFieldData or UseCellFieldData, + * you can specify which array to use for coloring using these methods. + * The lookup table will decide how to convert vectors to colors. + */ void SelectColorArray(vtkIdType arrayNum); void SelectColorArray(const vtkStdString &arrayName); + //@} - // Description: - // Get the array name to color by. + /** + * Get the array name to color by. + */ vtkStdString GetColorArrayName(); protected: vtkPlotParallelCoordinates(); ~vtkPlotParallelCoordinates(); - // Description: - // Update the table cache. + /** + * Update the table cache. + */ bool UpdateTableCache(vtkTable *table); - // Description: - // Store a well packed set of XY coordinates for this data series. + //@{ + /** + * Store a well packed set of XY coordinates for this data series. + */ class Private; Private* Storage; + //@} - // Description: - // The point cache is marked dirty until it has been initialized. + /** + * The point cache is marked dirty until it has been initialized. + */ vtkTimeStamp BuildTime; - // Description: - // Lookup Table for coloring points by scalar value + //@{ + /** + * Lookup Table for coloring points by scalar value + */ vtkScalarsToColors *LookupTable; vtkUnsignedCharArray *Colors; int ScalarVisibility; vtkStdString ColorArrayName; + //@} private: vtkPlotParallelCoordinates(const vtkPlotParallelCoordinates &) VTK_DELETE_FUNCTION; diff --git a/Charts/Core/vtkPlotPie.h b/Charts/Core/vtkPlotPie.h index 864351d9dd4da317c9080bd4f1cbe109ff1a2220..e7d708e61b5d92ffed7de304a71b06a648636352 100644 --- a/Charts/Core/vtkPlotPie.h +++ b/Charts/Core/vtkPlotPie.h @@ -13,9 +13,12 @@ =========================================================================*/ -// .NAME vtkPlotPie - Class for drawing a Pie diagram. -// -// .SECTION Description +/** + * @class vtkPlotPie + * @brief Class for drawing a Pie diagram. + * + * +*/ #ifndef vtkPlotPie_h #define vtkPlotPie_h @@ -38,44 +41,54 @@ public: static vtkPlotPie *New(); - // Description: - // Paint event for the item. + /** + * Paint event for the item. + */ virtual bool Paint(vtkContext2D *painter); - // Description: - // Paint legend event for the XY plot, called whenever the legend needs the - // plot items symbol/mark/line drawn. A rect is supplied with the lower left - // corner of the rect (elements 0 and 1) and with width x height (elements 2 - // and 3). The plot can choose how to fill the space supplied. + /** + * Paint legend event for the XY plot, called whenever the legend needs the + * plot items symbol/mark/line drawn. A rect is supplied with the lower left + * corner of the rect (elements 0 and 1) and with width x height (elements 2 + * and 3). The plot can choose how to fill the space supplied. + */ bool PaintLegend(vtkContext2D *painter, const vtkRectf& rect, int legendIndex); - // Description: - // Set the dimensions of the pie, arguments 1 and 2 are the x and y coordinate - // of the bottom corner. Arguments 3 and 4 are the width and height. + /** + * Set the dimensions of the pie, arguments 1 and 2 are the x and y coordinate + * of the bottom corner. Arguments 3 and 4 are the width and height. + */ void SetDimensions(int arg1, int arg2, int arg3, int arg4); - // Description: - // Set the dimensions of the pie, elements 0 and 1 are the x and y coordinate - // of the bottom corner. Elements 2 and 3 are the width and height. + /** + * Set the dimensions of the pie, elements 0 and 1 are the x and y coordinate + * of the bottom corner. Elements 2 and 3 are the width and height. + */ void SetDimensions(int arg[4]); - // Description: - // Get the dimensions of the pie, elements 0 and 1 are the x and y coordinate - // of the bottom corner. Elements 2 and 3 are the width and height. + //@{ + /** + * Get the dimensions of the pie, elements 0 and 1 are the x and y coordinate + * of the bottom corner. Elements 2 and 3 are the width and height. + */ vtkGetVector4Macro(Dimensions, int); + //@} - // Description: - // Set the color series to use for the Pie. + /** + * Set the color series to use for the Pie. + */ void SetColorSeries(vtkColorSeries *colorSeries); - // Description: - // Get the color series used. + /** + * Get the color series used. + */ vtkColorSeries *GetColorSeries(); - // Description: - // Function to query a plot for the nearest point to the specified coordinate. - // Returns the index of the data series with which the point is associated or - // -1. + /** + * Function to query a plot for the nearest point to the specified coordinate. + * Returns the index of the data series with which the point is associated or + * -1. + */ virtual vtkIdType GetNearestPoint(const vtkVector2f& point, const vtkVector2f& tolerance, vtkVector2f* location); @@ -84,22 +97,26 @@ protected: vtkPlotPie(); ~vtkPlotPie(); - // Description: - // Update the table cache. + /** + * Update the table cache. + */ bool UpdateTableCache(vtkTable *table); int Dimensions[4]; - // Description: - // The color series to use for the pie. + /** + * The color series to use for the pie. + */ vtkSmartPointer ColorSeries; - // Description: - // Store a well packed set of angles for the wedges of the pie. + /** + * Store a well packed set of angles for the wedges of the pie. + */ vtkPoints2D *Points; - // Description: - // The point cache is marked dirty until it has been initialized. + /** + * The point cache is marked dirty until it has been initialized. + */ vtkTimeStamp BuildTime; private: diff --git a/Charts/Core/vtkPlotPoints.h b/Charts/Core/vtkPlotPoints.h index a8856384aacdde699fcd71e101242d728724282e..87129c4b83d5086d68c346ae301647331805175d 100644 --- a/Charts/Core/vtkPlotPoints.h +++ b/Charts/Core/vtkPlotPoints.h @@ -13,16 +13,19 @@ =========================================================================*/ -// .NAME vtkPlotPoints - Class for drawing an points given two columns from a -// vtkTable. -// -// .SECTION Description -// This class draws points in a plot given two columns from a table. If you need -// a line as well you should use vtkPlotLine which derives from vtkPlotPoints -// and is capable of drawing both points and a line. -// -// .SECTION See Also -// vtkPlotLine +/** + * @class vtkPlotPoints + * @brief Class for drawing an points given two columns from a + * vtkTable. + * + * + * This class draws points in a plot given two columns from a table. If you need + * a line as well you should use vtkPlotLine which derives from vtkPlotPoints + * and is capable of drawing both points and a line. + * + * @sa + * vtkPlotLine +*/ #ifndef vtkPlotPoints_h #define vtkPlotPoints_h @@ -50,81 +53,102 @@ public: vtkTypeMacro(vtkPlotPoints, vtkPlot); virtual void PrintSelf(ostream &os, vtkIndent indent); - // Description: - // Creates a 2D Chart object. + /** + * Creates a 2D Chart object. + */ static vtkPlotPoints *New(); - // Description: - // Perform any updates to the item that may be necessary before rendering. - // The scene should take care of calling this on all items before their - // Paint function is invoked. + /** + * Perform any updates to the item that may be necessary before rendering. + * The scene should take care of calling this on all items before their + * Paint function is invoked. + */ virtual void Update(); - // Description: - // Paint event for the XY plot, called whenever the chart needs to be drawn + /** + * Paint event for the XY plot, called whenever the chart needs to be drawn + */ virtual bool Paint(vtkContext2D *painter); - // Description: - // Paint legend event for the XY plot, called whenever the legend needs the - // plot items symbol/mark/line drawn. A rect is supplied with the lower left - // corner of the rect (elements 0 and 1) and with width x height (elements 2 - // and 3). The plot can choose how to fill the space supplied. + /** + * Paint legend event for the XY plot, called whenever the legend needs the + * plot items symbol/mark/line drawn. A rect is supplied with the lower left + * corner of the rect (elements 0 and 1) and with width x height (elements 2 + * and 3). The plot can choose how to fill the space supplied. + */ virtual bool PaintLegend(vtkContext2D *painter, const vtkRectf& rect, int legendIndex); - // Description: - // Get the bounds for this plot as (Xmin, Xmax, Ymin, Ymax). + /** + * Get the bounds for this plot as (Xmin, Xmax, Ymin, Ymax). + */ virtual void GetBounds(double bounds[4]); - // Description: - // Get the non-log-scaled bounds on chart inputs for this plot as (Xmin, Xmax, Ymin, Ymax). + /** + * Get the non-log-scaled bounds on chart inputs for this plot as (Xmin, Xmax, Ymin, Ymax). + */ virtual void GetUnscaledInputBounds(double bounds[4]); - // Description: - // Specify a lookup table for the mapper to use. + //@{ + /** + * Specify a lookup table for the mapper to use. + */ void SetLookupTable(vtkScalarsToColors *lut); vtkScalarsToColors *GetLookupTable(); + //@} - // Description: - // Create default lookup table. Generally used to create one when none - // is available with the scalar data. + /** + * Create default lookup table. Generally used to create one when none + * is available with the scalar data. + */ virtual void CreateDefaultLookupTable(); - // Description: - // Turn on/off flag to control whether scalar data is used to color objects. + //@{ + /** + * Turn on/off flag to control whether scalar data is used to color objects. + */ vtkSetMacro(ScalarVisibility,int); vtkGetMacro(ScalarVisibility,int); vtkBooleanMacro(ScalarVisibility,int); - - // Description: - // When ScalarMode is set to UsePointFieldData or UseCellFieldData, - // you can specify which array to use for coloring using these methods. - // The lookup table will decide how to convert vectors to colors. + //@} + + //@{ + /** + * When ScalarMode is set to UsePointFieldData or UseCellFieldData, + * you can specify which array to use for coloring using these methods. + * The lookup table will decide how to convert vectors to colors. + */ void SelectColorArray(vtkIdType arrayNum); void SelectColorArray(const vtkStdString& arrayName); + //@} - // Description: - // Get the array name to color by. + /** + * Get the array name to color by. + */ vtkStdString GetColorArrayName(); - // Description: - // Function to query a plot for the nearest point to the specified coordinate. - // Returns the index of the data series with which the point is associated or - // -1. + /** + * Function to query a plot for the nearest point to the specified coordinate. + * Returns the index of the data series with which the point is associated or + * -1. + */ virtual vtkIdType GetNearestPoint(const vtkVector2f& point, const vtkVector2f& tolerance, vtkVector2f* location); - // Description: - // Select all points in the specified rectangle. + /** + * Select all points in the specified rectangle. + */ virtual bool SelectPoints(const vtkVector2f& min, const vtkVector2f& max); - // Description: - // Select all points in the specified polygon. + /** + * Select all points in the specified polygon. + */ virtual bool SelectPointsInPolygon(const vtkContextPolygon &polygon); - // Description: - // Enum containing various marker styles that can be used in a plot. + /** + * Enum containing various marker styles that can be used in a plot. + */ enum { NONE = VTK_MARKER_NONE, CROSS = VTK_MARKER_CROSS, @@ -134,102 +158,135 @@ public: DIAMOND = VTK_MARKER_DIAMOND }; - // Description: - // Get/set the marker style that should be used. The default is none, the enum - // in this class is used as a parameter. + //@{ + /** + * Get/set the marker style that should be used. The default is none, the enum + * in this class is used as a parameter. + */ vtkGetMacro(MarkerStyle, int); vtkSetMacro(MarkerStyle, int); + //@} - // Description: - // Get/set the marker size that should be used. The default is negative, and - // in that case it is 2.3 times the pen width, if less than 8 will be used. + //@{ + /** + * Get/set the marker size that should be used. The default is negative, and + * in that case it is 2.3 times the pen width, if less than 8 will be used. + */ vtkGetMacro(MarkerSize, float); vtkSetMacro(MarkerSize, float); + //@} - // Description: - // Get/set the valid point mask array name. + //@{ + /** + * Get/set the valid point mask array name. + */ vtkGetMacro(ValidPointMaskName, vtkStdString) vtkSetMacro(ValidPointMaskName, vtkStdString) + //@} protected: vtkPlotPoints(); ~vtkPlotPoints(); - // Description: - // Populate the data arrays ready to operate on input data. + /** + * Populate the data arrays ready to operate on input data. + */ bool GetDataArrays(vtkTable *table, vtkDataArray *array[2]); - // Description: - // Update the table cache. + /** + * Update the table cache. + */ bool UpdateTableCache(vtkTable *table); - // Description: - // Calculate the unscaled input bounds from the input arrays. + /** + * Calculate the unscaled input bounds from the input arrays. + */ void CalculateUnscaledInputBounds(); - // Description: - // Handle calculating the log of the x or y series if necessary. Should be - // called by UpdateTableCache once the data has been updated in Points. + /** + * Handle calculating the log of the x or y series if necessary. Should be + * called by UpdateTableCache once the data has been updated in Points. + */ void CalculateLogSeries(); - // Description: - // Find all of the "bad points" in the series. This is mainly used to cache - // bad points for performance reasons, but could also be used plot the bad - // points in the future. + /** + * Find all of the "bad points" in the series. This is mainly used to cache + * bad points for performance reasons, but could also be used plot the bad + * points in the future. + */ void FindBadPoints(); - // Description: - // Calculate the bounds of the plot, ignoring the bad points. + /** + * Calculate the bounds of the plot, ignoring the bad points. + */ void CalculateBounds(double bounds[4]); - // Description: - // Create the sorted point list if necessary. + /** + * Create the sorted point list if necessary. + */ void CreateSortedPoints(); - // Description: - // Store a well packed set of XY coordinates for this data series. + //@{ + /** + * Store a well packed set of XY coordinates for this data series. + */ vtkPoints2D *Points; vtkNew SelectedPoints; + //@} - // Description: - // Sorted points, used when searching for the nearest point. + //@{ + /** + * Sorted points, used when searching for the nearest point. + */ class VectorPIMPL; VectorPIMPL* Sorted; + //@} - // Description: - // An array containing the indices of all the "bad points", meaning any x, y - // pair that has an infinity, -infinity or not a number value. + /** + * An array containing the indices of all the "bad points", meaning any x, y + * pair that has an infinity, -infinity or not a number value. + */ vtkIdTypeArray* BadPoints; - // Description: - // Array which marks valid points in the array. If NULL (the default), all - // points in the input array are considered valid. + /** + * Array which marks valid points in the array. If NULL (the default), all + * points in the input array are considered valid. + */ vtkCharArray* ValidPointMask; - // Description: - // Name of the valid point mask array. + /** + * Name of the valid point mask array. + */ vtkStdString ValidPointMaskName; - // Description: - // The point cache is marked dirty until it has been initialized. + /** + * The point cache is marked dirty until it has been initialized. + */ vtkTimeStamp BuildTime; - // Description: - // The marker style that should be used + //@{ + /** + * The marker style that should be used + */ int MarkerStyle; float MarkerSize; + //@} bool LogX, LogY; - // Description: - // Lookup Table for coloring points by scalar value + //@{ + /** + * Lookup Table for coloring points by scalar value + */ vtkScalarsToColors *LookupTable; vtkUnsignedCharArray *Colors; int ScalarVisibility; vtkStdString ColorArrayName; + //@} - // Description: - // Cached bounds on the plot input axes + /** + * Cached bounds on the plot input axes + */ double UnscaledInputBounds[4]; private: diff --git a/Charts/Core/vtkPlotPoints3D.h b/Charts/Core/vtkPlotPoints3D.h index 56bcd12f5fca7ff2e06d31f182f2277803dc10d6..c6a1330d8b9b8819361ac30f460f56aedad719a4 100644 --- a/Charts/Core/vtkPlotPoints3D.h +++ b/Charts/Core/vtkPlotPoints3D.h @@ -13,15 +13,18 @@ =========================================================================*/ -// .NAME vtkPlotPoints3D - 3D scatter plot. -// -// .SECTION Description -// 3D scatter plot. -// -// .SECTION See Also -// vtkPlotLine3D -// vtkPlotPoints -// +/** + * @class vtkPlotPoints3D + * @brief 3D scatter plot. + * + * + * 3D scatter plot. + * + * @sa + * vtkPlotLine3D + * vtkPlotPoints + * +*/ #ifndef vtkPlotPoints3D_h #define vtkPlotPoints3D_h @@ -38,20 +41,23 @@ public: virtual void PrintSelf(ostream &os, vtkIndent indent); static vtkPlotPoints3D * New(); - // Description: - // Paint event for the XY plot, called whenever the chart needs to be drawn + /** + * Paint event for the XY plot, called whenever the chart needs to be drawn + */ virtual bool Paint(vtkContext2D *painter); protected: vtkPlotPoints3D(); ~vtkPlotPoints3D(); - // Description: - // The selected points. + /** + * The selected points. + */ std::vector SelectedPoints; - // Description: - // The selected points. + /** + * The selected points. + */ vtkTimeStamp SelectedPointsBuildTime; private: diff --git a/Charts/Core/vtkPlotStacked.h b/Charts/Core/vtkPlotStacked.h index f821d11e38cafc6e03ef75d4273a2ff8812fbe0d..0de83135a31368785bdb1278e6228e5cada52b91 100644 --- a/Charts/Core/vtkPlotStacked.h +++ b/Charts/Core/vtkPlotStacked.h @@ -13,11 +13,14 @@ =========================================================================*/ -// .NAME vtkPlotStacked - Class for drawing an stacked polygon plot -// given an X, Ybase, Yextent in a vtkTable. -// -// .SECTION Description -// +/** + * @class vtkPlotStacked + * @brief Class for drawing an stacked polygon plot + * given an X, Ybase, Yextent in a vtkTable. + * + * + * +*/ #ifndef vtkPlotStacked_h #define vtkPlotStacked_h @@ -41,78 +44,94 @@ public: vtkTypeMacro(vtkPlotStacked, vtkPlot); virtual void PrintSelf(ostream &os, vtkIndent indent); - // Description: - // Creates a Stacked Plot Object + /** + * Creates a Stacked Plot Object + */ static vtkPlotStacked *New(); - // Description: - // Set the plot color + //@{ + /** + * Set the plot color + */ virtual void SetColor(unsigned char r, unsigned char g, unsigned char b, unsigned char a); virtual void SetColor(double r, double g, double b); virtual void GetColor(double rgb[3]); + //@} - // Description: - // Perform any updates to the item that may be necessary before rendering. - // The scene should take care of calling this on all items before their - // Paint function is invoked. + /** + * Perform any updates to the item that may be necessary before rendering. + * The scene should take care of calling this on all items before their + * Paint function is invoked. + */ virtual void Update(); - // Description: - // Paint event for the Stacked plot, called whenever the chart needs to be drawn + /** + * Paint event for the Stacked plot, called whenever the chart needs to be drawn + */ virtual bool Paint(vtkContext2D *painter); - // Description: - // Paint legend event for the Stacked plot, called whenever the legend needs the - // plot items symbol/mark/line drawn. A rect is supplied with the lower left - // corner of the rect (elements 0 and 1) and with width x height (elements 2 - // and 3). The plot can choose how to fill the space supplied. + /** + * Paint legend event for the Stacked plot, called whenever the legend needs the + * plot items symbol/mark/line drawn. A rect is supplied with the lower left + * corner of the rect (elements 0 and 1) and with width x height (elements 2 + * and 3). The plot can choose how to fill the space supplied. + */ virtual bool PaintLegend(vtkContext2D *painter, const vtkRectf& rect, int legendIndex); - // Description: - // Get the bounds for this mapper as (Xmin,Xmax,Ymin,Ymax). + /** + * Get the bounds for this mapper as (Xmin,Xmax,Ymin,Ymax). + */ virtual void GetBounds(double bounds[4]); - // Description: - // Get the unscaled input bounds for this mapper as (Xmin,Xmax,Ymin,Ymax). - // See vtkPlot for more information. + /** + * Get the unscaled input bounds for this mapper as (Xmin,Xmax,Ymin,Ymax). + * See vtkPlot for more information. + */ virtual void GetUnscaledInputBounds(double bounds[4]); - // Description: - // When used to set additional arrays, stacked bars are created. + /** + * When used to set additional arrays, stacked bars are created. + */ virtual void SetInputArray(int index, const vtkStdString &name); - // Description: - // Set the color series to use if this becomes a stacked bar plot. + /** + * Set the color series to use if this becomes a stacked bar plot. + */ void SetColorSeries(vtkColorSeries *colorSeries); - // Description: - // Get the color series used if when this is a stacked bar plot. + /** + * Get the color series used if when this is a stacked bar plot. + */ vtkColorSeries *GetColorSeries(); - // Description - // Get the plot labels. + /** + * Get the plot labels. + */ virtual vtkStringArray *GetLabels(); - // Description: - // Function to query a plot for the nearest point to the specified coordinate. - // Returns the index of the data series with which the point is associated or - // -1. + /** + * Function to query a plot for the nearest point to the specified coordinate. + * Returns the index of the data series with which the point is associated or + * -1. + */ virtual vtkIdType GetNearestPoint(const vtkVector2f& point, const vtkVector2f& tolerance, vtkVector2f* location); - // Description: - // Select all points in the specified rectangle. + /** + * Select all points in the specified rectangle. + */ virtual bool SelectPoints(const vtkVector2f& min, const vtkVector2f& max); protected: vtkPlotStacked(); ~vtkPlotStacked(); - // Description: - // Update the table cache. + /** + * Update the table cache. + */ bool UpdateTableCache(vtkTable *table); // Descript: @@ -120,29 +139,34 @@ protected: // base data. Insure that this is true void FixExtent(); - // Description: - // Handle calculating the log of the x or y series if necessary. Should be - // called by UpdateTableCache once the data has been updated in Points. + /** + * Handle calculating the log of the x or y series if necessary. Should be + * called by UpdateTableCache once the data has been updated in Points. + */ void CalculateLogSeries(); - // Description: - // An array containing the indices of all the "bad base points", meaning any x, y - // pair that has an infinity, -infinity or not a number value. + /** + * An array containing the indices of all the "bad base points", meaning any x, y + * pair that has an infinity, -infinity or not a number value. + */ vtkIdTypeArray* BaseBadPoints; - // Description: - // An array containing the indices of all the "bad extent points", meaning any x, y - // pair that has an infinity, -infinity or not a number value. + /** + * An array containing the indices of all the "bad extent points", meaning any x, y + * pair that has an infinity, -infinity or not a number value. + */ vtkIdTypeArray* ExtentBadPoints; - // Description: - // The point cache is marked dirty until it has been initialized. + /** + * The point cache is marked dirty until it has been initialized. + */ vtkTimeStamp BuildTime; bool LogX, LogY; - // Description: - // The color series to use for each series. + /** + * The color series to use for each series. + */ vtkSmartPointer ColorSeries; private: diff --git a/Charts/Core/vtkPlotSurface.h b/Charts/Core/vtkPlotSurface.h index 0b63ec69c8b01cbf9193e4ebad33915903527814..29890259bda3baf0036e4f811bfd4d699a8f6630 100644 --- a/Charts/Core/vtkPlotSurface.h +++ b/Charts/Core/vtkPlotSurface.h @@ -13,11 +13,14 @@ =========================================================================*/ -// .NAME vtkPlotSurface - 3D surface plot. -// -// .SECTION Description -// 3D surface plot. -// +/** + * @class vtkPlotSurface + * @brief 3D surface plot. + * + * + * 3D surface plot. + * +*/ #ifndef vtkPlotSurface_h #define vtkPlotSurface_h @@ -37,18 +40,22 @@ public: virtual void PrintSelf(ostream &os, vtkIndent indent); static vtkPlotSurface * New(); - // Description: - // Paint event for the XY plot, called whenever the chart needs to be drawn + /** + * Paint event for the XY plot, called whenever the chart needs to be drawn + */ virtual bool Paint(vtkContext2D *painter); - // Description: - // Set the input to the surface plot. + /** + * Set the input to the surface plot. + */ virtual void SetInputData(vtkTable *input); - // Description: - // Set the input to the surface plot. - // Do not use these versions of SetInputData, as all the parameters - // beyond the vtkTable are ignored. + //@{ + /** + * Set the input to the surface plot. + * Do not use these versions of SetInputData, as all the parameters + * beyond the vtkTable are ignored. + */ virtual void SetInputData(vtkTable *input, const vtkStdString &xName, const vtkStdString &yName, const vtkStdString &zName); @@ -58,87 +65,107 @@ public: const vtkStdString &colorName); virtual void SetInputData(vtkTable *input, vtkIdType xColumn, vtkIdType yColumn, vtkIdType zColumn); - - // Description: - // Set the range of the input data for the X dimension. By default it is - // (1, NumberOfColumns). Calling this method after SetInputData() results - // in recomputation of the plot's data. Therefore, it is more efficient - // to call it before SetInputData() when possible. + //@} + + /** + * Set the range of the input data for the X dimension. By default it is + * (1, NumberOfColumns). Calling this method after SetInputData() results + * in recomputation of the plot's data. Therefore, it is more efficient + * to call it before SetInputData() when possible. + */ void SetXRange(float min, float max); - // Description: - // Set the range of the input data for the Y dimension. By default it is - // (1, NumberOfRows). Calling this method after SetInputData() results - // in recomputation of the plot's data. Therefore, it is more efficient - // to call it before SetInputData() when possible. + /** + * Set the range of the input data for the Y dimension. By default it is + * (1, NumberOfRows). Calling this method after SetInputData() results + * in recomputation of the plot's data. Therefore, it is more efficient + * to call it before SetInputData() when possible. + */ void SetYRange(float min, float max); protected: vtkPlotSurface(); ~vtkPlotSurface(); - // Description: - // Generate a surface (for OpenGL) from our list of points. + /** + * Generate a surface (for OpenGL) from our list of points. + */ void GenerateSurface(); - // Description: - // Helper function used to setup a colored surface. + /** + * Helper function used to setup a colored surface. + */ void InsertSurfaceVertex(float *data, float value, int i, int j, int &pos); - // Description: - // Change data values if SetXRange() or SetYRange() were called. + /** + * Change data values if SetXRange() or SetYRange() were called. + */ void RescaleData(); - // Description: - // Map a column index to the user-specified range for the X-axis. + /** + * Map a column index to the user-specified range for the X-axis. + */ float ColumnToX(int columnIndex); - // Description: - // Map a row index to the user-specified range for the Y-axis. + /** + * Map a row index to the user-specified range for the Y-axis. + */ float RowToY(int rowIndex); - // Description: - // Surface to render. + /** + * Surface to render. + */ std::vector Surface; - // Description: - // The number of rows in the input table. + /** + * The number of rows in the input table. + */ vtkIdType NumberOfRows; - // Description: - // The number of columns in the input table. + /** + * The number of columns in the input table. + */ vtkIdType NumberOfColumns; - // Description: - // The number of vertices in the surface. + /** + * The number of vertices in the surface. + */ vtkIdType NumberOfVertices; - // Description: - // This array indicates how the surface should be colored. + /** + * This array indicates how the surface should be colored. + */ vtkNew Colors; - // Description: - // The number of components used to color the surface. + /** + * The number of components used to color the surface. + */ int ColorComponents; - // Description: - // The input table used to generate the surface. + /** + * The input table used to generate the surface. + */ vtkTable *InputTable; - // Description: - // The lookup table used to color the surface by height (Z dimension). + /** + * The lookup table used to color the surface by height (Z dimension). + */ vtkNew LookupTable; - // Description: - // user-defined data ranges + //@{ + /** + * user-defined data ranges + */ float XMinimum; float XMaximum; float YMinimum; float YMaximum; + //@} - // Description: - // true if user-defined data scaling has already been applied, - // false otherwise. + /** + * true if user-defined data scaling has already been applied, + * false otherwise. + */ bool DataHasBeenRescaled; private: diff --git a/Charts/Core/vtkScalarsToColorsItem.h b/Charts/Core/vtkScalarsToColorsItem.h index 4aefabb6657d69cf0ff7d75aa7ecd4875b99f806..f6da51c27ca4d2f0431e5586dc9a655802999d72 100644 --- a/Charts/Core/vtkScalarsToColorsItem.h +++ b/Charts/Core/vtkScalarsToColorsItem.h @@ -13,16 +13,19 @@ =========================================================================*/ -// .NAME vtkScalarsToColorsItem - Abstract class for ScalarsToColors items. -// .SECTION Description -// vtkScalarsToColorsItem implements item bounds and painting for inherited -// classes that provide a texture (ComputeTexture()) and optionally a shape -// .SECTION See Also -// vtkControlPointsItem -// vtkLookupTableItem -// vtkColorTransferFunctionItem -// vtkCompositeTransferFunctionItem -// vtkPiecewiseItemFunctionItem +/** + * @class vtkScalarsToColorsItem + * @brief Abstract class for ScalarsToColors items. + * + * vtkScalarsToColorsItem implements item bounds and painting for inherited + * classes that provide a texture (ComputeTexture()) and optionally a shape + * @sa + * vtkControlPointsItem + * vtkLookupTableItem + * vtkColorTransferFunctionItem + * vtkCompositeTransferFunctionItem + * vtkPiecewiseItemFunctionItem +*/ #ifndef vtkScalarsToColorsItem_h #define vtkScalarsToColorsItem_h @@ -40,62 +43,78 @@ public: vtkTypeMacro(vtkScalarsToColorsItem, vtkPlot); virtual void PrintSelf(ostream &os, vtkIndent indent); - // Description: - // Bounds of the item, use the UserBounds if valid otherwise compute - // the bounds of the item (based on the transfer function range). + /** + * Bounds of the item, use the UserBounds if valid otherwise compute + * the bounds of the item (based on the transfer function range). + */ void GetBounds(double bounds[4]); - // Description: - // Set custom bounds, except if bounds are invalid, bounds will be - // automatically computed based on the range of the control points - // Invalid bounds by default. + //@{ + /** + * Set custom bounds, except if bounds are invalid, bounds will be + * automatically computed based on the range of the control points + * Invalid bounds by default. + */ vtkSetVector4Macro(UserBounds, double); vtkGetVector4Macro(UserBounds, double) + //@} - // Description: - // Paint the texture into a rectangle defined by the bounds. If - // MaskAboveCurve is true and a shape has been provided by a subclass, it - // draws the texture into the shape + /** + * Paint the texture into a rectangle defined by the bounds. If + * MaskAboveCurve is true and a shape has been provided by a subclass, it + * draws the texture into the shape + */ virtual bool Paint(vtkContext2D *painter); - // Description: - // Get a pointer to the vtkPen object that controls the drawing of the edge - // of the shape if any. - // PolyLinePen type is vtkPen::NO_PEN by default. + //@{ + /** + * Get a pointer to the vtkPen object that controls the drawing of the edge + * of the shape if any. + * PolyLinePen type is vtkPen::NO_PEN by default. + */ vtkGetObjectMacro(PolyLinePen, vtkPen); - - // Description: - // Don't fill in the part above the transfer function. - // If true texture is not visible above the shape provided by subclasses, - // otherwise the whole rectangle defined by the bounds is filled with the - // transfer function. - // Note: only 2D transfer functions (RGB tf + alpha tf ) support the feature. + //@} + + //@{ + /** + * Don't fill in the part above the transfer function. + * If true texture is not visible above the shape provided by subclasses, + * otherwise the whole rectangle defined by the bounds is filled with the + * transfer function. + * Note: only 2D transfer functions (RGB tf + alpha tf ) support the feature. + */ vtkSetMacro(MaskAboveCurve, bool); vtkGetMacro(MaskAboveCurve, bool); + //@} protected: vtkScalarsToColorsItem(); virtual ~vtkScalarsToColorsItem(); - // Description: - // Bounds of the item, by default (0, 1, 0, 1) but it depends on the - // range of the ScalarsToColors function. - // Need to be reimplemented by subclasses if the range is != [0,1] + /** + * Bounds of the item, by default (0, 1, 0, 1) but it depends on the + * range of the ScalarsToColors function. + * Need to be reimplemented by subclasses if the range is != [0,1] + */ virtual void ComputeBounds(double* bounds); - // Description: - // Need to be reimplemented by subclasses, ComputeTexture() is called at - // paint time if the texture is not up to date compared to vtkScalarsToColorsItem - // Return false if no texture is generated. + /** + * Need to be reimplemented by subclasses, ComputeTexture() is called at + * paint time if the texture is not up to date compared to vtkScalarsToColorsItem + * Return false if no texture is generated. + */ virtual void ComputeTexture() = 0; vtkGetMacro(TextureWidth, int); - // Description: - // Called whenever the ScalarsToColors function(s) is modified. It internally - // calls Modified(). Can be reimplemented by subclasses + //@{ + /** + * Called whenever the ScalarsToColors function(s) is modified. It internally + * calls Modified(). Can be reimplemented by subclasses + */ virtual void ScalarsToColorsModified(vtkObject* caller, unsigned long eid, void* calldata); static void OnScalarsToColorsModified(vtkObject* caller, unsigned long eid, void *clientdata, void* calldata); + //@} double UserBounds[4]; diff --git a/Charts/Core/vtkScatterPlotMatrix.h b/Charts/Core/vtkScatterPlotMatrix.h index 9775ae256a134a68d36530e3969d770478b34554..7f75a43620b197ce1450134c278980514e1614f9 100644 --- a/Charts/Core/vtkScatterPlotMatrix.h +++ b/Charts/Core/vtkScatterPlotMatrix.h @@ -13,12 +13,15 @@ =========================================================================*/ -// .NAME vtkScatterPlotMatrix - container for a matrix of charts. -// -// .SECTION Description -// This class contains a matrix of charts. These charts will be of type -// vtkChartXY by default, but this can be overridden. The class will manage -// their layout and object lifetime. +/** + * @class vtkScatterPlotMatrix + * @brief container for a matrix of charts. + * + * + * This class contains a matrix of charts. These charts will be of type + * vtkChartXY by default, but this can be overridden. The class will manage + * their layout and object lifetime. +*/ #ifndef vtkScatterPlotMatrix_h #define vtkScatterPlotMatrix_h @@ -52,299 +55,391 @@ public: vtkTypeMacro(vtkScatterPlotMatrix, vtkChartMatrix); virtual void PrintSelf(ostream &os, vtkIndent indent); - // Description: - // Creates a new object. + /** + * Creates a new object. + */ static vtkScatterPlotMatrix *New(); - // Description: - // Perform any updates to the item that may be necessary before rendering. + /** + * Perform any updates to the item that may be necessary before rendering. + */ virtual void Update(); - // Description: - // Paint event for the chart matrix. + /** + * Paint event for the chart matrix. + */ virtual bool Paint(vtkContext2D *painter); virtual void SetScene(vtkContextScene *scene); - // Description: - // Set the active plot, the one that will be displayed in the top-right. - // This defaults to (0, n-2), the plot below the first histogram on the left. - // \return false is the position specified is not valid. + /** + * Set the active plot, the one that will be displayed in the top-right. + * This defaults to (0, n-2), the plot below the first histogram on the left. + * \return false is the position specified is not valid. + */ virtual bool SetActivePlot(const vtkVector2i& position); - // Description: - // Get the position of the active plot. + /** + * Get the position of the active plot. + */ virtual vtkVector2i GetActivePlot(); - // Description: - // Get the AnnotationLink for the scatter plot matrix, this gives you access - // to the currently selected points in the scatter plot matrix. + /** + * Get the AnnotationLink for the scatter plot matrix, this gives you access + * to the currently selected points in the scatter plot matrix. + */ vtkAnnotationLink* GetAnnotationLink(); - // Description: - // Set the input table for the scatter plot matrix. This will cause all - // columns to be plotted against each other - a square scatter plot matrix. + /** + * Set the input table for the scatter plot matrix. This will cause all + * columns to be plotted against each other - a square scatter plot matrix. + */ virtual void SetInput(vtkTable *table); - // Description: - // Set the visibility of the specified column. + /** + * Set the visibility of the specified column. + */ void SetColumnVisibility(const vtkStdString& name, bool visible); - // Description: - // Insert the specified column at the index position of - // the visible columns. + /** + * Insert the specified column at the index position of + * the visible columns. + */ void InsertVisibleColumn(const vtkStdString& name, int index); - // Description: - // Get the visibility of the specified column. + /** + * Get the visibility of the specified column. + */ bool GetColumnVisibility(const vtkStdString& name); - // Description: - // Set the visibility of all columns (true will make them all visible, false - // will remove all visible columns). + /** + * Set the visibility of all columns (true will make them all visible, false + * will remove all visible columns). + */ void SetColumnVisibilityAll(bool visible); - // Description: - // Get a list of the columns, and the order in which they are displayed. + /** + * Get a list of the columns, and the order in which they are displayed. + */ virtual vtkStringArray* GetVisibleColumns(); - // Description: - // Set the list of visible columns, and the order in which they will be displayed. + /** + * Set the list of visible columns, and the order in which they will be displayed. + */ virtual void SetVisibleColumns(vtkStringArray* visColumns); - // Description: - // Set the number of bins in the histograms along the central diagonal of the - // scatter plot matrix. + /** + * Set the number of bins in the histograms along the central diagonal of the + * scatter plot matrix. + */ virtual void SetNumberOfBins(int numberOfBins); - // Description: - // Get the number of bins the histograms along the central diagonal scatter - // plot matrix. The default value is 10. + /** + * Get the number of bins the histograms along the central diagonal scatter + * plot matrix. The default value is 10. + */ virtual int GetNumberOfBins() const { return this->NumberOfBins; } - // Description: - // Set the color for the specified plotType. + /** + * Set the color for the specified plotType. + */ void SetPlotColor(int plotType, const vtkColor4ub& color); - // Description: - // Sets the marker style for the specified plotType. + /** + * Sets the marker style for the specified plotType. + */ void SetPlotMarkerStyle(int plotType, int style); - // Description: - // Sets the marker size for the specified plotType. + /** + * Sets the marker size for the specified plotType. + */ void SetPlotMarkerSize(int plotType, float size); - // Description: - // Return true if the supplied x, y coordinate is inside the item. + /** + * Return true if the supplied x, y coordinate is inside the item. + */ bool Hit(const vtkContextMouseEvent &mouse); - // Description: - // Mouse move event. + /** + * Mouse move event. + */ bool MouseMoveEvent(const vtkContextMouseEvent &mouse); - // Description: - // Mouse button down event + /** + * Mouse button down event + */ bool MouseButtonPressEvent(const vtkContextMouseEvent &mouse); - // Description: - // Mouse button release event. + /** + * Mouse button release event. + */ bool MouseButtonReleaseEvent(const vtkContextMouseEvent &mouse); - // Description: - // Returns the type of the plot at the given position. The return - // value is one of: SCATTERPLOT, HISTOGRAM, ACTIVEPLOT, or NOPLOT. + //@{ + /** + * Returns the type of the plot at the given position. The return + * value is one of: SCATTERPLOT, HISTOGRAM, ACTIVEPLOT, or NOPLOT. + */ int GetPlotType(const vtkVector2i &pos); int GetPlotType(int row, int column); + //@} - // Description: - // Set/get the scatter plot title. + //@{ + /** + * Set/get the scatter plot title. + */ void SetTitle(const vtkStdString& title); vtkStdString GetTitle(); + //@} - // Description: - // Set/get the text properties for the chart title, i.e. color, font, size. + //@{ + /** + * Set/get the text properties for the chart title, i.e. color, font, size. + */ void SetTitleProperties(vtkTextProperty *prop); vtkTextProperty* GetTitleProperties(); - - // Description: - // Sets whether or not the grid for the given axis is visible given a plot - // type, which refers to - // vtkScatterPlotMatrix::{SCATTERPLOT, HISTOGRAM, ACTIVEPLOT}. + //@} + + //@{ + /** + * Sets whether or not the grid for the given axis is visible given a plot + * type, which refers to + * vtkScatterPlotMatrix::{SCATTERPLOT, HISTOGRAM, ACTIVEPLOT}. + */ void SetGridVisibility(int plotType, bool visible); bool GetGridVisibility(int plotType); + //@} - // Description: - // Sets the background color for the chart given a plot type, which refers to - // vtkScatterPlotMatrix::{SCATTERPLOT, HISTOGRAM, ACTIVEPLOT}. + //@{ + /** + * Sets the background color for the chart given a plot type, which refers to + * vtkScatterPlotMatrix::{SCATTERPLOT, HISTOGRAM, ACTIVEPLOT}. + */ void SetBackgroundColor(int plotType, const vtkColor4ub& color); vtkColor4ub GetBackgroundColor(int plotType); + //@} - // Description: - // Sets the color for the axes given a plot type, which refers to - // vtkScatterPlotMatrix::{SCATTERPLOT, HISTOGRAM, ACTIVEPLOT}. + //@{ + /** + * Sets the color for the axes given a plot type, which refers to + * vtkScatterPlotMatrix::{SCATTERPLOT, HISTOGRAM, ACTIVEPLOT}. + */ void SetAxisColor(int plotType, const vtkColor4ub& color); vtkColor4ub GetAxisColor(int plotType); + //@} - // Description: - // Sets the color for the axes given a plot type, which refers to - // vtkScatterPlotMatrix::{SCATTERPLOT, HISTOGRAM, ACTIVEPLOT}. + //@{ + /** + * Sets the color for the axes given a plot type, which refers to + * vtkScatterPlotMatrix::{SCATTERPLOT, HISTOGRAM, ACTIVEPLOT}. + */ void SetGridColor(int plotType, const vtkColor4ub& color); vtkColor4ub GetGridColor(int plotType); - - // Description: - // Sets whether or not the labels for the axes are visible, given a plot type, - // which refers to - // vtkScatterPlotMatrix::{SCATTERPLOT, HISTOGRAM, ACTIVEPLOT}. + //@} + + //@{ + /** + * Sets whether or not the labels for the axes are visible, given a plot type, + * which refers to + * vtkScatterPlotMatrix::{SCATTERPLOT, HISTOGRAM, ACTIVEPLOT}. + */ void SetAxisLabelVisibility(int plotType, bool visible); bool GetAxisLabelVisibility(int plotType); + //@} - // Description: - // Set/get the text property for the axis labels of the given plot type, - // possible types are vtkScatterPlotMatrix::{SCATTERPLOT, HISTOGRAM, ACTIVEPLOT}. + //@{ + /** + * Set/get the text property for the axis labels of the given plot type, + * possible types are vtkScatterPlotMatrix::{SCATTERPLOT, HISTOGRAM, ACTIVEPLOT}. + */ void SetAxisLabelProperties(int plotType, vtkTextProperty *prop); vtkTextProperty* GetAxisLabelProperties(int plotType); + //@} - // Description: - // Sets the axis label notation for the axes given a plot type, which refers to - // vtkScatterPlotMatrix::{SCATTERPLOT, HISTOGRAM, ACTIVEPLOT}. + //@{ + /** + * Sets the axis label notation for the axes given a plot type, which refers to + * vtkScatterPlotMatrix::{SCATTERPLOT, HISTOGRAM, ACTIVEPLOT}. + */ void SetAxisLabelNotation(int plotType, int notation); int GetAxisLabelNotation(int plotType); + //@} - // Description: - // Sets the axis label precision for the axes given a plot type, which refers to - // vtkScatterPlotMatrix::{SCATTERPLOT, HISTOGRAM, ACTIVEPLOT}. + //@{ + /** + * Sets the axis label precision for the axes given a plot type, which refers to + * vtkScatterPlotMatrix::{SCATTERPLOT, HISTOGRAM, ACTIVEPLOT}. + */ void SetAxisLabelPrecision(int plotType, int precision); int GetAxisLabelPrecision(int plotType); + //@} - // Description: - // Set chart's tooltip notation and precision, given a plot type, which refers to - // vtkScatterPlotMatrix::{SCATTERPLOT, HISTOGRAM, ACTIVEPLOT}. + //@{ + /** + * Set chart's tooltip notation and precision, given a plot type, which refers to + * vtkScatterPlotMatrix::{SCATTERPLOT, HISTOGRAM, ACTIVEPLOT}. + */ void SetTooltipNotation(int plotType, int notation); void SetTooltipPrecision(int plotType, int precision); int GetTooltipNotation(int plotType); int GetTooltipPrecision(int plotType); + //@} - // Description: - // Set the vtkTooltipItem object that will be displayed by the active chart. + /** + * Set the vtkTooltipItem object that will be displayed by the active chart. + */ void SetTooltip(vtkTooltipItem *tooltip); - // Description: - // Get the vtkTooltipItem object that will be displayed by the active chart. + /** + * Get the vtkTooltipItem object that will be displayed by the active chart. + */ vtkTooltipItem* GetTooltip() const; - // Description: - // Set indexed labels array. + /** + * Set indexed labels array. + */ void SetIndexedLabels(vtkStringArray *labels); - // Description: - // Get the indexed labels array. + /** + * Get the indexed labels array. + */ vtkStringArray* GetIndexedLabels() const; - // Description: - // Set the scatter plot selected row/column charts' background color. + //@{ + /** + * Set the scatter plot selected row/column charts' background color. + */ void SetScatterPlotSelectedRowColumnColor(const vtkColor4ub& color); vtkColor4ub GetScatterPlotSelectedRowColumnColor(); + //@} - // Description: - // Set the scatter plot selected active chart background color. + //@{ + /** + * Set the scatter plot selected active chart background color. + */ void SetScatterPlotSelectedActiveColor(const vtkColor4ub& color); vtkColor4ub GetScatterPlotSelectedActiveColor(); + //@} - // Description: - // Convenient method to update all the chart settings + /** + * Convenient method to update all the chart settings + */ void UpdateSettings(); - // Description: - // Update charts based on settings given the plot type + /** + * Update charts based on settings given the plot type + */ void UpdateChartSettings(int plotType); - // Description: - // Set/get the Selection Mode that will be used by the chart while doing - // selection. The only valid enums are vtkContextScene::SELECTION_NONE, - // SELECTION_DEFAULT, SELECTION_ADDITION, SELECTION_SUBTRACTION, SELECTION_TOGGLE + //@{ + /** + * Set/get the Selection Mode that will be used by the chart while doing + * selection. The only valid enums are vtkContextScene::SELECTION_NONE, + * SELECTION_DEFAULT, SELECTION_ADDITION, SELECTION_SUBTRACTION, SELECTION_TOGGLE + */ virtual void SetSelectionMode(int); vtkGetMacro(SelectionMode, int); + //@} - // Description: - // Get the column name for the supplied index. + /** + * Get the column name for the supplied index. + */ vtkStdString GetColumnName(int column); - // Description: - // Get the column name for the supplied index. + /** + * Get the column name for the supplied index. + */ vtkStdString GetRowName(int row); - // Description: - // Set the number of animation frames in each transition. Default is 25, - // and 0 means to animations between axes. + /** + * Set the number of animation frames in each transition. Default is 25, + * and 0 means to animations between axes. + */ void SetNumberOfFrames(int frames); - // Description: - // Get the number of animation frames in each transition. Default is 25, - // and 0 means to animations between axes. + /** + * Get the number of animation frames in each transition. Default is 25, + * and 0 means to animations between axes. + */ int GetNumberOfFrames(); - // Description: - // Clear the animation path. + /** + * Clear the animation path. + */ void ClearAnimationPath(); - // Description: - // Add a move to the animation path. Note that a move can only change i or j, - // not both. If the proposed move does not satisfy those criteria it will - // be rejected and the animation path will not be extended. + /** + * Add a move to the animation path. Note that a move can only change i or j, + * not both. If the proposed move does not satisfy those criteria it will + * be rejected and the animation path will not be extended. + */ bool AddAnimationPath(const vtkVector2i &move); - // Description: - // Get the number of elements (transitions) in the animation path. + /** + * Get the number of elements (transitions) in the animation path. + */ vtkIdType GetNumberOfAnimationPathElements(); - // Description: - // Get the element specified from the animation path. + /** + * Get the element specified from the animation path. + */ vtkVector2i GetAnimationPathElement(vtkIdType i); - // Description: - // Trigger the animation of the scatter plot matrix to begin. + /** + * Trigger the animation of the scatter plot matrix to begin. + */ bool BeginAnimationPath(vtkRenderWindowInteractor* interactor); - // Description: - // Advance the animation in response to the timer events. This is public to - // allow the animation to be manually advanced when timers are not a + /** + * Advance the animation in response to the timer events. This is public to + * allow the animation to be manually advanced when timers are not a + */ virtual void AdvanceAnimation(); - // Description: - // Get the main plot (the one in the top-right of the matrix. + /** + * Get the main plot (the one in the top-right of the matrix. + */ virtual vtkChart * GetMainChart(); protected: vtkScatterPlotMatrix(); ~vtkScatterPlotMatrix(); - // Description: - // Internal helper to do the layout of the charts in the scatter plot matrix. + /** + * Internal helper to do the layout of the charts in the scatter plot matrix. + */ void UpdateLayout(); - // Description: - // Attach axis range listener so we can forward to dependent axes in matrix. + //@{ + /** + * Attach axis range listener so we can forward to dependent axes in matrix. + */ void AttachAxisRangeListener(vtkAxis*); void AxisRangeForwarderCallback(vtkObject*, unsigned long, void*); + //@} - // Description: - // The callback function when SelectionChangedEvent is invoked from - // the Big chart. This class will just forward the event. + /** + * The callback function when SelectionChangedEvent is invoked from + * the Big chart. This class will just forward the event. + */ void BigChartSelectionCallback(vtkObject*, unsigned long, void*); - // Description: - // Given a new position for the active plot, calculate a - // an animation path from the old active plot to the new - // active plot. + /** + * Given a new position for the active plot, calculate a + * an animation path from the old active plot to the new + * active plot. + */ virtual void UpdateAnimationPath(const vtkVector2i& newActivePos); - // Description: - // Given the render window interactor, start animation of the - // animation path calculated above. + /** + * Given the render window interactor, start animation of the + * animation path calculated above. + */ virtual void StartAnimation(vtkRenderWindowInteractor* interactor); - // Description: - // Process events and dispatch to the appropriate member functions. + /** + * Process events and dispatch to the appropriate member functions. + */ static void ProcessEvents(vtkObject *caller, unsigned long event, void *clientData, void *callerData); diff --git a/Common/Color/vtkColorSeries.h b/Common/Color/vtkColorSeries.h index 428bdfbb55be026916c544fd328fdd4ba7665e38..6ae6484f746cb5cd0c7b02172b022357aaa6b497 100644 --- a/Common/Color/vtkColorSeries.h +++ b/Common/Color/vtkColorSeries.h @@ -13,27 +13,30 @@ =========================================================================*/ -// .NAME vtkColorSeries - stores a list of colors. -// -// .SECTION Description -// The vtkColorSeries stores palettes of colors. There are several default -// palettes (or schemes) available and functions to control several aspects -// of what colors are returned. In essence a color scheme is set and then -// the number of colors and individual color values may be requested. -// -// It is also possible to add schemes beyond the default palettes. -// Whenever \a SetColorScheme is called with a string for which no palette -// already exists, a new, empty palette is created. -// You may then use \a SetNumberOfColors and \a SetColor to populate the -// palette. -// You may not extend default palettes by calling functions that alter -// a scheme; if called while a predefined palette is in use, they -// will create a new non-default scheme and populate it with the current -// palette before continuing. -// -// The "Brewer" palettes are courtesy of -// Cynthia A. Brewer (Dept. of Geography, Pennsylvania State University) -// and present under the Apache License. See the source code for details. +/** + * @class vtkColorSeries + * @brief stores a list of colors. + * + * + * The vtkColorSeries stores palettes of colors. There are several default + * palettes (or schemes) available and functions to control several aspects + * of what colors are returned. In essence a color scheme is set and then + * the number of colors and individual color values may be requested. + * + * It is also possible to add schemes beyond the default palettes. + * Whenever \a SetColorScheme is called with a string for which no palette + * already exists, a new, empty palette is created. + * You may then use \a SetNumberOfColors and \a SetColor to populate the + * palette. + * You may not extend default palettes by calling functions that alter + * a scheme; if called while a predefined palette is in use, they + * will create a new non-default scheme and populate it with the current + * palette before continuing. + * + * The "Brewer" palettes are courtesy of + * Cynthia A. Brewer (Dept. of Geography, Pennsylvania State University) + * and present under the Apache License. See the source code for details. +*/ #ifndef vtkColorSeries_h #define vtkColorSeries_h @@ -51,12 +54,14 @@ public: vtkTypeMacro(vtkColorSeries, vtkObject); void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE; - // Description: - // Create a new vtkColorSeries with the SPECTRUM color scheme. + /** + * Create a new vtkColorSeries with the SPECTRUM color scheme. + */ static vtkColorSeries* New(); - // Description: - // Enum of the available color schemes + /** + * Enum of the available color schemes + */ enum ColorSchemes { /// 7 different hues. SPECTRUM = 0, @@ -186,10 +191,11 @@ public: CUSTOM }; -// Description: -// An enum defining how lookup tables should be used: either as a -// list of discrete colors to choose from (categorical), or as an -// ordered list of color set - points to interpolate among (ordinal). +/** + * An enum defining how lookup tables should be used: either as a + * list of discrete colors to choose from (categorical), or as an + * ordered list of color set - points to interpolate among (ordinal). + */ enum LUTMode { /// indexed lookup is off ORDINAL = 0, @@ -197,92 +203,111 @@ enum LUTMode { CATEGORICAL }; - // Description: - // Set the color scheme that should be used. - // The variant of this function that takes an integer should pass a - // number from those in the enum, or a value returned by the string variant. - // The variant that accepts a string returns the integer index - // of the resulting palette (whether it already existed or is newly-created). + //@{ + /** + * Set the color scheme that should be used. + * The variant of this function that takes an integer should pass a + * number from those in the enum, or a value returned by the string variant. + * The variant that accepts a string returns the integer index + * of the resulting palette (whether it already existed or is newly-created). + */ virtual void SetColorScheme(int scheme); virtual int SetColorSchemeByName(const vtkStdString& schemeName); + //@} - // Description: - // Return the number of schemes currently defined. + /** + * Return the number of schemes currently defined. + */ int GetNumberOfColorSchemes() const; - // Description: - // Get the color scheme that is currently being used. + /** + * Get the color scheme that is currently being used. + */ virtual vtkStdString GetColorSchemeName() const; - // Description: - // Set the name of the current color scheme + /** + * Set the name of the current color scheme + */ virtual void SetColorSchemeName(const vtkStdString& scheme); - // Description: - // Return the ID of the color scheme currently in use. + /** + * Return the ID of the color scheme currently in use. + */ virtual int GetColorScheme() const; - // Description: - // Get the number of colors available in the current color scheme. + /** + * Get the number of colors available in the current color scheme. + */ virtual int GetNumberOfColors() const; - // Description: - // Set the number of colors to be stored in a non-default color scheme. - // Calling this function on a predefined color scheme will cause the scheme - // to be duplicated to a new custom scheme. + /** + * Set the number of colors to be stored in a non-default color scheme. + * Calling this function on a predefined color scheme will cause the scheme + * to be duplicated to a new custom scheme. + */ virtual void SetNumberOfColors(int numColors); - // Description: - // Get the color at the specified index. If the index is out of range then - // black will be returned. + /** + * Get the color at the specified index. If the index is out of range then + * black will be returned. + */ vtkColor3ub GetColor(int index) const; - // Description: - // Get the color at the specified index. If the index is out of range then - // the call wraps around, i.e. uses the mod operator. + /** + * Get the color at the specified index. If the index is out of range then + * the call wraps around, i.e. uses the mod operator. + */ vtkColor3ub GetColorRepeating(int index) const; - // Description: - // Set the color at the specified index. Does nothing if the index is out of - // range. + /** + * Set the color at the specified index. Does nothing if the index is out of + * range. + */ virtual void SetColor(int index, const vtkColor3ub &color); - // Description: - // Adds the color to the end of the list. + /** + * Adds the color to the end of the list. + */ virtual void AddColor(const vtkColor3ub &color); - // Description: - // Inserts the color at the specified index in the list. + /** + * Inserts the color at the specified index in the list. + */ virtual void InsertColor(int index, const vtkColor3ub &color); - // Description: - // Removes the color at the specified index in the list. + /** + * Removes the color at the specified index in the list. + */ virtual void RemoveColor(int index); - // Description: - // Clears the list of colors. + /** + * Clears the list of colors. + */ virtual void ClearColors(); - // Description: - // Make a deep copy of the supplied object. + /** + * Make a deep copy of the supplied object. + */ virtual void DeepCopy(vtkColorSeries *chartColors); - // Description: - // Populate a lookup table with all the colors in the current scheme. - // - // The default behavior is to return categorical data. Set lutIndexing - // to ORDINAL to return ordinal data. Any other value for lutIndexing - // is treated as CATEGORICAL. + /** + * Populate a lookup table with all the colors in the current scheme. + + * The default behavior is to return categorical data. Set lutIndexing + * to ORDINAL to return ordinal data. Any other value for lutIndexing + * is treated as CATEGORICAL. + */ void BuildLookupTable(vtkLookupTable* lkup, int lutIndexing = CATEGORICAL); - // Description: - // Create a new lookup table with all the colors in the current scheme. - // - // The caller is responsible for deleting the table after use. - // - // The default behavior is to return categorical data. Set lutIndexing - // to ORDINAL to return ordinal data. Any other value for lutIndexing - // is treated as CATEGORICAL. + /** + * Create a new lookup table with all the colors in the current scheme. + + * The caller is responsible for deleting the table after use. + + * The default behavior is to return categorical data. Set lutIndexing + * to ORDINAL to return ordinal data. Any other value for lutIndexing + * is treated as CATEGORICAL. + */ VTK_NEWINSTANCE vtkLookupTable* CreateLookupTable(int lutIndexing = CATEGORICAL); @@ -290,18 +315,23 @@ protected: vtkColorSeries(); ~vtkColorSeries() VTK_OVERRIDE; - // Description: - // If the current scheme is a predefined (read-only) scheme, - // copy the current colors to a new scheme and modify the new scheme instead. + /** + * If the current scheme is a predefined (read-only) scheme, + * copy the current colors to a new scheme and modify the new scheme instead. + */ virtual void CopyOnWrite(); - // Description: - // Private data pointer of the class, stores the color list. + //@{ + /** + * Private data pointer of the class, stores the color list. + */ class Private; Private* Storage; + //@} - // Description: - // The color scheme being used. + /** + * The color scheme being used. + */ int ColorScheme; /// The color scheme being used. diff --git a/Common/Color/vtkNamedColors.h b/Common/Color/vtkNamedColors.h index 405c21c482e6f1cce09160568549ae73c326b816..b7f2f8c7bb9a77a0d9dd741b0b5bf63d4de85151 100644 --- a/Common/Color/vtkNamedColors.h +++ b/Common/Color/vtkNamedColors.h @@ -12,56 +12,59 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkNamedColors - A class holding colors and their names. -// .SECTION Description -// vtkNamedColors is class that holds colors and their associated names. -// -// Color names are case insensitive and are stored as lower-case names -// along with a 4-element array whose elements are red, green, blue and alpha, -// in that order, corresponding to the RGBA value of the color. -// -// It is assumed that if the RGBA values are unsigned char then each element -// lies in the range 0...255 and if the RGBA values are double then each -// element lies in the range 0...1. -// -// The colors and names are those in http://en.wikipedia.org/wiki/Web_colors -// that are derived from the CSS3 specification: -// http://www.w3.org/TR/css3-color/#svg-color -// In this table common synonyms such as cyan/aqua and -// magenta/fuchsia are also included. -// -// Also included in this class are names and colors taken from -// Wrapping/Tcl/vtktesting/colors.tcl and Wrapping/Python/vtk/util/colors.py. -// -// Web colors and names in http://en.wikipedia.org/wiki/Web_colors take -// precedence over those in colors.tcl and colors.py. One consequence of this -// is that while colors.py and colors.tcl specify green as equivalent to -// (0,255,0), the web color standard defines it as (0,128,0). -// -// For a web page of VTK Named Colors and their RGB values, see: -// http://www.vtk.org/Wiki/VTK/Examples/Python/Visualization/VTKNamedColorPatches_html . -// -// The code used to generate this table is available from: -// http://www.vtk.org/Wiki/VTK/Examples/Python/Visualization/NamedColorPatches , -// this is useful if you wish to generate your own table. -// -// The SetColor methods will overwrite existing colors if the name of the -// color being set matches an existing color. Note that ColorExists() can be -// used to test for existence of the color being set. -// -// In the case of the GetColor methods returning doubles, alternative versions, -// identified by the letters RGB in the names, are provided. -// These get functions return just the red, green and blue components of -// a color. -// -// The class also provides methods for defining a color through an HTML color -// string. The following formats are supported: -// -// - #RGB (3-digit hexadecimal number, where #4F2 is a shortcut for #44FF22) -// - #RRGGBB (6-digit hexadecimal number) -// - rgb(r, g, b) (where r, g, b are in 0..255 or percentage values) -// - rgba(r, g, b, a) (where r, g, b, are in 0..255 or percentage values, a is in 0.0..1.0) -// - a CSS3 color name (e.g. "steelblue") +/** + * @class vtkNamedColors + * @brief A class holding colors and their names. + * + * vtkNamedColors is class that holds colors and their associated names. + * + * Color names are case insensitive and are stored as lower-case names + * along with a 4-element array whose elements are red, green, blue and alpha, + * in that order, corresponding to the RGBA value of the color. + * + * It is assumed that if the RGBA values are unsigned char then each element + * lies in the range 0...255 and if the RGBA values are double then each + * element lies in the range 0...1. + * + * The colors and names are those in http://en.wikipedia.org/wiki/Web_colors + * that are derived from the CSS3 specification: + * http://www.w3.org/TR/css3-color/#svg-color + * In this table common synonyms such as cyan/aqua and + * magenta/fuchsia are also included. + * + * Also included in this class are names and colors taken from + * Wrapping/Tcl/vtktesting/colors.tcl and Wrapping/Python/vtk/util/colors.py. + * + * Web colors and names in http://en.wikipedia.org/wiki/Web_colors take + * precedence over those in colors.tcl and colors.py. One consequence of this + * is that while colors.py and colors.tcl specify green as equivalent to + * (0,255,0), the web color standard defines it as (0,128,0). + * + * For a web page of VTK Named Colors and their RGB values, see: + * http://www.vtk.org/Wiki/VTK/Examples/Python/Visualization/VTKNamedColorPatches_html . + * + * The code used to generate this table is available from: + * http://www.vtk.org/Wiki/VTK/Examples/Python/Visualization/NamedColorPatches , + * this is useful if you wish to generate your own table. + * + * The SetColor methods will overwrite existing colors if the name of the + * color being set matches an existing color. Note that ColorExists() can be + * used to test for existence of the color being set. + * + * In the case of the GetColor methods returning doubles, alternative versions, + * identified by the letters RGB in the names, are provided. + * These get functions return just the red, green and blue components of + * a color. + * + * The class also provides methods for defining a color through an HTML color + * string. The following formats are supported: + * + * - #RGB (3-digit hexadecimal number, where #4F2 is a shortcut for #44FF22) + * - #RRGGBB (6-digit hexadecimal number) + * - rgb(r, g, b) (where r, g, b are in 0..255 or percentage values) + * - rgba(r, g, b, a) (where r, g, b, are in 0..255 or percentage values, a is in 0.0..1.0) + * - a CSS3 color name (e.g. "steelblue") +*/ #ifndef vtkNamedColors_h #define vtkNamedColors_h @@ -80,274 +83,310 @@ class VTKCOMMONCOLOR_EXPORT vtkNamedColors : public vtkObject public: vtkTypeMacro(vtkNamedColors, vtkObject); - // Description: - // Methods invoked by print to print information about the object - // including superclasses. Typically not called by the user - // (use Print() instead) but used in the hierarchical print - // process to combine the output of several classes. + /** + * Methods invoked by print to print information about the object + * including superclasses. Typically not called by the user + * (use Print() instead) but used in the hierarchical print + * process to combine the output of several classes. + */ void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE; - // Description: - // Create a new vtkNamedColors object. + /** + * Create a new vtkNamedColors object. + */ static vtkNamedColors* New(); - // Description: - // Get the number of colors. + /** + * Get the number of colors. + */ int GetNumberOfColors(); - // Description: - // Reset the colors in the color map to the original colors. - // Any colors inserted by the user will be lost. + /** + * Reset the colors in the color map to the original colors. + * Any colors inserted by the user will be lost. + */ void ResetColors(); - // Description: - // Return true if the color exists. + /** + * Return true if the color exists. + */ bool ColorExists(const vtkStdString & name); - // Description: - // Get the color by name. - // The name is treated as being case-insensitive. - // The color is returned as a vtkColor4ub class. - // The color black is returned if the color is not found. + /** + * Get the color by name. + * The name is treated as being case-insensitive. + * The color is returned as a vtkColor4ub class. + * The color black is returned if the color is not found. + */ vtkColor4ub GetColor4ub(const vtkStdString & name); - // Description: - // Get the color by name. - // The name is treated as being case-insensitive. - // The color is returned as four unsigned char variables: - // red, green, blue, alpha. The range of each element is 0...255. - // The color black is returned if the color is not found. + /** + * Get the color by name. + * The name is treated as being case-insensitive. + * The color is returned as four unsigned char variables: + * red, green, blue, alpha. The range of each element is 0...255. + * The color black is returned if the color is not found. + */ void GetColor(const vtkStdString & name, unsigned char & r, unsigned char & g, unsigned char & b, unsigned char & a); - // Description: - // Get the color by name. - // The name is treated as being case-insensitive. - // The color is returned as an unsigned char array: - // [red, green, blue, alpha]. The range of each element is 0...255. - // The color black is returned if the color is not found. + /** + * Get the color by name. + * The name is treated as being case-insensitive. + * The color is returned as an unsigned char array: + * [red, green, blue, alpha]. The range of each element is 0...255. + * The color black is returned if the color is not found. + */ void GetColor(const vtkStdString & name, unsigned char rgba[4]); - // Description: - // Get the color by name. - // The name is treated as being case-insensitive. - // The color is returned as a vtkColor4ub class. - // The color black is returned if the color is not found. + /** + * Get the color by name. + * The name is treated as being case-insensitive. + * The color is returned as a vtkColor4ub class. + * The color black is returned if the color is not found. + */ void GetColor(const vtkStdString & name, vtkColor4ub & rgba); - // Description: - // Get the color by name. - // The name is treated as being case-insensitive. - // The color is returned as a vtkColor4d class. - // The color black is returned if the color is not found. + /** + * Get the color by name. + * The name is treated as being case-insensitive. + * The color is returned as a vtkColor4d class. + * The color black is returned if the color is not found. + */ vtkColor4d GetColor4d(const vtkStdString & name); - // Description: - // Get the color by name. - // The name is treated as being case-insensitive. - // The color is returned as four double variables: - // red, green, blue, alpha. The range of each element is 0...1. - // The color black is returned if the color is not found. + /** + * Get the color by name. + * The name is treated as being case-insensitive. + * The color is returned as four double variables: + * red, green, blue, alpha. The range of each element is 0...1. + * The color black is returned if the color is not found. + */ void GetColor(const vtkStdString & name, double & r, double & g, double & b, double & a); - // Description: - // Get the color by name. - // The name is treated as being case-insensitive. - // The color is returned as a double array: - // [red, green, blue, alpha]. The range of each element is 0...1. - // The color black is returned if the color is not found. + /** + * Get the color by name. + * The name is treated as being case-insensitive. + * The color is returned as a double array: + * [red, green, blue, alpha]. The range of each element is 0...1. + * The color black is returned if the color is not found. + */ void GetColor(const vtkStdString & name, double rgba[4]); - // Description: - // Get the color by name. - // The name is treated as being case-insensitive. - // The color is returned as a vtkColor4d class. - // The color black is returned if the color is not found. + /** + * Get the color by name. + * The name is treated as being case-insensitive. + * The color is returned as a vtkColor4d class. + * The color black is returned if the color is not found. + */ void GetColor(const vtkStdString & name, vtkColor4d & rgba); - // Description: - // Get the color by name. - // The name is treated as being case-insensitive. - // The color is returned as a vtkColor3ub class. - // The color black is returned if the color is not found. + /** + * Get the color by name. + * The name is treated as being case-insensitive. + * The color is returned as a vtkColor3ub class. + * The color black is returned if the color is not found. + */ vtkColor3ub GetColor3ub(const vtkStdString & name); - // Description: - // Get the color by name. - // The name is treated as being case-insensitive. - // The color is returned as a vtkColor3d class. - // The color black is returned if the color is not found. + /** + * Get the color by name. + * The name is treated as being case-insensitive. + * The color is returned as a vtkColor3d class. + * The color black is returned if the color is not found. + */ vtkColor3d GetColor3d(const vtkStdString & name); - // Description: - // Get the color by name. - // The name is treated as being case-insensitive. - // The color is returned as three double variables: - // red, green, blue. The range of each element is 0...1. - // The color black is returned if the color is not found. + /** + * Get the color by name. + * The name is treated as being case-insensitive. + * The color is returned as three double variables: + * red, green, blue. The range of each element is 0...1. + * The color black is returned if the color is not found. + */ void GetColor(const vtkStdString & name, double & r, double & g, double & b); - // Description: - // Get the color by name. - // The name is treated as being case-insensitive. - // The color is returned as a double array: - // [red, green, blue]. The range of each element is 0...1. - // The color black is returned if the color is not found. + /** + * Get the color by name. + * The name is treated as being case-insensitive. + * The color is returned as a double array: + * [red, green, blue]. The range of each element is 0...1. + * The color black is returned if the color is not found. + */ void GetColorRGB(const vtkStdString & name, double rgb[3]); - // Description: - // Get the color by name. - // The name is treated as being case-insensitive. - // The color is returned as a vtkColor3ub class. - // The color black is returned if the color is not found. + /** + * Get the color by name. + * The name is treated as being case-insensitive. + * The color is returned as a vtkColor3ub class. + * The color black is returned if the color is not found. + */ void GetColor(const vtkStdString & name, vtkColor3ub & rgb); - // Description: - // Get the color by name. - // The name is treated as being case-insensitive. - // The color is returned as a vtkColor3d class. - // The color black is returned if the color is not found. + /** + * Get the color by name. + * The name is treated as being case-insensitive. + * The color is returned as a vtkColor3d class. + * The color black is returned if the color is not found. + */ void GetColor(const vtkStdString & name, vtkColor3d & rgb); - // Description: - // Set the color by name. - // The name is treated as being case-insensitive. - // The range of each color is 0...255. - // No color is set if the name is empty. + /** + * Set the color by name. + * The name is treated as being case-insensitive. + * The range of each color is 0...255. + * No color is set if the name is empty. + */ virtual void SetColor(const vtkStdString & name, const unsigned char & r, const unsigned char & g, const unsigned char & b, const unsigned char & a = 255); - // Description: - // Set the color by name. - // The name is treated as being case-insensitive. - // The range of each color is 0...1. - // No color is set if the name is empty. + /** + * Set the color by name. + * The name is treated as being case-insensitive. + * The range of each color is 0...1. + * No color is set if the name is empty. + */ virtual void SetColor(const vtkStdString & name, const double & r, const double & g, const double & b, const double & a = 1); - // Description: - // Set the color by name. - // The name is treated as being case-insensitive. - // The color is an unsigned char array: - // [red, green, blue, alpha]. The range of each element is 0...255. - // The user must ensure that the color array size is 4. - // No color is set if the name is empty. + /** + * Set the color by name. + * The name is treated as being case-insensitive. + * The color is an unsigned char array: + * [red, green, blue, alpha]. The range of each element is 0...255. + * The user must ensure that the color array size is 4. + * No color is set if the name is empty. + */ virtual void SetColor(const vtkStdString & name, const unsigned char rgba[4]); - // Description: - // Set the color by name. - // The name is treated as being case-insensitive. - // The color is a vtkColor4ub class. - // No color is set if the name is empty. + /** + * Set the color by name. + * The name is treated as being case-insensitive. + * The color is a vtkColor4ub class. + * No color is set if the name is empty. + */ virtual void SetColor(const vtkStdString & name, const vtkColor4ub & rgba); - // Description: - // Set the color by name. - // The name is treated as being case-insensitive. - // The color is a vtkColor3ub class. - // No color is set if the name is empty. + /** + * Set the color by name. + * The name is treated as being case-insensitive. + * The color is a vtkColor3ub class. + * No color is set if the name is empty. + */ virtual void SetColor(const vtkStdString & name, const vtkColor3ub & rgb); - // Description: - // Set the color by name. - // The name is treated as being case-insensitive. - // The color is a double array: - // [red, green, blue, alpha]. The range of each element is 0...1. - // No color is set if the name is empty. + /** + * Set the color by name. + * The name is treated as being case-insensitive. + * The color is a double array: + * [red, green, blue, alpha]. The range of each element is 0...1. + * No color is set if the name is empty. + */ virtual void SetColor(const vtkStdString & name, const double rgba[4]); - // Description: - // Set the color by name. - // The name is treated as being case-insensitive. - // The color is a vtkColor4d class. - // No color is set if the name is empty. + /** + * Set the color by name. + * The name is treated as being case-insensitive. + * The color is a vtkColor4d class. + * No color is set if the name is empty. + */ virtual void SetColor(const vtkStdString & name, const vtkColor4d & rgba); - // Description: - // Set the color by name. - // The name is treated as being case-insensitive. - // The color is a vtkColor3d class. - // No color is set if the name is empty. + /** + * Set the color by name. + * The name is treated as being case-insensitive. + * The color is a vtkColor3d class. + * No color is set if the name is empty. + */ virtual void SetColor(const vtkStdString & name, const vtkColor3d & rgb); - // Description: - // Remove the color by name. - // The name is treated as being case-insensitive. - // Examples for parsing are provided in: - // TestNamedColors.cxx and TestNamedColorsIntegration.py + /** + * Remove the color by name. + * The name is treated as being case-insensitive. + * Examples for parsing are provided in: + * TestNamedColors.cxx and TestNamedColorsIntegration.py + */ void RemoveColor(const vtkStdString & name); - // Description: - // Return a string of color names with each name - // delimited by a line feed. - // This is easily parsed by the user into whatever - // data structure they require. - // Examples for parsing are provided in: - // TestNamedColors.cxx and TestNamedColorsIntegration.py + /** + * Return a string of color names with each name + * delimited by a line feed. + * This is easily parsed by the user into whatever + * data structure they require. + * Examples for parsing are provided in: + * TestNamedColors.cxx and TestNamedColorsIntegration.py + */ vtkStdString GetColorNames(); - // Description: - // Return a string array of color names. + /** + * Return a string array of color names. + */ void GetColorNames(vtkStringArray * colorNames); - // Description: - // Return a string of synonyms such as - // cyan/aqua and magenta/fuchsia. - // The string is formatted such that a single line feed delimits - // each color in the synonym and a double line feed delimits each - // synonym. - // Warning this could take a long time for very large color maps. - // This is easily parsed by the user into whatever - // data structure they require. + /** + * Return a string of synonyms such as + * cyan/aqua and magenta/fuchsia. + * The string is formatted such that a single line feed delimits + * each color in the synonym and a double line feed delimits each + * synonym. + * Warning this could take a long time for very large color maps. + * This is easily parsed by the user into whatever + * data structure they require. + */ vtkStdString GetSynonyms(); - // Description: - // Return a vtkColor4ub instance from an HTML color string in any of - // the following formats: - // - #RGB - // - #RRGGBB - // - rgb(r, g, b) - // - rgba(r, g, b, a) - // - a CSS3 color name, e.g. "steelblue" - // If the string argument defines a color using one of the above formats - // the method returns the successfully parsed color else returns a color - // equal to `rgba(0, 0, 0, 0)`. + /** + * Return a vtkColor4ub instance from an HTML color string in any of + * the following formats: + * - #RGB + * - #RRGGBB + * - rgb(r, g, b) + * - rgba(r, g, b, a) + * - a CSS3 color name, e.g. "steelblue" + * If the string argument defines a color using one of the above formats + * the method returns the successfully parsed color else returns a color + * equal to `rgba(0, 0, 0, 0)`. + */ vtkColor4ub HTMLColorToRGBA(const vtkStdString& colorString); - // Description: - // Return a vtkColor3ub instance from an HTML color string in any of - // the following formats: - // - #RGB - // - #RRGGBB - // - rgb(r, g, b) - // - rgba(r, g, b, a) - // - a CSS3 color name, e.g. "steelblue" - // If the string argument defines a color using one of the above formats - // the method returns the successfully parsed color else returns the color - // black. + /** + * Return a vtkColor3ub instance from an HTML color string in any of + * the following formats: + * - #RGB + * - #RRGGBB + * - rgb(r, g, b) + * - rgba(r, g, b, a) + * - a CSS3 color name, e.g. "steelblue" + * If the string argument defines a color using one of the above formats + * the method returns the successfully parsed color else returns the color + * black. + */ vtkColor3ub HTMLColorToRGB(const vtkStdString& colorString); - // Description: - // Given a vtkColor3ub instance as input color return a valid HTML color - // string in the `#RRGGBB` format. + /** + * Given a vtkColor3ub instance as input color return a valid HTML color + * string in the `#RRGGBB` format. + */ vtkStdString RGBToHTMLColor(const vtkColor3ub & rgb); - // Description: - // Given a vtkColor4ub instance as input color return a valid HTML color - // string in the `rgba(r, g, b, a)` format. + /** + * Given a vtkColor4ub instance as input color return a valid HTML color + * string in the `rgba(r, g, b, a)` format. + */ vtkStdString RGBAToHTMLColor(const vtkColor4ub & rgba); - // Description: - // Set the color by name. - // The name is treated as being case-insensitive. - // The color must be a valid HTML color string. - // No color is set if the name is empty or if `htmlString` is not a valid - // HTML color string. + /** + * Set the color by name. + * The name is treated as being case-insensitive. + * The color must be a valid HTML color string. + * No color is set if the name is empty or if `htmlString` is not a valid + * HTML color string. + */ void SetColor(const vtkStdString & name, const vtkStdString & htmlString); protected: @@ -355,10 +394,13 @@ protected: ~vtkNamedColors() VTK_OVERRIDE; private: - // Description: - // The implementation of the color map and other required methods. + //@{ + /** + * The implementation of the color map and other required methods. + */ vtkNamedColorsDataStore *Colors; vtkColorStringParser* Parser; + //@} vtkNamedColors(const vtkNamedColors&) VTK_DELETE_FUNCTION; void operator=(const vtkNamedColors&) VTK_DELETE_FUNCTION; diff --git a/Common/ComputationalGeometry/vtkCardinalSpline.h b/Common/ComputationalGeometry/vtkCardinalSpline.h index 71668e1642437019c5650c75be27a20d1fa5bf82..e5f048c3c1e486ec4ed29d63501c250fa3480139 100644 --- a/Common/ComputationalGeometry/vtkCardinalSpline.h +++ b/Common/ComputationalGeometry/vtkCardinalSpline.h @@ -12,16 +12,18 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkCardinalSpline - computes an interpolating spline using a -// a Cardinal basis. - -// .SECTION Description -// vtkCardinalSpline is a concrete implementation of vtkSpline using a -// Cardinal basis. - -// .SECTION See Also -// vtkSpline vtkKochanekSpline - +/** + * @class vtkCardinalSpline + * @brief computes an interpolating spline using a + * a Cardinal basis. + * + * + * vtkCardinalSpline is a concrete implementation of vtkSpline using a + * Cardinal basis. + * + * @sa + * vtkSpline vtkKochanekSpline +*/ #ifndef vtkCardinalSpline_h #define vtkCardinalSpline_h @@ -37,16 +39,19 @@ public: vtkTypeMacro(vtkCardinalSpline,vtkSpline); void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE; - // Description - // Compute Cardinal Splines for each dependent variable + /** + * Compute Cardinal Splines for each dependent variable + */ void Compute () VTK_OVERRIDE; - // Description: - // Evaluate a 1D cardinal spline. + /** + * Evaluate a 1D cardinal spline. + */ double Evaluate (double t) VTK_OVERRIDE; - // Description: - // Deep copy of cardinal spline data. + /** + * Deep copy of cardinal spline data. + */ void DeepCopy(vtkSpline *s) VTK_OVERRIDE; protected: diff --git a/Common/ComputationalGeometry/vtkKochanekSpline.h b/Common/ComputationalGeometry/vtkKochanekSpline.h index b9fedb41b83298997e1cc0f9e0c8f5f80947c559..542ebb283c600f305e841185488156ff739269cd 100644 --- a/Common/ComputationalGeometry/vtkKochanekSpline.h +++ b/Common/ComputationalGeometry/vtkKochanekSpline.h @@ -12,33 +12,35 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkKochanekSpline - computes an interpolating spline using a Kochanek basis. -// .SECTION Description -// Implements the Kochanek interpolating spline described in: Kochanek, D., -// Bartels, R., "Interpolating Splines with Local Tension, Continuity, and -// Bias Control," Computer Graphics, vol. 18, no. 3, pp. 33-41, July 1984. -// These splines give the user more control over the shape of the curve than -// the cardinal splines implemented in vtkCardinalSpline. Three parameters -// can be specified. All have a range from -1 to 1. -// -// Tension controls how sharply the curve bends at an input point. A -// value of -1 produces more slack in the curve. A value of 1 tightens -// the curve. -// -// Continuity controls the continuity of the first derivative at input -// points. -// -// Bias controls the direction of the curve at it passes through an input -// point. A value of -1 undershoots the point while a value of 1 -// overshoots the point. -// -// These three parameters give the user broad control over the shape of -// the interpolating spline. The original Kochanek paper describes the -// effects nicely and is recommended reading. - -// .SECTION See Also -// vtkSpline vtkCardinalSpline - +/** + * @class vtkKochanekSpline + * @brief computes an interpolating spline using a Kochanek basis. + * + * Implements the Kochanek interpolating spline described in: Kochanek, D., + * Bartels, R., "Interpolating Splines with Local Tension, Continuity, and + * Bias Control," Computer Graphics, vol. 18, no. 3, pp. 33-41, July 1984. + * These splines give the user more control over the shape of the curve than + * the cardinal splines implemented in vtkCardinalSpline. Three parameters + * can be specified. All have a range from -1 to 1. + * + * Tension controls how sharply the curve bends at an input point. A + * value of -1 produces more slack in the curve. A value of 1 tightens + * the curve. + * + * Continuity controls the continuity of the first derivative at input + * points. + * + * Bias controls the direction of the curve at it passes through an input + * point. A value of -1 undershoots the point while a value of 1 + * overshoots the point. + * + * These three parameters give the user broad control over the shape of + * the interpolating spline. The original Kochanek paper describes the + * effects nicely and is recommended reading. + * + * @sa + * vtkSpline vtkCardinalSpline +*/ #ifndef vtkKochanekSpline_h #define vtkKochanekSpline_h @@ -52,36 +54,49 @@ public: vtkTypeMacro(vtkKochanekSpline,vtkSpline); void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE; - // Description: - // Construct a KochanekSpline with the following defaults: DefaultBias = 0, - // DefaultTension = 0, DefaultContinuity = 0. + /** + * Construct a KochanekSpline with the following defaults: DefaultBias = 0, + * DefaultTension = 0, DefaultContinuity = 0. + */ static vtkKochanekSpline *New(); - // Description: - // Compute Kochanek Spline coefficients. + /** + * Compute Kochanek Spline coefficients. + */ void Compute () VTK_OVERRIDE; - // Description: - // Evaluate a 1D Kochanek spline. + /** + * Evaluate a 1D Kochanek spline. + */ double Evaluate (double t) VTK_OVERRIDE; - // Description: - // Set the bias for all points. Default is 0. + //@{ + /** + * Set the bias for all points. Default is 0. + */ vtkSetMacro(DefaultBias,double); vtkGetMacro(DefaultBias,double); + //@} - // Description: - // Set the tension for all points. Default is 0. + //@{ + /** + * Set the tension for all points. Default is 0. + */ vtkSetMacro(DefaultTension,double); vtkGetMacro(DefaultTension,double); + //@} - // Description: - // Set the continuity for all points. Default is 0. + //@{ + /** + * Set the continuity for all points. Default is 0. + */ vtkSetMacro(DefaultContinuity,double); vtkGetMacro(DefaultContinuity,double); + //@} - // Description: - // Deep copy of cardinal spline data. + /** + * Deep copy of cardinal spline data. + */ void DeepCopy(vtkSpline *s) VTK_OVERRIDE; protected: diff --git a/Common/ComputationalGeometry/vtkParametricBohemianDome.h b/Common/ComputationalGeometry/vtkParametricBohemianDome.h index da3166cbef44f0f3ede5cc8b63b2cae03ea34767..2cb2f9be0afdae4e24eeb6b02fe2a56056f6158c 100644 --- a/Common/ComputationalGeometry/vtkParametricBohemianDome.h +++ b/Common/ComputationalGeometry/vtkParametricBohemianDome.h @@ -12,15 +12,18 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkParametricBohemianDome - Generate a Bohemian dome. -// .SECTION Description -// vtkParametricBohemianDome generates a parametric Bohemian dome. The Bohemian -// dome is a quartic surface, and is described in much better detail at -// HMC page. -// .SECTION Caveats -// I haven't set any restrictions on the A, B, or C values. -// .SECTION Thanks -// Tim Meehan +/** + * @class vtkParametricBohemianDome + * @brief Generate a Bohemian dome. + * + * vtkParametricBohemianDome generates a parametric Bohemian dome. The Bohemian + * dome is a quartic surface, and is described in much better detail at + * HMC page. + * @warning + * I haven't set any restrictions on the A, B, or C values. + * @par Thanks: + * Tim Meehan +*/ #ifndef vtkParametricBohemianDome_h #define vtkParametricBohemianDome_h @@ -35,10 +38,13 @@ public: vtkTypeMacro(vtkParametricBohemianDome,vtkParametricFunction); void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE; - // Description: - // Construct a Bohemian dome surface with the following parameters: + //@{ + /** + * Construct a Bohemian dome surface with the following parameters: + */ vtkGetMacro(A, double); vtkSetMacro(A, double); + //@} vtkGetMacro(B, double); vtkSetMacro(B, double); @@ -54,22 +60,25 @@ public: // DerivativesAvailable = 1, static vtkParametricBohemianDome *New(); - // Description - // Return the parametric dimension of the class. + /** + * Return the parametric dimension of the class. + */ int GetDimension() VTK_OVERRIDE {return 2;} - // Description: - // BohemianDome surface. - // - // This function performs the mapping \f$f(u,v) \rightarrow (x,y,x)\f$, returning it - // as Pt. It also returns the partial derivatives Du and Dv. - // \f$Pt = (x, y, z), D_u\vec{f} = (dx/du, dy/du, dz/du), D_v\vec{f} = (dx/dv, dy/dv, dz/dv)\f$ . - // Then the normal is \f$N = D_u\vec{f} \times D_v\vec{f}\f$ . + /** + * BohemianDome surface. + + * This function performs the mapping \f$f(u,v) \rightarrow (x,y,x)\f$, returning it + * as Pt. It also returns the partial derivatives Du and Dv. + * \f$Pt = (x, y, z), D_u\vec{f} = (dx/du, dy/du, dz/du), D_v\vec{f} = (dx/dv, dy/dv, dz/dv)\f$ . + * Then the normal is \f$N = D_u\vec{f} \times D_v\vec{f}\f$ . + */ void Evaluate(double uvw[3], double Pt[3], double Duvw[9]) VTK_OVERRIDE; - // Description: - // Calculate a user defined scalar using one or all of uvw, Pt, Duvw. - // This method simply returns 0. + /** + * Calculate a user defined scalar using one or all of uvw, Pt, Duvw. + * This method simply returns 0. + */ double EvaluateScalar(double uvw[3], double Pt[3], double Duvw[9]) VTK_OVERRIDE; protected: diff --git a/Common/ComputationalGeometry/vtkParametricBour.h b/Common/ComputationalGeometry/vtkParametricBour.h index 1d38c0bf7f27639fb71ba02d7d41b7560aceac23..801a9e567b1873a18101c96def548f070b3abe1e 100644 --- a/Common/ComputationalGeometry/vtkParametricBour.h +++ b/Common/ComputationalGeometry/vtkParametricBour.h @@ -12,13 +12,16 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkParametricBour - Generate Bour's minimal surface. -// .SECTION Description -// vtkParametricBour generates Bour's minimal surface parametrically. More -// information can be found at -// Wikipedia. -// .SECTION Thanks -// Tim Meehan +/** + * @class vtkParametricBour + * @brief Generate Bour's minimal surface. + * + * vtkParametricBour generates Bour's minimal surface parametrically. More + * information can be found at + * Wikipedia. + * @par Thanks: + * Tim Meehan +*/ #ifndef vtkParametricBour_h #define vtkParametricBour_h @@ -33,32 +36,36 @@ public: vtkTypeMacro(vtkParametricBour,vtkParametricFunction); void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE; - // Description: - // Construct Bour's minimal surface with the following parameters: - // (MinimumU, MaximumU) = (0., 1.), - // (MinimumV, MaximumV) = (0., 4.*pi), - // JoinU = 0, JoinV = 0, - // TwistU = 0, TwistV = 0; - // ClockwiseOrdering = 1, - // DerivativesAvailable = 1, + /** + * Construct Bour's minimal surface with the following parameters: + * (MinimumU, MaximumU) = (0., 1.), + * (MinimumV, MaximumV) = (0., 4.*pi), + * JoinU = 0, JoinV = 0, + * TwistU = 0, TwistV = 0; + * ClockwiseOrdering = 1, + * DerivativesAvailable = 1, + */ static vtkParametricBour *New(); - // Description - // Return the parametric dimension of the class. + /** + * Return the parametric dimension of the class. + */ int GetDimension() VTK_OVERRIDE {return 2;} - // Description: - // Bour's minimal surface. - // - // This function performs the mapping \f$f(u,v) \rightarrow (x,y,x)\f$, returning it - // as Pt. It also returns the partial derivatives Du and Dv. - // \f$Pt = (x, y, z), D_u\vec{f} = (dx/du, dy/du, dz/du), D_v\vec{f} = (dx/dv, dy/dv, dz/dv)\f$ . - // Then the normal is \f$N = D_u\vec{f} \times D_v\vec{f}\f$ . + /** + * Bour's minimal surface. + + * This function performs the mapping \f$f(u,v) \rightarrow (x,y,x)\f$, returning it + * as Pt. It also returns the partial derivatives Du and Dv. + * \f$Pt = (x, y, z), D_u\vec{f} = (dx/du, dy/du, dz/du), D_v\vec{f} = (dx/dv, dy/dv, dz/dv)\f$ . + * Then the normal is \f$N = D_u\vec{f} \times D_v\vec{f}\f$ . + */ void Evaluate(double uvw[3], double Pt[3], double Duvw[9]) VTK_OVERRIDE; - // Description: - // Calculate a user defined scalar using one or all of uvw, Pt, Duvw. - // This method simply returns 0. + /** + * Calculate a user defined scalar using one or all of uvw, Pt, Duvw. + * This method simply returns 0. + */ double EvaluateScalar(double uvw[3], double Pt[3], double Duvw[9]) VTK_OVERRIDE; protected: diff --git a/Common/ComputationalGeometry/vtkParametricBoy.h b/Common/ComputationalGeometry/vtkParametricBoy.h index d71e2f2c20b4ceffc53416658823070b90cc5ed1..7c118fbb3058266f99741219a7e765793c5e1da9 100644 --- a/Common/ComputationalGeometry/vtkParametricBoy.h +++ b/Common/ComputationalGeometry/vtkParametricBoy.h @@ -12,20 +12,24 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkParametricBoy - Generate Boy's surface. -// .SECTION Description -// vtkParametricBoy generates Boy's surface. -// This is a Model of the projective plane without singularities. -// It was found by Werner Boy on assignment from David Hilbert. -// -// For further information about this surface, please consult the -// technical description "Parametric surfaces" in http://www.vtk.org/publications -// in the "VTK Technical Documents" section in the VTk.org web pages. -// -// .SECTION Thanks -// Andrew Maclean andrew.amaclean@gmail.com for creating and contributing the -// class. -// +/** + * @class vtkParametricBoy + * @brief Generate Boy's surface. + * + * vtkParametricBoy generates Boy's surface. + * This is a Model of the projective plane without singularities. + * It was found by Werner Boy on assignment from David Hilbert. + * + * For further information about this surface, please consult the + * technical description "Parametric surfaces" in http://www.vtk.org/publications + * in the "VTK Technical Documents" section in the VTk.org web pages. + * + * @par Thanks: + * Andrew Maclean andrew.amaclean@gmail.com for creating and contributing the + * class. + * +*/ + #ifndef vtkParametricBoy_h #define vtkParametricBoy_h @@ -39,48 +43,55 @@ public: vtkTypeMacro(vtkParametricBoy,vtkParametricFunction); void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE; - // Description: - // Construct Boy's surface with the following parameters: - // MinimumU = 0, MaximumU = Pi, - // MinimumV = 0, MaximumV = Pi, - // JoinU = 1, JoinV = 1, - // TwistU = 1, TwistV = 1; - // ClockwiseOrdering = 1, - // DerivativesAvailable = 1, - // ZScale = 0.125. + /** + * Construct Boy's surface with the following parameters: + * MinimumU = 0, MaximumU = Pi, + * MinimumV = 0, MaximumV = Pi, + * JoinU = 1, JoinV = 1, + * TwistU = 1, TwistV = 1; + * ClockwiseOrdering = 1, + * DerivativesAvailable = 1, + * ZScale = 0.125. + */ static vtkParametricBoy *New(); - // Description - // Return the parametric dimension of the class. + /** + * Return the parametric dimension of the class. + */ int GetDimension() VTK_OVERRIDE {return 2;} - // Description: - // Set/Get the scale factor for the z-coordinate. - // Default is 1/8, giving a nice shape. + //@{ + /** + * Set/Get the scale factor for the z-coordinate. + * Default is 1/8, giving a nice shape. + */ vtkSetMacro(ZScale,double); vtkGetMacro(ZScale,double); + //@} + + /** + * Boy's surface. - // Description: - // Boy's surface. - // - // This function performs the mapping \f$f(u,v) \rightarrow (x,y,x)\f$, returning it - // as Pt. It also returns the partial derivatives Du and Dv. - // \f$Pt = (x, y, z), Du = (dx/du, dy/du, dz/du), Dv = (dx/dv, dy/dv, dz/dv)\f$ . - // Then the normal is \f$N = Du X Dv\f$ . + * This function performs the mapping \f$f(u,v) \rightarrow (x,y,x)\f$, returning it + * as Pt. It also returns the partial derivatives Du and Dv. + * \f$Pt = (x, y, z), Du = (dx/du, dy/du, dz/du), Dv = (dx/dv, dy/dv, dz/dv)\f$ . + * Then the normal is \f$N = Du X Dv\f$ . + */ void Evaluate(double uvw[3], double Pt[3], double Duvw[9]) VTK_OVERRIDE; - // Description: - // Calculate a user defined scalar using one or all of uvw, Pt, Duvw. - // - // uvw are the parameters with Pt being the the cartesian point, - // Duvw are the derivatives of this point with respect to u, v and w. - // Pt, Duvw are obtained from Evaluate(). - // - // This function is only called if the ScalarMode has the value - // vtkParametricFunctionSource::SCALAR_FUNCTION_DEFINED - // - // If the user does not need to calculate a scalar, then the - // instantiated function should return zero. + /** + * Calculate a user defined scalar using one or all of uvw, Pt, Duvw. + + * uvw are the parameters with Pt being the the cartesian point, + * Duvw are the derivatives of this point with respect to u, v and w. + * Pt, Duvw are obtained from Evaluate(). + + * This function is only called if the ScalarMode has the value + * vtkParametricFunctionSource::SCALAR_FUNCTION_DEFINED + + * If the user does not need to calculate a scalar, then the + * instantiated function should return zero. + */ double EvaluateScalar(double uvw[3], double Pt[3], double Duvw[9]) VTK_OVERRIDE; protected: diff --git a/Common/ComputationalGeometry/vtkParametricCatalanMinimal.h b/Common/ComputationalGeometry/vtkParametricCatalanMinimal.h index 4749d8123ade8524e1e5c3484139819dd2cff81e..8753256a380ce7452281871a1d91455c828028eb 100644 --- a/Common/ComputationalGeometry/vtkParametricCatalanMinimal.h +++ b/Common/ComputationalGeometry/vtkParametricCatalanMinimal.h @@ -12,14 +12,17 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkParametricCatalanMinimal - Generate Catalan's minimal surface. -// .SECTION Description -// vtkParametricCatalanMinimal generates Catalan's minimal surface -// parametrically. This minimal surface contains the cycloid as a geodesic. -// More information about it can be found at -// Wikipedia. -// .SECTION Thanks -// Tim Meehan +/** + * @class vtkParametricCatalanMinimal + * @brief Generate Catalan's minimal surface. + * + * vtkParametricCatalanMinimal generates Catalan's minimal surface + * parametrically. This minimal surface contains the cycloid as a geodesic. + * More information about it can be found at + * Wikipedia. + * @par Thanks: + * Tim Meehan +*/ #ifndef vtkParametricCatalanMinimal_h #define vtkParametricCatalanMinimal_h @@ -34,32 +37,36 @@ public: vtkTypeMacro(vtkParametricCatalanMinimal,vtkParametricFunction); void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE; - // Description: - // Construct Catalan's minimal surface with the following parameters: - // (MinimumU, MaximumU) = (-4.*pi, 4.*pi), - // (MinimumV, MaximumV) = (-1.5, 1.5), - // JoinU = 0, JoinV = 0, - // TwistU = 0, TwistV = 0; - // ClockwiseOrdering = 1, - // DerivativesAvailable = 1, + /** + * Construct Catalan's minimal surface with the following parameters: + * (MinimumU, MaximumU) = (-4.*pi, 4.*pi), + * (MinimumV, MaximumV) = (-1.5, 1.5), + * JoinU = 0, JoinV = 0, + * TwistU = 0, TwistV = 0; + * ClockwiseOrdering = 1, + * DerivativesAvailable = 1, + */ static vtkParametricCatalanMinimal *New(); - // Description - // Return the parametric dimension of the class. + /** + * Return the parametric dimension of the class. + */ int GetDimension() VTK_OVERRIDE {return 2;} - // Description: - // Catalan's minimal surface. - // - // This function performs the mapping \f$f(u,v) \rightarrow (x,y,x)\f$, returning it - // as Pt. It also returns the partial derivatives Du and Dv. - // \f$Pt = (x, y, z), D_u\vec{f} = (dx/du, dy/du, dz/du), D_v\vec{f} = (dx/dv, dy/dv, dz/dv)\f$ . - // Then the normal is \f$N = D_u\vec{f} \times D_v\vec{f}\f$ . + /** + * Catalan's minimal surface. + + * This function performs the mapping \f$f(u,v) \rightarrow (x,y,x)\f$, returning it + * as Pt. It also returns the partial derivatives Du and Dv. + * \f$Pt = (x, y, z), D_u\vec{f} = (dx/du, dy/du, dz/du), D_v\vec{f} = (dx/dv, dy/dv, dz/dv)\f$ . + * Then the normal is \f$N = D_u\vec{f} \times D_v\vec{f}\f$ . + */ void Evaluate(double uvw[3], double Pt[3], double Duvw[9]) VTK_OVERRIDE; - // Description: - // Calculate a user defined scalar using one or all of uvw, Pt, Duvw. - // This method simply returns 0. + /** + * Calculate a user defined scalar using one or all of uvw, Pt, Duvw. + * This method simply returns 0. + */ double EvaluateScalar(double uvw[3], double Pt[3], double Duvw[9]) VTK_OVERRIDE; protected: diff --git a/Common/ComputationalGeometry/vtkParametricConicSpiral.h b/Common/ComputationalGeometry/vtkParametricConicSpiral.h index b30f25f3ab47ca06d2abdde332fb769557242cf9..17369283892fca0d2e44c8752fb44e33f4dc0cc1 100644 --- a/Common/ComputationalGeometry/vtkParametricConicSpiral.h +++ b/Common/ComputationalGeometry/vtkParametricConicSpiral.h @@ -12,19 +12,23 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkParametricConicSpiral - Generate conic spiral surfaces that resemble sea-shells. -// .SECTION Description -// vtkParametricConicSpiral generates conic spiral surfaces. These can resemble sea shells, or -// may look like a torus "eating" its own tail. -// -// For further information about this surface, please consult the -// technical description "Parametric surfaces" in http://www.vtk.org/publications -// in the "VTK Technical Documents" section in the VTk.org web pages. -// -// .SECTION Thanks -// Andrew Maclean andrew.amaclean@gmail.com for creating and contributing the -// class. -// +/** + * @class vtkParametricConicSpiral + * @brief Generate conic spiral surfaces that resemble sea-shells. + * + * vtkParametricConicSpiral generates conic spiral surfaces. These can resemble sea shells, or + * may look like a torus "eating" its own tail. + * + * For further information about this surface, please consult the + * technical description "Parametric surfaces" in http://www.vtk.org/publications + * in the "VTK Technical Documents" section in the VTk.org web pages. + * + * @par Thanks: + * Andrew Maclean andrew.amaclean@gmail.com for creating and contributing the + * class. + * +*/ + #ifndef vtkParametricConicSpiral_h #define vtkParametricConicSpiral_h @@ -37,69 +41,85 @@ public: vtkTypeMacro(vtkParametricConicSpiral,vtkParametricFunction); void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE; - // Description: - // Construct a conic spiral surface with the following parameters: - // MinimumU = 0, MaximumU = 2Pi, - // MinimumV = 0, MaximumV = 2Pi, - // JoinU = 0, JoinV = 0, - // TwistU = 0, TwistV = 0, - // ClockwiseOrdering = 1, - // DerivativesAvailable = 1, - // A = 0.2, B = 1.0, C = 0.1, N = 2. + /** + * Construct a conic spiral surface with the following parameters: + * MinimumU = 0, MaximumU = 2Pi, + * MinimumV = 0, MaximumV = 2Pi, + * JoinU = 0, JoinV = 0, + * TwistU = 0, TwistV = 0, + * ClockwiseOrdering = 1, + * DerivativesAvailable = 1, + * A = 0.2, B = 1.0, C = 0.1, N = 2. + */ static vtkParametricConicSpiral *New(); - // Description - // Return the parametric dimension of the class. + /** + * Return the parametric dimension of the class. + */ int GetDimension() VTK_OVERRIDE {return 2;} - // Description: - // Set/Get the scale factor. - // Default = 0.2 + //@{ + /** + * Set/Get the scale factor. + * Default = 0.2 + */ vtkSetMacro(A,double); vtkGetMacro(A,double); - - // Description: - // Set/Get the A function coefficient. - // See the definition in Parametric surfaces referred to above. - // Default is 1. + //@} + + //@{ + /** + * Set/Get the A function coefficient. + * See the definition in Parametric surfaces referred to above. + * Default is 1. + */ vtkSetMacro(B,double); vtkGetMacro(B,double); - - // Description: - // Set/Get the B function coefficient. - // See the definition in Parametric surfaces referred to above. - // Default is 0.1. + //@} + + //@{ + /** + * Set/Get the B function coefficient. + * See the definition in Parametric surfaces referred to above. + * Default is 0.1. + */ vtkSetMacro(C,double); vtkGetMacro(C,double); - - // Description: - // Set/Get the C function coefficient. - // See the definition in Parametric surfaces referred to above. - // Default is 2. + //@} + + //@{ + /** + * Set/Get the C function coefficient. + * See the definition in Parametric surfaces referred to above. + * Default is 2. + */ vtkSetMacro(N,double); vtkGetMacro(N,double); + //@} - // Description: - // A conic spiral surface. - // - // This function performs the mapping \f$f(u,v) \rightarrow (x,y,x)\f$, returning it - // as Pt. It also returns the partial derivatives Du and Dv. - // \f$Pt = (x, y, z), Du = (dx/du, dy/du, dz/du), Dv = (dx/dv, dy/dv, dz/dv)\f$ . - // Then the normal is \f$N = Du X Dv\f$ . + /** + * A conic spiral surface. + + * This function performs the mapping \f$f(u,v) \rightarrow (x,y,x)\f$, returning it + * as Pt. It also returns the partial derivatives Du and Dv. + * \f$Pt = (x, y, z), Du = (dx/du, dy/du, dz/du), Dv = (dx/dv, dy/dv, dz/dv)\f$ . + * Then the normal is \f$N = Du X Dv\f$ . + */ void Evaluate(double uvw[3], double Pt[3], double Duvw[9]) VTK_OVERRIDE; - // Description: - // Calculate a user defined scalar using one or all of uvw, Pt, Duvw. - // - // uvw are the parameters with Pt being the the cartesian point, - // Duvw are the derivatives of this point with respect to u, v and w. - // Pt, Duvw are obtained from Evaluate(). - // - // This function is only called if the ScalarMode has the value - // vtkParametricFunctionSource::SCALAR_FUNCTION_DEFINED - // - // If the user does not need to calculate a scalar, then the - // instantiated function should return zero. + /** + * Calculate a user defined scalar using one or all of uvw, Pt, Duvw. + + * uvw are the parameters with Pt being the the cartesian point, + * Duvw are the derivatives of this point with respect to u, v and w. + * Pt, Duvw are obtained from Evaluate(). + + * This function is only called if the ScalarMode has the value + * vtkParametricFunctionSource::SCALAR_FUNCTION_DEFINED + + * If the user does not need to calculate a scalar, then the + * instantiated function should return zero. + */ double EvaluateScalar(double uvw[3], double Pt[3], double Duvw[9]) VTK_OVERRIDE; protected: diff --git a/Common/ComputationalGeometry/vtkParametricCrossCap.h b/Common/ComputationalGeometry/vtkParametricCrossCap.h index 74cead729b6fee528f01f6aef370a18aff77dc01..7e0f31a3746099dc324a413d20889971df9bb991 100644 --- a/Common/ComputationalGeometry/vtkParametricCrossCap.h +++ b/Common/ComputationalGeometry/vtkParametricCrossCap.h @@ -12,20 +12,24 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkParametricCrossCap - Generate a cross-cap. -// .SECTION Description -// vtkParametricCrossCap generates a cross-cap which is a -// non-orientable self-intersecting single-sided surface. -// This is one possible image of a projective plane in three-space. -// -// For further information about this surface, please consult the -// technical description "Parametric surfaces" in http://www.vtk.org/publications -// in the "VTK Technical Documents" section in the VTk.org web pages. -// -// .SECTION Thanks -// Andrew Maclean andrew.amaclean@gmail.com for creating and contributing the -// class. -// +/** + * @class vtkParametricCrossCap + * @brief Generate a cross-cap. + * + * vtkParametricCrossCap generates a cross-cap which is a + * non-orientable self-intersecting single-sided surface. + * This is one possible image of a projective plane in three-space. + * + * For further information about this surface, please consult the + * technical description "Parametric surfaces" in http://www.vtk.org/publications + * in the "VTK Technical Documents" section in the VTk.org web pages. + * + * @par Thanks: + * Andrew Maclean andrew.amaclean@gmail.com for creating and contributing the + * class. + * +*/ + #ifndef vtkParametricCrossCap_h #define vtkParametricCrossCap_h @@ -39,41 +43,45 @@ public: vtkTypeMacro(vtkParametricCrossCap,vtkParametricFunction); void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE; - // Description: - // Construct a cross-cap with the following parameters: - // MinimumU = 0, MaximumU = Pi, - // MinimumV = 0, MaximumV = Pi, - // JoinU = 1, JoinV = 1, - // TwistU = 1, TwistV = 1; - // ClockwiseOrdering = 1, - // DerivativesAvailable = 1 + /** + * Construct a cross-cap with the following parameters: + * MinimumU = 0, MaximumU = Pi, + * MinimumV = 0, MaximumV = Pi, + * JoinU = 1, JoinV = 1, + * TwistU = 1, TwistV = 1; + * ClockwiseOrdering = 1, + * DerivativesAvailable = 1 + */ static vtkParametricCrossCap *New(); - // Description - // Return the parametric dimension of the class. + /** + * Return the parametric dimension of the class. + */ int GetDimension() VTK_OVERRIDE {return 2;} - // Description: - // A cross-cap. - // - // This function performs the mapping \f$f(u,v) \rightarrow (x,y,x)\f$, returning it - // as Pt. It also returns the partial derivatives Du and Dv. - // \f$Pt = (x, y, z), Du = (dx/du, dy/du, dz/du), Dv = (dx/dv, dy/dv, dz/dv)\f$ . - // Then the normal is \f$N = Du X Dv\f$ . + /** + * A cross-cap. + + * This function performs the mapping \f$f(u,v) \rightarrow (x,y,x)\f$, returning it + * as Pt. It also returns the partial derivatives Du and Dv. + * \f$Pt = (x, y, z), Du = (dx/du, dy/du, dz/du), Dv = (dx/dv, dy/dv, dz/dv)\f$ . + * Then the normal is \f$N = Du X Dv\f$ . + */ void Evaluate(double uvw[3], double Pt[3], double Duvw[9]) VTK_OVERRIDE; - // Description: - // Calculate a user defined scalar using one or all of uvw, Pt, Duvw. - // - // uvw are the parameters with Pt being the the cartesian point, - // Duvw are the derivatives of this point with respect to u, v and w. - // Pt, Duvw are obtained from Evaluate(). - // - // This function is only called if the ScalarMode has the value - // vtkParametricFunctionSource::SCALAR_FUNCTION_DEFINED - // - // If the user does not need to calculate a scalar, then the - // instantiated function should return zero. + /** + * Calculate a user defined scalar using one or all of uvw, Pt, Duvw. + + * uvw are the parameters with Pt being the the cartesian point, + * Duvw are the derivatives of this point with respect to u, v and w. + * Pt, Duvw are obtained from Evaluate(). + + * This function is only called if the ScalarMode has the value + * vtkParametricFunctionSource::SCALAR_FUNCTION_DEFINED + + * If the user does not need to calculate a scalar, then the + * instantiated function should return zero. + */ double EvaluateScalar(double uvw[3], double Pt[3], double Duvw[9]) VTK_OVERRIDE; protected: diff --git a/Common/ComputationalGeometry/vtkParametricDini.h b/Common/ComputationalGeometry/vtkParametricDini.h index 75d03c3cc82bf10d7cf3465bbe4588c9e210c4e3..e4be4ef8bc67f8d770ccea594da17a9e6907ce4a 100644 --- a/Common/ComputationalGeometry/vtkParametricDini.h +++ b/Common/ComputationalGeometry/vtkParametricDini.h @@ -12,20 +12,24 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkParametricDini - Generate Dini's surface. -// .SECTION Description -// vtkParametricDini generates Dini's surface. -// Dini's surface is a surface that possesses constant negative -// Gaussian curvature -// -// For further information about this surface, please consult the -// technical description "Parametric surfaces" in http://www.vtk.org/publications -// in the "VTK Technical Documents" section in the VTk.org web pages. -// -// .SECTION Thanks -// Andrew Maclean andrew.amaclean@gmail.com for creating and contributing the -// class. -// +/** + * @class vtkParametricDini + * @brief Generate Dini's surface. + * + * vtkParametricDini generates Dini's surface. + * Dini's surface is a surface that possesses constant negative + * Gaussian curvature + * + * For further information about this surface, please consult the + * technical description "Parametric surfaces" in http://www.vtk.org/publications + * in the "VTK Technical Documents" section in the VTk.org web pages. + * + * @par Thanks: + * Andrew Maclean andrew.amaclean@gmail.com for creating and contributing the + * class. + * +*/ + #ifndef vtkParametricDini_h #define vtkParametricDini_h @@ -39,56 +43,66 @@ public: vtkTypeMacro(vtkParametricDini,vtkParametricFunction); void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE; - // Description: - // Construct Dini's surface with the following parameters: - // MinimumU = 0, MaximumU = 4*Pi, - // MinimumV = 0.001, MaximumV = 2, - // JoinU = 0, JoinV = 0, - // TwistU = 0, TwistV = 0, - // ClockwiseOrdering = 1, - // DerivativesAvailable = 1 - // A = 1, B = 0.2 + /** + * Construct Dini's surface with the following parameters: + * MinimumU = 0, MaximumU = 4*Pi, + * MinimumV = 0.001, MaximumV = 2, + * JoinU = 0, JoinV = 0, + * TwistU = 0, TwistV = 0, + * ClockwiseOrdering = 1, + * DerivativesAvailable = 1 + * A = 1, B = 0.2 + */ static vtkParametricDini *New(); - // Description - // Return the parametric dimension of the class. + /** + * Return the parametric dimension of the class. + */ int GetDimension() VTK_OVERRIDE {return 2;} - // Description: - // Set/Get the scale factor. - // See the definition in Parametric surfaces referred to above. - // Default is 1. + //@{ + /** + * Set/Get the scale factor. + * See the definition in Parametric surfaces referred to above. + * Default is 1. + */ vtkSetMacro(A,double); vtkGetMacro(A,double); - - // Description: - // Set/Get the scale factor. - // See the definition in Parametric surfaces referred to above. - // Default is 0.2 + //@} + + //@{ + /** + * Set/Get the scale factor. + * See the definition in Parametric surfaces referred to above. + * Default is 0.2 + */ vtkSetMacro(B,double); vtkGetMacro(B,double); + //@} + + /** + * Dini's surface. - // Description: - // Dini's surface. - // - // This function performs the mapping \f$f(u,v) \rightarrow (x,y,x)\f$, returning it - // as Pt. It also returns the partial derivatives Du and Dv. - // \f$Pt = (x, y, z), Du = (dx/du, dy/du, dz/du), Dv = (dx/dv, dy/dv, dz/dv)\f$ . - // Then the normal is \f$N = Du X Dv\f$ . + * This function performs the mapping \f$f(u,v) \rightarrow (x,y,x)\f$, returning it + * as Pt. It also returns the partial derivatives Du and Dv. + * \f$Pt = (x, y, z), Du = (dx/du, dy/du, dz/du), Dv = (dx/dv, dy/dv, dz/dv)\f$ . + * Then the normal is \f$N = Du X Dv\f$ . + */ void Evaluate(double uvw[3], double Pt[3], double Duvw[9]) VTK_OVERRIDE; - // Description: - // Calculate a user defined scalar using one or all of uvw, Pt, Duvw. - // - // uvw are the parameters with Pt being the the cartesian point, - // Duvw are the derivatives of this point with respect to u, v and w. - // Pt, Duvw are obtained from Evaluate(). - // - // This function is only called if the ScalarMode has the value - // vtkParametricFunctionSource::SCALAR_FUNCTION_DEFINED - // - // If the user does not need to calculate a scalar, then the - // instantiated function should return zero. + /** + * Calculate a user defined scalar using one or all of uvw, Pt, Duvw. + + * uvw are the parameters with Pt being the the cartesian point, + * Duvw are the derivatives of this point with respect to u, v and w. + * Pt, Duvw are obtained from Evaluate(). + + * This function is only called if the ScalarMode has the value + * vtkParametricFunctionSource::SCALAR_FUNCTION_DEFINED + + * If the user does not need to calculate a scalar, then the + * instantiated function should return zero. + */ double EvaluateScalar(double uvw[3], double Pt[3], double Duvw[9]) VTK_OVERRIDE; protected: diff --git a/Common/ComputationalGeometry/vtkParametricEllipsoid.h b/Common/ComputationalGeometry/vtkParametricEllipsoid.h index ca170231ec4b2ce95165ca8e52b3d2f4d0d8143c..32912f2315acf76cd3d3d3702d01fb70b83d5244 100644 --- a/Common/ComputationalGeometry/vtkParametricEllipsoid.h +++ b/Common/ComputationalGeometry/vtkParametricEllipsoid.h @@ -12,23 +12,27 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkParametricEllipsoid - Generate an ellipsoid. -// .SECTION Description -// vtkParametricEllipsoid generates an ellipsoid. -// If all the radii are the same, we have a sphere. -// An oblate spheroid occurs if RadiusX = RadiusY > RadiusZ. -// Here the Z-axis forms the symmetry axis. To a first -// approximation, this is the shape of the earth. -// A prolate spheroid occurs if RadiusX = RadiusY < RadiusZ. -// -// For further information about this surface, please consult the -// technical description "Parametric surfaces" in http://www.vtk.org/publications -// in the "VTK Technical Documents" section in the VTk.org web pages. -// -// .SECTION Thanks -// Andrew Maclean andrew.amaclean@gmail.com for creating and contributing the -// class. -// +/** + * @class vtkParametricEllipsoid + * @brief Generate an ellipsoid. + * + * vtkParametricEllipsoid generates an ellipsoid. + * If all the radii are the same, we have a sphere. + * An oblate spheroid occurs if RadiusX = RadiusY > RadiusZ. + * Here the Z-axis forms the symmetry axis. To a first + * approximation, this is the shape of the earth. + * A prolate spheroid occurs if RadiusX = RadiusY < RadiusZ. + * + * For further information about this surface, please consult the + * technical description "Parametric surfaces" in http://www.vtk.org/publications + * in the "VTK Technical Documents" section in the VTk.org web pages. + * + * @par Thanks: + * Andrew Maclean andrew.amaclean@gmail.com for creating and contributing the + * class. + * +*/ + #ifndef vtkParametricEllipsoid_h #define vtkParametricEllipsoid_h @@ -41,58 +45,71 @@ public: vtkTypeMacro(vtkParametricEllipsoid,vtkParametricFunction); void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE; - // Description: - // Construct an ellipsoid with the following parameters: - // MinimumU = 0, MaximumU = 2*Pi, - // MinimumV = 0, MaximumV = Pi, - // JoinU = 1, JoinV = 0, - // TwistU = 0, TwistV = 0, - // ClockwiseOrdering = 1, - // DerivativesAvailable = 1, - // XRadius = 1, YRadius = 1, - // ZRadius = 1, a sphere in this case. + /** + * Construct an ellipsoid with the following parameters: + * MinimumU = 0, MaximumU = 2*Pi, + * MinimumV = 0, MaximumV = Pi, + * JoinU = 1, JoinV = 0, + * TwistU = 0, TwistV = 0, + * ClockwiseOrdering = 1, + * DerivativesAvailable = 1, + * XRadius = 1, YRadius = 1, + * ZRadius = 1, a sphere in this case. + */ static vtkParametricEllipsoid *New(); - // Description - // Return the parametric dimension of the class. + /** + * Return the parametric dimension of the class. + */ int GetDimension() VTK_OVERRIDE {return 2;} - // Description: - // Set/Get the scaling factor for the x-axis. Default is 1. + //@{ + /** + * Set/Get the scaling factor for the x-axis. Default is 1. + */ vtkSetMacro(XRadius,double); vtkGetMacro(XRadius,double); + //@} - // Description: - // Set/Get the scaling factor for the y-axis. Default is 1. + //@{ + /** + * Set/Get the scaling factor for the y-axis. Default is 1. + */ vtkSetMacro(YRadius,double); vtkGetMacro(YRadius,double); + //@} - // Description: - // Set/Get the scaling factor for the z-axis. Default is 1. + //@{ + /** + * Set/Get the scaling factor for the z-axis. Default is 1. + */ vtkSetMacro(ZRadius,double); vtkGetMacro(ZRadius,double); + //@} + + /** + * An ellipsoid. - // Description: - // An ellipsoid. - // - // This function performs the mapping \f$f(u,v) \rightarrow (x,y,x)\f$, returning it - // as Pt. It also returns the partial derivatives Du and Dv. - // \f$Pt = (x, y, z), Du = (dx/du, dy/du, dz/du), Dv = (dx/dv, dy/dv, dz/dv)\f$ . - // Then the normal is \f$N = Du X Dv\f$ . + * This function performs the mapping \f$f(u,v) \rightarrow (x,y,x)\f$, returning it + * as Pt. It also returns the partial derivatives Du and Dv. + * \f$Pt = (x, y, z), Du = (dx/du, dy/du, dz/du), Dv = (dx/dv, dy/dv, dz/dv)\f$ . + * Then the normal is \f$N = Du X Dv\f$ . + */ void Evaluate(double uvw[3], double Pt[3], double Duvw[9]) VTK_OVERRIDE; - // Description: - // Calculate a user defined scalar using one or all of uvw, Pt, Duvw. - // - // uvw are the parameters with Pt being the the cartesian point, - // Duvw are the derivatives of this point with respect to u, v and w. - // Pt, Duvw are obtained from Evaluate(). - // - // This function is only called if the ScalarMode has the value - // vtkParametricFunctionSource::SCALAR_FUNCTION_DEFINED - // - // If the user does not need to calculate a scalar, then the - // instantiated function should return zero. + /** + * Calculate a user defined scalar using one or all of uvw, Pt, Duvw. + + * uvw are the parameters with Pt being the the cartesian point, + * Duvw are the derivatives of this point with respect to u, v and w. + * Pt, Duvw are obtained from Evaluate(). + + * This function is only called if the ScalarMode has the value + * vtkParametricFunctionSource::SCALAR_FUNCTION_DEFINED + + * If the user does not need to calculate a scalar, then the + * instantiated function should return zero. + */ double EvaluateScalar(double uvw[3], double Pt[3], double Duvw[9]) VTK_OVERRIDE; protected: diff --git a/Common/ComputationalGeometry/vtkParametricEnneper.h b/Common/ComputationalGeometry/vtkParametricEnneper.h index 75798b1b61065070e92458ac08310212711b4107..3788745c49051e9452396e43b5027c88adb152c2 100644 --- a/Common/ComputationalGeometry/vtkParametricEnneper.h +++ b/Common/ComputationalGeometry/vtkParametricEnneper.h @@ -12,20 +12,24 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkParametricEnneper - Generate Enneper's surface. -// .SECTION Description -// vtkParametricEnneper generates Enneper's surface. -// Enneper's surface is a a self-intersecting minimal surface -// possessing constant negative Gaussian curvature -// -// For further information about this surface, please consult the -// technical description "Parametric surfaces" in http://www.vtk.org/publications -// in the "VTK Technical Documents" section in the VTk.org web pages. -// -// .SECTION Thanks -// Andrew Maclean andrew.amaclean@gmail.com for creating and contributing the -// class. -// +/** + * @class vtkParametricEnneper + * @brief Generate Enneper's surface. + * + * vtkParametricEnneper generates Enneper's surface. + * Enneper's surface is a a self-intersecting minimal surface + * possessing constant negative Gaussian curvature + * + * For further information about this surface, please consult the + * technical description "Parametric surfaces" in http://www.vtk.org/publications + * in the "VTK Technical Documents" section in the VTk.org web pages. + * + * @par Thanks: + * Andrew Maclean andrew.amaclean@gmail.com for creating and contributing the + * class. + * +*/ + #ifndef vtkParametricEnneper_h #define vtkParametricEnneper_h @@ -39,41 +43,45 @@ public: vtkTypeMacro(vtkParametricEnneper,vtkParametricFunction); void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE; - // Description: - // Construct Enneper's surface with the following parameters: - // MinimumU = -2, MaximumU = 2, - // MinimumV = -2, MaximumV = 2, - // JoinU = 0, JoinV = 0, - // TwistU = 0, TwistV = 0, - // ClockwiseOrdering = 1, - // DerivativesAvailable = 1 + /** + * Construct Enneper's surface with the following parameters: + * MinimumU = -2, MaximumU = 2, + * MinimumV = -2, MaximumV = 2, + * JoinU = 0, JoinV = 0, + * TwistU = 0, TwistV = 0, + * ClockwiseOrdering = 1, + * DerivativesAvailable = 1 + */ static vtkParametricEnneper *New(); - // Description - // Return the parametric dimension of the class. + /** + * Return the parametric dimension of the class. + */ int GetDimension() VTK_OVERRIDE {return 2;} - // Description: - // Enneper's surface. - // - // This function performs the mapping \f$f(u,v) \rightarrow (x,y,x)\f$, returning it - // as Pt. It also returns the partial derivatives Du and Dv. - // \f$Pt = (x, y, z), Du = (dx/du, dy/du, dz/du), Dv = (dx/dv, dy/dv, dz/dv)\f$ . - // Then the normal is \f$N = Du X Dv\f$ . + /** + * Enneper's surface. + + * This function performs the mapping \f$f(u,v) \rightarrow (x,y,x)\f$, returning it + * as Pt. It also returns the partial derivatives Du and Dv. + * \f$Pt = (x, y, z), Du = (dx/du, dy/du, dz/du), Dv = (dx/dv, dy/dv, dz/dv)\f$ . + * Then the normal is \f$N = Du X Dv\f$ . + */ void Evaluate(double uvw[3], double Pt[3], double Duvw[9]) VTK_OVERRIDE; - // Description: - // Calculate a user defined scalar using one or all of uvw, Pt, Duvw. - // - // uv are the parameters with Pt being the the cartesian point, - // Duvw are the derivatives of this point with respect to u, v and w. - // Pt, Duvw are obtained from Evaluate(). - // - // This function is only called if the ScalarMode has the value - // vtkParametricFunctionSource::SCALAR_FUNCTION_DEFINED - // - // If the user does not need to calculate a scalar, then the - // instantiated function should return zero. + /** + * Calculate a user defined scalar using one or all of uvw, Pt, Duvw. + + * uv are the parameters with Pt being the the cartesian point, + * Duvw are the derivatives of this point with respect to u, v and w. + * Pt, Duvw are obtained from Evaluate(). + + * This function is only called if the ScalarMode has the value + * vtkParametricFunctionSource::SCALAR_FUNCTION_DEFINED + + * If the user does not need to calculate a scalar, then the + * instantiated function should return zero. + */ double EvaluateScalar(double uvw[3], double Pt[3], double Duvw[9]) VTK_OVERRIDE; protected: diff --git a/Common/ComputationalGeometry/vtkParametricFigure8Klein.h b/Common/ComputationalGeometry/vtkParametricFigure8Klein.h index 0f20b9b3acb764097f12d0f743ffd7b17773d10a..18d8df845b808aa012602c3c4667d20b238872ac 100644 --- a/Common/ComputationalGeometry/vtkParametricFigure8Klein.h +++ b/Common/ComputationalGeometry/vtkParametricFigure8Klein.h @@ -12,27 +12,31 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkParametricFigure8Klein - Generate a figure-8 Klein bottle. -// .SECTION Description -// vtkParametricFigure8Klein generates a figure-8 Klein bottle. A Klein bottle -// is a closed surface with no interior and only one surface. It is -// unrealisable in 3 dimensions without intersecting surfaces. It can be -// realised in 4 dimensions by considering the map \f$F:R^2 \rightarrow R^4\f$ given by: -// -// - \f$f(u,v) = ((r*cos(v)+a)*cos(u),(r*cos(v)+a)*sin(u),r*sin(v)*cos(u/2),r*sin(v)*sin(u/2))\f$ -// -// This representation of the immersion in \f$R^3\f$ is formed by taking two Mobius -// strips and joining them along their boundaries, this is the so called -// "Figure-8 Klein Bottle" -// -// For further information about this surface, please consult the -// technical description "Parametric surfaces" in http://www.vtk.org/publications -// in the "VTK Technical Documents" section in the VTk.org web pages. -// -// .SECTION Thanks -// Andrew Maclean andrew.amaclean@gmail.com for creating and contributing the -// class. -// +/** + * @class vtkParametricFigure8Klein + * @brief Generate a figure-8 Klein bottle. + * + * vtkParametricFigure8Klein generates a figure-8 Klein bottle. A Klein bottle + * is a closed surface with no interior and only one surface. It is + * unrealisable in 3 dimensions without intersecting surfaces. It can be + * realised in 4 dimensions by considering the map \f$F:R^2 \rightarrow R^4\f$ given by: + * + * - \f$f(u,v) = ((r*cos(v)+a)*cos(u),(r*cos(v)+a)*sin(u),r*sin(v)*cos(u/2),r*sin(v)*sin(u/2))\f$ + * + * This representation of the immersion in \f$R^3\f$ is formed by taking two Mobius + * strips and joining them along their boundaries, this is the so called + * "Figure-8 Klein Bottle" + * + * For further information about this surface, please consult the + * technical description "Parametric surfaces" in http://www.vtk.org/publications + * in the "VTK Technical Documents" section in the VTk.org web pages. + * + * @par Thanks: + * Andrew Maclean andrew.amaclean@gmail.com for creating and contributing the + * class. + * +*/ + #ifndef vtkParametricFigure8Klein_h #define vtkParametricFigure8Klein_h @@ -45,47 +49,54 @@ public: vtkTypeMacro(vtkParametricFigure8Klein,vtkParametricFunction); void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE; - // Description: - // Construct a figure-8 Klein Bottle with the following parameters: - // MinimumU = -Pi, MaximumU = Pi, - // MinimumV = -Pi, MaximumV = Pi, - // JoinU = 1, JoinV = 1, - // TwistU = 0, TwistV = 0, - // ClockwiseOrdering = 1, - // DerivativesAvailable = 1, - // Radius = 1 + /** + * Construct a figure-8 Klein Bottle with the following parameters: + * MinimumU = -Pi, MaximumU = Pi, + * MinimumV = -Pi, MaximumV = Pi, + * JoinU = 1, JoinV = 1, + * TwistU = 0, TwistV = 0, + * ClockwiseOrdering = 1, + * DerivativesAvailable = 1, + * Radius = 1 + */ static vtkParametricFigure8Klein *New(); - // Description: - // Set/Get the radius of the bottle. Default is 1. + //@{ + /** + * Set/Get the radius of the bottle. Default is 1. + */ vtkSetMacro(Radius,double); vtkGetMacro(Radius,double); + //@} - // Description - // Return the parametric dimension of the class. + /** + * Return the parametric dimension of the class. + */ int GetDimension() VTK_OVERRIDE {return 2;} - // Description: - // A Figure-8 Klein bottle. - // - // This function performs the mapping \f$f(u,v) \rightarrow (x,y,x)\f$, returning it - // as Pt. It also returns the partial derivatives Du and Dv. - // \f$Pt = (x, y, z), Du = (dx/du, dy/du, dz/du), Dv = (dx/dv, dy/dv, dz/dv)\f$ . - // Then the normal is \f$N = Du X Dv\f$ . + /** + * A Figure-8 Klein bottle. + + * This function performs the mapping \f$f(u,v) \rightarrow (x,y,x)\f$, returning it + * as Pt. It also returns the partial derivatives Du and Dv. + * \f$Pt = (x, y, z), Du = (dx/du, dy/du, dz/du), Dv = (dx/dv, dy/dv, dz/dv)\f$ . + * Then the normal is \f$N = Du X Dv\f$ . + */ void Evaluate(double uvw[3], double Pt[3], double Duvw[9]) VTK_OVERRIDE; - // Description: - // Calculate a user defined scalar using one or all of uvw, Pt, Duvw. - // - // uvw are the parameters with Pt being the the cartesian point, - // Duvw are the derivatives of this point with respect to u, v and w. - // Pt, Duvw are obtained from Evaluate(). - // - // This function is only called if the ScalarMode has the value - // vtkParametricFunctionSource::SCALAR_FUNCTION_DEFINED - // - // If the user does not need to calculate a scalar, then the - // instantiated function should return zero. + /** + * Calculate a user defined scalar using one or all of uvw, Pt, Duvw. + + * uvw are the parameters with Pt being the the cartesian point, + * Duvw are the derivatives of this point with respect to u, v and w. + * Pt, Duvw are obtained from Evaluate(). + + * This function is only called if the ScalarMode has the value + * vtkParametricFunctionSource::SCALAR_FUNCTION_DEFINED + + * If the user does not need to calculate a scalar, then the + * instantiated function should return zero. + */ double EvaluateScalar(double uvw[3], double Pt[3], double Duvw[9]) VTK_OVERRIDE; protected: diff --git a/Common/ComputationalGeometry/vtkParametricFunction.h b/Common/ComputationalGeometry/vtkParametricFunction.h index 7e60dc779ab84914155cda795a16c850fe6c1db0..4fdc5d8bafef37496d423f32fdf63797ae0a422d 100644 --- a/Common/ComputationalGeometry/vtkParametricFunction.h +++ b/Common/ComputationalGeometry/vtkParametricFunction.h @@ -12,41 +12,47 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkParametricFunction - abstract interface for parametric functions -// .SECTION Description -// vtkParametricFunction is an abstract interface for functions -// defined by parametric mapping i.e. f(u,v,w)->(x,y,z) where -// u_min <= u < u_max, v_min <= v < v_max, w_min <= w < w_max. (For -// notational convenience, we will write f(u)->x and assume that -// u means (u,v,w) and x means (x,y,z).) -// -// The interface contains the pure virtual function, Evaluate(), that -// generates a point and the derivatives at that point which are then used to -// construct the surface. A second pure virtual function, EvaluateScalar(), -// can be used to generate a scalar for the surface. Finally, the -// GetDimension() virtual function is used to differentiate 1D, 2D, and 3D -// parametric functions. Since this abstract class defines a pure virtual -// API, its subclasses must implement the pure virtual functions -// GetDimension(), Evaluate() and EvaluateScalar(). -// -// This class has also methods for defining a range of parametric values (u,v,w). -// -// .SECTION Thanks -// Andrew Maclean andrew.amaclean@gmail.com for creating and contributing the -// class. -// -// .SECTION See Also -// vtkParametricFunctionSource - tessellates a parametric function -// -// Implementations of derived classes implementing non-orentable surfaces: -// vtkParametricBoy vtkParametricCrossCap vtkParametricFigure8Klein -// vtkParametricKlein vtkParametricMobius vtkParametricRoman -// -// Implementations of derived classes implementing orientable surfaces: -// vtkParametricConicSpiral vtkParametricDini vtkParametricEllipsoid -// vtkParametricEnneper vtkParametricRandomHills vtkParametricSuperEllipsoid -// vtkParametricSuperToroid vtkParametricTorus -// +/** + * @class vtkParametricFunction + * @brief abstract interface for parametric functions + * + * vtkParametricFunction is an abstract interface for functions + * defined by parametric mapping i.e. f(u,v,w)->(x,y,z) where + * u_min <= u < u_max, v_min <= v < v_max, w_min <= w < w_max. (For + * notational convenience, we will write f(u)->x and assume that + * u means (u,v,w) and x means (x,y,z).) + * + * The interface contains the pure virtual function, Evaluate(), that + * generates a point and the derivatives at that point which are then used to + * construct the surface. A second pure virtual function, EvaluateScalar(), + * can be used to generate a scalar for the surface. Finally, the + * GetDimension() virtual function is used to differentiate 1D, 2D, and 3D + * parametric functions. Since this abstract class defines a pure virtual + * API, its subclasses must implement the pure virtual functions + * GetDimension(), Evaluate() and EvaluateScalar(). + * + * This class has also methods for defining a range of parametric values (u,v,w). + * + * @par Thanks: + * Andrew Maclean andrew.amaclean@gmail.com for creating and contributing the + * class. + * + * @sa + * vtkParametricFunctionSource - tessellates a parametric function + * + * @sa + * Implementations of derived classes implementing non-orentable surfaces: + * vtkParametricBoy vtkParametricCrossCap vtkParametricFigure8Klein + * vtkParametricKlein vtkParametricMobius vtkParametricRoman + * + * @sa + * Implementations of derived classes implementing orientable surfaces: + * vtkParametricConicSpiral vtkParametricDini vtkParametricEllipsoid + * vtkParametricEnneper vtkParametricRandomHills vtkParametricSuperEllipsoid + * vtkParametricSuperToroid vtkParametricTorus + * +*/ + #ifndef vtkParametricFunction_h #define vtkParametricFunction_h @@ -59,132 +65,177 @@ public: vtkTypeMacro(vtkParametricFunction, vtkObject); void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE; - // Description - // Return the dimension of parametric space. Depending on the dimension, - // then the (u,v,w) parameters and associated information (e.g., derivates) - // have meaning. For example, if the dimension of the function is one, then - // u[0] and Duvw[0...2] have meaning. - // This is a pure virtual function that must be instantiated in - // a derived class. + /** + * Return the dimension of parametric space. Depending on the dimension, + * then the (u,v,w) parameters and associated information (e.g., derivates) + * have meaning. For example, if the dimension of the function is one, then + * u[0] and Duvw[0...2] have meaning. + * This is a pure virtual function that must be instantiated in + * a derived class. + */ virtual int GetDimension() = 0; - // Description: - // Performs the mapping \$f(uvw)->(Pt,Duvw)\$f. - // This is a pure virtual function that must be instantiated in - // a derived class. - // - // uvw are the parameters, with u corresponding to uvw[0], - // v to uvw[1] and w to uvw[2] respectively. Pt is the returned Cartesian point, - // Duvw are the derivatives of this point with respect to u, v and w. - // Note that the first three values in Duvw are Du, the next three are Dv, - // and the final three are Dw. Du Dv Dw are the partial derivatives of the - // function at the point Pt with respect to u, v and w respectively. + /** + * Performs the mapping \$f(uvw)->(Pt,Duvw)\$f. + * This is a pure virtual function that must be instantiated in + * a derived class. + + * uvw are the parameters, with u corresponding to uvw[0], + * v to uvw[1] and w to uvw[2] respectively. Pt is the returned Cartesian point, + * Duvw are the derivatives of this point with respect to u, v and w. + * Note that the first three values in Duvw are Du, the next three are Dv, + * and the final three are Dw. Du Dv Dw are the partial derivatives of the + * function at the point Pt with respect to u, v and w respectively. + */ virtual void Evaluate(double uvw[3], double Pt[3], double Duvw[9]) = 0; - // Description: - // Calculate a user defined scalar using one or all of uvw, Pt, Duvw. - // This is a pure virtual function that must be instantiated in - // a derived class. - // - // uvw are the parameters with Pt being the the cartesian point, - // Duvw are the derivatives of this point with respect to u, v, and w. - // Pt, Duvw are obtained from Evaluate(). + /** + * Calculate a user defined scalar using one or all of uvw, Pt, Duvw. + * This is a pure virtual function that must be instantiated in + * a derived class. + + * uvw are the parameters with Pt being the the cartesian point, + * Duvw are the derivatives of this point with respect to u, v, and w. + * Pt, Duvw are obtained from Evaluate(). + */ virtual double EvaluateScalar(double uvw[3], double Pt[3], double Duvw[9]) = 0; - // Description: - // Set/Get the minimum u-value. + //@{ + /** + * Set/Get the minimum u-value. + */ vtkSetMacro(MinimumU,double); vtkGetMacro(MinimumU,double); + //@} - // Description: - // Set/Get the maximum u-value. + //@{ + /** + * Set/Get the maximum u-value. + */ vtkSetMacro(MaximumU,double); vtkGetMacro(MaximumU,double); + //@} - // Description: - // Set/Get the minimum v-value. + //@{ + /** + * Set/Get the minimum v-value. + */ vtkSetMacro(MinimumV,double); vtkGetMacro(MinimumV,double); + //@} - // Description: - // Set/Get the maximum v-value. + //@{ + /** + * Set/Get the maximum v-value. + */ vtkSetMacro(MaximumV,double); vtkGetMacro(MaximumV,double); + //@} - // Description: - // Set/Get the minimum w-value. + //@{ + /** + * Set/Get the minimum w-value. + */ vtkSetMacro(MinimumW,double); vtkGetMacro(MinimumW,double); + //@} - // Description: - // Set/Get the maximum w-value. + //@{ + /** + * Set/Get the maximum w-value. + */ vtkSetMacro(MaximumW,double); vtkGetMacro(MaximumW,double); + //@} - // Description: - // Set/Get the flag which joins the first triangle strip to the last one. + //@{ + /** + * Set/Get the flag which joins the first triangle strip to the last one. + */ vtkSetClampMacro(JoinU,int,0,1); vtkGetMacro(JoinU,int); vtkBooleanMacro(JoinU,int); + //@} - // Description: - // Set/Get the flag which joins the the ends of the triangle strips. + //@{ + /** + * Set/Get the flag which joins the the ends of the triangle strips. + */ vtkSetClampMacro(JoinV, int, 0, 1); vtkGetMacro(JoinV, int); vtkBooleanMacro(JoinV, int); + //@} - // Description: - // Set/Get the flag which joins the the ends of the triangle strips. + //@{ + /** + * Set/Get the flag which joins the the ends of the triangle strips. + */ vtkSetClampMacro(JoinW, int, 0, 1); vtkGetMacro(JoinW, int); vtkBooleanMacro(JoinW, int); - - // Description: - // Set/Get the flag which joins the first triangle strip to - // the last one with a twist. - // JoinU must also be set if this is set. - // Used when building some non-orientable surfaces. + //@} + + //@{ + /** + * Set/Get the flag which joins the first triangle strip to + * the last one with a twist. + * JoinU must also be set if this is set. + * Used when building some non-orientable surfaces. + */ vtkSetClampMacro(TwistU,int,0,1); vtkGetMacro(TwistU,int); vtkBooleanMacro(TwistU,int); - - // Description: - // Set/Get the flag which joins the ends of the - // triangle strips with a twist. - // JoinV must also be set if this is set. - // Used when building some non-orientable surfaces. + //@} + + //@{ + /** + * Set/Get the flag which joins the ends of the + * triangle strips with a twist. + * JoinV must also be set if this is set. + * Used when building some non-orientable surfaces. + */ vtkSetClampMacro(TwistV, int, 0, 1); vtkGetMacro(TwistV, int); vtkBooleanMacro(TwistV, int); - - // Description: - // Set/Get the flag which joins the ends of the - // triangle strips with a twist. - // JoinW must also be set if this is set. - // Used when building some non-orientable surfaces. + //@} + + //@{ + /** + * Set/Get the flag which joins the ends of the + * triangle strips with a twist. + * JoinW must also be set if this is set. + * Used when building some non-orientable surfaces. + */ vtkSetClampMacro(TwistW, int, 0, 1); vtkGetMacro(TwistW, int); vtkBooleanMacro(TwistW, int); - - // Description: - // Set/Get the flag which determines the ordering of the the - // vertices forming the triangle strips. The ordering of the - // points being inserted into the triangle strip is important - // because it determines the direction of the normals for the - // lighting. If set, the ordering is clockwise, otherwise the - // ordering is anti-clockwise. Default is true (i.e. clockwise - // ordering). + //@} + + //@{ + /** + * Set/Get the flag which determines the ordering of the the + * vertices forming the triangle strips. The ordering of the + * points being inserted into the triangle strip is important + * because it determines the direction of the normals for the + * lighting. If set, the ordering is clockwise, otherwise the + * ordering is anti-clockwise. Default is true (i.e. clockwise + * ordering). + */ vtkSetClampMacro(ClockwiseOrdering,int,0,1); vtkGetMacro(ClockwiseOrdering,int); vtkBooleanMacro(ClockwiseOrdering,int); - - // Description: - // Set/Get the flag which determines whether derivatives are available - // from the parametric function (i.e., whether the Evaluate() method - // returns valid derivatives). + //@} + + //@{ + /** + * Set/Get the flag which determines whether derivatives are available + * from the parametric function (i.e., whether the Evaluate() method + * returns valid derivatives). + */ vtkSetClampMacro(DerivativesAvailable,int,0,1); vtkGetMacro(DerivativesAvailable,int); vtkBooleanMacro(DerivativesAvailable,int); + //@} protected: vtkParametricFunction(); diff --git a/Common/ComputationalGeometry/vtkParametricHenneberg.h b/Common/ComputationalGeometry/vtkParametricHenneberg.h index 0a5e3f085f5607167545bf4472fbbfa693426708..55802640713c223b0624d7b9d31fbcf33f1424bf 100644 --- a/Common/ComputationalGeometry/vtkParametricHenneberg.h +++ b/Common/ComputationalGeometry/vtkParametricHenneberg.h @@ -12,13 +12,16 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkParametricHenneberg - Generate Henneberg's minimal surface. -// .SECTION Description -// vtkParametricHenneberg generates Henneberg's minimal surface parametrically. -// Henneberg's minimal surface is discussed further at -// Math World. -// .SECTION Thanks -// Tim Meehan +/** + * @class vtkParametricHenneberg + * @brief Generate Henneberg's minimal surface. + * + * vtkParametricHenneberg generates Henneberg's minimal surface parametrically. + * Henneberg's minimal surface is discussed further at + * Math World. + * @par Thanks: + * Tim Meehan +*/ #ifndef vtkParametricHenneberg_h #define vtkParametricHenneberg_h @@ -33,32 +36,36 @@ public: vtkTypeMacro(vtkParametricHenneberg,vtkParametricFunction); void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE; - // Description: - // Construct Henneberg's minimal surface with the following parameters: - // (MinimumU, MaximumU) = (-1., 1.), - // (MinimumV, MaximumV) = (-pi/.2, pi/2.), - // JoinU = 0, JoinV = 0, - // TwistU = 0, TwistV = 0; - // ClockwiseOrdering = 1, - // DerivativesAvailable = 1, + /** + * Construct Henneberg's minimal surface with the following parameters: + * (MinimumU, MaximumU) = (-1., 1.), + * (MinimumV, MaximumV) = (-pi/.2, pi/2.), + * JoinU = 0, JoinV = 0, + * TwistU = 0, TwistV = 0; + * ClockwiseOrdering = 1, + * DerivativesAvailable = 1, + */ static vtkParametricHenneberg *New(); - // Description - // Return the parametric dimension of the class. + /** + * Return the parametric dimension of the class. + */ int GetDimension() VTK_OVERRIDE {return 2;} - // Description: - // Henneberg's minimal surface. - // - // This function performs the mapping \f$f(u,v) \rightarrow (x,y,x)\f$, returning it - // as Pt. It also returns the partial derivatives Du and Dv. - // \f$Pt = (x, y, z), D_u\vec{f} = (dx/du, dy/du, dz/du), D_v\vec{f} = (dx/dv, dy/dv, dz/dv)\f$ . - // Then the normal is \f$N = D_u\vec{f} \times D_v\vec{f}\f$ . + /** + * Henneberg's minimal surface. + + * This function performs the mapping \f$f(u,v) \rightarrow (x,y,x)\f$, returning it + * as Pt. It also returns the partial derivatives Du and Dv. + * \f$Pt = (x, y, z), D_u\vec{f} = (dx/du, dy/du, dz/du), D_v\vec{f} = (dx/dv, dy/dv, dz/dv)\f$ . + * Then the normal is \f$N = D_u\vec{f} \times D_v\vec{f}\f$ . + */ void Evaluate(double uvw[3], double Pt[3], double Duvw[9]) VTK_OVERRIDE; - // Description: - // Calculate a user defined scalar using one or all of uvw, Pt, Duvw. - // This method simply returns 0. + /** + * Calculate a user defined scalar using one or all of uvw, Pt, Duvw. + * This method simply returns 0. + */ double EvaluateScalar(double uvw[3], double Pt[3], double Duvw[9]) VTK_OVERRIDE; protected: diff --git a/Common/ComputationalGeometry/vtkParametricKlein.h b/Common/ComputationalGeometry/vtkParametricKlein.h index f3579a05493cddb5f984187f0d3f24c42d882374..5a89680704c890e3a1bce803315d5748cf155030 100644 --- a/Common/ComputationalGeometry/vtkParametricKlein.h +++ b/Common/ComputationalGeometry/vtkParametricKlein.h @@ -12,27 +12,31 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkParametricKlein - Generates a "classical" representation of a Klein bottle. -// .SECTION Description -// vtkParametricKlein generates a "classical" representation of a Klein -// bottle. A Klein bottle is a closed surface with no interior and only one -// surface. It is unrealisable in 3 dimensions without intersecting -// surfaces. It can be -// realised in 4 dimensions by considering the map \f$F:R^2 \rightarrow R^4\f$ given by: -// -// - \f$f(u,v) = ((r*cos(v)+a)*cos(u),(r*cos(v)+a)*sin(u),r*sin(v)*cos(u/2),r*sin(v)*sin(u/2))\f$ -// -// The classical representation of the immersion in \f$R^3\f$ is returned by this function. -// -// -// For further information about this surface, please consult the -// technical description "Parametric surfaces" in http://www.vtk.org/publications -// in the "VTK Technical Documents" section in the VTk.org web pages. -// -// .SECTION Thanks -// Andrew Maclean andrew.amaclean@gmail.com for creating and contributing the -// class. -// +/** + * @class vtkParametricKlein + * @brief Generates a "classical" representation of a Klein bottle. + * + * vtkParametricKlein generates a "classical" representation of a Klein + * bottle. A Klein bottle is a closed surface with no interior and only one + * surface. It is unrealisable in 3 dimensions without intersecting + * surfaces. It can be + * realised in 4 dimensions by considering the map \f$F:R^2 \rightarrow R^4\f$ given by: + * + * - \f$f(u,v) = ((r*cos(v)+a)*cos(u),(r*cos(v)+a)*sin(u),r*sin(v)*cos(u/2),r*sin(v)*sin(u/2))\f$ + * + * The classical representation of the immersion in \f$R^3\f$ is returned by this function. + * + * + * For further information about this surface, please consult the + * technical description "Parametric surfaces" in http://www.vtk.org/publications + * in the "VTK Technical Documents" section in the VTk.org web pages. + * + * @par Thanks: + * Andrew Maclean andrew.amaclean@gmail.com for creating and contributing the + * class. + * +*/ + #ifndef vtkParametricKlein_h #define vtkParametricKlein_h @@ -45,41 +49,45 @@ public: vtkTypeMacro(vtkParametricKlein,vtkParametricFunction); void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE; - // Description: - // Construct a Klein Bottle with the following parameters: - // MinimumU = 0, MaximumU = 2*Pi, - // MinimumV = -Pi, MaximumV = Pi, - // JoinU = 0, JoinV = 1, - // TwistU = 0, TwistV = 0, - // ClockwiseOrdering = 1, - // DerivativesAvailable = 1, + /** + * Construct a Klein Bottle with the following parameters: + * MinimumU = 0, MaximumU = 2*Pi, + * MinimumV = -Pi, MaximumV = Pi, + * JoinU = 0, JoinV = 1, + * TwistU = 0, TwistV = 0, + * ClockwiseOrdering = 1, + * DerivativesAvailable = 1, + */ static vtkParametricKlein *New(); //! Initialise the parameters for the Klein bottle - // Description - // Return the parametric dimension of the class. + /** + * Return the parametric dimension of the class. + */ int GetDimension() VTK_OVERRIDE {return 2;} - // Description: - // A Klein bottle. - // - // This function performs the mapping \f$f(u,v) \rightarrow (x,y,x)\f$, returning it - // as Pt. It also returns the partial derivatives Du and Dv. - // \f$Pt = (x, y, z), Du = (dx/du, dy/du, dz/du), Dv = (dx/dv, dy/dv, dz/dv)\f$ . - // Then the normal is \f$N = Du X Dv\f$ . + /** + * A Klein bottle. + + * This function performs the mapping \f$f(u,v) \rightarrow (x,y,x)\f$, returning it + * as Pt. It also returns the partial derivatives Du and Dv. + * \f$Pt = (x, y, z), Du = (dx/du, dy/du, dz/du), Dv = (dx/dv, dy/dv, dz/dv)\f$ . + * Then the normal is \f$N = Du X Dv\f$ . + */ void Evaluate(double uvw[3], double Pt[3], double Duvw[9]) VTK_OVERRIDE; - // Description: - // Calculate a user defined scalar using one or all of uvw, Pt, Duvw. - // - // uvw are the parameters with Pt being the the cartesian point, - // Duvw are the derivatives of this point with respect to u, v and w. - // Pt, Duvw are obtained from Evaluate(). - // - // This function is only called if the ScalarMode has the value - // vtkParametricFunctionSource::SCALAR_FUNCTION_DEFINED - // - // If the user does not need to calculate a scalar, then the - // instantiated function should return zero. + /** + * Calculate a user defined scalar using one or all of uvw, Pt, Duvw. + + * uvw are the parameters with Pt being the the cartesian point, + * Duvw are the derivatives of this point with respect to u, v and w. + * Pt, Duvw are obtained from Evaluate(). + + * This function is only called if the ScalarMode has the value + * vtkParametricFunctionSource::SCALAR_FUNCTION_DEFINED + + * If the user does not need to calculate a scalar, then the + * instantiated function should return zero. + */ double EvaluateScalar(double uvw[3], double Pt[3], double Duvw[9]) VTK_OVERRIDE; protected: diff --git a/Common/ComputationalGeometry/vtkParametricKuen.h b/Common/ComputationalGeometry/vtkParametricKuen.h index 363dbaa8f778e21b74582a2405c90dbbfa5d04b5..46d6ed502726d7987bfd01045ade64d110bc4f95 100644 --- a/Common/ComputationalGeometry/vtkParametricKuen.h +++ b/Common/ComputationalGeometry/vtkParametricKuen.h @@ -12,14 +12,17 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkParametricKuen - Generate Kuens' surface. -// .SECTION Description -// vtkParametricKuen generates Kuens' surface. This surface has a constant -// negative gaussian curvature. For more information about this surface, see -// Dr. O'Niell's page at the -// UCLA Mathematics Department. -// .SECTION Thanks -// Tim Meehan +/** + * @class vtkParametricKuen + * @brief Generate Kuens' surface. + * + * vtkParametricKuen generates Kuens' surface. This surface has a constant + * negative gaussian curvature. For more information about this surface, see + * Dr. O'Niell's page at the + * UCLA Mathematics Department. + * @par Thanks: + * Tim Meehan +*/ #ifndef vtkParametricKuen_h #define vtkParametricKuen_h @@ -34,32 +37,36 @@ public: vtkTypeMacro(vtkParametricKuen,vtkParametricFunction); void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE; - // Description: - // Construct Kuen's surface with the following parameters: - // (MinimumU, MaximumU) = (-3*pi, 3*pi), - // (MinimumV, MaximumV) = (0., pi), - // JoinU = 0, JoinV = 0, - // TwistU = 0, TwistV = 0; - // ClockwiseOrdering = 1, - // DerivativesAvailable = 1, + /** + * Construct Kuen's surface with the following parameters: + * (MinimumU, MaximumU) = (-3*pi, 3*pi), + * (MinimumV, MaximumV) = (0., pi), + * JoinU = 0, JoinV = 0, + * TwistU = 0, TwistV = 0; + * ClockwiseOrdering = 1, + * DerivativesAvailable = 1, + */ static vtkParametricKuen *New(); - // Description - // Return the parametric dimension of the class. + /** + * Return the parametric dimension of the class. + */ int GetDimension() VTK_OVERRIDE {return 2;} - // Description: - // Kuen's surface. - // - // This function performs the mapping \f$f(u,v) \rightarrow (x,y,x)\f$, returning it - // as Pt. It also returns the partial derivatives Du and Dv. - // \f$Pt = (x, y, z), D_u\vec{f} = (dx/du, dy/du, dz/du), D_v\vec{f} = (dx/dv, dy/dv, dz/dv)\f$ . - // Then the normal is \f$N = D_u\vec{f} \times D_v\vec{f}\f$ . + /** + * Kuen's surface. + + * This function performs the mapping \f$f(u,v) \rightarrow (x,y,x)\f$, returning it + * as Pt. It also returns the partial derivatives Du and Dv. + * \f$Pt = (x, y, z), D_u\vec{f} = (dx/du, dy/du, dz/du), D_v\vec{f} = (dx/dv, dy/dv, dz/dv)\f$ . + * Then the normal is \f$N = D_u\vec{f} \times D_v\vec{f}\f$ . + */ void Evaluate(double uvw[3], double Pt[3], double Duvw[9]) VTK_OVERRIDE; - // Description: - // Calculate a user defined scalar using one or all of uvw, Pt, Duvw. - // This method simply returns 0. + /** + * Calculate a user defined scalar using one or all of uvw, Pt, Duvw. + * This method simply returns 0. + */ double EvaluateScalar(double uvw[3], double Pt[3], double Duvw[9]) VTK_OVERRIDE; protected: diff --git a/Common/ComputationalGeometry/vtkParametricMobius.h b/Common/ComputationalGeometry/vtkParametricMobius.h index 92983c863f604da3b176413d5fab36342783f609..8ca43dd614fae2b34c0e0807d70a0a3d8c9644e6 100644 --- a/Common/ComputationalGeometry/vtkParametricMobius.h +++ b/Common/ComputationalGeometry/vtkParametricMobius.h @@ -12,18 +12,22 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkParametricMobius - Generate a Mobius strip. -// .SECTION Description -// vtkParametricMobius generates a Mobius strip. -// -// For further information about this surface, please consult the -// technical description "Parametric surfaces" in http://www.vtk.org/publications -// in the "VTK Technical Documents" section in the VTk.org web pages. -// -// .SECTION Thanks -// Andrew Maclean andrew.amaclean@gmail.com for creating and contributing the -// class. -// +/** + * @class vtkParametricMobius + * @brief Generate a Mobius strip. + * + * vtkParametricMobius generates a Mobius strip. + * + * For further information about this surface, please consult the + * technical description "Parametric surfaces" in http://www.vtk.org/publications + * in the "VTK Technical Documents" section in the VTk.org web pages. + * + * @par Thanks: + * Andrew Maclean andrew.amaclean@gmail.com for creating and contributing the + * class. + * +*/ + #ifndef vtkParametricMobius_h #define vtkParametricMobius_h @@ -36,47 +40,54 @@ public: vtkTypeMacro(vtkParametricMobius,vtkParametricFunction); void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE; - // Description: - // Construct a Mobius strip with the following parameters: - // MinimumU = 0, MaximumU = 2*Pi, - // MinimumV = -1, MaximumV = 1, - // JoinU = 1, JoinV = 0, - // TwistU = 0, TwistV = 0, - // ClockwiseOrdering = 1, - // DerivativesAvailable = 1, - // Radius = 1. + /** + * Construct a Mobius strip with the following parameters: + * MinimumU = 0, MaximumU = 2*Pi, + * MinimumV = -1, MaximumV = 1, + * JoinU = 1, JoinV = 0, + * TwistU = 0, TwistV = 0, + * ClockwiseOrdering = 1, + * DerivativesAvailable = 1, + * Radius = 1. + */ static vtkParametricMobius *New(); - // Description: - // Set/Get the radius of the Mobius strip. Default is 1. + //@{ + /** + * Set/Get the radius of the Mobius strip. Default is 1. + */ vtkSetMacro(Radius,double); vtkGetMacro(Radius,double); + //@} - // Description - // Return the parametric dimension of the class. + /** + * Return the parametric dimension of the class. + */ int GetDimension() VTK_OVERRIDE {return 2;} - // Description: - // The Mobius strip. - // - // This function performs the mapping \f$f(u,v) \rightarrow (x,y,x)\f$, returning it - // as Pt. It also returns the partial derivatives Du and Dv. - // \f$Pt = (x, y, z), Du = (dx/du, dy/du, dz/du), Dv = (dx/dv, dy/dv, dz/dv)\f$ . - // Then the normal is \f$N = Du X Dv\f$ . + /** + * The Mobius strip. + + * This function performs the mapping \f$f(u,v) \rightarrow (x,y,x)\f$, returning it + * as Pt. It also returns the partial derivatives Du and Dv. + * \f$Pt = (x, y, z), Du = (dx/du, dy/du, dz/du), Dv = (dx/dv, dy/dv, dz/dv)\f$ . + * Then the normal is \f$N = Du X Dv\f$ . + */ void Evaluate(double uvw[3], double Pt[3], double Duvw[9]) VTK_OVERRIDE; - // Description: - // Calculate a user defined scalar using one or all of uvw, Pt, Duvw. - // - // uvw are the parameters with Pt being the the cartesian point, - // Duvw are the derivatives of this point with respect to u, v and w. - // Pt, Du, Dv are obtained from Evaluate(). - // - // This function is only called if the ScalarMode has the value - // vtkParametricFunctionSource::SCALAR_FUNCTION_DEFINED - // - // If the user does not need to calculate a scalar, then the - // instantiated function should return zero. + /** + * Calculate a user defined scalar using one or all of uvw, Pt, Duvw. + + * uvw are the parameters with Pt being the the cartesian point, + * Duvw are the derivatives of this point with respect to u, v and w. + * Pt, Du, Dv are obtained from Evaluate(). + + * This function is only called if the ScalarMode has the value + * vtkParametricFunctionSource::SCALAR_FUNCTION_DEFINED + + * If the user does not need to calculate a scalar, then the + * instantiated function should return zero. + */ double EvaluateScalar(double uvw[3], double Pt[3], double Duvw[9]) VTK_OVERRIDE; protected: diff --git a/Common/ComputationalGeometry/vtkParametricPluckerConoid.h b/Common/ComputationalGeometry/vtkParametricPluckerConoid.h index 842088f981de07484242f05c72461b3e5e7a2ea3..3dfb3d38ac507061841de755bc824a45bf916d13 100644 --- a/Common/ComputationalGeometry/vtkParametricPluckerConoid.h +++ b/Common/ComputationalGeometry/vtkParametricPluckerConoid.h @@ -12,18 +12,21 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkParametricPluckerConoid - Generate Plucker's conoid surface. -// .SECTION Description -// vtkParametricPluckerConoid generates Plucker's conoid surface parametrically. -// Plucker's conoid is a ruled surface, named after Julius Plucker. It is -// possible to set the number of folds in this class via the parameter 'N'. -// -// For more information, see the Wikipedia page on -// Plucker's Conoid. -// .SECTION Caveats -// I haven't done any special checking on the number of folds parameter, N. -// .SECTION Thanks -// Tim Meehan +/** + * @class vtkParametricPluckerConoid + * @brief Generate Plucker's conoid surface. + * + * vtkParametricPluckerConoid generates Plucker's conoid surface parametrically. + * Plucker's conoid is a ruled surface, named after Julius Plucker. It is + * possible to set the number of folds in this class via the parameter 'N'. + * + * For more information, see the Wikipedia page on + * Plucker's Conoid. + * @warning + * I haven't done any special checking on the number of folds parameter, N. + * @par Thanks: + * Tim Meehan +*/ #ifndef vtkParametricPluckerConoid_h #define vtkParametricPluckerConoid_h @@ -39,37 +42,44 @@ public: vtkTypeMacro(vtkParametricPluckerConoid,vtkParametricFunction); void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE; - // Description: - // This is the number of folds in the conoid. + //@{ + /** + * This is the number of folds in the conoid. + */ vtkGetMacro(N, int); vtkSetMacro(N, int); - - // Description: - // Construct Plucker's conoid surface with the following parameters: - // (MinimumU, MaximumU) = (0., 3.), - // (MinimumV, MaximumV) = (0., pi), - // JoinU = 0, JoinV = 0, - // TwistU = 0, TwistV = 0; - // ClockwiseOrdering = 1, - // DerivativesAvailable = 1, + //@} + + /** + * Construct Plucker's conoid surface with the following parameters: + * (MinimumU, MaximumU) = (0., 3.), + * (MinimumV, MaximumV) = (0., pi), + * JoinU = 0, JoinV = 0, + * TwistU = 0, TwistV = 0; + * ClockwiseOrdering = 1, + * DerivativesAvailable = 1, + */ static vtkParametricPluckerConoid *New(); - // Description - // Return the parametric dimension of the class. + /** + * Return the parametric dimension of the class. + */ int GetDimension() VTK_OVERRIDE {return 2;} - // Description: - // Plucker's conoid surface. - // - // This function performs the mapping \f$f(u,v) \rightarrow (x,y,x)\f$, returning it - // as Pt. It also returns the partial derivatives Du and Dv. - // \f$Pt = (x, y, z), D_u\vec{f} = (dx/du, dy/du, dz/du), D_v\vec{f} = (dx/dv, dy/dv, dz/dv)\f$ . - // Then the normal is \f$N = D_u\vec{f} \times D_v\vec{f}\f$ . + /** + * Plucker's conoid surface. + + * This function performs the mapping \f$f(u,v) \rightarrow (x,y,x)\f$, returning it + * as Pt. It also returns the partial derivatives Du and Dv. + * \f$Pt = (x, y, z), D_u\vec{f} = (dx/du, dy/du, dz/du), D_v\vec{f} = (dx/dv, dy/dv, dz/dv)\f$ . + * Then the normal is \f$N = D_u\vec{f} \times D_v\vec{f}\f$ . + */ void Evaluate(double uvw[3], double Pt[3], double Duvw[9]) VTK_OVERRIDE; - // Description: - // Calculate a user defined scalar using one or all of uvw, Pt, Duvw. - // This method simply returns 0. + /** + * Calculate a user defined scalar using one or all of uvw, Pt, Duvw. + * This method simply returns 0. + */ double EvaluateScalar(double uvw[3], double Pt[3], double Duvw[9]) VTK_OVERRIDE; protected: diff --git a/Common/ComputationalGeometry/vtkParametricPseudosphere.h b/Common/ComputationalGeometry/vtkParametricPseudosphere.h index 925bfe997f0f2d48be7113a5b30e9b2cba0c0070..1e44409c155228ada309837d929d0720978d1b09 100644 --- a/Common/ComputationalGeometry/vtkParametricPseudosphere.h +++ b/Common/ComputationalGeometry/vtkParametricPseudosphere.h @@ -12,15 +12,18 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkParametricPseudosphere - Generate a pseudosphere. -// .SECTION Description -// vtkParametricPseudosphere generates a parametric pseudosphere. The -// pseudosphere is generated as a surface of revolution of the tractrix about -// it's asymptote, and is a surface of constant negative Gaussian curvature. -// You can find out more about this interesting surface at -// Math World. -// .SECTION Thanks -// Tim Meehan +/** + * @class vtkParametricPseudosphere + * @brief Generate a pseudosphere. + * + * vtkParametricPseudosphere generates a parametric pseudosphere. The + * pseudosphere is generated as a surface of revolution of the tractrix about + * it's asymptote, and is a surface of constant negative Gaussian curvature. + * You can find out more about this interesting surface at + * Math World. + * @par Thanks: + * Tim Meehan +*/ #ifndef vtkParametricPseudosphere_h #define vtkParametricPseudosphere_h @@ -35,32 +38,36 @@ public: vtkTypeMacro(vtkParametricPseudosphere,vtkParametricFunction); void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE; - // Description: - // Construct a pseudosphere surface with the following parameters: - // (MinimumU, MaximumU) = (-5., 5.), - // (MinimumV, MaximumV) = (-pi, pi), - // JoinU = 0, JoinV = 1, - // TwistU = 0, TwistV = 0; - // ClockwiseOrdering = 1, - // DerivativesAvailable = 1, + /** + * Construct a pseudosphere surface with the following parameters: + * (MinimumU, MaximumU) = (-5., 5.), + * (MinimumV, MaximumV) = (-pi, pi), + * JoinU = 0, JoinV = 1, + * TwistU = 0, TwistV = 0; + * ClockwiseOrdering = 1, + * DerivativesAvailable = 1, + */ static vtkParametricPseudosphere *New(); - // Description - // Return the parametric dimension of the class. + /** + * Return the parametric dimension of the class. + */ int GetDimension() VTK_OVERRIDE {return 2;} - // Description: - // Pseudosphere surface. - // - // This function performs the mapping \f$f(u,v) \rightarrow (x,y,x)\f$, returning it - // as Pt. It also returns the partial derivatives Du and Dv. - // \f$Pt = (x, y, z), D_u\vec{f} = (dx/du, dy/du, dz/du), D_v\vec{f} = (dx/dv, dy/dv, dz/dv)\f$ . - // Then the normal is \f$N = D_u\vec{f} \times D_v\vec{f}\f$ . + /** + * Pseudosphere surface. + + * This function performs the mapping \f$f(u,v) \rightarrow (x,y,x)\f$, returning it + * as Pt. It also returns the partial derivatives Du and Dv. + * \f$Pt = (x, y, z), D_u\vec{f} = (dx/du, dy/du, dz/du), D_v\vec{f} = (dx/dv, dy/dv, dz/dv)\f$ . + * Then the normal is \f$N = D_u\vec{f} \times D_v\vec{f}\f$ . + */ void Evaluate(double uvw[3], double Pt[3], double Duvw[9]) VTK_OVERRIDE; - // Description: - // Calculate a user defined scalar using one or all of uvw, Pt, Duvw. - // This method simply returns 0. + /** + * Calculate a user defined scalar using one or all of uvw, Pt, Duvw. + * This method simply returns 0. + */ double EvaluateScalar(double uvw[3], double Pt[3], double Duvw[9]) VTK_OVERRIDE; protected: diff --git a/Common/ComputationalGeometry/vtkParametricRandomHills.h b/Common/ComputationalGeometry/vtkParametricRandomHills.h index bf8b5ea6c1686f3638c8d5d4c092c494edd260aa..2af0d7b91ff4dec5a9ed40752a2385a57f5c83d9 100644 --- a/Common/ComputationalGeometry/vtkParametricRandomHills.h +++ b/Common/ComputationalGeometry/vtkParametricRandomHills.h @@ -12,22 +12,26 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkParametricRandomHills - Generate a surface covered with randomly placed hills. -// .SECTION Description -// vtkParametricRandomHills generates a surface covered with randomly placed -// hills. Hills will vary in shape and height since the presence -// of nearby hills will contribute to the shape and height of a given hill. -// An option is provided for placing hills on a regular grid on the surface. -// In this case the hills will all have the same shape and height. -// -// For further information about this surface, please consult the -// technical description "Parametric surfaces" in http://www.vtk.org/publications -// in the "VTK Technical Documents" section in the VTk.org web pages. -// -// .SECTION Thanks -// Andrew Maclean andrew.amaclean@gmail.com for creating and contributing the -// class. -// +/** + * @class vtkParametricRandomHills + * @brief Generate a surface covered with randomly placed hills. + * + * vtkParametricRandomHills generates a surface covered with randomly placed + * hills. Hills will vary in shape and height since the presence + * of nearby hills will contribute to the shape and height of a given hill. + * An option is provided for placing hills on a regular grid on the surface. + * In this case the hills will all have the same shape and height. + * + * For further information about this surface, please consult the + * technical description "Parametric surfaces" in http://www.vtk.org/publications + * in the "VTK Technical Documents" section in the VTk.org web pages. + * + * @par Thanks: + * Andrew Maclean andrew.amaclean@gmail.com for creating and contributing the + * class. + * +*/ + #ifndef vtkParametricRandomHills_h #define vtkParametricRandomHills_h @@ -44,114 +48,145 @@ public: vtkTypeMacro(vtkParametricRandomHills,vtkParametricFunction); void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE; - // Description - // Return the parametric dimension of the class. + /** + * Return the parametric dimension of the class. + */ int GetDimension() VTK_OVERRIDE {return 2;} - // Description: - // Construct a surface of random hills with the following parameters: - // MinimumU = -10, MaximumU = 10, - // MinimumV = -10, MaximumV = 10, - // JoinU = 0, JoinV = 0, - // TwistU = 0, TwistV = 0; - // ClockwiseOrdering = 1, - // DerivativesAvailable = 0, - // Number of hills = 30, - // Variance of the hills 2.5 in both x- and y- directions, - // Scaling factor for the variances 1/3 in both x- and y- directions, - // Amplitude of each hill = 2, - // Scaling factor for the amplitude = 1/3, - // RandomSeed = 1, - // AllowRandomGeneration = 1. + /** + * Construct a surface of random hills with the following parameters: + * MinimumU = -10, MaximumU = 10, + * MinimumV = -10, MaximumV = 10, + * JoinU = 0, JoinV = 0, + * TwistU = 0, TwistV = 0; + * ClockwiseOrdering = 1, + * DerivativesAvailable = 0, + * Number of hills = 30, + * Variance of the hills 2.5 in both x- and y- directions, + * Scaling factor for the variances 1/3 in both x- and y- directions, + * Amplitude of each hill = 2, + * Scaling factor for the amplitude = 1/3, + * RandomSeed = 1, + * AllowRandomGeneration = 1. + */ static vtkParametricRandomHills *New(); - // Description: - // Set/Get the number of hills. - // Default is 30. + //@{ + /** + * Set/Get the number of hills. + * Default is 30. + */ vtkSetMacro(NumberOfHills,int); vtkGetMacro(NumberOfHills,int); + //@} - // Description: - // Set/Get the hill variance in the x-direction. - // Default is 2.5. + //@{ + /** + * Set/Get the hill variance in the x-direction. + * Default is 2.5. + */ vtkSetMacro(HillXVariance,double); vtkGetMacro(HillXVariance,double); + //@} - // Description: - // Set/Get the hill variance in the y-direction. - // Default is 2.5. + //@{ + /** + * Set/Get the hill variance in the y-direction. + * Default is 2.5. + */ vtkSetMacro(HillYVariance,double); vtkGetMacro(HillYVariance,double); + //@} - // Description: - // Set/Get the hill amplitude (height). - // Default is 2. + //@{ + /** + * Set/Get the hill amplitude (height). + * Default is 2. + */ vtkSetMacro(HillAmplitude,double); vtkGetMacro(HillAmplitude,double); - - // Description: - // Set/Get the Seed for the random number generator, - // a value of 1 will initialize the random number generator, - // a negative value will initialize it with the system time. - // Default is 1. + //@} + + //@{ + /** + * Set/Get the Seed for the random number generator, + * a value of 1 will initialize the random number generator, + * a negative value will initialize it with the system time. + * Default is 1. + */ vtkSetMacro(RandomSeed,int); vtkGetMacro(RandomSeed,int); - - // Description: - // Set/Get the random generation flag. - // A value of 0 will disable the generation of random hills on the surface - // allowing a reproducible number of identically shaped hills to be - // generated. If zero, then the number of hills used will be the nearest - // perfect square less than or equal to the number of hills. - // For example, selecting 30 hills will result in a 5 X 5 array of - // hills being generated. Thus a square array of hills will be generated. - // - // Any other value means that the hills will be placed randomly on the - // surface. - // Default is 1. + //@} + + //@{ + /** + * Set/Get the random generation flag. + * A value of 0 will disable the generation of random hills on the surface + * allowing a reproducible number of identically shaped hills to be + * generated. If zero, then the number of hills used will be the nearest + * perfect square less than or equal to the number of hills. + * For example, selecting 30 hills will result in a 5 X 5 array of + * hills being generated. Thus a square array of hills will be generated. + + * Any other value means that the hills will be placed randomly on the + * surface. + * Default is 1. + */ vtkSetClampMacro(AllowRandomGeneration,int,0,1); vtkGetMacro(AllowRandomGeneration,int); vtkBooleanMacro(AllowRandomGeneration,int); + //@} - // Description: - // Set/Get the scaling factor for the variance in the x-direction. - // Default is 1/3. + //@{ + /** + * Set/Get the scaling factor for the variance in the x-direction. + * Default is 1/3. + */ vtkSetMacro(XVarianceScaleFactor,double); vtkGetMacro(XVarianceScaleFactor,double); + //@} - // Description: - // Set/Get the scaling factor for the variance in the y-direction. - // Default is 1/3. + //@{ + /** + * Set/Get the scaling factor for the variance in the y-direction. + * Default is 1/3. + */ vtkSetMacro(YVarianceScaleFactor,double); vtkGetMacro(YVarianceScaleFactor,double); + //@} - // Description: - // Set/Get the scaling factor for the amplitude. - // Default is 1/3. + //@{ + /** + * Set/Get the scaling factor for the amplitude. + * Default is 1/3. + */ vtkSetMacro(AmplitudeScaleFactor,double); vtkGetMacro(AmplitudeScaleFactor,double); + //@} + + /** + * Construct a terrain consisting of hills on a surface. - // Description: - // Construct a terrain consisting of hills on a surface. - // - // This function performs the mapping \f$f(u,v) \rightarrow (x,y,x)\f$, returning it - // as Pt. It also returns the partial derivatives Du and Dv. - // \f$Pt = (x, y, z), Du = (dx/du, dy/du, dz/du), Dv = (dx/dv, dy/dv, dz/dv)\f$ . - // Then the normal is \f$N = Du X Dv\f$ . + * This function performs the mapping \f$f(u,v) \rightarrow (x,y,x)\f$, returning it + * as Pt. It also returns the partial derivatives Du and Dv. + * \f$Pt = (x, y, z), Du = (dx/du, dy/du, dz/du), Dv = (dx/dv, dy/dv, dz/dv)\f$ . + * Then the normal is \f$N = Du X Dv\f$ . + */ void Evaluate(double uvw[3], double Pt[3], double Duvw[9]) VTK_OVERRIDE; - // Description: - // Calculate a user defined scalar using one or all of uvw, Pt, Duvw. - // - // uvw are the parameters with Pt being the the Cartesian point, - // Duvw are the derivatives of this point with respect to u, v and w. - // Pt, Duvw are obtained from Evaluate(). - // - // This function is only called if the ScalarMode has the value - // vtkParametricFunctionSource::SCALAR_FUNCTION_DEFINED - // - // If the user does not need to calculate a scalar, then the - // instantiated function should return zero. + /** + * Calculate a user defined scalar using one or all of uvw, Pt, Duvw. + + * uvw are the parameters with Pt being the the Cartesian point, + * Duvw are the derivatives of this point with respect to u, v and w. + * Pt, Duvw are obtained from Evaluate(). + + * This function is only called if the ScalarMode has the value + * vtkParametricFunctionSource::SCALAR_FUNCTION_DEFINED + + * If the user does not need to calculate a scalar, then the + * instantiated function should return zero. + */ double EvaluateScalar(double uvw[3], double Pt[3], double Duvw[9]) VTK_OVERRIDE; protected: @@ -184,36 +219,45 @@ private: vtkParametricRandomHills(const vtkParametricRandomHills&) VTK_DELETE_FUNCTION; void operator=(const vtkParametricRandomHills&) VTK_DELETE_FUNCTION; - // Description: - // Initialise the random number generator. + /** + * Initialise the random number generator. + */ void InitRNG ( int RandomSeed ); - // Description: - // Return a random number between 0 and 1. + /** + * Return a random number between 0 and 1. + */ double Rand ( void ); - // Description: - // A random sequence generator. + /** + * A random sequence generator. + */ vtkMinimalStandardRandomSequence *randomSequenceGenerator; - // Description: - // Generate the centers of the hills, their standard deviations and - // their amplitudes. This function creates a series of vectors representing - // the u, v coordinates of each hill, their variances in the u, v directions - // and their amplitudes. + /** + * Generate the centers of the hills, their standard deviations and + * their amplitudes. This function creates a series of vectors representing + * the u, v coordinates of each hill, their variances in the u, v directions + * and their amplitudes. + */ void MakeTheHillData( void ); - // Description: - // True if any parameters have changed. + /** + * True if any parameters have changed. + */ bool ParametersChanged(); - // Description: - // Set the previous values of the parameters with the current values. + /** + * Set the previous values of the parameters with the current values. + */ void CopyParameters(); - // Description: - // Centers (x,y), variances (x,y) and amplitudes of the hills. + //@{ + /** + * Centers (x,y), variances (x,y) and amplitudes of the hills. + */ vtkDoubleArray *hillData; }; + //@} #endif diff --git a/Common/ComputationalGeometry/vtkParametricRoman.h b/Common/ComputationalGeometry/vtkParametricRoman.h index 1d52e295bf636ca4128cee6ac2cd1953ae971879..55cac7233175ab14fad10db7fad18368edb76f20 100644 --- a/Common/ComputationalGeometry/vtkParametricRoman.h +++ b/Common/ComputationalGeometry/vtkParametricRoman.h @@ -12,18 +12,22 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkParametricRoman - Generate Steiner's Roman Surface. -// .SECTION Description -// vtkParametricRoman generates Steiner's Roman Surface. -// -// For further information about this surface, please consult the -// technical description "Parametric surfaces" in http://www.vtk.org/publications -// in the "VTK Technical Documents" section in the VTk.org web pages. -// -// .SECTION Thanks -// Andrew Maclean andrew.amaclean@gmail.com for creating and contributing the -// class. -// +/** + * @class vtkParametricRoman + * @brief Generate Steiner's Roman Surface. + * + * vtkParametricRoman generates Steiner's Roman Surface. + * + * For further information about this surface, please consult the + * technical description "Parametric surfaces" in http://www.vtk.org/publications + * in the "VTK Technical Documents" section in the VTk.org web pages. + * + * @par Thanks: + * Andrew Maclean andrew.amaclean@gmail.com for creating and contributing the + * class. + * +*/ + #ifndef vtkParametricRoman_h #define vtkParametricRoman_h @@ -37,47 +41,54 @@ public: vtkTypeMacro(vtkParametricRoman,vtkParametricFunction); void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE; - // Description - // Return the parametric dimension of the class. + /** + * Return the parametric dimension of the class. + */ int GetDimension() VTK_OVERRIDE {return 2;} - // Description: - // Construct Steiner's Roman Surface with the following parameters: - // MinimumU = 0, MaximumU = Pi, - // MinimumV = 0, MaximumV = Pi, - // JoinU = 1, JoinV = 1, - // TwistU = 1, TwistV = 0; - // ClockwiseOrdering = 1, - // DerivativesAvailable = 1, - // Radius = 1 + /** + * Construct Steiner's Roman Surface with the following parameters: + * MinimumU = 0, MaximumU = Pi, + * MinimumV = 0, MaximumV = Pi, + * JoinU = 1, JoinV = 1, + * TwistU = 1, TwistV = 0; + * ClockwiseOrdering = 1, + * DerivativesAvailable = 1, + * Radius = 1 + */ static vtkParametricRoman *New(); - // Description: - // Set/Get the radius. Default is 1. + //@{ + /** + * Set/Get the radius. Default is 1. + */ vtkSetMacro(Radius,double); vtkGetMacro(Radius,double); + //@} + + /** + * Steiner's Roman Surface - // Description: - // Steiner's Roman Surface - // - // This function performs the mapping \f$f(u,v) \rightarrow (x,y,x)\f$, returning it - // as Pt. It also returns the partial derivatives Du and Dv. - // \f$Pt = (x, y, z), Du = (dx/du, dy/du, dz/du), Dv = (dx/dv, dy/dv, dz/dv)\f$ . - // Then the normal is \f$N = Du X Dv\f$ . + * This function performs the mapping \f$f(u,v) \rightarrow (x,y,x)\f$, returning it + * as Pt. It also returns the partial derivatives Du and Dv. + * \f$Pt = (x, y, z), Du = (dx/du, dy/du, dz/du), Dv = (dx/dv, dy/dv, dz/dv)\f$ . + * Then the normal is \f$N = Du X Dv\f$ . + */ void Evaluate(double uvw[3], double Pt[3], double Duvw[9]) VTK_OVERRIDE; - // Description: - // Calculate a user defined scalar using one or all of uvw, Pt, Duvw. - // - // uvw are the parameters with Pt being the the Cartesian point, - // Duvw are the derivatives of this point with respect to u, v and w. - // Pt, Duvw are obtained from Evaluate(). - // - // This function is only called if the ScalarMode has the value - // vtkParametricFunctionSource::SCALAR_FUNCTION_DEFINED - // - // If the user does not need to calculate a scalar, then the - // instantiated function should return zero. + /** + * Calculate a user defined scalar using one or all of uvw, Pt, Duvw. + + * uvw are the parameters with Pt being the the Cartesian point, + * Duvw are the derivatives of this point with respect to u, v and w. + * Pt, Duvw are obtained from Evaluate(). + + * This function is only called if the ScalarMode has the value + * vtkParametricFunctionSource::SCALAR_FUNCTION_DEFINED + + * If the user does not need to calculate a scalar, then the + * instantiated function should return zero. + */ double EvaluateScalar(double uvw[3], double Pt[3], double Duvw[9]) VTK_OVERRIDE; diff --git a/Common/ComputationalGeometry/vtkParametricSpline.h b/Common/ComputationalGeometry/vtkParametricSpline.h index 9458876207db82e59a534c5296431ddc127dce1a..fd2ef213221e0453ab04ecb458b81ffc8f049150 100644 --- a/Common/ComputationalGeometry/vtkParametricSpline.h +++ b/Common/ComputationalGeometry/vtkParametricSpline.h @@ -12,25 +12,28 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkParametricSpline - parametric function for 1D interpolating splines -// .SECTION Description -// vtkParametricSpline is a parametric function for 1D interpolating splines. -// vtkParametricSpline maps the single parameter u into a 3D point (x,y,z) -// using three instances of interpolating splines. This family of 1D splines -// is guaranteed to be parameterized in the interval [0,1]. Attempting to -// evaluate outside this interval will cause the parameter u to be clamped in -// the range [0,1]. -// -// When constructed, this class creates instances of vtkCardinalSpline for -// each of the x-y-z coordinates. The user may choose to replace these with -// their own instances of subclasses of vtkSpline. -// -// .SECTION Caveats -// If you wish to tessellate the spline, use the class -// vtkParametricFunctionSource. -// -// .SECTION See Also -// vtkSpline vtkKochanekSpline vtkCardinalSpline +/** + * @class vtkParametricSpline + * @brief parametric function for 1D interpolating splines + * + * vtkParametricSpline is a parametric function for 1D interpolating splines. + * vtkParametricSpline maps the single parameter u into a 3D point (x,y,z) + * using three instances of interpolating splines. This family of 1D splines + * is guaranteed to be parameterized in the interval [0,1]. Attempting to + * evaluate outside this interval will cause the parameter u to be clamped in + * the range [0,1]. + * + * When constructed, this class creates instances of vtkCardinalSpline for + * each of the x-y-z coordinates. The user may choose to replace these with + * their own instances of subclasses of vtkSpline. + * + * @warning + * If you wish to tessellate the spline, use the class + * vtkParametricFunctionSource. + * + * @sa + * vtkSpline vtkKochanekSpline vtkCardinalSpline +*/ #ifndef vtkParametricSpline_h #define vtkParametricSpline_h @@ -47,94 +50,119 @@ public: vtkTypeMacro(vtkParametricSpline,vtkParametricFunction); void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE; - // Description: - // Construct the spline with the following parameters: - // MinimumU = 0, MaximumU = 1, JoinU = 0 (unless the spline is - // closed, then JoinU = 1), TwistU = 0, DerivativesSupplied = 0 - // (the other vtkParametricFunction parameters are ignored). + /** + * Construct the spline with the following parameters: + * MinimumU = 0, MaximumU = 1, JoinU = 0 (unless the spline is + * closed, then JoinU = 1), TwistU = 0, DerivativesSupplied = 0 + * (the other vtkParametricFunction parameters are ignored). + */ static vtkParametricSpline *New(); - // Description - // Return the parametric dimension of the class. + /** + * Return the parametric dimension of the class. + */ int GetDimension() VTK_OVERRIDE {return 1;} - // Description: - // Evaluate the spline at parametric coordinate u[0] returning - // the point coordinate Pt[3]. + /** + * Evaluate the spline at parametric coordinate u[0] returning + * the point coordinate Pt[3]. + */ void Evaluate(double u[3], double Pt[3], double Du[9]) VTK_OVERRIDE; - // Description: - // Evaluate a scalar value at parametric coordinate u[0] and Pt[3]. - // The scalar value is just the parameter u[0]. + /** + * Evaluate a scalar value at parametric coordinate u[0] and Pt[3]. + * The scalar value is just the parameter u[0]. + */ double EvaluateScalar(double u[3], double Pt[3], double Du[9]) VTK_OVERRIDE; - // Description: - // By default, this class is constructed with three instances of - // vtkCardinalSpline (for each of the x-y-z coordinate axes). The user may - // choose to create and assign their own instances of vtkSpline. + //@{ + /** + * By default, this class is constructed with three instances of + * vtkCardinalSpline (for each of the x-y-z coordinate axes). The user may + * choose to create and assign their own instances of vtkSpline. + */ void SetXSpline(vtkSpline*); void SetYSpline(vtkSpline*); void SetZSpline(vtkSpline*); vtkGetObjectMacro(XSpline,vtkSpline); vtkGetObjectMacro(YSpline,vtkSpline); vtkGetObjectMacro(ZSpline,vtkSpline); - - // Description: - // Specify the list of points defining the spline. Do this by - // specifying a vtkPoints array containing the points. Note that - // the order of the points in vtkPoints is the order that the - // splines will be fit. + //@} + + //@{ + /** + * Specify the list of points defining the spline. Do this by + * specifying a vtkPoints array containing the points. Note that + * the order of the points in vtkPoints is the order that the + * splines will be fit. + */ void SetPoints(vtkPoints*); vtkGetObjectMacro(Points,vtkPoints); + //@} - // Description: - // Another API to set the points. Set the number of points and then set the - // individual point coordinates. + //@{ + /** + * Another API to set the points. Set the number of points and then set the + * individual point coordinates. + */ void SetNumberOfPoints(vtkIdType numPts); void SetPoint(vtkIdType index, double x, double y, double z); - - // Description: - // Control whether the spline is open or closed. A closed spline forms - // a continuous loop: the first and last points are the same, and - // derivatives are continuous. + //@} + + //@{ + /** + * Control whether the spline is open or closed. A closed spline forms + * a continuous loop: the first and last points are the same, and + * derivatives are continuous. + */ vtkSetMacro(Closed,int); vtkGetMacro(Closed,int); vtkBooleanMacro(Closed,int); + //@} - // Description: - // Control whether the spline is parameterized by length or by point index. - // Default is by length. + //@{ + /** + * Control whether the spline is parameterized by length or by point index. + * Default is by length. + */ vtkSetMacro(ParameterizeByLength,int); vtkGetMacro(ParameterizeByLength,int); vtkBooleanMacro(ParameterizeByLength,int); + //@} + + //@{ + /** + * Set the type of constraint of the left(right) end points. Four + * constraints are available: + + * 0: the first derivative at left(right) most point is determined + * from the line defined from the first(last) two points. + + * 1: the first derivative at left(right) most point is set to + * Left(Right)Value. + + * 2: the second derivative at left(right) most point is set to + * Left(Right)Value. - // Description: - // Set the type of constraint of the left(right) end points. Four - // constraints are available: - // - // 0: the first derivative at left(right) most point is determined - // from the line defined from the first(last) two points. - // - // 1: the first derivative at left(right) most point is set to - // Left(Right)Value. - // - // 2: the second derivative at left(right) most point is set to - // Left(Right)Value. - // - // 3: the second derivative at left(right)most points is Left(Right)Value - // times second derivative at first interior point. + * 3: the second derivative at left(right)most points is Left(Right)Value + * times second derivative at first interior point. + */ vtkSetClampMacro(LeftConstraint,int,0,3); vtkGetMacro(LeftConstraint,int); vtkSetClampMacro(RightConstraint,int,0,3); vtkGetMacro(RightConstraint,int); + //@} - // Description: - // The values of the derivative on the left and right sides. The value - // is used only if the left(right) constraint is type 1-3. + //@{ + /** + * The values of the derivative on the left and right sides. The value + * is used only if the left(right) constraint is type 1-3. + */ vtkSetMacro(LeftValue,double); vtkGetMacro(LeftValue,double); vtkSetMacro(RightValue,double); vtkGetMacro(RightValue,double); + //@} protected: vtkParametricSpline(); diff --git a/Common/ComputationalGeometry/vtkParametricSuperEllipsoid.h b/Common/ComputationalGeometry/vtkParametricSuperEllipsoid.h index 9bc9778815e351ef16614c8679e143f8d1de80e9..34e5491ffdcb03276a8faaa0628400f587b38564 100644 --- a/Common/ComputationalGeometry/vtkParametricSuperEllipsoid.h +++ b/Common/ComputationalGeometry/vtkParametricSuperEllipsoid.h @@ -12,27 +12,31 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkParametricSuperEllipsoid - Generate a superellipsoid. -// .SECTION Description -// vtkParametricSuperEllipsoid generates a superellipsoid. A superellipsoid -// is a versatile primitive that is controlled by two parameters n1 and -// n2. As special cases it can represent a sphere, square box, and closed -// cylindrical can. -// -// For further information about this surface, please consult the -// technical description "Parametric surfaces" in http://www.vtk.org/publications -// in the "VTK Technical Documents" section in the VTk.org web pages. -// -// Also see: http://paulbourke.net/geometry/superellipse/ -// -// .SECTION Caveats -// Care needs to be taken specifying the bounds correctly. You may need to -// carefully adjust MinimumU, MinimumV, MaximumU, MaximumV. -// -// .SECTION Thanks -// Andrew Maclean andrew.amaclean@gmail.com for creating and contributing the -// class. -// +/** + * @class vtkParametricSuperEllipsoid + * @brief Generate a superellipsoid. + * + * vtkParametricSuperEllipsoid generates a superellipsoid. A superellipsoid + * is a versatile primitive that is controlled by two parameters n1 and + * n2. As special cases it can represent a sphere, square box, and closed + * cylindrical can. + * + * For further information about this surface, please consult the + * technical description "Parametric surfaces" in http://www.vtk.org/publications + * in the "VTK Technical Documents" section in the VTk.org web pages. + * + * Also see: http://paulbourke.net/geometry/superellipse/ + * + * @warning + * Care needs to be taken specifying the bounds correctly. You may need to + * carefully adjust MinimumU, MinimumV, MaximumU, MaximumV. + * + * @par Thanks: + * Andrew Maclean andrew.amaclean@gmail.com for creating and contributing the + * class. + * +*/ + #ifndef vtkParametricSuperEllipsoid_h #define vtkParametricSuperEllipsoid_h @@ -45,68 +49,87 @@ public: vtkTypeMacro(vtkParametricSuperEllipsoid,vtkParametricFunction); void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE; - // Description: - // Construct a superellipsoid with the following parameters: - // MinimumU = 0, MaximumU = 2*Pi, - // MinimumV = 0, MaximumV = Pi, - // JoinU = 1, JoinV = 0, - // TwistU = 0, TwistV = 0, - // ClockwiseOrdering = 1, - // DerivativesAvailable = 0, - // N1 = 1, N2 = 1, XRadius = 1, YRadius = 1, - // ZRadius = 1, a sphere in this case. + /** + * Construct a superellipsoid with the following parameters: + * MinimumU = 0, MaximumU = 2*Pi, + * MinimumV = 0, MaximumV = Pi, + * JoinU = 1, JoinV = 0, + * TwistU = 0, TwistV = 0, + * ClockwiseOrdering = 1, + * DerivativesAvailable = 0, + * N1 = 1, N2 = 1, XRadius = 1, YRadius = 1, + * ZRadius = 1, a sphere in this case. + */ static vtkParametricSuperEllipsoid *New(); - // Description - // Return the parametric dimension of the class. + /** + * Return the parametric dimension of the class. + */ int GetDimension() VTK_OVERRIDE {return 2;} - // Description: - // Set/Get the scaling factor for the x-axis. Default is 1. + //@{ + /** + * Set/Get the scaling factor for the x-axis. Default is 1. + */ vtkSetMacro(XRadius,double); vtkGetMacro(XRadius,double); + //@} - // Description: - // Set/Get the scaling factor for the y-axis. Default is 1. + //@{ + /** + * Set/Get the scaling factor for the y-axis. Default is 1. + */ vtkSetMacro(YRadius,double); vtkGetMacro(YRadius,double); + //@} - // Description: - // Set/Get the scaling factor for the z-axis. Default is 1. + //@{ + /** + * Set/Get the scaling factor for the z-axis. Default is 1. + */ vtkSetMacro(ZRadius,double); vtkGetMacro(ZRadius,double); + //@} - // Description: - // Set/Get the "squareness" parameter in the z axis. Default is 1. + //@{ + /** + * Set/Get the "squareness" parameter in the z axis. Default is 1. + */ vtkSetMacro(N1,double); vtkGetMacro(N1,double); + //@} - // Description: - // Set/Get the "squareness" parameter in the x-y plane. Default is 1. + //@{ + /** + * Set/Get the "squareness" parameter in the x-y plane. Default is 1. + */ vtkSetMacro(N2,double); vtkGetMacro(N2,double); + //@} + + /** + * A superellipsoid. - // Description: - // A superellipsoid. - // - // This function performs the mapping \f$f(u,v) \rightarrow (x,y,x)\f$, returning it - // as Pt. It also returns the partial derivatives Du and Dv. - // \f$Pt = (x, y, z), Du = (dx/du, dy/du, dz/du), Dv = (dx/dv, dy/dv, dz/dv)\f$ . - // Then the normal is \f$N = Du X Dv\f$ . + * This function performs the mapping \f$f(u,v) \rightarrow (x,y,x)\f$, returning it + * as Pt. It also returns the partial derivatives Du and Dv. + * \f$Pt = (x, y, z), Du = (dx/du, dy/du, dz/du), Dv = (dx/dv, dy/dv, dz/dv)\f$ . + * Then the normal is \f$N = Du X Dv\f$ . + */ void Evaluate(double uvw[3], double Pt[3], double Duvw[9]) VTK_OVERRIDE; - // Description: - // Calculate a user defined scalar using one or all of uvw, Pt, Duvw. - // - // uvw are the parameters with Pt being the the cartesian point, - // Duvw are the derivatives of this point with respect to u, v and w. - // Pt, Duvw are obtained from Evaluate(). - // - // This function is only called if the ScalarMode has the value - // vtkParametricFunctionSource::SCALAR_FUNCTION_DEFINED - // - // If the user does not need to calculate a scalar, then the - // instantiated function should return zero. + /** + * Calculate a user defined scalar using one or all of uvw, Pt, Duvw. + + * uvw are the parameters with Pt being the the cartesian point, + * Duvw are the derivatives of this point with respect to u, v and w. + * Pt, Duvw are obtained from Evaluate(). + + * This function is only called if the ScalarMode has the value + * vtkParametricFunctionSource::SCALAR_FUNCTION_DEFINED + + * If the user does not need to calculate a scalar, then the + * instantiated function should return zero. + */ double EvaluateScalar(double uvw[3], double Pt[3], double Duvw[9]) VTK_OVERRIDE; protected: @@ -124,8 +147,9 @@ private: vtkParametricSuperEllipsoid(const vtkParametricSuperEllipsoid&) VTK_DELETE_FUNCTION; void operator=(const vtkParametricSuperEllipsoid&) VTK_DELETE_FUNCTION; - // Description: - // Calculate sign(x)*(abs(x)^n). + /** + * Calculate sign(x)*(abs(x)^n). + */ double Power ( double x, double n ); }; diff --git a/Common/ComputationalGeometry/vtkParametricSuperToroid.h b/Common/ComputationalGeometry/vtkParametricSuperToroid.h index cceefa634d94ee7254a088b6e1be66f991bd875f..6b6fea9672b3d57699bc42b1e7dd85f3c2f2bfde 100644 --- a/Common/ComputationalGeometry/vtkParametricSuperToroid.h +++ b/Common/ComputationalGeometry/vtkParametricSuperToroid.h @@ -12,31 +12,35 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkParametricSuperToroid - Generate a supertoroid. -// .SECTION Description -// vtkParametricSuperToroid generates a supertoroid. Essentially a -// supertoroid is a torus with the sine and cosine terms raised to a power. -// A supertoroid is a versatile primitive that is controlled by four -// parameters r0, r1, n1 and n2. r0, r1 determine the type of torus whilst -// the value of n1 determines the shape of the torus ring and n2 determines -// the shape of the cross section of the ring. It is the different values of -// these powers which give rise to a family of 3D shapes that are all -// basically toroidal in shape. -// -// For further information about this surface, please consult the -// technical description "Parametric surfaces" in http://www.vtk.org/publications -// in the "VTK Technical Documents" section in the VTk.org web pages. -// -// Also see: http://paulbourke.net/geometry/torus/#super. -// -// .SECTION Caveats -// Care needs to be taken specifying the bounds correctly. You may need to -// carefully adjust MinimumU, MinimumV, MaximumU, MaximumV. -// -// .SECTION Thanks -// Andrew Maclean andrew.amaclean@gmail.com for creating and contributing the -// class. -// +/** + * @class vtkParametricSuperToroid + * @brief Generate a supertoroid. + * + * vtkParametricSuperToroid generates a supertoroid. Essentially a + * supertoroid is a torus with the sine and cosine terms raised to a power. + * A supertoroid is a versatile primitive that is controlled by four + * parameters r0, r1, n1 and n2. r0, r1 determine the type of torus whilst + * the value of n1 determines the shape of the torus ring and n2 determines + * the shape of the cross section of the ring. It is the different values of + * these powers which give rise to a family of 3D shapes that are all + * basically toroidal in shape. + * + * For further information about this surface, please consult the + * technical description "Parametric surfaces" in http://www.vtk.org/publications + * in the "VTK Technical Documents" section in the VTk.org web pages. + * + * Also see: http://paulbourke.net/geometry/torus/#super. + * + * @warning + * Care needs to be taken specifying the bounds correctly. You may need to + * carefully adjust MinimumU, MinimumV, MaximumU, MaximumV. + * + * @par Thanks: + * Andrew Maclean andrew.amaclean@gmail.com for creating and contributing the + * class. + * +*/ + #ifndef vtkParametricSuperToroid_h #define vtkParametricSuperToroid_h @@ -49,81 +53,106 @@ public: vtkTypeMacro(vtkParametricSuperToroid,vtkParametricFunction); void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE; - // Description: - // Construct a supertoroid with the following parameters: - // MinimumU = 0, MaximumU = 2*Pi, - // MinimumV = 0, MaximumV = 2*Pi, - // JoinU = 1, JoinV = 1, - // TwistU = 0, TwistV = 0, - // ClockwiseOrdering = 1, - // DerivativesAvailable = 0, - // RingRadius = 1, CrossSectionRadius = 0.5, - // N1 = 1, N2 = 1, XRadius = 1, - // YRadius = 1, ZRadius = 1, a torus in this case. + /** + * Construct a supertoroid with the following parameters: + * MinimumU = 0, MaximumU = 2*Pi, + * MinimumV = 0, MaximumV = 2*Pi, + * JoinU = 1, JoinV = 1, + * TwistU = 0, TwistV = 0, + * ClockwiseOrdering = 1, + * DerivativesAvailable = 0, + * RingRadius = 1, CrossSectionRadius = 0.5, + * N1 = 1, N2 = 1, XRadius = 1, + * YRadius = 1, ZRadius = 1, a torus in this case. + */ static vtkParametricSuperToroid *New(); - // Description - // Return the parametric dimension of the class. + /** + * Return the parametric dimension of the class. + */ int GetDimension() VTK_OVERRIDE {return 2;} - // Description: - // Set/Get the radius from the center to the middle of the ring of the - // supertoroid. Default is 1. + //@{ + /** + * Set/Get the radius from the center to the middle of the ring of the + * supertoroid. Default is 1. + */ vtkSetMacro(RingRadius,double); vtkGetMacro(RingRadius,double); + //@} - // Description: - // Set/Get the radius of the cross section of ring of the supertoroid. - // Default = 0.5. + //@{ + /** + * Set/Get the radius of the cross section of ring of the supertoroid. + * Default = 0.5. + */ vtkSetMacro(CrossSectionRadius,double); vtkGetMacro(CrossSectionRadius,double); + //@} - // Description: - // Set/Get the scaling factor for the x-axis. Default is 1. + //@{ + /** + * Set/Get the scaling factor for the x-axis. Default is 1. + */ vtkSetMacro(XRadius,double); vtkGetMacro(XRadius,double); + //@} - // Description: - // Set/Get the scaling factor for the y-axis. Default is 1. + //@{ + /** + * Set/Get the scaling factor for the y-axis. Default is 1. + */ vtkSetMacro(YRadius,double); vtkGetMacro(YRadius,double); + //@} - // Description: - // Set/Get the scaling factor for the z-axis. Default is 1. + //@{ + /** + * Set/Get the scaling factor for the z-axis. Default is 1. + */ vtkSetMacro(ZRadius,double); vtkGetMacro(ZRadius,double); + //@} - // Description: - // Set/Get the shape of the torus ring. Default is 1. + //@{ + /** + * Set/Get the shape of the torus ring. Default is 1. + */ vtkSetMacro(N1,double); vtkGetMacro(N1,double); + //@} - // Description: - // Set/Get the shape of the cross section of the ring. Default is 1. + //@{ + /** + * Set/Get the shape of the cross section of the ring. Default is 1. + */ vtkSetMacro(N2,double); vtkGetMacro(N2,double); + //@} + + /** + * A supertoroid. - // Description: - // A supertoroid. - // - // This function performs the mapping \f$f(u,v) \rightarrow (x,y,x)\f$, returning it - // as Pt. It also returns the partial derivatives Du and Dv. - // \f$Pt = (x, y, z), Du = (dx/du, dy/du, dz/du), Dv = (dx/dv, dy/dv, dz/dv)\f$ . - // Then the normal is \f$N = Du X Dv\f$ . + * This function performs the mapping \f$f(u,v) \rightarrow (x,y,x)\f$, returning it + * as Pt. It also returns the partial derivatives Du and Dv. + * \f$Pt = (x, y, z), Du = (dx/du, dy/du, dz/du), Dv = (dx/dv, dy/dv, dz/dv)\f$ . + * Then the normal is \f$N = Du X Dv\f$ . + */ void Evaluate(double uvw[3], double Pt[3], double Duvw[9]) VTK_OVERRIDE; - // Description: - // Calculate a user defined scalar using one or all of uvw, Pt, Duvw. - // - // uvw are the parameters with Pt being the the cartesian point, - // Duvw are the derivatives of this point with respect to u, v and w. - // Pt, Duvw are obtained from Evaluate(). - // - // This function is only called if the ScalarMode has the value - // vtkParametricFunctionSource::SCALAR_FUNCTION_DEFINED - // - // If the user does not need to calculate a scalar, then the - // instantiated function should return zero. + /** + * Calculate a user defined scalar using one or all of uvw, Pt, Duvw. + + * uvw are the parameters with Pt being the the cartesian point, + * Duvw are the derivatives of this point with respect to u, v and w. + * Pt, Duvw are obtained from Evaluate(). + + * This function is only called if the ScalarMode has the value + * vtkParametricFunctionSource::SCALAR_FUNCTION_DEFINED + + * If the user does not need to calculate a scalar, then the + * instantiated function should return zero. + */ double EvaluateScalar(double uvw[3], double Pt[3], double Duvw[9]) VTK_OVERRIDE; protected: @@ -143,8 +172,9 @@ private: vtkParametricSuperToroid(const vtkParametricSuperToroid&) VTK_DELETE_FUNCTION; void operator=(const vtkParametricSuperToroid&) VTK_DELETE_FUNCTION; - // Description: - // Calculate sign(x)*(abs(x)^n). + /** + * Calculate sign(x)*(abs(x)^n). + */ double Power ( double x, double n ); }; diff --git a/Common/ComputationalGeometry/vtkParametricTorus.h b/Common/ComputationalGeometry/vtkParametricTorus.h index dfe17e279aa0727b0cbd0e030db2caa50691dcdd..6905cd233223628591a0c478a1909f684d1b2613 100644 --- a/Common/ComputationalGeometry/vtkParametricTorus.h +++ b/Common/ComputationalGeometry/vtkParametricTorus.h @@ -12,18 +12,22 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkParametricTorus - Generate a torus. -// .SECTION Description -// vtkParametricTorus generates a torus. -// -// For further information about this surface, please consult the -// technical description "Parametric surfaces" in http://www.vtk.org/publications -// in the "VTK Technical Documents" section in the VTk.org web pages. -// -// .SECTION Thanks -// Andrew Maclean andrew.amaclean@gmail.com for creating and contributing the -// class. -// +/** + * @class vtkParametricTorus + * @brief Generate a torus. + * + * vtkParametricTorus generates a torus. + * + * For further information about this surface, please consult the + * technical description "Parametric surfaces" in http://www.vtk.org/publications + * in the "VTK Technical Documents" section in the VTk.org web pages. + * + * @par Thanks: + * Andrew Maclean andrew.amaclean@gmail.com for creating and contributing the + * class. + * +*/ + #ifndef vtkParametricTorus_h #define vtkParametricTorus_h @@ -37,53 +41,63 @@ public: vtkTypeMacro(vtkParametricTorus,vtkParametricFunction); void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE; - // Description: - // Construct a torus with the following parameters: - // MinimumU = 0, MaximumU = 2*Pi, - // MinimumV = 0, MaximumV = 2*Pi, - // JoinU = 1, JoinV = 1, - // TwistU = 0, TwistV = 0, - // ClockwiseOrdering = 1, - // DerivativesAvailable = 1, - // RingRadius = 1, CrossSectionRadius = 0.5. + /** + * Construct a torus with the following parameters: + * MinimumU = 0, MaximumU = 2*Pi, + * MinimumV = 0, MaximumV = 2*Pi, + * JoinU = 1, JoinV = 1, + * TwistU = 0, TwistV = 0, + * ClockwiseOrdering = 1, + * DerivativesAvailable = 1, + * RingRadius = 1, CrossSectionRadius = 0.5. + */ static vtkParametricTorus *New(); - // Description: - // Set/Get the radius from the center to the middle of the ring of the - // torus. Default is 1.0. + //@{ + /** + * Set/Get the radius from the center to the middle of the ring of the + * torus. Default is 1.0. + */ vtkSetMacro(RingRadius,double); vtkGetMacro(RingRadius,double); + //@} - // Description: - // Set/Get the radius of the cross section of ring of the torus. Default is 0.5. + //@{ + /** + * Set/Get the radius of the cross section of ring of the torus. Default is 0.5. + */ vtkSetMacro(CrossSectionRadius,double); vtkGetMacro(CrossSectionRadius,double); + //@} - // Description - // Return the parametric dimension of the class. + /** + * Return the parametric dimension of the class. + */ int GetDimension() VTK_OVERRIDE {return 2;} - // Description: - // A torus. - // - // This function performs the mapping \f$f(u,v) \rightarrow (x,y,x)\f$, returning it - // as Pt. It also returns the partial derivatives Du and Dv. - // \f$Pt = (x, y, z), Du = (dx/du, dy/du, dz/du), Dv = (dx/dv, dy/dv, dz/dv)\f$. - // Then the normal is \f$N = Du X Dv\f$. + /** + * A torus. + + * This function performs the mapping \f$f(u,v) \rightarrow (x,y,x)\f$, returning it + * as Pt. It also returns the partial derivatives Du and Dv. + * \f$Pt = (x, y, z), Du = (dx/du, dy/du, dz/du), Dv = (dx/dv, dy/dv, dz/dv)\f$. + * Then the normal is \f$N = Du X Dv\f$. + */ void Evaluate(double uvw[3], double Pt[3], double Duvw[9]) VTK_OVERRIDE; - // Description: - // Calculate a user defined scalar using one or all of uvw, Pt, Duvw. - // - // uvw are the parameters with Pt being the the Cartesian point, - // Duvw are the derivatives of this point with respect to u, v and w. - // Pt, Duvw are obtained from Evaluate(). - // - // This function is only called if the ScalarMode has the value - // vtkParametricFunctionSource::SCALAR_FUNCTION_DEFINED - // - // If the user does not need to calculate a scalar, then the - // instantiated function should return zero. + /** + * Calculate a user defined scalar using one or all of uvw, Pt, Duvw. + + * uvw are the parameters with Pt being the the Cartesian point, + * Duvw are the derivatives of this point with respect to u, v and w. + * Pt, Duvw are obtained from Evaluate(). + + * This function is only called if the ScalarMode has the value + * vtkParametricFunctionSource::SCALAR_FUNCTION_DEFINED + + * If the user does not need to calculate a scalar, then the + * instantiated function should return zero. + */ double EvaluateScalar(double uvw[3], double Pt[3], double Duvw[9]) VTK_OVERRIDE; protected: diff --git a/Common/Core/Testing/Cxx/vtkTestNewVar.h b/Common/Core/Testing/Cxx/vtkTestNewVar.h index 928ee82bf0493cf871facad0febf8e42c07a6311..49b866c5ce74e7a0b8ff32cb49b285e9467b15a0 100644 --- a/Common/Core/Testing/Cxx/vtkTestNewVar.h +++ b/Common/Core/Testing/Cxx/vtkTestNewVar.h @@ -12,9 +12,11 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME Test of vtkNew. -// .SECTION Description -// Tests instantiations of the vtkNew class template. +/** + * @class Test + * + * Tests instantiations of the vtkNew class template. +*/ #ifndef vtkTestNewVar_h #define vtkTestNewVar_h @@ -32,14 +34,16 @@ public: vtkTypeMacro(vtkTestNewVar, vtkObject) void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE; - // Description: - // Get the reference count for the points object. + /** + * Get the reference count for the points object. + */ vtkIdType GetPointsRefCount(); - // Description: - // This is just for testing - return the points as a vtkObject so that it can - // be assigned to a vtkSmartPointer without including the vtkPoints2D header - // and defeating part of the point of the test. + /** + * This is just for testing - return the points as a vtkObject so that it can + * be assigned to a vtkSmartPointer without including the vtkPoints2D header + * and defeating part of the point of the test. + */ vtkObject * GetPoints(); protected: diff --git a/Common/Core/vtkABI.h b/Common/Core/vtkABI.h index ff3841a4f7baf7e95c35ac4b8b635162110ef3f1..e83f07f720a27c88ffcc0c729c02ea85fbdca559 100644 --- a/Common/Core/vtkABI.h +++ b/Common/Core/vtkABI.h @@ -12,31 +12,34 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkABI - manage macros for exporting symbols in the binary interface. -// .SECTION Description -// This header defines the macros for importing and exporting symbols in shared -// objects (DLLs, etc). All VTK headers should use these macros to define the -// kit specific import/export macros. So for the vtkCommon kit this might be, -// -// \code -// #include "vtkABI.h" -// -// #if defined(VTK_BUILD_SHARED_LIBS) -// # if defined(vtkCommon_EXPORTS) -// # define VTK_COMMON_EXPORT VTK_ABI_EXPORT -// # else -// # define VTK_COMMON_EXPORT VTK_ABI_IMPORT -// # endif -// #else -// # define VTK_COMMON_EXPORT -// #endif -// \endcode -// -// See http://gcc.gnu.org/wiki/Visibility for a discussion of the symbol -// visibility support in GCC. The project must pass extra CFLAGS/CXXFLAGS in -// order to change the default symbol visibility when using GCC. -// Currently hidden is not used, but it can be used to explicitly hide -// symbols from external linkage. +/** + * @class vtkABI + * @brief manage macros for exporting symbols in the binary interface. + * + * This header defines the macros for importing and exporting symbols in shared + * objects (DLLs, etc). All VTK headers should use these macros to define the + * kit specific import/export macros. So for the vtkCommon kit this might be, + * + * \code + * #include "vtkABI.h" + * + * #if defined(VTK_BUILD_SHARED_LIBS) + * # if defined(vtkCommon_EXPORTS) + * # define VTK_COMMON_EXPORT VTK_ABI_EXPORT + * # else + * # define VTK_COMMON_EXPORT VTK_ABI_IMPORT + * # endif + * #else + * # define VTK_COMMON_EXPORT + * #endif + * \endcode + * + * See http://gcc.gnu.org/wiki/Visibility for a discussion of the symbol + * visibility support in GCC. The project must pass extra CFLAGS/CXXFLAGS in + * order to change the default symbol visibility when using GCC. + * Currently hidden is not used, but it can be used to explicitly hide + * symbols from external linkage. +*/ #ifndef vtkABI_h #define vtkABI_h diff --git a/Common/Core/vtkAOSDataArrayTemplate.h b/Common/Core/vtkAOSDataArrayTemplate.h index 62dcc743ffe52c777c0e25d8e1c2fc66d4d4b39d..bfccdd0fa8e56e8d94b4fe4501b06b4c43da635f 100644 --- a/Common/Core/vtkAOSDataArrayTemplate.h +++ b/Common/Core/vtkAOSDataArrayTemplate.h @@ -12,18 +12,21 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkAOSDataArrayTemplate - Array-Of-Structs implementation of -// vtkGenericDataArray. -// -// .SECTION Description -// vtkGenericDataArray specialization that stores data array in the traditional -// VTK memory layout where a 3 component is stored in contiguous memory as -// \c A1A2A2B1B2B3C1C2C3 ... where A,B,C,... are tuples. -// -// This replaces vtkDataArrayTemplate. -// -// .SECTION See Also -// vtkGenericDataArray vtkSOADataArrayTemplate +/** + * @class vtkAOSDataArrayTemplate + * @brief Array-Of-Structs implementation of + * vtkGenericDataArray. + * + * + * vtkGenericDataArray specialization that stores data array in the traditional + * VTK memory layout where a 3 component is stored in contiguous memory as + * \c A1A2A2B1B2B3C1C2C3 ... where A,B,C,... are tuples. + * + * This replaces vtkDataArrayTemplate. + * + * @sa + * vtkGenericDataArray vtkSOADataArrayTemplate +*/ #ifndef vtkAOSDataArrayTemplate_h #define vtkAOSDataArrayTemplate_h @@ -53,22 +56,26 @@ public: static vtkAOSDataArrayTemplate* New(); - // Description: - // Get the value at @a valueIdx. @a valueIdx assumes AOS ordering. + /** + * Get the value at @a valueIdx. @a valueIdx assumes AOS ordering. + */ inline ValueType GetValue(vtkIdType valueIdx) const { return this->Buffer->GetBuffer()[valueIdx]; } - // Description: - // Set the value at @a valueIdx to @a value. @a valueIdx assumes AOS ordering. + /** + * Set the value at @a valueIdx to @a value. @a valueIdx assumes AOS ordering. + */ inline void SetValue(vtkIdType valueIdx, ValueType value) { this->Buffer->GetBuffer()[valueIdx] = value; } - // Description: - // Copy the tuple at @a tupleIdx into @a tuple. + //@{ + /** + * Copy the tuple at @a tupleIdx into @a tuple. + */ inline void GetTypedTuple(vtkIdType tupleIdx, ValueType* tuple) const { const vtkIdType valueIdx = tupleIdx * this->NumberOfComponents; @@ -76,87 +83,108 @@ public: this->Buffer->GetBuffer() + valueIdx + this->NumberOfComponents, tuple); } + //@} - // Description: - // Set this array's tuple at @a tupleIdx to the values in @a tuple. + //@{ + /** + * Set this array's tuple at @a tupleIdx to the values in @a tuple. + */ inline void SetTypedTuple(vtkIdType tupleIdx, const ValueType* tuple) { const vtkIdType valueIdx = tupleIdx * this->NumberOfComponents; std::copy(tuple, tuple + this->NumberOfComponents, this->Buffer->GetBuffer() + valueIdx); } + //@} - // Description: - // Get component @a comp of the tuple at @a tupleIdx. + /** + * Get component @a comp of the tuple at @a tupleIdx. + */ inline ValueType GetTypedComponent(vtkIdType tupleIdx, int comp) const { return this->Buffer->GetBuffer()[this->NumberOfComponents*tupleIdx + comp]; } - // Description: - // Set component @a comp of the tuple at @a tupleIdx to @a value. + //@{ + /** + * Set component @a comp of the tuple at @a tupleIdx to @a value. + */ inline void SetTypedComponent(vtkIdType tupleIdx, int comp, ValueType value) { const vtkIdType valueIdx = tupleIdx * this->NumberOfComponents + comp; this->SetValue(valueIdx, value); } - - // Description: - // Get the address of a particular data index. Make sure data is allocated - // for the number of items requested. Set MaxId according to the number of - // data values requested. + //@} + + //@{ + /** + * Get the address of a particular data index. Make sure data is allocated + * for the number of items requested. Set MaxId according to the number of + * data values requested. + */ ValueType* WritePointer(vtkIdType valueIdx, vtkIdType numValues); void* WriteVoidPointer(vtkIdType valueIdx, vtkIdType numValues) VTK_OVERRIDE; - - // Description: - // Get the address of a particular data index. Performs no checks - // to verify that the memory has been allocated etc. - // Use of this method is discouraged, as newer arrays require a deep-copy of - // the array data in order to return a suitable pointer. See vtkArrayDispatch - // for a safer alternative for fast data access. + //@} + + //@{ + /** + * Get the address of a particular data index. Performs no checks + * to verify that the memory has been allocated etc. + * Use of this method is discouraged, as newer arrays require a deep-copy of + * the array data in order to return a suitable pointer. See vtkArrayDispatch + * for a safer alternative for fast data access. + */ ValueType* GetPointer(vtkIdType valueIdx); void* GetVoidPointer(vtkIdType valueIdx) VTK_OVERRIDE; - - // Description: - // This method lets the user specify data to be held by the array. The - // array argument is a pointer to the data. size is the size of the - // array supplied by the user. Set save to 1 to keep the class from - // deleting the array when it cleans up or reallocates memory. The class - // uses the actual array provided; it does not copy the data from the - // suppled array. If specified, the delete method determines how the data - // array will be deallocated. If the delete method is - // VTK_DATA_ARRAY_FREE, free() will be used. If the delete method is - // DELETE, delete[] will be used. The default is FREE. + //@} + + //@{ + /** + * This method lets the user specify data to be held by the array. The + * array argument is a pointer to the data. size is the size of the + * array supplied by the user. Set save to 1 to keep the class from + * deleting the array when it cleans up or reallocates memory. The class + * uses the actual array provided; it does not copy the data from the + * suppled array. If specified, the delete method determines how the data + * array will be deallocated. If the delete method is + * VTK_DATA_ARRAY_FREE, free() will be used. If the delete method is + * DELETE, delete[] will be used. The default is FREE. + */ void SetArray(ValueType* array, vtkIdType size, int save, int deleteMethod); void SetArray(ValueType* array, vtkIdType size, int save); void SetVoidArray(void* array, vtkIdType size, int save) VTK_OVERRIDE; void SetVoidArray(void* array, vtkIdType size, int save, int deleteMethod) VTK_OVERRIDE; - - // Description: - // Tell the array explicitly that a single data element has - // changed. Like DataChanged(), then is only necessary when you - // modify the array contents without using the array's API. - // @note This is a legacy method from vtkDataArrayTemplate, and is only - // implemented for array-of-struct arrays. It currently just calls - // DataChanged() and does nothing clever. - // TODO this is only defined for AOS (vtkDataArrayTemplate leftover). - // Deprecate to favor DataChanged? + //@} + + /** + * Tell the array explicitly that a single data element has + * changed. Like DataChanged(), then is only necessary when you + * modify the array contents without using the array's API. + * @note This is a legacy method from vtkDataArrayTemplate, and is only + * implemented for array-of-struct arrays. It currently just calls + * DataChanged() and does nothing clever. + * TODO this is only defined for AOS (vtkDataArrayTemplate leftover). + * Deprecate to favor DataChanged? + */ void DataElementChanged(vtkIdType) { this->DataChanged(); } - // Description: - // Legacy support for array-of-structs value iteration. - // TODO Deprecate? + /** + * Legacy support for array-of-structs value iteration. + * TODO Deprecate? + */ typedef ValueType* Iterator; Iterator Begin() { return Iterator(this->GetVoidPointer(0)); } Iterator End() { return Iterator(this->GetVoidPointer(this->MaxId + 1)); } - // Description: - // Perform a fast, safe cast from a vtkAbstractArray to a - // vtkAOSDataArrayTemplate. - // This method checks if source->GetArrayType() returns DataArray - // or a more derived type, and performs a static_cast to return - // source as a vtkDataArray pointer. Otherwise, NULL is returned. + //@{ + /** + * Perform a fast, safe cast from a vtkAbstractArray to a + * vtkAOSDataArrayTemplate. + * This method checks if source->GetArrayType() returns DataArray + * or a more derived type, and performs a static_cast to return + * source as a vtkDataArray pointer. Otherwise, NULL is returned. + */ static vtkAOSDataArrayTemplate* FastDownCast(vtkAbstractArray *source) { @@ -175,19 +203,23 @@ public: } return NULL; } + //@} int GetArrayType() VTK_OVERRIDE { return vtkAbstractArray::AoSDataArrayTemplate; } VTK_NEWINSTANCE vtkArrayIterator *NewIterator() VTK_OVERRIDE; bool HasStandardMemoryLayout() VTK_OVERRIDE { return true; } void ShallowCopy(vtkDataArray *other) VTK_OVERRIDE; - // Description: - // @deprecated Replace TupleValue with TypedTuple to use the new method - // names. Note that the new signatures are also const-correct. + //@{ + /** + * @deprecated Replace TupleValue with TypedTuple to use the new method + * names. Note that the new signatures are also const-correct. + */ VTK_LEGACY(void GetTupleValue(vtkIdType tupleIdx, ValueType *tuple)); VTK_LEGACY(void SetTupleValue(vtkIdType tupleIdx, const ValueType *tuple)); VTK_LEGACY(void InsertTupleValue(vtkIdType tupleIdx, const ValueType *tuple)); VTK_LEGACY(vtkIdType InsertNextTupleValue(const ValueType *tuple)); + //@} // Reimplemented for efficiency: void InsertTuples(vtkIdType dstStart, vtkIdType n, vtkIdType srcStart, @@ -202,14 +234,16 @@ protected: vtkAOSDataArrayTemplate(); ~vtkAOSDataArrayTemplate() VTK_OVERRIDE; - // Description: - // Allocate space for numTuples. Old data is not preserved. If numTuples == 0, - // all data is freed. + /** + * Allocate space for numTuples. Old data is not preserved. If numTuples == 0, + * all data is freed. + */ bool AllocateTuples(vtkIdType numTuples); - // Description: - // Allocate space for numTuples. Old data is preserved. If numTuples == 0, - // all data is freed. + /** + * Allocate space for numTuples. Old data is preserved. If numTuples == 0, + * all data is freed. + */ bool ReallocateTuples(vtkIdType numTuples); vtkBuffer *Buffer; diff --git a/Common/Core/vtkAbstractArray.h b/Common/Core/vtkAbstractArray.h index 44188ff6ec291fc99e5db35e9ae75d8c5ec88389..fff070e74d8c47c3c35a2faf86f60461aa2e3f29 100644 --- a/Common/Core/vtkAbstractArray.h +++ b/Common/Core/vtkAbstractArray.h @@ -13,43 +13,46 @@ =========================================================================*/ // -// .NAME vtkAbstractArray - Abstract superclass for all arrays -// -// .SECTION Description -// -// vtkAbstractArray is an abstract superclass for data array objects. -// This class defines an API that all subclasses must support. The -// data type must be assignable and copy-constructible, but no other -// assumptions about its type are made. Most of the subclasses of -// this array deal with numeric data either as scalars or tuples of -// scalars. A program can use the IsNumeric() method to check whether -// an instance of vtkAbstractArray contains numbers. It is also -// possible to test for this by attempting to SafeDownCast an array to -// an instance of vtkDataArray, although this assumes that all numeric -// arrays will always be descended from vtkDataArray. -// -//

-// -// Every array has a character-string name. The naming of the array -// occurs automatically when it is instantiated, but you are free to -// change this name using the SetName() method. (The array name is -// used for data manipulation.) -// -// This class (and subclasses) use two forms of addressing elements: -// - Value Indexing: The index of an element assuming an array-of-structs -// memory layout. -// - Tuple/Component Indexing: Explicitly specify the tuple and component -// indices. -// -// It is also worth pointing out that the behavior of the "Insert*" methods -// of classes in this hierarchy may not behave as expected. They work exactly -// as the corresponding "Set*" methods, except that memory allocation will -// be performed if acting on a value past the end of the array. If the data -// already exists, "inserting" will overwrite existing values, rather than shift -// the array contents and insert the new data at the specified location. -// -// .SECTION See Also -// vtkDataArray vtkStringArray vtkCellArray +/** + * @class vtkAbstractArray + * @brief Abstract superclass for all arrays + * + * + * + * vtkAbstractArray is an abstract superclass for data array objects. + * This class defines an API that all subclasses must support. The + * data type must be assignable and copy-constructible, but no other + * assumptions about its type are made. Most of the subclasses of + * this array deal with numeric data either as scalars or tuples of + * scalars. A program can use the IsNumeric() method to check whether + * an instance of vtkAbstractArray contains numbers. It is also + * possible to test for this by attempting to SafeDownCast an array to + * an instance of vtkDataArray, although this assumes that all numeric + * arrays will always be descended from vtkDataArray. + * + *

+ * + * Every array has a character-string name. The naming of the array + * occurs automatically when it is instantiated, but you are free to + * change this name using the SetName() method. (The array name is + * used for data manipulation.) + * + * This class (and subclasses) use two forms of addressing elements: + * - Value Indexing: The index of an element assuming an array-of-structs + * memory layout. + * - Tuple/Component Indexing: Explicitly specify the tuple and component + * indices. + * + * It is also worth pointing out that the behavior of the "Insert*" methods + * of classes in this hierarchy may not behave as expected. They work exactly + * as the corresponding "Set*" methods, except that memory allocation will + * be performed if acting on a value past the end of the array. If the data + * already exists, "inserting" will overwrite existing values, rather than shift + * the array contents and insert the new data at the specified location. + * + * @sa + * vtkDataArray vtkStringArray vtkCellArray +*/ #ifndef vtkAbstractArray_h #define vtkAbstractArray_h @@ -75,215 +78,252 @@ public: vtkTypeMacro(vtkAbstractArray,vtkObject); void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE; - // Description: - // Allocate memory for this array. Delete old storage only if necessary. - // Note that ext is no longer used. - // This method will reset MaxId to -1 and resize the array capacity such that - // this->Size >= numValues. - // If numValues is 0, all memory will be freed. - // Return 1 on success, 0 on failure. + /** + * Allocate memory for this array. Delete old storage only if necessary. + * Note that ext is no longer used. + * This method will reset MaxId to -1 and resize the array capacity such that + * this->Size >= numValues. + * If numValues is 0, all memory will be freed. + * Return 1 on success, 0 on failure. + */ virtual int Allocate(vtkIdType numValues, vtkIdType ext=1000) = 0; - // Description: - // Release storage and reset array to initial state. + /** + * Release storage and reset array to initial state. + */ virtual void Initialize() = 0; - // Description: - // Return the underlying data type. An integer indicating data type is - // returned as specified in vtkSetGet.h. + /** + * Return the underlying data type. An integer indicating data type is + * returned as specified in vtkSetGet.h. + */ virtual int GetDataType() =0; - // Description: - // Return the size of the underlying data type. For a bit, 0 is - // returned. For string 0 is returned. Arrays with variable length - // components return 0. + //@{ + /** + * Return the size of the underlying data type. For a bit, 0 is + * returned. For string 0 is returned. Arrays with variable length + * components return 0. + */ virtual int GetDataTypeSize() = 0; static int GetDataTypeSize(int type); - - // Description: - // Return the size, in bytes, of the lowest-level element of an - // array. For vtkDataArray and subclasses this is the size of the - // data type. For vtkStringArray, this is - // sizeof(vtkStdString::value_type), which winds up being - // sizeof(char). + //@} + + /** + * Return the size, in bytes, of the lowest-level element of an + * array. For vtkDataArray and subclasses this is the size of the + * data type. For vtkStringArray, this is + * sizeof(vtkStdString::value_type), which winds up being + * sizeof(char). + */ virtual int GetElementComponentSize() = 0; - // Description: - // Set/Get the dimension (n) of the components. Must be >= 1. Make sure that - // this is set before allocation. + //@{ + /** + * Set/Get the dimension (n) of the components. Must be >= 1. Make sure that + * this is set before allocation. + */ vtkSetClampMacro(NumberOfComponents, int, 1, VTK_INT_MAX); int GetNumberOfComponents() { return this->NumberOfComponents; } + //@} - // Description: - // Set the name for a component. Must be >= 1. + /** + * Set the name for a component. Must be >= 1. + */ void SetComponentName( vtkIdType component, const char *name ); - //Description: - // Get the component name for a given component. - // Note: will return the actual string that is stored + /** + * Get the component name for a given component. + * Note: will return the actual string that is stored + */ const char* GetComponentName( vtkIdType component ); - // Description: - // Returns if any component has had a name assigned + /** + * Returns if any component has had a name assigned + */ bool HasAComponentName(); - // Description: - // Copies the component names from the inputed array to the current array - // make sure that the current array has the same number of components as the input array + /** + * Copies the component names from the inputed array to the current array + * make sure that the current array has the same number of components as the input array + */ int CopyComponentNames( vtkAbstractArray *da ); - // Description: - // Set the number of tuples (a component group) in the array. Note that - // this may allocate space depending on the number of components. - // Also note that if allocation is performed no copy is performed so - // existing data will be lost (if data conservation is sought, one may - // use the Resize method instead). + /** + * Set the number of tuples (a component group) in the array. Note that + * this may allocate space depending on the number of components. + * Also note that if allocation is performed no copy is performed so + * existing data will be lost (if data conservation is sought, one may + * use the Resize method instead). + */ virtual void SetNumberOfTuples(vtkIdType numTuples) = 0; - // Description: - // Specify the number of values (tuples * components) for this object to hold. - // Does an allocation as well as setting the MaxId ivar. Used in conjunction - // with SetValue() method for fast insertion. + /** + * Specify the number of values (tuples * components) for this object to hold. + * Does an allocation as well as setting the MaxId ivar. Used in conjunction + * with SetValue() method for fast insertion. + */ virtual void SetNumberOfValues(vtkIdType numValues); - // Description: - // Get the number of complete tuples (a component group) in the array. + /** + * Get the number of complete tuples (a component group) in the array. + */ vtkIdType GetNumberOfTuples() {return (this->MaxId + 1)/this->NumberOfComponents;} - // Description: - // Get the total number of values in the array. This is typically equivalent - // to (numTuples * numComponents). The exception is during incremental array - // construction for subclasses that support component insertion, which may - // result in an incomplete trailing tuple. + /** + * Get the total number of values in the array. This is typically equivalent + * to (numTuples * numComponents). The exception is during incremental array + * construction for subclasses that support component insertion, which may + * result in an incomplete trailing tuple. + */ inline vtkIdType GetNumberOfValues() const { return (this->MaxId + 1); } - // Description: - // Set the tuple at dstTupleIdx in this array to the tuple at srcTupleIdx in - // the source array. This method assumes that the two arrays have the same - // type and structure. Note that range checking and memory allocation is not - // performed; use in conjunction with SetNumberOfTuples() to allocate space. + /** + * Set the tuple at dstTupleIdx in this array to the tuple at srcTupleIdx in + * the source array. This method assumes that the two arrays have the same + * type and structure. Note that range checking and memory allocation is not + * performed; use in conjunction with SetNumberOfTuples() to allocate space. + */ virtual void SetTuple(vtkIdType dstTupleIdx, vtkIdType srcTupleIdx, vtkAbstractArray *source) = 0; - // Description: - // Insert the tuple at srcTupleIdx in the source array into this array at - // dstTupleIdx. - // Note that memory allocation is performed as necessary to hold the data. + /** + * Insert the tuple at srcTupleIdx in the source array into this array at + * dstTupleIdx. + * Note that memory allocation is performed as necessary to hold the data. + */ virtual void InsertTuple(vtkIdType dstTupleIdx, vtkIdType srcTupleIdx, vtkAbstractArray* source) = 0; - // Description: - // Copy the tuples indexed in srcIds from the source array to the tuple - // locations indexed by dstIds in this array. - // Note that memory allocation is performed as necessary to hold the data. + /** + * Copy the tuples indexed in srcIds from the source array to the tuple + * locations indexed by dstIds in this array. + * Note that memory allocation is performed as necessary to hold the data. + */ virtual void InsertTuples(vtkIdList *dstIds, vtkIdList *srcIds, vtkAbstractArray* source) = 0; - // Description: - // Copy n consecutive tuples starting at srcStart from the source array to - // this array, starting at the dstStart location. - // Note that memory allocation is performed as necessary to hold the data. + /** + * Copy n consecutive tuples starting at srcStart from the source array to + * this array, starting at the dstStart location. + * Note that memory allocation is performed as necessary to hold the data. + */ virtual void InsertTuples(vtkIdType dstStart, vtkIdType n, vtkIdType srcStart, vtkAbstractArray* source) = 0; - // Description: - // Insert the tuple from srcTupleIdx in the source array at the end of this - // array. Note that memory allocation is performed as necessary to hold the - // data. Returns the tuple index at which the data was inserted. + /** + * Insert the tuple from srcTupleIdx in the source array at the end of this + * array. Note that memory allocation is performed as necessary to hold the + * data. Returns the tuple index at which the data was inserted. + */ virtual vtkIdType InsertNextTuple(vtkIdType srcTupleIdx, vtkAbstractArray* source) = 0; - // Description: - // Given a list of tuple ids, return an array of tuples. - // You must insure that the output array has been previously - // allocated with enough space to hold the data. + /** + * Given a list of tuple ids, return an array of tuples. + * You must insure that the output array has been previously + * allocated with enough space to hold the data. + */ virtual void GetTuples(vtkIdList *tupleIds, vtkAbstractArray* output); - // Description: - // Get the tuples for the range of tuple ids specified - // (i.e., p1->p2 inclusive). You must insure that the output array has - // been previously allocated with enough space to hold the data. + /** + * Get the tuples for the range of tuple ids specified + * (i.e., p1->p2 inclusive). You must insure that the output array has + * been previously allocated with enough space to hold the data. + */ virtual void GetTuples(vtkIdType p1, vtkIdType p2, vtkAbstractArray *output); - // Description: - // Returns true if this array uses the standard memory layout defined in the - // VTK user guide, e.g. a contiguous array: - // {t1c1, t1c2, t1c3, ... t1cM, t2c1, ... tNcM} - // where t1c2 is the second component of the first tuple. + /** + * Returns true if this array uses the standard memory layout defined in the + * VTK user guide, e.g. a contiguous array: + * {t1c1, t1c2, t1c3, ... t1cM, t2c1, ... tNcM} + * where t1c2 is the second component of the first tuple. + */ virtual bool HasStandardMemoryLayout(); - // Description: - // Return a void pointer. For image pipeline interface and other - // special pointer manipulation. - // Use of this method is discouraged, as newer arrays require a deep-copy of - // the array data in order to return a suitable pointer. See vtkArrayDispatch - // for a safer alternative for fast data access. + /** + * Return a void pointer. For image pipeline interface and other + * special pointer manipulation. + * Use of this method is discouraged, as newer arrays require a deep-copy of + * the array data in order to return a suitable pointer. See vtkArrayDispatch + * for a safer alternative for fast data access. + */ virtual void *GetVoidPointer(vtkIdType valueIdx) = 0; - // Description: - // Deep copy of data. Implementation left to subclasses, which - // should support as many type conversions as possible given the - // data type. - // - // Subclasses should call vtkAbstractArray::DeepCopy() so that the - // information object (if one exists) is copied from \a da. + /** + * Deep copy of data. Implementation left to subclasses, which + * should support as many type conversions as possible given the + * data type. + + * Subclasses should call vtkAbstractArray::DeepCopy() so that the + * information object (if one exists) is copied from \a da. + */ virtual void DeepCopy(vtkAbstractArray* da); - // Description: - // Set the tuple at dstTupleIdx in this array to the interpolated tuple value, - // given the ptIndices in the source array and associated interpolation - // weights. - // This method assumes that the two arrays are of the same type - // and strcuture. + /** + * Set the tuple at dstTupleIdx in this array to the interpolated tuple value, + * given the ptIndices in the source array and associated interpolation + * weights. + * This method assumes that the two arrays are of the same type + * and strcuture. + */ virtual void InterpolateTuple(vtkIdType dstTupleIdx, vtkIdList *ptIndices, vtkAbstractArray* source, double* weights) = 0; - // Description - // Insert the tuple at dstTupleIdx in this array to the tuple interpolated - // from the two tuple indices, srcTupleIdx1 and srcTupleIdx2, and an - // interpolation factor, t. The interpolation factor ranges from (0,1), - // with t=0 located at the tuple described by srcTupleIdx1. This method - // assumes that the three arrays are of the same type, srcTupleIdx1 is an - // index to array source1, and srcTupleIdx2 is an index to array source2. + /** + * Insert the tuple at dstTupleIdx in this array to the tuple interpolated + * from the two tuple indices, srcTupleIdx1 and srcTupleIdx2, and an + * interpolation factor, t. The interpolation factor ranges from (0,1), + * with t=0 located at the tuple described by srcTupleIdx1. This method + * assumes that the three arrays are of the same type, srcTupleIdx1 is an + * index to array source1, and srcTupleIdx2 is an index to array source2. + */ virtual void InterpolateTuple(vtkIdType dstTupleIdx, vtkIdType srcTupleIdx1, vtkAbstractArray* source1, vtkIdType srcTupleIdx2, vtkAbstractArray* source2, double t) =0; - // Description: - // Free any unnecessary memory. - // Description: - // Resize object to just fit data requirement. Reclaims extra memory. + /** + * Free any unnecessary memory. + * Description: + * Resize object to just fit data requirement. Reclaims extra memory. + */ virtual void Squeeze() = 0; - // Description: - // Resize the array to the requested number of tuples and preserve data. - // Increasing the array size may allocate extra memory beyond what was - // requested. MaxId will not be modified when increasing array size. - // Decreasing the array size will trim memory to the requested size and - // may update MaxId if the valid id range is truncated. - // Requesting an array size of 0 will free all memory. - // Returns 1 if resizing succeeded and 0 otherwise. + /** + * Resize the array to the requested number of tuples and preserve data. + * Increasing the array size may allocate extra memory beyond what was + * requested. MaxId will not be modified when increasing array size. + * Decreasing the array size will trim memory to the requested size and + * may update MaxId if the valid id range is truncated. + * Requesting an array size of 0 will free all memory. + * Returns 1 if resizing succeeded and 0 otherwise. + */ virtual int Resize(vtkIdType numTuples) = 0; - // Description: - // Reset to an empty state, without freeing any memory. + //@{ + /** + * Reset to an empty state, without freeing any memory. + */ void Reset() { this->MaxId = -1; this->DataChanged(); } + //@} - // Description: - // Return the size of the data. + /** + * Return the size of the data. + */ vtkIdType GetSize() {return this->Size;} - // Description: - // What is the maximum id currently in the array. + /** + * What is the maximum id currently in the array. + */ vtkIdType GetMaxId() {return this->MaxId;} @@ -293,165 +333,187 @@ public: VTK_DATA_ARRAY_DELETE }; - // Description: - // This method lets the user specify data to be held by the array. The - // array argument is a pointer to the data. size is the size of the array - // supplied by the user. Set save to 1 to keep the class from deleting the - // array when it cleans up or reallocates memory. The class uses the - // actual array provided; it does not copy the data from the supplied - // array. If specified, the delete method determines how the data array - // will be deallocated. If the delete method is VTK_DATA_ARRAY_FREE, free() - // will be used. If the delete method is DELETE, delete[] will be used. The - // default is FREE. (Note not all subclasses can support deleteMethod.) + //@{ + /** + * This method lets the user specify data to be held by the array. The + * array argument is a pointer to the data. size is the size of the array + * supplied by the user. Set save to 1 to keep the class from deleting the + * array when it cleans up or reallocates memory. The class uses the + * actual array provided; it does not copy the data from the supplied + * array. If specified, the delete method determines how the data array + * will be deallocated. If the delete method is VTK_DATA_ARRAY_FREE, free() + * will be used. If the delete method is DELETE, delete[] will be used. The + * default is FREE. (Note not all subclasses can support deleteMethod.) + */ virtual void SetVoidArray(void *vtkNotUsed(array), vtkIdType vtkNotUsed(size), int vtkNotUsed(save)) =0; virtual void SetVoidArray(void *array, vtkIdType size, int save, int vtkNotUsed(deleteMethod)) {this->SetVoidArray(array,size,save);}; + //@} - // Description: - // This method copies the array data to the void pointer specified - // by the user. It is up to the user to allocate enough memory for - // the void pointer. + /** + * This method copies the array data to the void pointer specified + * by the user. It is up to the user to allocate enough memory for + * the void pointer. + */ virtual void ExportToVoidPointer(void *out_ptr); - // Description: - // Return the memory in kibibytes (1024 bytes) consumed by this data array. Used to - // support streaming and reading/writing data. The value returned is - // guaranteed to be greater than or equal to the memory required to - // actually represent the data represented by this object. The - // information returned is valid only after the pipeline has - // been updated. + /** + * Return the memory in kibibytes (1024 bytes) consumed by this data array. Used to + * support streaming and reading/writing data. The value returned is + * guaranteed to be greater than or equal to the memory required to + * actually represent the data represented by this object. The + * information returned is valid only after the pipeline has + * been updated. + */ virtual unsigned long GetActualMemorySize() = 0; - // Description: - // Set/get array's name + //@{ + /** + * Set/get array's name + */ vtkSetStringMacro(Name); vtkGetStringMacro(Name); + //@} - // Description: - // Get the name of a data type as a string. + /** + * Get the name of a data type as a string. + */ virtual const char *GetDataTypeAsString( void ) { return vtkImageScalarTypeNameMacro( this->GetDataType() ); } - // Description: - // Creates an array for dataType where dataType is one of - // VTK_BIT, VTK_CHAR, VTK_UNSIGNED_CHAR, VTK_SHORT, - // VTK_UNSIGNED_SHORT, VTK_INT, VTK_UNSIGNED_INT, VTK_LONG, - // VTK_UNSIGNED_LONG, VTK_DOUBLE, VTK_DOUBLE, VTK_ID_TYPE, - // VTK_STRING. - // Note that the data array returned has to be deleted by the - // user. + /** + * Creates an array for dataType where dataType is one of + * VTK_BIT, VTK_CHAR, VTK_UNSIGNED_CHAR, VTK_SHORT, + * VTK_UNSIGNED_SHORT, VTK_INT, VTK_UNSIGNED_INT, VTK_LONG, + * VTK_UNSIGNED_LONG, VTK_DOUBLE, VTK_DOUBLE, VTK_ID_TYPE, + * VTK_STRING. + * Note that the data array returned has to be deleted by the + * user. + */ VTK_NEWINSTANCE static vtkAbstractArray* CreateArray(int dataType); - // Description: - // This method is here to make backward compatibility easier. It - // must return true if and only if an array contains numeric data. + /** + * This method is here to make backward compatibility easier. It + * must return true if and only if an array contains numeric data. + */ virtual int IsNumeric() = 0; - // Description: - // Subclasses must override this method and provide the right kind - // of templated vtkArrayIteratorTemplate. + /** + * Subclasses must override this method and provide the right kind + * of templated vtkArrayIteratorTemplate. + */ VTK_NEWINSTANCE virtual vtkArrayIterator* NewIterator() = 0; - // Description: - // Returns the size of the data in DataTypeSize units. Thus, the - // number of bytes for the data can be computed by GetDataSize() * - // GetDataTypeSize(). Non-contiguous or variable- size arrays need - // to override this method. + /** + * Returns the size of the data in DataTypeSize units. Thus, the + * number of bytes for the data can be computed by GetDataSize() * + * GetDataTypeSize(). Non-contiguous or variable- size arrays need + * to override this method. + */ virtual vtkIdType GetDataSize() { return this->GetNumberOfComponents() * this->GetNumberOfTuples(); } - // Description: - // Return the value indices where a specific value appears. + //@{ + /** + * Return the value indices where a specific value appears. + */ virtual vtkIdType LookupValue(vtkVariant value) = 0; virtual void LookupValue(vtkVariant value, vtkIdList* valueIds) = 0; + //@} - // Description: - // Retrieve value from the array as a variant. + /** + * Retrieve value from the array as a variant. + */ virtual vtkVariant GetVariantValue(vtkIdType valueIdx); - // Description: - // Insert a value into the array from a variant. This method does - // bounds checking. + /** + * Insert a value into the array from a variant. This method does + * bounds checking. + */ virtual void InsertVariantValue(vtkIdType valueIdx, vtkVariant value) = 0; - // Description: - // Set a value in the array from a variant. This method does NOT do - // bounds checking. + /** + * Set a value in the array from a variant. This method does NOT do + * bounds checking. + */ virtual void SetVariantValue(vtkIdType valueIdx, vtkVariant value) = 0; - // Description: - // Tell the array explicitly that the data has changed. - // This is only necessary to call when you modify the array contents - // without using the array's API (i.e. you retrieve a pointer to the - // data and modify the array contents). You need to call this so that - // the fast lookup will know to rebuild itself. Otherwise, the lookup - // functions will give incorrect results. + /** + * Tell the array explicitly that the data has changed. + * This is only necessary to call when you modify the array contents + * without using the array's API (i.e. you retrieve a pointer to the + * data and modify the array contents). You need to call this so that + * the fast lookup will know to rebuild itself. Otherwise, the lookup + * functions will give incorrect results. + */ virtual void DataChanged() = 0; - // Description: - // Delete the associated fast lookup data structure on this array, - // if it exists. The lookup will be rebuilt on the next call to a lookup - // function. + /** + * Delete the associated fast lookup data structure on this array, + * if it exists. The lookup will be rebuilt on the next call to a lookup + * function. + */ virtual void ClearLookup() = 0; - // Description: - // Populate the given vtkVariantArray with a set of distinct values taken on - // by the requested component (or, when passed -1, by the tuples as a whole). - // If the set of prominent values has more than 32 entries, then the array - // is assumed to be continuous in nature and no values are returned. - // - // This method takes 2 parameters: \a uncertainty and \a minimumProminence. - // Note that this set of returned values may not be complete if - // \a uncertainty and \a minimumProminence are both larger than 0.0; - // in order to perform interactively, a subsample of the array is - // used to determine the set of values. - // - // The first parameter (\a uncertainty, U) is the maximum acceptable - // probability that a prominent value will not be detected. - // Setting this to 0 will cause every value in the array to be examined. - // - // The second parameter (\a minimumProminence, P) specifies the smallest - // relative frequency (in [0,1]) with which a value in the array may - // occur and still be considered prominent. Setting this to 0 - // will force every value in the array to be traversed. - // Using numbers close to 0 for this parameter quickly causes - // the number of samples required to obtain the given uncertainty to - // subsume the entire array, as rare occurrences require frequent - // sampling to detect. - // - // For an array with T tuples and given uncertainty U and mininumum - // prominence P, we sample N values, with N = f(T; P, U). - // We want f to be sublinear in T in order to interactively handle large - // arrays; in practice, we can make f independent of T: - // \f$ N >= \frac{5}{P}\mathrm{ln}\left(\frac{1}{PU}\right) \f$, - // but note that small values of P are costly to achieve. - // The default parameters will locate prominent values that occur at least - // 1 out of every 1000 samples with a confidence of 0.999999 (= 1 - 1e6). - // Thanks to Seshadri Comandur (Sandia National Laboratories) for the - // bounds on the number of samples. - // - // The first time this is called, the array is examined and unique values - // are stored in the vtkInformation object associated with the array. - // The list of unique values will be updated on subsequent calls only if - // the array's MTime is newer than the associated vtkInformation object or - // if better sampling (lower \a uncertainty or \a minimumProminence) is - // requested. - // The DISCRETE_VALUE_SAMPLE_PARAMETERS() information key is used to - // store the numbers which produced any current set of prominent values. - // - // Also, note that every value encountered is reported and counts toward - // the maximum of 32 distinct values, regardless of the value's frequency. - // This is required for an efficient implementation. - // Use the vtkOrderStatistics filter if you wish to threshold the set of - // distinct values to eliminate "unprominent" (infrequently-occurring) - // values. + /** + * Populate the given vtkVariantArray with a set of distinct values taken on + * by the requested component (or, when passed -1, by the tuples as a whole). + * If the set of prominent values has more than 32 entries, then the array + * is assumed to be continuous in nature and no values are returned. + + * This method takes 2 parameters: \a uncertainty and \a minimumProminence. + * Note that this set of returned values may not be complete if + * \a uncertainty and \a minimumProminence are both larger than 0.0; + * in order to perform interactively, a subsample of the array is + * used to determine the set of values. + + * The first parameter (\a uncertainty, U) is the maximum acceptable + * probability that a prominent value will not be detected. + * Setting this to 0 will cause every value in the array to be examined. + + * The second parameter (\a minimumProminence, P) specifies the smallest + * relative frequency (in [0,1]) with which a value in the array may + * occur and still be considered prominent. Setting this to 0 + * will force every value in the array to be traversed. + * Using numbers close to 0 for this parameter quickly causes + * the number of samples required to obtain the given uncertainty to + * subsume the entire array, as rare occurrences require frequent + * sampling to detect. + + * For an array with T tuples and given uncertainty U and mininumum + * prominence P, we sample N values, with N = f(T; P, U). + * We want f to be sublinear in T in order to interactively handle large + * arrays; in practice, we can make f independent of T: + * \f$ N >= \frac{5}{P}\mathrm{ln}\left(\frac{1}{PU}\right) \f$, + * but note that small values of P are costly to achieve. + * The default parameters will locate prominent values that occur at least + * 1 out of every 1000 samples with a confidence of 0.999999 (= 1 - 1e6). + * Thanks to Seshadri Comandur (Sandia National Laboratories) for the + * bounds on the number of samples. + + * The first time this is called, the array is examined and unique values + * are stored in the vtkInformation object associated with the array. + * The list of unique values will be updated on subsequent calls only if + * the array's MTime is newer than the associated vtkInformation object or + * if better sampling (lower \a uncertainty or \a minimumProminence) is + * requested. + * The DISCRETE_VALUE_SAMPLE_PARAMETERS() information key is used to + * store the numbers which produced any current set of prominent values. + + * Also, note that every value encountered is reported and counts toward + * the maximum of 32 distinct values, regardless of the value's frequency. + * This is required for an efficient implementation. + * Use the vtkOrderStatistics filter if you wish to threshold the set of + * distinct values to eliminate "unprominent" (infrequently-occurring) + * values. + */ virtual void GetProminentComponentValues(int comp, vtkVariantArray* values, double uncertainty = 1.e-6, double minimumProminence = 1.e-3); @@ -461,60 +523,67 @@ public: //virtual void LookupGreaterThan(vtkVariant min, vtkIdList* ids, bool includeMin = false) = 0; //virtual void LookupLessThan(vtkVariant max, vtkIdList* ids, bool includeMax = false) = 0; - // Description: - // Get an information object that can be used to annotate the array. - // This will always return an instance of vtkInformation, if one is - // not currently associated with the array it will be created. + /** + * Get an information object that can be used to annotate the array. + * This will always return an instance of vtkInformation, if one is + * not currently associated with the array it will be created. + */ vtkInformation* GetInformation(); - // Description: - // Inquire if this array has an instance of vtkInformation - // already associated with it. + /** + * Inquire if this array has an instance of vtkInformation + * already associated with it. + */ bool HasInformation(){ return this->Information!=0; } - // Description: - // Copy information instance. Arrays use information objects - // in a variety of ways. It is important to have flexibility in - // this regard because certain keys should not be coppied, while - // others must be. - // - // NOTE: Subclasses must always call their superclass's CopyInformation - // method, so that all classes in the hierarchy get a chance to remove - // keys they do not wish to be coppied. The subclass will not need to - // explicilty copy the keys as it's handled here. + /** + * Copy information instance. Arrays use information objects + * in a variety of ways. It is important to have flexibility in + * this regard because certain keys should not be coppied, while + * others must be. + + * NOTE: Subclasses must always call their superclass's CopyInformation + * method, so that all classes in the hierarchy get a chance to remove + * keys they do not wish to be coppied. The subclass will not need to + * explicilty copy the keys as it's handled here. + */ virtual int CopyInformation(vtkInformation *infoFrom, int deep=1); - // Description: - // This key is a hint to end user interface that this array - // is internal and should not be shown to the end user. + /** + * This key is a hint to end user interface that this array + * is internal and should not be shown to the end user. + */ static vtkInformationIntegerKey* GUI_HIDE(); - // Description: - // This key is used to hold a vector of COMPONENT_VALUES (and, for - // vtkDataArray subclasses, COMPONENT_RANGE) keys -- one - // for each component of the array. You may add additional per-component - // key-value pairs to information objects in this vector. However if you - // do so, you must be sure to either (1) set COMPONENT_VALUES to - // an invalid variant and set COMPONENT_RANGE to - // {VTK_DOUBLE_MAX, VTK_DOUBLE_MIN} or (2) call ComputeUniqueValues(component) - // and ComputeRange(component) before modifying the information object. - // Otherwise it is possible for modifications to the array to take place - // without the bounds on the component being updated since the modification - // time of the vtkInformation object is used to determine when the - // COMPONENT_RANGE values are out of date. + /** + * This key is used to hold a vector of COMPONENT_VALUES (and, for + * vtkDataArray subclasses, COMPONENT_RANGE) keys -- one + * for each component of the array. You may add additional per-component + * key-value pairs to information objects in this vector. However if you + * do so, you must be sure to either (1) set COMPONENT_VALUES to + * an invalid variant and set COMPONENT_RANGE to + * {VTK_DOUBLE_MAX, VTK_DOUBLE_MIN} or (2) call ComputeUniqueValues(component) + * and ComputeRange(component) before modifying the information object. + * Otherwise it is possible for modifications to the array to take place + * without the bounds on the component being updated since the modification + * time of the vtkInformation object is used to determine when the + * COMPONENT_RANGE values are out of date. + */ static vtkInformationInformationVectorKey* PER_COMPONENT(); - // Description: - // A key used to hold discrete values taken on either by the tuples of the - // array (when present in this->GetInformation()) or individual components - // (when present in one entry of the PER_COMPONENT() information vector). + /** + * A key used to hold discrete values taken on either by the tuples of the + * array (when present in this->GetInformation()) or individual components + * (when present in one entry of the PER_COMPONENT() information vector). + */ static vtkInformationVariantVectorKey* DISCRETE_VALUES(); - // Description: - // A key used to hold conditions under which cached discrete values were generated; - // the value is a 2-vector of doubles. - // The first entry corresponds to the maximum uncertainty that prominent values - // exist but have not been detected. The second entry corresponds to the smallest - // relative frequency a value is allowed to have and still appear on the list. + /** + * A key used to hold conditions under which cached discrete values were generated; + * the value is a 2-vector of doubles. + * The first entry corresponds to the maximum uncertainty that prominent values + * exist but have not been detected. The second entry corresponds to the smallest + * relative frequency a value is allowed to have and still appear on the list. + */ static vtkInformationDoubleVectorKey* DISCRETE_VALUE_SAMPLE_PARAMETERS(); // Deprecated. Use vtkAbstractArray::MaxDiscreteValues instead. @@ -522,11 +591,14 @@ public: MAX_DISCRETE_VALUES = 32 }; - // Description: - // Get/Set the maximum number of prominent values this array may contain - // before it is considered continuous. Default value is 32. + //@{ + /** + * Get/Set the maximum number of prominent values this array may contain + * before it is considered continuous. Default value is 32. + */ vtkGetMacro(MaxDiscreteValues, unsigned int); vtkSetMacro(MaxDiscreteValues, unsigned int); + //@} enum { AbstractArray = 0, @@ -539,9 +611,10 @@ public: DataArrayTemplate = AoSDataArrayTemplate //! Legacy }; - // Description: - // Method for type-checking in FastDownCast implementations. See also - // vtkArrayDownCast. + /** + * Method for type-checking in FastDownCast implementations. See also + * vtkArrayDownCast. + */ virtual int GetArrayType() { return AbstractArray; @@ -552,22 +625,24 @@ protected: vtkAbstractArray(); ~vtkAbstractArray() VTK_OVERRIDE; - // Description: - // Set an information object that can be used to annotate the array. - // Use this with caution as array instances depend on persistence of - // information keys. See CopyInformation. + /** + * Set an information object that can be used to annotate the array. + * Use this with caution as array instances depend on persistence of + * information keys. See CopyInformation. + */ virtual void SetInformation( vtkInformation* ); - // Description: - // Obtain the set of unique values taken on by each component of the array, - // as well as by the tuples of the array. - // - // The results are stored in the PER_COMPONENT() vtkInformation objects - // using the DISCRETE_VALUES() key. - // If the key is present but stores 0 values, the array either has no - // entries or does not behave as a discrete set. - // If the key is not present, the array has not been examined for - // distinct values or has been modified since the last examination. + /** + * Obtain the set of unique values taken on by each component of the array, + * as well as by the tuples of the array. + + * The results are stored in the PER_COMPONENT() vtkInformation objects + * using the DISCRETE_VALUES() key. + * If the key is present but stores 0 values, the array either has no + * entries or does not behave as a discrete set. + * If the key is not present, the array has not been examined for + * distinct values or has been modified since the last examination. + */ virtual void UpdateDiscreteValueSet(double uncertainty, double minProminence); vtkIdType Size; // allocated size of data @@ -591,10 +666,12 @@ private: void operator=(const vtkAbstractArray&) VTK_DELETE_FUNCTION; }; -// Description: -// Implementation of vtkArrayDownCast. The templating/etc is moved to this -// worker struct to get around limitations of template functions (no partial -// specialization, ambiguities, etc). +//@{ +/** + * Implementation of vtkArrayDownCast. The templating/etc is moved to this + * worker struct to get around limitations of template functions (no partial + * specialization, ambiguities, etc). + */ template struct vtkArrayDownCast_impl { @@ -603,23 +680,25 @@ struct vtkArrayDownCast_impl return ArrayT::SafeDownCast(array); } }; - -// Description: -// vtkArrayDownCast is to be used by generic (e.g. templated) code for quickly -// downcasting vtkAbstractArray pointers to more derived classes. -// The typical VTK downcast pattern (SafeDownCast) performs a string comparison -// on the class names in the object's inheritance hierarchy, which is quite -// expensive and can dominate computational resource usage when downcasting is -// needed in a worker function. -// To address this, certain arrays support a FastDownCast method, which replaces -// the chain of string comparisons with 1-2 integer comparisons and thus is -// significantly more efficient. -// However, not all arrays support the FastDownCast mechanism. vtkArrayDownCast -// exists to select between the two; Arrays that support FastDownCast will use -// it, while others will fallback to the slower SafeDownCast. -// -// A more detailed description of this class and related tools can be found -// \ref VTK-7-1-ArrayDispatch "here". +//@} + +/** + * vtkArrayDownCast is to be used by generic (e.g. templated) code for quickly + * downcasting vtkAbstractArray pointers to more derived classes. + * The typical VTK downcast pattern (SafeDownCast) performs a string comparison + * on the class names in the object's inheritance hierarchy, which is quite + * expensive and can dominate computational resource usage when downcasting is + * needed in a worker function. + * To address this, certain arrays support a FastDownCast method, which replaces + * the chain of string comparisons with 1-2 integer comparisons and thus is + * significantly more efficient. + * However, not all arrays support the FastDownCast mechanism. vtkArrayDownCast + * exists to select between the two; Arrays that support FastDownCast will use + * it, while others will fallback to the slower SafeDownCast. + + * A more detailed description of this class and related tools can be found + * \ref VTK-7-1-ArrayDispatch "here". + */ template ArrayT* vtkArrayDownCast(vtkAbstractArray *array) { @@ -628,9 +707,11 @@ ArrayT* vtkArrayDownCast(vtkAbstractArray *array) return vtkArrayDownCast_impl()(array); } -// Description: -// This macro is used to tell vtkArrayDownCast to use FastDownCast instead of -// SafeDownCast. +//@{ +/** + * This macro is used to tell vtkArrayDownCast to use FastDownCast instead of + * SafeDownCast. + */ #define vtkArrayDownCast_FastCastMacro(ArrayT) \ template <> struct vtkArrayDownCast_impl \ { \ @@ -639,12 +720,15 @@ ArrayT* vtkArrayDownCast(vtkAbstractArray *array) return ArrayT::FastDownCast(array); \ } \ }; - -// Description: -// Same as vtkArrayDownCast_FastCastMacro, but treats ArrayT as a -// single-parameter template (the parameter is the value type). Defines a -// vtkArrayDownCast implementation that uses the specified array template class -// with any value type. +//@} + +//@{ +/** + * Same as vtkArrayDownCast_FastCastMacro, but treats ArrayT as a + * single-parameter template (the parameter is the value type). Defines a + * vtkArrayDownCast implementation that uses the specified array template class + * with any value type. + */ #define vtkArrayDownCast_TemplateFastCastMacro(ArrayT) \ template struct vtkArrayDownCast_impl > \ { \ @@ -653,5 +737,6 @@ ArrayT* vtkArrayDownCast(vtkAbstractArray *array) return ArrayT::FastDownCast(array); \ } \ }; +//@} #endif diff --git a/Common/Core/vtkAndroidOutputWindow.h b/Common/Core/vtkAndroidOutputWindow.h index cc20c525682050b38bd79c5d9338d7afd48d6cfc..0adae06db6c97b90027da24d75f0c1477f0bc566 100644 --- a/Common/Core/vtkAndroidOutputWindow.h +++ b/Common/Core/vtkAndroidOutputWindow.h @@ -12,15 +12,18 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkAndroidOutputWindow - Win32 Specific output window class -// .SECTION Description -// This class is used for error and debug message output on the windows -// platform. It creates a read only EDIT control to display the -// output. This class should not be used directly. It should -// only be used through the interface of vtkOutputWindow. This class -// only handles one output window per process. If the window is destroyed, -// the vtkObject::GlobalWarningDisplayOff() function is called. The -// window is created the next time text is written to the window. +/** + * @class vtkAndroidOutputWindow + * @brief Win32 Specific output window class + * + * This class is used for error and debug message output on the windows + * platform. It creates a read only EDIT control to display the + * output. This class should not be used directly. It should + * only be used through the interface of vtkOutputWindow. This class + * only handles one output window per process. If the window is destroyed, + * the vtkObject::GlobalWarningDisplayOff() function is called. The + * window is created the next time text is written to the window. +*/ #ifndef vtkAndroidOutputWindow_h #define vtkAndroidOutputWindow_h @@ -36,16 +39,20 @@ public: vtkTypeMacro(vtkAndroidOutputWindow,vtkOutputWindow); void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE; - // Description: - // Create a vtkAndroidOutputWindow. + /** + * Create a vtkAndroidOutputWindow. + */ static vtkAndroidOutputWindow* New(); - // Description: Put the text into the display window. - // New lines are converted to carriage return new lines. + //@{ + /** + * New lines are converted to carriage return new lines. + */ virtual void DisplayText(const char*); virtual void DisplayErrorText(const char*); virtual void DisplayWarningText(const char*); virtual void DisplayGenericWarningText(const char*); + //@} virtual void DisplayDebugText(const char*); diff --git a/Common/Core/vtkAngularPeriodicDataArray.h b/Common/Core/vtkAngularPeriodicDataArray.h index b0f065f7075fcc9fd37b53e8a87483a24c377a84..baefff645e86dbf23170a156d211efc7e48a8716 100644 --- a/Common/Core/vtkAngularPeriodicDataArray.h +++ b/Common/Core/vtkAngularPeriodicDataArray.h @@ -13,15 +13,18 @@ =========================================================================*/ -// .NAME vtkAngularPeriodicDataArray - Map native an Array into an angulat -// periodic array -// -// .SECTION Description -// 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. +/** + * @class vtkAngularPeriodicDataArray + * @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 vtkAngularPeriodicDataArray_h #define vtkAngularPeriodicDataArray_h @@ -44,38 +47,50 @@ public: static vtkAngularPeriodicDataArray *New(); void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE; - // Description: - // Initialize the mapped array with the original input data array. + /** + * Initialize the mapped array with the original input data array. + */ void InitializeArray(vtkAOSDataArrayTemplate* inputData); - // Description: - // Set/Get the rotation angle in degrees. Default is 0. + //@{ + /** + * Set/Get the rotation angle in degrees. Default is 0. + */ void SetAngle(double angle); vtkGetMacro(Angle, double); + //@} - // Description: - // Set/Get the rotation center. Default is 0,0,0. + //@{ + /** + * Set/Get the rotation center. Default is 0,0,0. + */ void SetCenter(double* center); vtkGetVector3Macro(Center, double); + //@} - // Description: - // Set/Get the rotation axis. Default is VTK_PERIODIC_ARRAY_AXIS_X axis. + //@{ + /** + * Set/Get the rotation axis. Default is VTK_PERIODIC_ARRAY_AXIS_X axis. + */ void SetAxis(int axis); vtkGetMacro(Axis, int); void SetAxisToX(void) { this->SetAxisType(VTK_PERIODIC_ARRAY_AXIS_X); } void SetAxisToY(void) { this->SetAxisType(VTK_PERIODIC_ARRAY_AXIS_Y); } void SetAxisToZ(void) { this->SetAxisType(VTK_PERIODIC_ARRAY_AXIS_Z); } + //@} protected: vtkAngularPeriodicDataArray(); ~vtkAngularPeriodicDataArray(); - // Description: - // Transform the provided tuple + /** + * Transform the provided tuple + */ void Transform(Scalar* tuple) const VTK_OVERRIDE; - // Description: - // Update rotation matrix from Axis, Angle and Center + /** + * Update rotation matrix from Axis, Angle and Center + */ void UpdateRotationMatrix(); private: diff --git a/Common/Core/vtkAnimationCue.h b/Common/Core/vtkAnimationCue.h index 2d42f9c9f589b4e0bda907111af3a766dff51844..0ab6e08b5cc0c39d856e117a3c4e404559254cd1 100644 --- a/Common/Core/vtkAnimationCue.h +++ b/Common/Core/vtkAnimationCue.h @@ -12,25 +12,28 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkAnimationCue - a seqin an animation. -// .SECTION Description -// vtkAnimationCue and vtkAnimationScene provide the framework to support -// animations in VTK. vtkAnimationCue represents an entity that changes/ -// animates with time, while vtkAnimationScene represents scene or setup -// for the animation, which consists on individual cues or other scenes. -// -// A cue has three states: UNINITIALIZED, ACTIVE and INACTIVE. -// UNINITIALIZED represents an point in time before the start time of the cue. -// The cue is in ACTIVE state at a point in time between start time and end time -// for the cue. While, beyond the end time, it is in INACTIVE state. -// When the cue enters the ACTIVE state, StartAnimationCueEvent is fired. This -// event may be handled to initialize the entity to be animated. -// When the cue leaves the ACTIVE state, EndAnimationCueEvent is fired, which -// can be handled to cleanup after having run the animation. -// For every request to render during the ACTIVE state, AnimationCueTickEvent is -// fired, which must be handled to perform the actual animation. -// .SECTION See Also -// vtkAnimationScene +/** + * @class vtkAnimationCue + * @brief a seqin an animation. + * + * vtkAnimationCue and vtkAnimationScene provide the framework to support + * animations in VTK. vtkAnimationCue represents an entity that changes/ + * animates with time, while vtkAnimationScene represents scene or setup + * for the animation, which consists on individual cues or other scenes. + * + * A cue has three states: UNINITIALIZED, ACTIVE and INACTIVE. + * UNINITIALIZED represents an point in time before the start time of the cue. + * The cue is in ACTIVE state at a point in time between start time and end time + * for the cue. While, beyond the end time, it is in INACTIVE state. + * When the cue enters the ACTIVE state, StartAnimationCueEvent is fired. This + * event may be handled to initialize the entity to be animated. + * When the cue leaves the ACTIVE state, EndAnimationCueEvent is fired, which + * can be handled to cleanup after having run the animation. + * For every request to render during the ACTIVE state, AnimationCueTickEvent is + * fired, which must be handled to perform the actual animation. + * @sa + * vtkAnimationScene +*/ #ifndef vtkAnimationCue_h #define vtkAnimationCue_h @@ -62,90 +65,111 @@ public: double ClockTime; // valid only in AnimationCueTickEvent handler }; - // Description: - // Get/Set the time mode. In Normalized mode, the start and end - // times of the cue are normalized [0,1] with respect to the start and - // end times of the container scene. In Relative mode the start and end - // time of the cue are specified in offset seconds relative to the - // start time of the container scene. + //@{ + /** + * Get/Set the time mode. In Normalized mode, the start and end + * times of the cue are normalized [0,1] with respect to the start and + * end times of the container scene. In Relative mode the start and end + * time of the cue are specified in offset seconds relative to the + * start time of the container scene. + */ virtual void SetTimeMode(int mode); vtkGetMacro(TimeMode, int); void SetTimeModeToRelative() { this->SetTimeMode(TIMEMODE_RELATIVE); } void SetTimeModeToNormalized() { this->SetTimeMode(TIMEMODE_NORMALIZED); } - - // Description: - // Get/Set the Start time for this cue. - // When the current time is >= StartTime, the Cue is in - // ACTIVE state. if Current time i < StartTime, the Cue is in - // UNINITIALIZED state. Whenever the cue enters the ACTIVE state from - // an INACTIVE state, it triggers the StartEvent. - // The Start time is in seconds relative to the start of the - // container Scene (when in Relative time mode) or is normalized - // over the span of the container Scene (when in Normalized time mode). + //@} + + //@{ + /** + * Get/Set the Start time for this cue. + * When the current time is >= StartTime, the Cue is in + * ACTIVE state. if Current time i < StartTime, the Cue is in + * UNINITIALIZED state. Whenever the cue enters the ACTIVE state from + * an INACTIVE state, it triggers the StartEvent. + * The Start time is in seconds relative to the start of the + * container Scene (when in Relative time mode) or is normalized + * over the span of the container Scene (when in Normalized time mode). + */ vtkSetMacro(StartTime, double); vtkGetMacro(StartTime, double); - - // Description: - // Get/Set the End time for this cue. - // When the current time is > EndTime, the Cue is in - // INACTIVE state. Whenever the cue leaves an ACTIVE state to enter - // INACTIVE state, the EndEvent is triggered. - // The End time is in seconds relative to the start of the - // container Scene (when in Relative time mode) or is normalized - // over the span of the container Scene (when in Normalized time mode). + //@} + + //@{ + /** + * Get/Set the End time for this cue. + * When the current time is > EndTime, the Cue is in + * INACTIVE state. Whenever the cue leaves an ACTIVE state to enter + * INACTIVE state, the EndEvent is triggered. + * The End time is in seconds relative to the start of the + * container Scene (when in Relative time mode) or is normalized + * over the span of the container Scene (when in Normalized time mode). + */ vtkSetMacro(EndTime, double); vtkGetMacro(EndTime, double); - - // Description: - // Indicates a tick or point in time in the animation. - // Triggers a Tick event if currenttime >= StartTime and - // currenttime <= EndTime. - // Whenever the state of the cue changes, - // either StartEvent or EndEvent is triggerred depending upon - // whether the cue entered Active state or quit active state respectively. - // The current time is relative to the start of the container Scene - // (when in Relative time mode) or is normalized - // over the span of the container Scene (when in Normalized time mode). - // deltatime is the time since last call to Tick. deltatime also can be in seconds - // relative to the start of the container Scene or normalized depending upon the - // cue's Time mode. - // clocktime is the time from the scene i.e. it does not depend on the time - // mode for the cue. - // For the first call to Tick - // after a call to Initialize(), the deltatime is 0; + //@} + + /** + * Indicates a tick or point in time in the animation. + * Triggers a Tick event if currenttime >= StartTime and + * currenttime <= EndTime. + * Whenever the state of the cue changes, + * either StartEvent or EndEvent is triggerred depending upon + * whether the cue entered Active state or quit active state respectively. + * The current time is relative to the start of the container Scene + * (when in Relative time mode) or is normalized + * over the span of the container Scene (when in Normalized time mode). + * deltatime is the time since last call to Tick. deltatime also can be in seconds + * relative to the start of the container Scene or normalized depending upon the + * cue's Time mode. + * clocktime is the time from the scene i.e. it does not depend on the time + * mode for the cue. + * For the first call to Tick + * after a call to Initialize(), the deltatime is 0; + */ virtual void Tick(double currenttime, double deltatime, double clocktime); - // Description: - // Called when the playing of the scene begins. - // This will set the Cue to UNINITIALIZED state. + /** + * Called when the playing of the scene begins. + * This will set the Cue to UNINITIALIZED state. + */ virtual void Initialize(); - // Description: - // Called when the scene reaches the end. - // If the cue state is ACTIVE when this method is called, this will - // trigger a EndAnimationCueEvent. + /** + * Called when the scene reaches the end. + * If the cue state is ACTIVE when this method is called, this will + * trigger a EndAnimationCueEvent. + */ virtual void Finalize(); - // Description: - // This is valid only in a AnimationCueTickEvent handler. - // Before firing the event the animation cue sets the AnimationTime to - // the time of the tick. + //@{ + /** + * This is valid only in a AnimationCueTickEvent handler. + * Before firing the event the animation cue sets the AnimationTime to + * the time of the tick. + */ vtkGetMacro(AnimationTime, double); - - // Description: - // This is valid only in a AnimationCueTickEvent handler. - // Before firing the event the animation cue sets the DeltaTime - // to the difference in time between the current tick and the last tick. + //@} + + //@{ + /** + * This is valid only in a AnimationCueTickEvent handler. + * Before firing the event the animation cue sets the DeltaTime + * to the difference in time between the current tick and the last tick. + */ vtkGetMacro(DeltaTime, double); - - // Description: - // This is valid only in a AnimationCueTickEvent handler. - // Before firing the event the animation cue sets the ClockTime to - // the time of the tick. ClockTime is directly the time from the animation - // scene neither normalized nor offsetted to the start of the scene. + //@} + + //@{ + /** + * This is valid only in a AnimationCueTickEvent handler. + * Before firing the event the animation cue sets the ClockTime to + * the time of the tick. ClockTime is directly the time from the animation + * scene neither normalized nor offsetted to the start of the scene. + */ vtkGetMacro(ClockTime, double); + //@} enum TimeCodes { @@ -174,18 +198,22 @@ protected: double DeltaTime; double ClockTime; - // Description: - // Current state of the Cue. + /** + * Current state of the Cue. + */ int CueState; - // Description: - // These are the internal methods that actually trigger they - // corresponding events. Subclasses can override these to - // do extra processing at start/end or on tick. + //@{ + /** + * These are the internal methods that actually trigger they + * corresponding events. Subclasses can override these to + * do extra processing at start/end or on tick. + */ virtual void StartCueInternal(); virtual void TickInternal(double currenttime, double deltatime, double clocktime); virtual void EndCueInternal(); + //@} private: vtkAnimationCue(const vtkAnimationCue&) VTK_DELETE_FUNCTION; diff --git a/Common/Core/vtkArray.h b/Common/Core/vtkArray.h index 481a0d2f75fee35fb0c971ed674911c59fbaa8ba..c32ca212fee7e4fb4e152273cb71c3dba34eb7ea 100644 --- a/Common/Core/vtkArray.h +++ b/Common/Core/vtkArray.h @@ -19,34 +19,37 @@ =========================================================================*/ -// .NAME vtkArray - Abstract interface for N-dimensional arrays. -// -// .SECTION Description -// vtkArray is the root of a hierarchy of arrays that can be used to -// store data with any number of dimensions. It provides an abstract -// interface for retrieving and setting array attributes that are -// independent of the type of values stored in the array - such as the -// number of dimensions, extents along each dimension, and number of -// values stored in the array. -// -// To get and set array values, the vtkTypedArray template class derives -// from vtkArray and provides type-specific methods for retrieval and -// update. -// -// Two concrete derivatives of vtkTypedArray are provided at the moment: -// vtkDenseArray and vtkSparseArray, which provide dense and sparse -// storage for arbitrary-dimension data, respectively. Toolkit users -// can create their own concrete derivatives that implement alternative -// storage strategies, such as compressed-sparse-row, etc. You could -// also create an array that provided read-only access to 'virtual' data, -// such as an array that returned a Fibonacci sequence, etc. -// -// .SECTION See Also -// vtkTypedArray, vtkDenseArray, vtkSparseArray -// -// .SECTION Thanks -// Developed by Timothy M. Shead (tshead@sandia.gov) at Sandia National -// Laboratories. +/** + * @class vtkArray + * @brief Abstract interface for N-dimensional arrays. + * + * + * vtkArray is the root of a hierarchy of arrays that can be used to + * store data with any number of dimensions. It provides an abstract + * interface for retrieving and setting array attributes that are + * independent of the type of values stored in the array - such as the + * number of dimensions, extents along each dimension, and number of + * values stored in the array. + * + * To get and set array values, the vtkTypedArray template class derives + * from vtkArray and provides type-specific methods for retrieval and + * update. + * + * Two concrete derivatives of vtkTypedArray are provided at the moment: + * vtkDenseArray and vtkSparseArray, which provide dense and sparse + * storage for arbitrary-dimension data, respectively. Toolkit users + * can create their own concrete derivatives that implement alternative + * storage strategies, such as compressed-sparse-row, etc. You could + * also create an array that provided read-only access to 'virtual' data, + * such as an array that returned a Fibonacci sequence, etc. + * + * @sa + * vtkTypedArray, vtkDenseArray, vtkSparseArray + * + * @par Thanks: + * Developed by Timothy M. Shead (tshead@sandia.gov) at Sandia National + * Laboratories. +*/ #ifndef vtkArray_h #define vtkArray_h @@ -76,33 +79,37 @@ public: SPARSE = 1 }; - // Description: - // Creates a new array where StorageType is one of vtkArray::DENSE - // or vtkArray::SPARSE, and ValueType is one of VTK_CHAR, - // VTK_UNSIGNED_CHAR, VTK_SHORT, VTK_UNSIGNED_SHORT, VTK_INT, - // VTK_UNSIGNED_INT, VTK_LONG, VTK_UNSIGNED_LONG, VTK_DOUBLE, - // VTK_ID_TYPE, or VTK_STRING. The caller is responsible for the - // lifetime of the returned object. + /** + * Creates a new array where StorageType is one of vtkArray::DENSE + * or vtkArray::SPARSE, and ValueType is one of VTK_CHAR, + * VTK_UNSIGNED_CHAR, VTK_SHORT, VTK_UNSIGNED_SHORT, VTK_INT, + * VTK_UNSIGNED_INT, VTK_LONG, VTK_UNSIGNED_LONG, VTK_DOUBLE, + * VTK_ID_TYPE, or VTK_STRING. The caller is responsible for the + * lifetime of the returned object. + */ VTK_NEWINSTANCE static vtkArray* CreateArray(int StorageType, int ValueType); - // Description: - // Returns true iff the underlying array storage is "dense", i.e. that - // GetSize() and GetNonNullSize() will always return the same value. - // If not, the array is "sparse". + /** + * Returns true iff the underlying array storage is "dense", i.e. that + * GetSize() and GetNonNullSize() will always return the same value. + * If not, the array is "sparse". + */ virtual bool IsDense() = 0; - // Description: - // Resizes the array to the given extents (number of dimensions and - // size of each dimension). Note that concrete implementations of - // vtkArray may place constraints on the the extents that they will - // store, so you cannot assume that GetExtents() will always return - // the same value passed to Resize(). - // - // The contents of the array are undefined after calling Resize() - you - // should initialize its contents accordingly. In particular, - // dimension-labels will be undefined, dense array values will be - // undefined, and sparse arrays will be empty. + //@{ + /** + * Resizes the array to the given extents (number of dimensions and + * size of each dimension). Note that concrete implementations of + * vtkArray may place constraints on the the extents that they will + * store, so you cannot assume that GetExtents() will always return + * the same value passed to Resize(). + + * The contents of the array are undefined after calling Resize() - you + * should initialize its contents accordingly. In particular, + * dimension-labels will be undefined, dense array values will be + * undefined, and sparse arrays will be empty. + */ void Resize(const CoordinateT i); void Resize(const CoordinateT i, const CoordinateT j); void Resize(const CoordinateT i, const CoordinateT j, const CoordinateT k); @@ -110,102 +117,125 @@ public: void Resize(const vtkArrayRange& i, const vtkArrayRange& j); void Resize(const vtkArrayRange& i, const vtkArrayRange& j, const vtkArrayRange& k); void Resize(const vtkArrayExtents& extents); + //@} - // Description: - // Returns the extent (valid coordinate range) along the given - // dimension. + /** + * Returns the extent (valid coordinate range) along the given + * dimension. + */ const vtkArrayRange GetExtent(DimensionT dimension); - // Description: - // Returns the extents (the number of dimensions and size along each - // dimension) of the array. + /** + * Returns the extents (the number of dimensions and size along each + * dimension) of the array. + */ virtual const vtkArrayExtents& GetExtents() = 0; - // Description: - // Returns the number of dimensions stored in the array. Note that - // this is the same as calling GetExtents().GetDimensions(). + /** + * Returns the number of dimensions stored in the array. Note that + * this is the same as calling GetExtents().GetDimensions(). + */ DimensionT GetDimensions(); - // Description: - // Returns the number of values stored in the array. Note that this is - // the same as calling GetExtents().GetSize(), and represents the - // maximum number of values that could ever be stored using the current - // extents. This is equal to the number of values stored in a dense - // array, but may be larger than the number of values stored in a - // sparse array. + /** + * Returns the number of values stored in the array. Note that this is + * the same as calling GetExtents().GetSize(), and represents the + * maximum number of values that could ever be stored using the current + * extents. This is equal to the number of values stored in a dense + * array, but may be larger than the number of values stored in a + * sparse array. + */ SizeT GetSize(); - // Description: - // Returns the number of non-null values stored in the array. Note - // that this value will equal GetSize() for dense arrays, and will be - // less-than-or-equal to GetSize() for sparse arrays. + /** + * Returns the number of non-null values stored in the array. Note + * that this value will equal GetSize() for dense arrays, and will be + * less-than-or-equal to GetSize() for sparse arrays. + */ virtual SizeT GetNonNullSize() = 0; - // Description: - // Sets the array name. + /** + * Sets the array name. + */ void SetName(const vtkStdString& name); - // Description: - // Returns the array name. + /** + * Returns the array name. + */ vtkStdString GetName(); - // Description: - // Sets the label for the i-th array dimension. + /** + * Sets the label for the i-th array dimension. + */ void SetDimensionLabel(DimensionT i, const vtkStdString& label); - // Description: - // Returns the label for the i-th array dimension. + /** + * Returns the label for the i-th array dimension. + */ vtkStdString GetDimensionLabel(DimensionT i); - // Description: - // Returns the coordinates of the n-th value in the array, where n is - // in the range [0, GetNonNullSize()). Note that the order in which - // coordinates are visited is undefined, but is guaranteed to match the - // order in which values are visited using vtkTypedArray::GetValueN() - // and vtkTypedArray::SetValueN(). + /** + * Returns the coordinates of the n-th value in the array, where n is + * in the range [0, GetNonNullSize()). Note that the order in which + * coordinates are visited is undefined, but is guaranteed to match the + * order in which values are visited using vtkTypedArray::GetValueN() + * and vtkTypedArray::SetValueN(). + */ virtual void GetCoordinatesN(const SizeT n, vtkArrayCoordinates& coordinates) = 0; - // Description: - // Returns the value stored in the array at the given coordinates. - // Note that the number of dimensions in the supplied coordinates must - // match the number of dimensions in the array. + //@{ + /** + * Returns the value stored in the array at the given coordinates. + * Note that the number of dimensions in the supplied coordinates must + * match the number of dimensions in the array. + */ inline vtkVariant GetVariantValue(CoordinateT i); inline vtkVariant GetVariantValue(CoordinateT i, CoordinateT j); inline vtkVariant GetVariantValue(CoordinateT i, CoordinateT j, CoordinateT k); virtual vtkVariant GetVariantValue(const vtkArrayCoordinates& coordinates) = 0; - - // Description: - // Returns the n-th value stored in the array, where n is in the - // range [0, GetNonNullSize()). This is useful for efficiently - // visiting every value in the array. Note that the order in which - // values are visited is undefined, but is guaranteed to match the - // order used by vtkArray::GetCoordinatesN(). + //@} + + /** + * Returns the n-th value stored in the array, where n is in the + * range [0, GetNonNullSize()). This is useful for efficiently + * visiting every value in the array. Note that the order in which + * values are visited is undefined, but is guaranteed to match the + * order used by vtkArray::GetCoordinatesN(). + */ virtual vtkVariant GetVariantValueN(const SizeT n) = 0; - // Description: - // Overwrites the value stored in the array at the given coordinates. - // Note that the number of dimensions in the supplied coordinates must - // match the number of dimensions in the array. + //@{ + /** + * Overwrites the value stored in the array at the given coordinates. + * Note that the number of dimensions in the supplied coordinates must + * match the number of dimensions in the array. + */ inline void SetVariantValue(CoordinateT i, const vtkVariant& value); inline void SetVariantValue(CoordinateT i, CoordinateT j, const vtkVariant& value); inline void SetVariantValue(CoordinateT i, CoordinateT j, CoordinateT k, const vtkVariant& value); virtual void SetVariantValue(const vtkArrayCoordinates& coordinates, const vtkVariant& value) = 0; - - // Description: - // Overwrites the n-th value stored in the array, where n is in the - // range [0, GetNonNullSize()). This is useful for efficiently - // visiting every value in the array. Note that the order in which - // values are visited is undefined, but is guaranteed to match the - // order used by vtkArray::GetCoordinatesN(). + //@} + + /** + * Overwrites the n-th value stored in the array, where n is in the + * range [0, GetNonNullSize()). This is useful for efficiently + * visiting every value in the array. Note that the order in which + * values are visited is undefined, but is guaranteed to match the + * order used by vtkArray::GetCoordinatesN(). + */ virtual void SetVariantValueN(const SizeT n, const vtkVariant& value) = 0; - // Description: - // Overwrites a value with a value retrieved from another array. Both - // arrays must store the same data types. + //@{ + /** + * Overwrites a value with a value retrieved from another array. Both + * arrays must store the same data types. + */ virtual void CopyValue(vtkArray* source, const vtkArrayCoordinates& source_coordinates, const vtkArrayCoordinates& target_coordinates) = 0; virtual void CopyValue(vtkArray* source, const SizeT source_index, const vtkArrayCoordinates& target_coordinates) = 0; virtual void CopyValue(vtkArray* source, const vtkArrayCoordinates& source_coordinates, const SizeT target_index) = 0; + //@} - // Description: - // Returns a new array that is a deep copy of this array. + /** + * Returns a new array that is a deep copy of this array. + */ virtual vtkArray* DeepCopy() = 0; protected: @@ -216,23 +246,29 @@ private: vtkArray(const vtkArray&) VTK_DELETE_FUNCTION; void operator=(const vtkArray&) VTK_DELETE_FUNCTION; - // Description: - // Stores the array name. + /** + * Stores the array name. + */ vtkStdString Name; - // Description: - // Implemented in concrete derivatives to update their storage - // when the array is resized. + /** + * Implemented in concrete derivatives to update their storage + * when the array is resized. + */ virtual void InternalResize(const vtkArrayExtents&) = 0; - // Description: - // Implemented in concrete derivatives to set dimension labels. + /** + * Implemented in concrete derivatives to set dimension labels. + */ virtual void InternalSetDimensionLabel(DimensionT i, const vtkStdString& label) = 0; - // Description: - // Implemented in concrete derivatives to get dimension labels. + //@{ + /** + * Implemented in concrete derivatives to get dimension labels. + */ virtual vtkStdString InternalGetDimensionLabel(DimensionT i) = 0; }; + //@} vtkVariant vtkArray::GetVariantValue(CoordinateT i) { diff --git a/Common/Core/vtkArrayCoordinates.h b/Common/Core/vtkArrayCoordinates.h index e629b3ca64c234a240293df09f6b63017488cfbb..491141264096a017175857852ec2caad27f7d9ca 100644 --- a/Common/Core/vtkArrayCoordinates.h +++ b/Common/Core/vtkArrayCoordinates.h @@ -19,24 +19,27 @@ =========================================================================*/ -// .NAME vtkArrayCoordinates - Stores coordinate into an N-way array. -// -// .SECTION Description -// vtkArrayCoordinates stores a collection of coordinates that can be -// used to access values in a vtkArray containing an arbitrary number of -// dimensions. -// -// Convenience constructors are provided for working with one, two, and -// three dimensions. For higher dimensions, use the default constructor, -// SetDimensions() and operator[] to assign a coordinate value along each -// dimension. -// -// .SECTION See Also -// vtkArray, vtkArrayExtents -// -// .SECTION Thanks -// Developed by Timothy M. Shead (tshead@sandia.gov) at Sandia National -// Laboratories. +/** + * @class vtkArrayCoordinates + * @brief Stores coordinate into an N-way array. + * + * + * vtkArrayCoordinates stores a collection of coordinates that can be + * used to access values in a vtkArray containing an arbitrary number of + * dimensions. + * + * Convenience constructors are provided for working with one, two, and + * three dimensions. For higher dimensions, use the default constructor, + * SetDimensions() and operator[] to assign a coordinate value along each + * dimension. + * + * @sa + * vtkArray, vtkArrayExtents + * + * @par Thanks: + * Developed by Timothy M. Shead (tshead@sandia.gov) at Sandia National + * Laboratories. +*/ #ifndef vtkArrayCoordinates_h #define vtkArrayCoordinates_h @@ -51,58 +54,72 @@ public: typedef vtkIdType CoordinateT; typedef vtkIdType DimensionT; - // Description: - // Create an empty set of coordinates. Use SetDimensions() and - // operator[] to populate the coordinates. + /** + * Create an empty set of coordinates. Use SetDimensions() and + * operator[] to populate the coordinates. + */ vtkArrayCoordinates(); - // Description: - // Create coordinates for a one-dimensional array. + /** + * Create coordinates for a one-dimensional array. + */ explicit vtkArrayCoordinates(CoordinateT i); - // Description: - // Create coordinates for a two-dimensional array. + /** + * Create coordinates for a two-dimensional array. + */ vtkArrayCoordinates(CoordinateT i, CoordinateT j); - // Description: - // Create coordinates for a three-dimensional array. + /** + * Create coordinates for a three-dimensional array. + */ vtkArrayCoordinates(CoordinateT i, CoordinateT j, CoordinateT k); - // Description: - // Return the number of dimensions contained in the coordinates. + /** + * Return the number of dimensions contained in the coordinates. + */ DimensionT GetDimensions() const; - // Description: - // Set the number of dimensions. Note that this method resets the - // coordinate along each dimension to zero, so you must set every - // coordinate explicitly using operator[] after calling SetDimensions(). + /** + * Set the number of dimensions. Note that this method resets the + * coordinate along each dimension to zero, so you must set every + * coordinate explicitly using operator[] after calling SetDimensions(). + */ void SetDimensions(DimensionT dimensions); - // Description: - // Returns the coordinate of the i-th dimension. + /** + * Returns the coordinate of the i-th dimension. + */ CoordinateT& operator[](DimensionT i); - // Description: - // Returns the coordinate of the i-th dimension. + /** + * Returns the coordinate of the i-th dimension. + */ const CoordinateT& operator[](DimensionT i) const; - // Description: - // Returns the coordinate of the i-th dimension. + /** + * Returns the coordinate of the i-th dimension. + */ CoordinateT GetCoordinate(DimensionT i) const; - // Description: - // Sets the coordinate of the i-th dimension. + /** + * Sets the coordinate of the i-th dimension. + */ void SetCoordinate(DimensionT i, const CoordinateT&); - // Description: - // Equality comparison + /** + * Equality comparison + */ bool operator==(const vtkArrayCoordinates& rhs) const; - // Description: - // Inequality comparison + //@{ + /** + * Inequality comparison + */ bool operator!=(const vtkArrayCoordinates& rhs) const; VTKCOMMONCORE_EXPORT friend ostream& operator<<( ostream& stream, const vtkArrayCoordinates& rhs); + //@} private: diff --git a/Common/Core/vtkArrayDispatch.h b/Common/Core/vtkArrayDispatch.h index 7234181dabf7bd54475de5cb2a615c124c90ca81..22137b71ca871c3190e6bdaa90d114c3c3278660 100644 --- a/Common/Core/vtkArrayDispatch.h +++ b/Common/Core/vtkArrayDispatch.h @@ -12,143 +12,146 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkArrayDispatch - vtkDataArray code generator/dispatcher. -// -// vtkArrayDispatch implements a mechanism for generating optimized code for -// multiple subclasses of vtkDataArray at once. Using a TypeList based -// approach (see vtkTypeList), a templated worker implementation is generated -// for a restricted or unrestricted set of vtkDataArray subclasses. -// -// A more detailed description of this class and related tools can be found -// \ref VTK-7-1-ArrayDispatch "here". -// -// The primary goals of this class are to simplify multi-array dispatch -// implementations, and provide tools to lower compilation time and binary -// size (i.e. avoiding 'template explosions'). -// -// vtkArrayDispatch is also intended to replace code that currently relies on -// the encapsulation-breaking vtkDataArray::GetVoidPointer method. Not all -// subclasses of vtkDataArray use the memory layout assumed by GetVoidPointer; -// calling this method on, e.g. a vtkSOADataArrayTemplate will trigger a deep -// copy of the array data into an AOS buffer. This is very inefficient and -// should be avoided. -// -// The vtkDataArrayAccessor wrapper is worth mentioning here, as it allows -// vtkArrayDispatch workers to operate on selected concrete subclasses for -// 'fast paths', yet fallback to using the slower vtkDataArray API for uncommon -// array types. This helps mitigate the "template explosion" issues that can -// result from instantiating a large worker functions for many array types. -// -// These dispatchers extend the basic functionality of vtkTemplateMacro with -// the following features: -// - Multiarray dispatch: A single call can dispatch up to 3 arrays at once. -// - Array restriction: The set of valid arrays for a particular dispatch -// can be restricted. For example, if only vtkDoubleArray or vtkFloatArray -// will be passed into the call, the dispatcher will only generate code paths -// that use those arrays. -// - ValueType restriction: If both SoA and AoS arrays need to be supported, -// but only certain ValueTypes are expected, the dispatcher can restrict -// itself to only use arrays that match this critera. -// - Application-wide array restrictions: If a VTK application uses only a few -// arraytype / valuetype combinations, certain dispatchers will eliminate -// paths using unsupported arrays at compile time. -// -// The basic Dispatch implementation will generate code paths for all arrays -// in the application-wide array list, and operates on a single array. -// -// Dispatchers that start with Dispatch2 operate on 2 arrays simultaneously, -// while those that begin with Dispatch3 operate on 3 arrays. -// -// To reduce compile time and binary size, the following dispatchers can be -// used to restrict the set of arrays that will be used. There are versions of -// these that operate on 1, 2, or 3 arrays: -// -// - DispatchByArray: -// Accepts an explicit TypeList of arrays to consider. -// These dispatchers do NOT respect the application-wide array restrictions. -// Example usecase: A filter that creates either vtkFloatArray or -// vtkDoubleArray depending on configuration can use this to restrict itself -// to only these specific types. -// Note that these should not be used for operating on filter inputs, instead -// use DispatchByValueType, which also considers variations in vtkDataArray -// subclasses and respects the application-wide array restrictions. -// -// - DispatchByValueType: -// Accepts an explicit TypeList of ValueTypes to consider. -// These dispatchers respect the application-wide array restrictions. -// Example usecase: An image filter that operates on an input array that must -// have either a float or unsigned char ValueType. -// -// - DispatchNByArrayWithSameValueType: -// Multiarray dispatcher that accepts an explicit TypeList of arrays for -// consideration. Generated code paths are further restricted to enforce that -// all dispatched arrays will have the same ValueType. -// Example usecase: A filter that creates and operates on multiple arrays at -// the same time, where the arrays are guaranteed to have the same ValueType. -// Note that these should not be used for operating on filter inputs, instead -// use DispatchNBySameValueType, which also considers variations in -// vtkDataArray subclasses and respects the application-wide array -// restrictions. -// -// - DispatchNBySameValueType: -// Multiarray dispatcher that accepts an explicit TypeList of ValueTypes to -// consider. Generated code paths are further restricted to enforce that -// all dispatched arrays will have the same ValueType. -// Example usecase: A filter that creates a modified version of an input -// array using NewInstance(). Both arrays may be passed into the dispatcher -// using a worker function that produces the output from the input. -// -// Execution: -// There are three components to a dispatch: The dispatcher, the worker, and -// the array(s). They are combined like so: -// -// @code -// bool result = Dispatcher<...>::Execute(array, worker); -// @endcode -// -// The dispatcher can also be instantiated into an object, e.g.: -// -// @code -// vtkArrayDispatch::SomeDispatcher<...> myDispatcher; -// MyWorker worker; -// bool result = myDispatcher.Execute(array, worker); -// @endcode -// -// Return value: -// The Execute method of the dispatcher will return true if a code path matching -// the array arguments is found, or false if the arrays are not supported. If -// false is returned, the arrays will not be modified, and the worker will not -// be executed. -// -// Workers: -// The dispatch requires a Worker functor that performs the work. -// For single array, the functor must be callable with the array object as an -// argument. For 2-array dispatch, the arguments must be (array1, array2). -// For 3-array dispatch, the arguments must be (array1, array2, array3). -// Workers are passed by reference, so stateful functors are permitted if -// additional input/output data is needed. -// -// A simple worker implementation for triple dispatch: -// @code -// struct MyWorker -// { -// template -// void operator()(Array1T *array1, Array2T *array2, Array3T *array3) -// { -// // Do work using vtkGenericDataArray API... -// } -// }; -// @endcode -// -// Note that optimized implementations (e.g. for AoS arrays vs SoA arrays) can -// be supported by providing overloads of operator() that have more restrictive -// template parameters. -// -// Examples: -// See TestArrayDispatchers.cxx for examples of each dispatch type. -// -// .SECTION See Also -// vtkDataArrayAccessor +/** + * @class vtkArrayDispatch + * @brief vtkDataArray code generator/dispatcher. + * + * vtkArrayDispatch implements a mechanism for generating optimized code for + * multiple subclasses of vtkDataArray at once. Using a TypeList based + * approach (see vtkTypeList), a templated worker implementation is generated + * for a restricted or unrestricted set of vtkDataArray subclasses. + * + * A more detailed description of this class and related tools can be found + * \ref VTK-7-1-ArrayDispatch "here". + * + * The primary goals of this class are to simplify multi-array dispatch + * implementations, and provide tools to lower compilation time and binary + * size (i.e. avoiding 'template explosions'). + * + * vtkArrayDispatch is also intended to replace code that currently relies on + * the encapsulation-breaking vtkDataArray::GetVoidPointer method. Not all + * subclasses of vtkDataArray use the memory layout assumed by GetVoidPointer; + * calling this method on, e.g. a vtkSOADataArrayTemplate will trigger a deep + * copy of the array data into an AOS buffer. This is very inefficient and + * should be avoided. + * + * The vtkDataArrayAccessor wrapper is worth mentioning here, as it allows + * vtkArrayDispatch workers to operate on selected concrete subclasses for + * 'fast paths', yet fallback to using the slower vtkDataArray API for uncommon + * array types. This helps mitigate the "template explosion" issues that can + * result from instantiating a large worker functions for many array types. + * + * These dispatchers extend the basic functionality of vtkTemplateMacro with + * the following features: + * - Multiarray dispatch: A single call can dispatch up to 3 arrays at once. + * - Array restriction: The set of valid arrays for a particular dispatch + * can be restricted. For example, if only vtkDoubleArray or vtkFloatArray + * will be passed into the call, the dispatcher will only generate code paths + * that use those arrays. + * - ValueType restriction: If both SoA and AoS arrays need to be supported, + * but only certain ValueTypes are expected, the dispatcher can restrict + * itself to only use arrays that match this critera. + * - Application-wide array restrictions: If a VTK application uses only a few + * arraytype / valuetype combinations, certain dispatchers will eliminate + * paths using unsupported arrays at compile time. + * + * The basic Dispatch implementation will generate code paths for all arrays + * in the application-wide array list, and operates on a single array. + * + * Dispatchers that start with Dispatch2 operate on 2 arrays simultaneously, + * while those that begin with Dispatch3 operate on 3 arrays. + * + * To reduce compile time and binary size, the following dispatchers can be + * used to restrict the set of arrays that will be used. There are versions of + * these that operate on 1, 2, or 3 arrays: + * + * - DispatchByArray: + * Accepts an explicit TypeList of arrays to consider. + * These dispatchers do NOT respect the application-wide array restrictions. + * Example usecase: A filter that creates either vtkFloatArray or + * vtkDoubleArray depending on configuration can use this to restrict itself + * to only these specific types. + * Note that these should not be used for operating on filter inputs, instead + * use DispatchByValueType, which also considers variations in vtkDataArray + * subclasses and respects the application-wide array restrictions. + * + * - DispatchByValueType: + * Accepts an explicit TypeList of ValueTypes to consider. + * These dispatchers respect the application-wide array restrictions. + * Example usecase: An image filter that operates on an input array that must + * have either a float or unsigned char ValueType. + * + * - DispatchNByArrayWithSameValueType: + * Multiarray dispatcher that accepts an explicit TypeList of arrays for + * consideration. Generated code paths are further restricted to enforce that + * all dispatched arrays will have the same ValueType. + * Example usecase: A filter that creates and operates on multiple arrays at + * the same time, where the arrays are guaranteed to have the same ValueType. + * Note that these should not be used for operating on filter inputs, instead + * use DispatchNBySameValueType, which also considers variations in + * vtkDataArray subclasses and respects the application-wide array + * restrictions. + * + * - DispatchNBySameValueType: + * Multiarray dispatcher that accepts an explicit TypeList of ValueTypes to + * consider. Generated code paths are further restricted to enforce that + * all dispatched arrays will have the same ValueType. + * Example usecase: A filter that creates a modified version of an input + * array using NewInstance(). Both arrays may be passed into the dispatcher + * using a worker function that produces the output from the input. + * + * Execution: + * There are three components to a dispatch: The dispatcher, the worker, and + * the array(s). They are combined like so: + * + * @code + * bool result = Dispatcher<...>::Execute(array, worker); + * @endcode + * + * The dispatcher can also be instantiated into an object, e.g.: + * + * @code + * vtkArrayDispatch::SomeDispatcher<...> myDispatcher; + * MyWorker worker; + * bool result = myDispatcher.Execute(array, worker); + * @endcode + * + * Return value: + * The Execute method of the dispatcher will return true if a code path matching + * the array arguments is found, or false if the arrays are not supported. If + * false is returned, the arrays will not be modified, and the worker will not + * be executed. + * + * Workers: + * The dispatch requires a Worker functor that performs the work. + * For single array, the functor must be callable with the array object as an + * argument. For 2-array dispatch, the arguments must be (array1, array2). + * For 3-array dispatch, the arguments must be (array1, array2, array3). + * Workers are passed by reference, so stateful functors are permitted if + * additional input/output data is needed. + * + * A simple worker implementation for triple dispatch: + * @code + * struct MyWorker + * { + * template + * void operator()(Array1T *array1, Array2T *array2, Array3T *array3) + * { + * // Do work using vtkGenericDataArray API... + * } + * }; + * @endcode + * + * Note that optimized implementations (e.g. for AoS arrays vs SoA arrays) can + * be supported by providing overloads of operator() that have more restrictive + * template parameters. + * + * Examples: + * See TestArrayDispatchers.cxx for examples of each dispatch type. + * + * @sa + * vtkDataArrayAccessor +*/ #ifndef vtkArrayDispatch_h #define vtkArrayDispatch_h @@ -160,77 +163,86 @@ namespace vtkArrayDispatch { -// Description: -// A TypeList containing all real ValueTypes. +/** + * A TypeList containing all real ValueTypes. + */ typedef vtkTypeList_Create_2(double, float) Reals; -// Description: -// A Typelist containing all integral ValueTypes. +/** + * A Typelist containing all integral ValueTypes. + */ typedef vtkTypeList::Unique< vtkTypeList_Create_12(char, int, long, long long, short, signed char, unsigned char, unsigned int, unsigned long, unsigned long long, unsigned short, vtkIdType) >::Result Integrals; -// Description: -// A Typelist containing all standard VTK array ValueTypes. +/** + * A Typelist containing all standard VTK array ValueTypes. + */ typedef vtkTypeList::Append::Result AllTypes; //------------------------------------------------------------------------------ -// Description: -// Dispatch a single array against all array types in the application-wide -// vtkArrayDispatch::Arrays list. -// The entry point is: -// bool Dispatch::Execute(vtkDataArray *array, Worker &worker). +/** + * Dispatch a single array against all array types in the application-wide + * vtkArrayDispatch::Arrays list. + * The entry point is: + * bool Dispatch::Execute(vtkDataArray *array, Worker &worker). + */ struct Dispatch; //------------------------------------------------------------------------------ -// Description: -// Dispatch a single array against all array types mentioned in the ArrayList -// template parameter. -// The entry point is: -// bool DispatchByArray<...>::Execute(vtkDataArray *array, Worker &worker). +/** + * Dispatch a single array against all array types mentioned in the ArrayList + * template parameter. + * The entry point is: + * bool DispatchByArray<...>::Execute(vtkDataArray *array, Worker &worker). + */ template struct DispatchByArray; //------------------------------------------------------------------------------ -// Description: -// Dispatch a single array against all array types in the application-wide -// vtkArrayDispatch::Arrays list with the added restriction that the array -// must have a type that appears the ValueTypeList TypeList. -// The entry point is: -// bool DispatchByValueType<...>::Execute(vtkDataArray *array, Worker &worker). +/** + * Dispatch a single array against all array types in the application-wide + * vtkArrayDispatch::Arrays list with the added restriction that the array + * must have a type that appears the ValueTypeList TypeList. + * The entry point is: + * bool DispatchByValueType<...>::Execute(vtkDataArray *array, Worker &worker). + */ template struct DispatchByValueType; //------------------------------------------------------------------------------ -// Description: -// Dispatch two arrays using all array types in the application-wide -// vtkArrayDispatch::Arrays list. -// The entry point is: -// bool Dispatch2::Execute(vtkDataArray *array, vtkDataArray *array2, -// Worker &worker). +/** + * Dispatch two arrays using all array types in the application-wide + * vtkArrayDispatch::Arrays list. + * The entry point is: + * bool Dispatch2::Execute(vtkDataArray *array, vtkDataArray *array2, + * Worker &worker). + */ struct Dispatch2; //------------------------------------------------------------------------------ -// Description: -// Dispatch two arrays, restricting the valid code paths to use only arrays that -// have the same ValueType. -// All application-wide arrays in vtkArrayDispatch::Arrays are used. -// The entry point is: -// bool Dispatch2SameValueType::Execute( -// vtkDataArray *a1, vtkDataArray *a2, Worker &worker). +/** + * Dispatch two arrays, restricting the valid code paths to use only arrays that + * have the same ValueType. + * All application-wide arrays in vtkArrayDispatch::Arrays are used. + * The entry point is: + * bool Dispatch2SameValueType::Execute( + * vtkDataArray *a1, vtkDataArray *a2, Worker &worker). + */ struct Dispatch2SameValueType; //------------------------------------------------------------------------------ -// Description: -// Dispatch two arrays with the restriction that the type of the first array is -// in the ArrayList1 TypeList, and the second is in ArrayList2. -// If all application-wide arrays are desired, use vtkArrayDispatch::Arrays for -// the first two template parameters. -// The entry point is: -// bool Dispatch2ByArray<...>::Execute(vtkDataArray *a1, vtkDataArray *a2, -// Worker &worker). +/** + * Dispatch two arrays with the restriction that the type of the first array is + * in the ArrayList1 TypeList, and the second is in ArrayList2. + * If all application-wide arrays are desired, use vtkArrayDispatch::Arrays for + * the first two template parameters. + * The entry point is: + * bool Dispatch2ByArray<...>::Execute(vtkDataArray *a1, vtkDataArray *a2, + * Worker &worker). + */ template < typename ArrayList1, typename ArrayList2 @@ -238,16 +250,17 @@ template < struct Dispatch2ByArray; //------------------------------------------------------------------------------ -// Description: -// Dispatch two arrays, restricting the valid code paths to use -// ValueType-filtered versions of the application-wide vtkArrayDispatch::Arrays -// TypeList. The first array's ValueType must be in the ValueTypeList1 TypeList, -// and the second's must be in ValueTypeList2. -// If all types are to be considered, use vtkArrayDispatch::AllTypes for the -// first two template parameters. -// The entry point is: -// bool Dispatch2ByValueType<...>::Execute(vtkDataArray *a1, vtkDataArray *a2, -// Worker &worker). +/** + * Dispatch two arrays, restricting the valid code paths to use + * ValueType-filtered versions of the application-wide vtkArrayDispatch::Arrays + * TypeList. The first array's ValueType must be in the ValueTypeList1 TypeList, + * and the second's must be in ValueTypeList2. + * If all types are to be considered, use vtkArrayDispatch::AllTypes for the + * first two template parameters. + * The entry point is: + * bool Dispatch2ByValueType<...>::Execute(vtkDataArray *a1, vtkDataArray *a2, + * Worker &worker). + */ template < typename ValueTypeList1, typename ValueTypeList2 @@ -255,15 +268,16 @@ template < struct Dispatch2ByValueType; //------------------------------------------------------------------------------ -// Description: -// Dispatch two arrays, restricting the valid code paths to use only array types -// specified in the ArrayList TypeList, additionally enforcing that all arrays -// must have the same ValueType. -// If all application-wide arrays are desired, use vtkArrayDispatch::Arrays for -// the first two template parameters. -// The entry point is: -// bool Dispatch2ByArrayWithSameValueType<...>::Execute( -// vtkDataArray *a1, vtkDataArray *a2, Worker &worker). +/** + * Dispatch two arrays, restricting the valid code paths to use only array types + * specified in the ArrayList TypeList, additionally enforcing that all arrays + * must have the same ValueType. + * If all application-wide arrays are desired, use vtkArrayDispatch::Arrays for + * the first two template parameters. + * The entry point is: + * bool Dispatch2ByArrayWithSameValueType<...>::Execute( + * vtkDataArray *a1, vtkDataArray *a2, Worker &worker). + */ template < typename ArrayList1, typename ArrayList2 @@ -271,48 +285,52 @@ template < struct Dispatch2ByArrayWithSameValueType; //------------------------------------------------------------------------------ -// Description: -// Dispatch two arrays, restricting the valid code paths to use only array types -// found in application-wide vtkArrayDispatch::Arrays TypeList that have a -// ValueType contained in the ValueTypeList TypeList. This dispatcher also -// enforces that all arrays have the same ValueType. -// If all types are to be considered, use vtkArrayDispatch::AllTypes for the -// first two template parameters. -// The entry point is: -// bool Dispatch2BySameValueType<...>::Execute( -// vtkDataArray *a1, vtkDataArray *a2, Worker &worker). +/** + * Dispatch two arrays, restricting the valid code paths to use only array types + * found in application-wide vtkArrayDispatch::Arrays TypeList that have a + * ValueType contained in the ValueTypeList TypeList. This dispatcher also + * enforces that all arrays have the same ValueType. + * If all types are to be considered, use vtkArrayDispatch::AllTypes for the + * first two template parameters. + * The entry point is: + * bool Dispatch2BySameValueType<...>::Execute( + * vtkDataArray *a1, vtkDataArray *a2, Worker &worker). + */ template struct Dispatch2BySameValueType; //------------------------------------------------------------------------------ -// Description: -// Dispatch three arrays using all array types in the application-wide -// vtkArrayDispatch::Arrays list. -// The entry point is: -// bool Dispatch3::Execute(vtkDataArray *array1, vtkDataArray *array2, -// vtkDataArray *array3, Worker &worker). +/** + * Dispatch three arrays using all array types in the application-wide + * vtkArrayDispatch::Arrays list. + * The entry point is: + * bool Dispatch3::Execute(vtkDataArray *array1, vtkDataArray *array2, + * vtkDataArray *array3, Worker &worker). + */ struct Dispatch3; //------------------------------------------------------------------------------ -// Description: -// Dispatch three arrays, restricting the valid code paths to use only arrays -// that have the same ValueType. -// All application-wide arrays in vtkArrayDispatch::Arrays are used. -// The entry point is: -// bool Dispatch3SameValueType::Execute( -// vtkDataArray *a1, vtkDataArray *a2, vtkDataArray *a3, Worker &worker). +/** + * Dispatch three arrays, restricting the valid code paths to use only arrays + * that have the same ValueType. + * All application-wide arrays in vtkArrayDispatch::Arrays are used. + * The entry point is: + * bool Dispatch3SameValueType::Execute( + * vtkDataArray *a1, vtkDataArray *a2, vtkDataArray *a3, Worker &worker). + */ struct Dispatch3SameValueType; //------------------------------------------------------------------------------ -// Description: -// Dispatch three arrays with the restriction that the type of the first array -// is in the ArrayList1 TypeList, the second is in ArrayList2, and the third -// is in ArrayList3. -// If all application-wide arrays are desired, use vtkArrayDispatch::Arrays for -// the first three template parameters. -// The entry point is: -// bool Dispatch3ByArray::Execute<...>(vtkDataArray *a1, vtkDataArray *a2, -// vtkDataArray *a3, Worker &worker). +/** + * Dispatch three arrays with the restriction that the type of the first array + * is in the ArrayList1 TypeList, the second is in ArrayList2, and the third + * is in ArrayList3. + * If all application-wide arrays are desired, use vtkArrayDispatch::Arrays for + * the first three template parameters. + * The entry point is: + * bool Dispatch3ByArray::Execute<...>(vtkDataArray *a1, vtkDataArray *a2, + * vtkDataArray *a3, Worker &worker). + */ template < typename ArrayList1, typename ArrayList2, @@ -321,17 +339,18 @@ template < struct Dispatch3ByArray; //------------------------------------------------------------------------------ -// Description: -// Dispatch three arrays, restricting the valid code paths to use -// ValueType-filtered versions of the application-wide vtkArrayDispatch::Arrays -// TypeList. The first array's ValueType must be in the ValueTypeList1 TypeList, -// the second's must be in ValueTypeList2, and the third's must be in -// ValueTypeList3. -// If all types are to be considered, use vtkArrayDispatch::AllTypes for the -// first three template parameters. -// The entry point is: -// bool Dispatch3ByValueType<...>::Execute(vtkDataArray *a1, vtkDataArray *a2, -// vtkDataArray *a3, Worker &worker). +/** + * Dispatch three arrays, restricting the valid code paths to use + * ValueType-filtered versions of the application-wide vtkArrayDispatch::Arrays + * TypeList. The first array's ValueType must be in the ValueTypeList1 TypeList, + * the second's must be in ValueTypeList2, and the third's must be in + * ValueTypeList3. + * If all types are to be considered, use vtkArrayDispatch::AllTypes for the + * first three template parameters. + * The entry point is: + * bool Dispatch3ByValueType<...>::Execute(vtkDataArray *a1, vtkDataArray *a2, + * vtkDataArray *a3, Worker &worker). + */ template < typename ValueTypeList1, typename ValueTypeList2, @@ -340,15 +359,16 @@ template < struct Dispatch3ByValueType; //------------------------------------------------------------------------------ -// Description: -// Dispatch three arrays, restricting the valid code paths to use only array -// types specified in the ArrayList TypeList, additionally enforcing that all -// arrays must have the same ValueType. -// If all application-wide arrays are desired, use vtkArrayDispatch::Arrays for -// the first three template parameters. -// The entry point is: -// bool Dispatch3ByArrayWithSameValueType<...>::Execute( -// vtkDataArray *a1, vtkDataArray *a2, vtkDataArray *a3, Worker &worker). +/** + * Dispatch three arrays, restricting the valid code paths to use only array + * types specified in the ArrayList TypeList, additionally enforcing that all + * arrays must have the same ValueType. + * If all application-wide arrays are desired, use vtkArrayDispatch::Arrays for + * the first three template parameters. + * The entry point is: + * bool Dispatch3ByArrayWithSameValueType<...>::Execute( + * vtkDataArray *a1, vtkDataArray *a2, vtkDataArray *a3, Worker &worker). + */ template < typename ArrayList1, typename ArrayList2, @@ -357,23 +377,25 @@ template < struct Dispatch3ByArrayWithSameValueType; //------------------------------------------------------------------------------ -// Description: -// Dispatch three arrays, restricting the valid code paths to use only array -// types found in application-wide vtkArrayDispatch::Arrays TypeList that have a -// ValueType contained in the ValueTypeList TypeList. This dispatcher also -// enforces that all arrays have the same ValueType. -// If all types are to be considered, use vtkArrayDispatch::AllTypes for the -// first three template parameters. -// The entry point is: -// bool Dispatch3BySameValueType<...>::Execute( -// vtkDataArray *a1, vtkDataArray *a2, vtkDataArray *a3, Worker &worker). +/** + * Dispatch three arrays, restricting the valid code paths to use only array + * types found in application-wide vtkArrayDispatch::Arrays TypeList that have a + * ValueType contained in the ValueTypeList TypeList. This dispatcher also + * enforces that all arrays have the same ValueType. + * If all types are to be considered, use vtkArrayDispatch::AllTypes for the + * first three template parameters. + * The entry point is: + * bool Dispatch3BySameValueType<...>::Execute( + * vtkDataArray *a1, vtkDataArray *a2, vtkDataArray *a3, Worker &worker). + */ template struct Dispatch3BySameValueType; //------------------------------------------------------------------------------ -// Description: -// Filter the ArrayList to contain only arrays with ArrayType::ValueType that -// exist in ValueList. The result TypeList is stored in Result. +/** + * Filter the ArrayList to contain only arrays with ArrayType::ValueType that + * exist in ValueList. The result TypeList is stored in Result. + */ template struct FilterArraysByValueType; diff --git a/Common/Core/vtkArrayExtents.h b/Common/Core/vtkArrayExtents.h index a4914e1932041a51017a3e27d80bf1db0f105bbf..c93db167c7f79db8351cbfa0417cb1a5cec52863 100644 --- a/Common/Core/vtkArrayExtents.h +++ b/Common/Core/vtkArrayExtents.h @@ -19,40 +19,43 @@ =========================================================================*/ -// .NAME vtkArrayExtents - Stores the number of dimensions and valid -// coordinate ranges along each dimension for vtkArray. -// -// .SECTION Description -// vtkArrayExtents describes the number of dimensions and coordinate -// ranges along each dimension of an N-way collection of values. It is -// used to retrieve and update the extents of a vtkArray object. -// -// Conceptually, vtkArrayExtents is a collection of vtkArrayRange -// objects, one per dimension, that store the half-open range of valid -// coordinates (the "extent") for that dimension. Because each extent is -// stored as a range rather than a size, you can: create arrays that use -// one-based coordinates for consistency with mathematics and tools such -// as MATLAB; easily represent arbitrary subsets of an array; and easily -// store and manipulate distributed arrays using "global" coordinates. -// -// Convenience constructors are provided for creating extents along one, -// two, and three dimensions. For higher dimensions, you can: -// -// Use the static Uniform() factory method to create extents that have -// the same size along an arbitrary number of dimensions. -// -// Use the default constructor and the Append() method to "grow" your -// extents to the correct number of dimensions. -// -// Use the default constructuor, SetDimensions() and operator[] to assign -// a size along each dimension. -// -// .SECTION See Also -// vtkArray, vtkArrayRange, vtkArrayCoordinates -// -// .SECTION Thanks -// Developed by Timothy M. Shead (tshead@sandia.gov) at Sandia National -// Laboratories. +/** + * @class vtkArrayExtents + * @brief Stores the number of dimensions and valid + * coordinate ranges along each dimension for vtkArray. + * + * + * vtkArrayExtents describes the number of dimensions and coordinate + * ranges along each dimension of an N-way collection of values. It is + * used to retrieve and update the extents of a vtkArray object. + * + * Conceptually, vtkArrayExtents is a collection of vtkArrayRange + * objects, one per dimension, that store the half-open range of valid + * coordinates (the "extent") for that dimension. Because each extent is + * stored as a range rather than a size, you can: create arrays that use + * one-based coordinates for consistency with mathematics and tools such + * as MATLAB; easily represent arbitrary subsets of an array; and easily + * store and manipulate distributed arrays using "global" coordinates. + * + * Convenience constructors are provided for creating extents along one, + * two, and three dimensions. For higher dimensions, you can: + * + * Use the static Uniform() factory method to create extents that have + * the same size along an arbitrary number of dimensions. + * + * Use the default constructor and the Append() method to "grow" your + * extents to the correct number of dimensions. + * + * Use the default constructuor, SetDimensions() and operator[] to assign + * a size along each dimension. + * + * @sa + * vtkArray, vtkArrayRange, vtkArrayCoordinates + * + * @par Thanks: + * Developed by Timothy M. Shead (tshead@sandia.gov) at Sandia National + * Laboratories. +*/ #ifndef vtkArrayExtents_h #define vtkArrayExtents_h @@ -69,133 +72,157 @@ public: typedef vtkArrayCoordinates::CoordinateT CoordinateT; typedef vtkTypeUInt64 SizeT; - // Description: - // Create zero-dimensional extents. + /** + * Create zero-dimensional extents. + */ vtkArrayExtents(); - // Description: - // Create zero-based one-dimensional extents. This constructor is shorthand for - // vtkArrayExtents(vtkArrayRange(0, i)). + /** + * Create zero-based one-dimensional extents. This constructor is shorthand for + * vtkArrayExtents(vtkArrayRange(0, i)). + */ explicit vtkArrayExtents(const CoordinateT i); - // Description: - // Create one-dimensional extents. + /** + * Create one-dimensional extents. + */ explicit vtkArrayExtents(const vtkArrayRange& i); - // Description: - // Create zero-based two-dimensional extents. This constructor is shorthand for - // vtkArrayExtents(vtkArrayRange(0, i), vtkArrayRange(0, j)). + /** + * Create zero-based two-dimensional extents. This constructor is shorthand for + * vtkArrayExtents(vtkArrayRange(0, i), vtkArrayRange(0, j)). + */ vtkArrayExtents(const CoordinateT i, const CoordinateT j); - // Description: - // Create two-dimensional extents. + /** + * Create two-dimensional extents. + */ vtkArrayExtents(const vtkArrayRange& i, const vtkArrayRange& j); - // Description: - // Create zero-based three-dimensional extents. This constructor is shorthand for - // vtkArrayExtents(vtkArrayRange(0, i), vtkArrayRange(0, j), - // vtkArrayRange(0, k)). + /** + * Create zero-based three-dimensional extents. This constructor is shorthand for + * vtkArrayExtents(vtkArrayRange(0, i), vtkArrayRange(0, j), + * vtkArrayRange(0, k)). + */ vtkArrayExtents(const CoordinateT i, const CoordinateT j, const CoordinateT k); - // Description: - // Create three-dimensional extents. + /** + * Create three-dimensional extents. + */ vtkArrayExtents(const vtkArrayRange& i, const vtkArrayRange& j, const vtkArrayRange& k); - // Description: - // Create n-dimensional extents with extent [0, m) along each dimension. - // This is useful for creating e.g: a square matrix. + /** + * Create n-dimensional extents with extent [0, m) along each dimension. + * This is useful for creating e.g: a square matrix. + */ static const vtkArrayExtents Uniform(DimensionT n, CoordinateT m); - // Description: - // Grow the number of dimensions by one, specifying the extent - // of the new dimension. + /** + * Grow the number of dimensions by one, specifying the extent + * of the new dimension. + */ void Append(const vtkArrayRange& extent); - // Description: - // Return the current number of dimensions. + /** + * Return the current number of dimensions. + */ DimensionT GetDimensions() const; - // Description: - // Return the number of values that *could* be stored using the - // current extents. This is equal to the product of the size of the - // extent along each dimension. + /** + * Return the number of values that *could* be stored using the + * current extents. This is equal to the product of the size of the + * extent along each dimension. + */ SizeT GetSize() const; - // Description: - // Set the current number of dimensions. Note that this method - // resets the extent along each dimension to an empty range, so you - // must assign each dimension's extent explicitly using operator[] - // after calling SetDimensions(). + /** + * Set the current number of dimensions. Note that this method + * resets the extent along each dimension to an empty range, so you + * must assign each dimension's extent explicitly using operator[] + * after calling SetDimensions(). + */ void SetDimensions(DimensionT dimensions); - // Description: - // Accesses the extent of the i-th dimension. + /** + * Accesses the extent of the i-th dimension. + */ vtkArrayRange& operator[](DimensionT i); - // Description: - // Accesses the extent of the i-th dimension. + /** + * Accesses the extent of the i-th dimension. + */ const vtkArrayRange& operator[](DimensionT i) const; - // Description: - // Get the extent of the i-th dimension. + /** + * Get the extent of the i-th dimension. + */ vtkArrayRange GetExtent(DimensionT i) const; - // Description: - // Set the extent of the i-th dimension. + /** + * Set the extent of the i-th dimension. + */ void SetExtent(DimensionT i, const vtkArrayRange&); - // Description: - // Equality comparison + /** + * Equality comparison + */ bool operator==(const vtkArrayExtents& rhs) const; - // Description: - // Inequality comparison + /** + * Inequality comparison + */ bool operator!=(const vtkArrayExtents& rhs) const; - // Description: - // Returns true iff every range in the current extents is zero-based. - // This is useful as a precondition test for legacy filters/operations - // that predate the switch to range-based extents and assume that all - // extents are zero-based. In general, new code should be written to - // work with arbitrary range extents, so won't need to perform this - // check. + /** + * Returns true iff every range in the current extents is zero-based. + * This is useful as a precondition test for legacy filters/operations + * that predate the switch to range-based extents and assume that all + * extents are zero-based. In general, new code should be written to + * work with arbitrary range extents, so won't need to perform this + * check. + */ bool ZeroBased() const; - // Description: - // Returns true iff the given extents have the same number of - // dimensions and size along each dimension. Note that the ranges - // along each dimension may have different values, so long as their - // sizes match. + /** + * Returns true iff the given extents have the same number of + * dimensions and size along each dimension. Note that the ranges + * along each dimension may have different values, so long as their + * sizes match. + */ bool SameShape(const vtkArrayExtents& rhs) const; - // Description: - // Returns coordinates that reference the n-th value in the extents, - // where n is in the range [0, GetSize()). The returned coordinates - // will be ordered so that the left-most indices vary fastest. This is - // equivalent to column-major ordering for matrices, and corresponds to - // the order in which consecutive array values would be stored in - // languages such as Fortran, MATLAB, Octave, and R. + /** + * Returns coordinates that reference the n-th value in the extents, + * where n is in the range [0, GetSize()). The returned coordinates + * will be ordered so that the left-most indices vary fastest. This is + * equivalent to column-major ordering for matrices, and corresponds to + * the order in which consecutive array values would be stored in + * languages such as Fortran, MATLAB, Octave, and R. + */ void GetLeftToRightCoordinatesN(SizeT n, vtkArrayCoordinates& coordinates) const; - // Description: - // Returns coordinates that reference the n-th value in the extents, - // where n is in the range [0, GetSize()). The returned coordinates - // will be ordered so that the right-most indices vary fastest. This is - // equivalent to row-major ordering for matrices, and corresponds to - // the order in which consecutive array values would be stored in - // languages including C and C++. + /** + * Returns coordinates that reference the n-th value in the extents, + * where n is in the range [0, GetSize()). The returned coordinates + * will be ordered so that the right-most indices vary fastest. This is + * equivalent to row-major ordering for matrices, and corresponds to + * the order in which consecutive array values would be stored in + * languages including C and C++. + */ void GetRightToLeftCoordinatesN(SizeT n, vtkArrayCoordinates& coordinates) const; - // Description: - // Returns true if the given extents are a non-overlapping subset of - // the current extents. Returns false if any of the given extents fall - // outside the current extents, or there is a mismatch in the number of - // dimensions. + /** + * Returns true if the given extents are a non-overlapping subset of + * the current extents. Returns false if any of the given extents fall + * outside the current extents, or there is a mismatch in the number of + * dimensions. + */ bool Contains(const vtkArrayExtents& extents) const; - // Description: - // Returns true if the given array coordinates are completely contained - // by the current extents (i.e. extent begin <= coordinate and - // coordinate < extent end along every dimension). Returns false if - // the array coordinates are outside the current extents, or contain a - // different number of dimensions. + /** + * Returns true if the given array coordinates are completely contained + * by the current extents (i.e. extent begin <= coordinate and + * coordinate < extent end along every dimension). Returns false if + * the array coordinates are outside the current extents, or contain a + * different number of dimensions. + */ bool Contains(const vtkArrayCoordinates& coordinates) const; VTKCOMMONCORE_EXPORT friend ostream& operator<<( diff --git a/Common/Core/vtkArrayExtentsList.h b/Common/Core/vtkArrayExtentsList.h index 92fe885a3c1290b2a7c730bda6edf87188bb4449..f0cae61ce437f99a41cabf878d407bebffed3d1e 100644 --- a/Common/Core/vtkArrayExtentsList.h +++ b/Common/Core/vtkArrayExtentsList.h @@ -19,24 +19,27 @@ =========================================================================*/ -// .NAME vtkArrayExtentsList - Stores a collection of vtkArrayExtents objects. -// -// .SECTION Description -// vtkArrayExtentsList provides storage for a collection of vtkArrayExtents -// instances. Constructors are provided for creating collections -// containing one, two, three, or four slices. To work with larger -// numbers of slices, use the default constructor, the SetCount() method, -// and operator[]. -// -// vtkArrayExtentsList is most commonly used with the vtkInterpolate() -// function, which is used to computed weighted sums of vtkArray slices. -// -// .SECTION See Also -// vtkArray, vtkExtents -// -// .SECTION Thanks -// Developed by Timothy M. Shead (tshead@sandia.gov) at Sandia National -// Laboratories. +/** + * @class vtkArrayExtentsList + * @brief Stores a collection of vtkArrayExtents objects. + * + * + * vtkArrayExtentsList provides storage for a collection of vtkArrayExtents + * instances. Constructors are provided for creating collections + * containing one, two, three, or four slices. To work with larger + * numbers of slices, use the default constructor, the SetCount() method, + * and operator[]. + * + * vtkArrayExtentsList is most commonly used with the vtkInterpolate() + * function, which is used to computed weighted sums of vtkArray slices. + * + * @sa + * vtkArray, vtkExtents + * + * @par Thanks: + * Developed by Timothy M. Shead (tshead@sandia.gov) at Sandia National + * Laboratories. +*/ #ifndef vtkArrayExtentsList_h #define vtkArrayExtentsList_h @@ -48,43 +51,52 @@ class VTKCOMMONCORE_EXPORT vtkArrayExtentsList { public: - // Description: - // Creates an empty collection of slices. + /** + * Creates an empty collection of slices. + */ vtkArrayExtentsList(); - // Description: - // Creates a collection containing one slice. + /** + * Creates a collection containing one slice. + */ vtkArrayExtentsList(const vtkArrayExtents& i); - // Description: - // Creates a collection containing two slices. + /** + * Creates a collection containing two slices. + */ vtkArrayExtentsList(const vtkArrayExtents& i, const vtkArrayExtents& j); - // Description: - // Creates a collection containing three slices. + /** + * Creates a collection containing three slices. + */ vtkArrayExtentsList(const vtkArrayExtents& i, const vtkArrayExtents& j, const vtkArrayExtents& k); - // Description: - // Creates a collection containing four slices. + /** + * Creates a collection containing four slices. + */ vtkArrayExtentsList(const vtkArrayExtents& i, const vtkArrayExtents& j, const vtkArrayExtents& k, const vtkArrayExtents& l); - // Description: - // Returns the number of slices stored in this collection. + /** + * Returns the number of slices stored in this collection. + */ vtkIdType GetCount() const; - // Description: - // Sets the number of extents stored in this collection. Note: all - // extents will be empty after calling SetCount(), use operator[] - // to assign extents to each item in the collection. + /** + * Sets the number of extents stored in this collection. Note: all + * extents will be empty after calling SetCount(), use operator[] + * to assign extents to each item in the collection. + */ void SetCount(vtkIdType count); - // Description: - // Accesses the i-th slice. + /** + * Accesses the i-th slice. + */ vtkArrayExtents& operator[](vtkIdType i); - // Description: - // Accesses the i-th slice. + /** + * Accesses the i-th slice. + */ const vtkArrayExtents& operator[](vtkIdType i) const; private: diff --git a/Common/Core/vtkArrayInterpolate.h b/Common/Core/vtkArrayInterpolate.h index 8f51e8a68aeb8d85a8929be3f553187a4848f001..ba51c75e7858747636661be1f7fe0ebe68e026a4 100644 --- a/Common/Core/vtkArrayInterpolate.h +++ b/Common/Core/vtkArrayInterpolate.h @@ -19,25 +19,27 @@ =========================================================================*/ -// .NAME vtkArrayInterpolate -// .SECTION Description -// Computes the weighted sum of a collection of slices from a source -// array, and stores the results in a slice of a target array. Note that -// the number of source slices and weights must match, and the extents of -// each source slice must match the extents of the target slice. -// -// Note: The implementation assumes that operator*(T, double) is defined, -// and that there is an implicit conversion from its result back to T. -// -// If you need to interpolate arrays of T other than double, you will -// likely want to create your own specialization of this function. -// -// The implementation should produce correct results for dense and sparse -// arrays, but may perform poorly on sparse. - -// .SECTION Thanks -// Developed by Timothy M. Shead (tshead@sandia.gov) at Sandia National -// Laboratories. +/** + * @class vtkArrayInterpolate + * + * Computes the weighted sum of a collection of slices from a source + * array, and stores the results in a slice of a target array. Note that + * the number of source slices and weights must match, and the extents of + * each source slice must match the extents of the target slice. + * + * Note: The implementation assumes that operator*(T, double) is defined, + * and that there is an implicit conversion from its result back to T. + * + * If you need to interpolate arrays of T other than double, you will + * likely want to create your own specialization of this function. + * + * The implementation should produce correct results for dense and sparse + * arrays, but may perform poorly on sparse. + * + * @par Thanks: + * Developed by Timothy M. Shead (tshead@sandia.gov) at Sandia National + * Laboratories. +*/ #ifndef vtkArrayInterpolate_h #define vtkArrayInterpolate_h diff --git a/Common/Core/vtkArrayIterator.h b/Common/Core/vtkArrayIterator.h index 5f12b15afcdd863db8d7cae565cbbfcc6809b869..f6d864d42d1fcd0cc361738d7c7947992e562808 100644 --- a/Common/Core/vtkArrayIterator.h +++ b/Common/Core/vtkArrayIterator.h @@ -13,29 +13,32 @@ =========================================================================*/ -// .NAME vtkArrayIterator - Abstract superclass to iterate over elements -// in an vtkAbstractArray. -// -// .SECTION Description -// vtkArrayIterator is used to iterate over elements in any -// vtkAbstractArray subclass. The vtkArrayIteratorTemplateMacro is used -// to centralize the set of types supported by Execute methods. It also -// avoids duplication of long switch statement case lists. -// -// Note that in this macro VTK_TT is defined to be the type of the -// iterator for the given type of array. One must include the -// vtkArrayIteratorIncludes.h header file to provide for extending of -// this macro by addition of new iterators. -// -// Example usage: -// \code -// vtkArrayIter* iter = array->NewIterator(); -// switch(array->GetDataType()) -// { -// vtkArrayIteratorTemplateMacro(myFunc(static_cast(iter), arg2)); -// } -// iter->Delete(); -// \endcode +/** + * @class vtkArrayIterator + * @brief Abstract superclass to iterate over elements + * in an vtkAbstractArray. + * + * + * vtkArrayIterator is used to iterate over elements in any + * vtkAbstractArray subclass. The vtkArrayIteratorTemplateMacro is used + * to centralize the set of types supported by Execute methods. It also + * avoids duplication of long switch statement case lists. + * + * Note that in this macro VTK_TT is defined to be the type of the + * iterator for the given type of array. One must include the + * vtkArrayIteratorIncludes.h header file to provide for extending of + * this macro by addition of new iterators. + * + * Example usage: + * \code + * vtkArrayIter* iter = array->NewIterator(); + * switch(array->GetDataType()) + * { + * vtkArrayIteratorTemplateMacro(myFunc(static_cast(iter), arg2)); + * } + * iter->Delete(); + * \endcode +*/ #ifndef vtkArrayIterator_h #define vtkArrayIterator_h @@ -49,21 +52,25 @@ public: vtkTypeMacro(vtkArrayIterator, vtkObject); void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE; - // Description: - // Set the array this iterator will iterate over. - // After Initialize() has been called, the iterator is valid - // so long as the Array has not been modified - // (except using the iterator itself). - // If the array is modified, the iterator must be re-intialized. + /** + * Set the array this iterator will iterate over. + * After Initialize() has been called, the iterator is valid + * so long as the Array has not been modified + * (except using the iterator itself). + * If the array is modified, the iterator must be re-intialized. + */ virtual void Initialize(vtkAbstractArray* array) = 0; - // Description - // Get the data type from the underlying array. Returns 0 if - // no underlying array is present. + //@{ + /** + * Get the data type from the underlying array. Returns 0 if + * no underlying array is present. + */ virtual int GetDataType()=0; protected: vtkArrayIterator(); ~vtkArrayIterator() VTK_OVERRIDE; + //@} private: vtkArrayIterator(const vtkArrayIterator&) VTK_DELETE_FUNCTION; diff --git a/Common/Core/vtkArrayIteratorIncludes.h b/Common/Core/vtkArrayIteratorIncludes.h index 9227a2863a027383b69fb1f8a3186eeb68438388..9016c6cce1ec2e6db862ed52e163947a3ec1aa39 100644 --- a/Common/Core/vtkArrayIteratorIncludes.h +++ b/Common/Core/vtkArrayIteratorIncludes.h @@ -12,21 +12,24 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkArrayIteratorIncludes - centralize array iterator type includes -// required when using the vtkArrayIteratorTemplateMacro. -// -// .SECTION Description -// A CXX file using vtkArrayIteratorTemplateMacro needs to include the -// header files for all types of iterators supported by the macro. As -// new arrays and new iterators are added, vtkArrayIteratorTemplateMacro -// will also need to be updated to switch to the additional cases. -// However, this would imply any code using the macro will start giving -// compilation errors unless they include the new iterator headers. The -// vtkArrayIteratorIncludes.h will streamline this issue. Every file -// using the vtkArrayIteratorTemplateMacro must include this -// vtkArrayIteratorIncludes.h. As new iterators are added and the -// vtkArrayIteratorTemplateMacro updated, one needs to update this header -// file alone. +/** + * @class vtkArrayIteratorIncludes + * @brief centralize array iterator type includes + * required when using the vtkArrayIteratorTemplateMacro. + * + * + * A CXX file using vtkArrayIteratorTemplateMacro needs to include the + * header files for all types of iterators supported by the macro. As + * new arrays and new iterators are added, vtkArrayIteratorTemplateMacro + * will also need to be updated to switch to the additional cases. + * However, this would imply any code using the macro will start giving + * compilation errors unless they include the new iterator headers. The + * vtkArrayIteratorIncludes.h will streamline this issue. Every file + * using the vtkArrayIteratorTemplateMacro must include this + * vtkArrayIteratorIncludes.h. As new iterators are added and the + * vtkArrayIteratorTemplateMacro updated, one needs to update this header + * file alone. +*/ #ifndef vtkArrayIteratorIncludes_h #define vtkArrayIteratorIncludes_h diff --git a/Common/Core/vtkArrayIteratorTemplate.h b/Common/Core/vtkArrayIteratorTemplate.h index 35f35a7e369bd83b614014fb205e2fd9c3b3c366..f8c9ae3f5cd0610f31edb99d408b96a9a54240cd 100644 --- a/Common/Core/vtkArrayIteratorTemplate.h +++ b/Common/Core/vtkArrayIteratorTemplate.h @@ -12,13 +12,16 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkArrayIteratorTemplate - Implementation template for a array -// iterator. -// -// .SECTION Description -// This is implementation template for a array iterator. It only works -// with arrays that have a contiguous internal storage of values (as in -// vtkDataArray, vtkStringArray). +/** + * @class vtkArrayIteratorTemplate + * @brief Implementation template for a array + * iterator. + * + * + * This is implementation template for a array iterator. It only works + * with arrays that have a contiguous internal storage of values (as in + * vtkDataArray, vtkStringArray). +*/ #ifndef vtkArrayIteratorTemplate_h #define vtkArrayIteratorTemplate_h @@ -38,63 +41,76 @@ public: vtkTemplateTypeMacro(vtkArrayIteratorTemplate, vtkArrayIterator) void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE; - // Description: - // Set the array this iterator will iterate over. - // After Initialize() has been called, the iterator is valid - // so long as the Array has not been modified - // (except using the iterator itself). - // If the array is modified, the iterator must be re-intialized. + /** + * Set the array this iterator will iterate over. + * After Initialize() has been called, the iterator is valid + * so long as the Array has not been modified + * (except using the iterator itself). + * If the array is modified, the iterator must be re-intialized. + */ void Initialize(vtkAbstractArray* array) VTK_OVERRIDE; - // Description: - // Get the array. + /** + * Get the array. + */ vtkAbstractArray* GetArray(){ return this->Array; } - // Description: - // Must be called only after Initialize. + /** + * Must be called only after Initialize. + */ T* GetTuple(vtkIdType id); - // Description: - // Must be called only after Initialize. + /** + * Must be called only after Initialize. + */ T& GetValue(vtkIdType id) { return this->Pointer[id]; } - // Description: - // Sets the value at the index. This does not verify if the index is - // valid. The caller must ensure that id is less than the maximum - // number of values. + /** + * Sets the value at the index. This does not verify if the index is + * valid. The caller must ensure that id is less than the maximum + * number of values. + */ void SetValue(vtkIdType id, T value) { this->Pointer[id] = value; } - // Description: - // Must be called only after Initialize. + /** + * Must be called only after Initialize. + */ vtkIdType GetNumberOfTuples(); - // Description: - // Must be called only after Initialize. + /** + * Must be called only after Initialize. + */ vtkIdType GetNumberOfValues(); - // Description: - // Must be called only after Initialize. + /** + * Must be called only after Initialize. + */ int GetNumberOfComponents(); - // Description: - // Get the data type from the underlying array. + /** + * Get the data type from the underlying array. + */ int GetDataType() VTK_OVERRIDE; - // Description: - // Get the data type size from the underlying array. + /** + * Get the data type size from the underlying array. + */ int GetDataTypeSize(); - // Description: - // This is the data type for the value. + //@{ + /** + * This is the data type for the value. + */ typedef T ValueType; protected: vtkArrayIteratorTemplate(); ~vtkArrayIteratorTemplate() VTK_OVERRIDE; + //@} T* Pointer; private: diff --git a/Common/Core/vtkArrayPrint.h b/Common/Core/vtkArrayPrint.h index e074f88c542223b1ca7981e4e267caec00aa9856..83e1de6b32d229e5ccb14bf25d37ea1d3cef85a2 100644 --- a/Common/Core/vtkArrayPrint.h +++ b/Common/Core/vtkArrayPrint.h @@ -18,11 +18,14 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkArrayPrint - Print arrays in different formats - -// .SECTION Thanks -// Developed by Timothy M. Shead (tshead@sandia.gov) at Sandia National -// Laboratories. +/** + * @class vtkArrayPrint + * @brief Print arrays in different formats + * + * @par Thanks: + * Developed by Timothy M. Shead (tshead@sandia.gov) at Sandia National + * Laboratories. +*/ #ifndef vtkArrayPrint_h #define vtkArrayPrint_h diff --git a/Common/Core/vtkArrayRange.h b/Common/Core/vtkArrayRange.h index ed714ada88b7996679a7055c6d80c9914764ae62..a669d2823fafb8b686ca5a85ea72c9b3bf3c2d78 100644 --- a/Common/Core/vtkArrayRange.h +++ b/Common/Core/vtkArrayRange.h @@ -19,18 +19,21 @@ =========================================================================*/ -// .NAME vtkArrayRange - Stores a half-open range of array coordinates. -// -// .SECTION Description -// vtkArrayRange stores a half-open range of array coordinates along a -// single dimension of a vtkArraySlice object. -// -// .SECTION See Also -// vtkArray, vtkArrayRange -// -// .SECTION Thanks -// Developed by Timothy M. Shead (tshead@sandia.gov) at Sandia National -// Laboratories. +/** + * @class vtkArrayRange + * @brief Stores a half-open range of array coordinates. + * + * + * vtkArrayRange stores a half-open range of array coordinates along a + * single dimension of a vtkArraySlice object. + * + * @sa + * vtkArray, vtkArrayRange + * + * @par Thanks: + * Developed by Timothy M. Shead (tshead@sandia.gov) at Sandia National + * Laboratories. +*/ #ifndef vtkArrayRange_h #define vtkArrayRange_h @@ -44,55 +47,70 @@ class VTKCOMMONCORE_EXPORT vtkArrayRange public: typedef vtkArrayCoordinates::CoordinateT CoordinateT; - // Description: - // Creates an empty range. + /** + * Creates an empty range. + */ vtkArrayRange(); - // Description: - // Creates a half-open range [begin, end). - // Note that begin must be <= end, - // if not, creates the empty range [begin, begin). + /** + * Creates a half-open range [begin, end). + * Note that begin must be <= end, + * if not, creates the empty range [begin, begin). + */ vtkArrayRange(CoordinateT begin, CoordinateT end); - // Description: - // Returns the beginning of the range + /** + * Returns the beginning of the range + */ CoordinateT GetBegin() const; - // Description: - // Returns one-past-the-end of the range + /** + * Returns one-past-the-end of the range + */ CoordinateT GetEnd() const; - // Description: - // Returns the size of the range (the distance End - Begin). + /** + * Returns the size of the range (the distance End - Begin). + */ CoordinateT GetSize() const; - // Description: - // Returns true iff the given range is a non-overlapping subset of this - // range. + /** + * Returns true iff the given range is a non-overlapping subset of this + * range. + */ bool Contains(const vtkArrayRange& range) const; - // Description: - // Returns true iff the given coordinate falls within this range. + /** + * Returns true iff the given coordinate falls within this range. + */ bool Contains(const CoordinateT coordinate) const; - // Description: - // Equality comparisons. + //@{ + /** + * Equality comparisons. + */ VTKCOMMONCORE_EXPORT friend bool operator==(const vtkArrayRange& lhs, const vtkArrayRange& rhs); VTKCOMMONCORE_EXPORT friend bool operator!=(const vtkArrayRange& lhs, const vtkArrayRange& rhs); + //@} - // Description: - // Serialization. + /** + * Serialization. + */ VTKCOMMONCORE_EXPORT friend ostream& operator<<(ostream& stream, const vtkArrayRange& rhs); private: - // Description: - // Stores the beginning of the range. + /** + * Stores the beginning of the range. + */ CoordinateT Begin; - // Description: - // Stores one-past-the-end of the range. + //@{ + /** + * Stores one-past-the-end of the range. + */ CoordinateT End; }; + //@} #endif // VTK-HeaderTest-Exclude: vtkArrayRange.h diff --git a/Common/Core/vtkArraySort.h b/Common/Core/vtkArraySort.h index 201003c9333780bec1d689abb5a730ee167c90b9..36114025f9707b968db4baa39d37f1daf4a581b6 100644 --- a/Common/Core/vtkArraySort.h +++ b/Common/Core/vtkArraySort.h @@ -19,23 +19,26 @@ =========================================================================*/ -// .NAME vtkArraySort - Controls sorting of sparse array coordinates. -// -// .SECTION Description -// vtkArraySort stores an ordered set of dimensions along which the -// values stored in a sparse array should be sorted. -// -// Convenience constructors are provided for specifying one, two, and -// three dimensions. To sort along more than three dimensions, use the -// default constructor, SetDimensions(), and operator[] to assign each -// dimension to be sorted. -// -// .SECTION See Also -// vtkSparseArray -// -// .SECTION Thanks -// Developed by Timothy M. Shead (tshead@sandia.gov) at Sandia National -// Laboratories. +/** + * @class vtkArraySort + * @brief Controls sorting of sparse array coordinates. + * + * + * vtkArraySort stores an ordered set of dimensions along which the + * values stored in a sparse array should be sorted. + * + * Convenience constructors are provided for specifying one, two, and + * three dimensions. To sort along more than three dimensions, use the + * default constructor, SetDimensions(), and operator[] to assign each + * dimension to be sorted. + * + * @sa + * vtkSparseArray + * + * @par Thanks: + * Developed by Timothy M. Shead (tshead@sandia.gov) at Sandia National + * Laboratories. +*/ #ifndef vtkArraySort_h #define vtkArraySort_h @@ -50,52 +53,63 @@ class VTKCOMMONCORE_EXPORT vtkArraySort public: typedef vtkArrayCoordinates::DimensionT DimensionT; - // Description: - // Create an empty set of dimensions. Use SetDimensions() and - // operator[] to populate them. + /** + * Create an empty set of dimensions. Use SetDimensions() and + * operator[] to populate them. + */ vtkArraySort(); - // Description: - // Sorts an array along one dimension. + /** + * Sorts an array along one dimension. + */ explicit vtkArraySort(DimensionT i); - // Description: - // Sorts an array along two dimensions. + /** + * Sorts an array along two dimensions. + */ vtkArraySort(DimensionT i, DimensionT j); - // Description: - // Sorts an array along three dimensions. + /** + * Sorts an array along three dimensions. + */ vtkArraySort(DimensionT i, DimensionT j, DimensionT k); - // Description: - // Return the number of dimensions for sorting. + /** + * Return the number of dimensions for sorting. + */ DimensionT GetDimensions() const; - // Description: - // Set the number of dimensions to be sorted. Note that this method - // resets every dimension to zero, so you must set every dimension - // explicitly using operator[] after calling SetDimensions(). + /** + * Set the number of dimensions to be sorted. Note that this method + * resets every dimension to zero, so you must set every dimension + * explicitly using operator[] after calling SetDimensions(). + */ void SetDimensions(DimensionT dimensions); - // Description: - // Returns the i-th dimension to be sorted. + /** + * Returns the i-th dimension to be sorted. + */ DimensionT& operator[](DimensionT i); - // Description: - // Returns the i-th dimension to be sorted. + /** + * Returns the i-th dimension to be sorted. + */ const DimensionT& operator[](DimensionT i) const; - // Description: - // Equality comparison + /** + * Equality comparison + */ bool operator==(const vtkArraySort& rhs) const; - // Description: - // Inequality comparison + /** + * Inequality comparison + */ bool operator!=(const vtkArraySort& rhs) const; - // Description: - // Serialization + /** + * Serialization + */ VTKCOMMONCORE_EXPORT friend ostream& operator<<( ostream& stream, const vtkArraySort& rhs); diff --git a/Common/Core/vtkArrayWeights.h b/Common/Core/vtkArrayWeights.h index 406207965db2c485c3c4122e909186b5cc242f48..a2c462592fdb9d0069cfe2d0397cbc19fee95005 100644 --- a/Common/Core/vtkArrayWeights.h +++ b/Common/Core/vtkArrayWeights.h @@ -19,24 +19,27 @@ =========================================================================*/ -// .NAME vtkArrayWeights - Stores a collection of weighting factors. -// -// .SECTION Description -// vtkArrayWeights provides storage for a collection of weights to be -// used when merging / interpolating N-way arrays. Convenience -// constructors are provided for working with one, two, three, and four -// weighting factors. For arbitrary collections of weights, use -// SetCount() and operator[] to assign values. -// -// vtkArrayWeights is most commonly used with the vtkInterpolate() -// function to compute weighted sums of vtkArray objects. -// -// .SECTION See Also -// vtkArray, vtkArraySlices -// -// .SECTION Thanks -// Developed by Timothy M. Shead (tshead@sandia.gov) at Sandia National -// Laboratories. +/** + * @class vtkArrayWeights + * @brief Stores a collection of weighting factors. + * + * + * vtkArrayWeights provides storage for a collection of weights to be + * used when merging / interpolating N-way arrays. Convenience + * constructors are provided for working with one, two, three, and four + * weighting factors. For arbitrary collections of weights, use + * SetCount() and operator[] to assign values. + * + * vtkArrayWeights is most commonly used with the vtkInterpolate() + * function to compute weighted sums of vtkArray objects. + * + * @sa + * vtkArray, vtkArraySlices + * + * @par Thanks: + * Developed by Timothy M. Shead (tshead@sandia.gov) at Sandia National + * Laboratories. +*/ #ifndef vtkArrayWeights_h #define vtkArrayWeights_h @@ -49,54 +52,66 @@ class vtkArrayWeightsStorage; // pimpl class VTKCOMMONCORE_EXPORT vtkArrayWeights { public: - // Description: - // Create an empty collection of weights + /** + * Create an empty collection of weights + */ vtkArrayWeights(); - // Description: - // Copy the weights from another object. + /** + * Copy the weights from another object. + */ vtkArrayWeights(const vtkArrayWeights& other); - // Description: - // Create a collection containing one weight. + /** + * Create a collection containing one weight. + */ vtkArrayWeights(double i); - // Description: - // Create a collection containing two weights. + /** + * Create a collection containing two weights. + */ vtkArrayWeights(double i, double j); - // Description: - // Create a collection containing three weights. + /** + * Create a collection containing three weights. + */ vtkArrayWeights(double i, double j, double k); - // Description: - // Create a collection containing four weights. + /** + * Create a collection containing four weights. + */ vtkArrayWeights(double i, double j, double k, double l); - // Description: - // Destructor. + /** + * Destructor. + */ ~vtkArrayWeights(); - // Description: - // Returns the number of weights stored in this container. + /** + * Returns the number of weights stored in this container. + */ vtkIdType GetCount() const; - // Description: - // Sets the number of weights stored in this container. Note that each - // weight will be reset to 0.0 after calling SetCount(), use operator[] - // to assign the desired value for each weight. + /** + * Sets the number of weights stored in this container. Note that each + * weight will be reset to 0.0 after calling SetCount(), use operator[] + * to assign the desired value for each weight. + */ void SetCount(vtkIdType count); - // Description: - // Accesses the i-th weight in the collection. + /** + * Accesses the i-th weight in the collection. + */ double& operator[](vtkIdType); - // Description: - // Accesses the i-th weight in the collection. + /** + * Accesses the i-th weight in the collection. + */ const double& operator[](vtkIdType) const; - // Description: - // Assignment operator. + /** + * Assignment operator. + */ vtkArrayWeights& operator=(const vtkArrayWeights& other); protected: diff --git a/Common/Core/vtkAssume.h b/Common/Core/vtkAssume.h index c68857f8e49b917c2aab367aeac1887b24b2f8b5..17f4b072cf94c193770c21896eacf7b19fa8ee81 100644 --- a/Common/Core/vtkAssume.h +++ b/Common/Core/vtkAssume.h @@ -12,7 +12,10 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME VTK_ASSUME - Provide compiler hints for non-obvious conditions. +/** + * @class VTK_ASSUME + * @brief Provide compiler hints for non-obvious conditions. +*/ #ifndef vtkAssume_h #define vtkAssume_h @@ -21,20 +24,21 @@ #include -// Description: -// VTK_ASSUME instructs the compiler that a certain non-obvious condition will -// *always* be true. Beware that if cond is false at runtime, the results are -// unpredictable (and likely catastrophic). A runtime assertion is added so -// that debugging builds may easily catch violations of the condition. -// -// A useful application of this macro is when a vtkGenericDataArray subclass has -// a known number of components at compile time. Adding, for example, -// VTK_ASSUME(array->GetNumberOfComponents() == 3); allows the compiler to -// provide faster access through the GetTypedComponent method, as the fixed data -// stride in AOS arrays allows advanced optimization of the accesses. -// -// A more detailed description of this class and related tools can be found -// \ref VTK-7-1-ArrayDispatch "here". +/** + * VTK_ASSUME instructs the compiler that a certain non-obvious condition will + * *always* be true. Beware that if cond is false at runtime, the results are + * unpredictable (and likely catastrophic). A runtime assertion is added so + * that debugging builds may easily catch violations of the condition. + + * A useful application of this macro is when a vtkGenericDataArray subclass has + * a known number of components at compile time. Adding, for example, + * VTK_ASSUME(array->GetNumberOfComponents() == 3); allows the compiler to + * provide faster access through the GetTypedComponent method, as the fixed data + * stride in AOS arrays allows advanced optimization of the accesses. + + * A more detailed description of this class and related tools can be found + * \ref VTK-7-1-ArrayDispatch "here". + */ #define VTK_ASSUME(cond) \ do { \ const bool c = cond; \ diff --git a/Common/Core/vtkBitArray.h b/Common/Core/vtkBitArray.h index f25c9f4c7a40acb90b4991b8285703b43f11f511..6647621024c997485c462f56c62bb98224f39fb0 100644 --- a/Common/Core/vtkBitArray.h +++ b/Common/Core/vtkBitArray.h @@ -12,12 +12,15 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkBitArray - dynamic, self-adjusting array of bits -// .SECTION Description -// vtkBitArray is an array of bits (0/1 data value). The array is packed -// so that each byte stores eight bits. vtkBitArray provides methods -// for insertion and retrieval of bits, and will automatically resize -// itself to hold new data. +/** + * @class vtkBitArray + * @brief dynamic, self-adjusting array of bits + * + * vtkBitArray is an array of bits (0/1 data value). The array is packed + * so that each byte stores eight bits. vtkBitArray provides methods + * for insertion and retrieval of bits, and will automatically resize + * itself to hold new data. +*/ #ifndef vtkBitArray_h #define vtkBitArray_h @@ -34,151 +37,185 @@ public: vtkTypeMacro(vtkBitArray,vtkDataArray); void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE; - // Description: - // Allocate memory for this array. Delete old storage only if necessary. - // Note that ext is no longer used. + /** + * Allocate memory for this array. Delete old storage only if necessary. + * Note that ext is no longer used. + */ int Allocate(vtkIdType sz, vtkIdType ext=1000) VTK_OVERRIDE; - // Description: - // Release storage and reset array to initial state. + /** + * Release storage and reset array to initial state. + */ void Initialize() VTK_OVERRIDE; // satisfy vtkDataArray API int GetDataType() VTK_OVERRIDE {return VTK_BIT;} int GetDataTypeSize() VTK_OVERRIDE { return 0; } - // Description: - // Set the number of n-tuples in the array. + /** + * Set the number of n-tuples in the array. + */ void SetNumberOfTuples(vtkIdType number) VTK_OVERRIDE; - // Description: - // Set the tuple at the ith location using the jth tuple in the source array. - // This method assumes that the two arrays have the same type - // and structure. Note that range checking and memory allocation is not - // performed; use in conjunction with SetNumberOfTuples() to allocate space. + /** + * Set the tuple at the ith location using the jth tuple in the source array. + * This method assumes that the two arrays have the same type + * and structure. Note that range checking and memory allocation is not + * performed; use in conjunction with SetNumberOfTuples() to allocate space. + */ void SetTuple(vtkIdType i, vtkIdType j, vtkAbstractArray* source) VTK_OVERRIDE; - // Description: - // Insert the jth tuple in the source array, at ith location in this array. - // Note that memory allocation is performed as necessary to hold the data. + /** + * Insert the jth tuple in the source array, at ith location in this array. + * Note that memory allocation is performed as necessary to hold the data. + */ void InsertTuple(vtkIdType i, vtkIdType j, vtkAbstractArray* source) VTK_OVERRIDE; - // Description: - // Copy the tuples indexed in srcIds from the source array to the tuple - // locations indexed by dstIds in this array. - // Note that memory allocation is performed as necessary to hold the data. + /** + * Copy the tuples indexed in srcIds from the source array to the tuple + * locations indexed by dstIds in this array. + * Note that memory allocation is performed as necessary to hold the data. + */ void InsertTuples(vtkIdList *dstIds, vtkIdList *srcIds, vtkAbstractArray *source) VTK_OVERRIDE; - // Description: - // Copy n consecutive tuples starting at srcStart from the source array to - // this array, starting at the dstStart location. - // Note that memory allocation is performed as necessary to hold the data. + /** + * Copy n consecutive tuples starting at srcStart from the source array to + * this array, starting at the dstStart location. + * Note that memory allocation is performed as necessary to hold the data. + */ void InsertTuples(vtkIdType dstStart, vtkIdType n, vtkIdType srcStart, vtkAbstractArray* source) VTK_OVERRIDE; - // Description: - // Insert the jth tuple in the source array, at the end in this array. - // Note that memory allocation is performed as necessary to hold the data. - // Returns the location at which the data was inserted. + /** + * Insert the jth tuple in the source array, at the end in this array. + * Note that memory allocation is performed as necessary to hold the data. + * Returns the location at which the data was inserted. + */ vtkIdType InsertNextTuple(vtkIdType j, vtkAbstractArray* source) VTK_OVERRIDE; - // Description: - // Get a pointer to a tuple at the ith location. This is a dangerous method - // (it is not thread safe since a pointer is returned). + /** + * Get a pointer to a tuple at the ith location. This is a dangerous method + * (it is not thread safe since a pointer is returned). + */ double *GetTuple(vtkIdType i) VTK_OVERRIDE; - // Description: - // Copy the tuple value into a user-provided array. + /** + * Copy the tuple value into a user-provided array. + */ void GetTuple(vtkIdType i, double * tuple) VTK_OVERRIDE; - // Description: - // Set the tuple value at the ith location in the array. + //@{ + /** + * Set the tuple value at the ith location in the array. + */ void SetTuple(vtkIdType i, const float * tuple) VTK_OVERRIDE; void SetTuple(vtkIdType i, const double * tuple) VTK_OVERRIDE; + //@} - // Description: - // Insert (memory allocation performed) the tuple into the ith location - // in the array. + //@{ + /** + * Insert (memory allocation performed) the tuple into the ith location + * in the array. + */ void InsertTuple(vtkIdType i, const float * tuple) VTK_OVERRIDE; void InsertTuple(vtkIdType i, const double * tuple) VTK_OVERRIDE; + //@} - // Description: - // Insert (memory allocation performed) the tuple onto the end of the array. + //@{ + /** + * Insert (memory allocation performed) the tuple onto the end of the array. + */ vtkIdType InsertNextTuple(const float * tuple) VTK_OVERRIDE; vtkIdType InsertNextTuple(const double * tuple) VTK_OVERRIDE; - - // Description: - // These methods remove tuples from the data array. They shift data and - // resize array, so the data array is still valid after this operation. Note, - // this operation is fairly slow. + //@} + + //@{ + /** + * These methods remove tuples from the data array. They shift data and + * resize array, so the data array is still valid after this operation. Note, + * this operation is fairly slow. + */ void RemoveTuple(vtkIdType id) VTK_OVERRIDE; void RemoveFirstTuple() VTK_OVERRIDE; void RemoveLastTuple() VTK_OVERRIDE; - - // Description: - // Set the data component at the ith tuple and jth component location. - // Note that i is less then NumberOfTuples and j is less then - // NumberOfComponents. Make sure enough memory has been allocated (use - // SetNumberOfTuples() and SetNumberOfComponents()). + //@} + + /** + * Set the data component at the ith tuple and jth component location. + * Note that i is less then NumberOfTuples and j is less then + * NumberOfComponents. Make sure enough memory has been allocated (use + * SetNumberOfTuples() and SetNumberOfComponents()). + */ void SetComponent(vtkIdType i, int j, double c) VTK_OVERRIDE; - // Description: - // Free any unneeded memory. + /** + * Free any unneeded memory. + */ void Squeeze() VTK_OVERRIDE; - // Description: - // Resize the array while conserving the data. + /** + * Resize the array while conserving the data. + */ int Resize(vtkIdType numTuples) VTK_OVERRIDE; - // Description: - // Get the data at a particular index. + /** + * Get the data at a particular index. + */ int GetValue(vtkIdType id); - // Description: - // Fast method based setting of values without memory checks. First - // use SetNumberOfValues then use SetValue to actually set them. - // Specify the number of values for this object to hold. Does an - // allocation as well as setting the MaxId ivar. Used in conjunction with - // SetValue() method for fast insertion. + /** + * Fast method based setting of values without memory checks. First + * use SetNumberOfValues then use SetValue to actually set them. + * Specify the number of values for this object to hold. Does an + * allocation as well as setting the MaxId ivar. Used in conjunction with + * SetValue() method for fast insertion. + */ void SetNumberOfValues(vtkIdType number) VTK_OVERRIDE; - // Description: - // Set the data at a particular index. Does not do range checking. Make sure - // you use the method SetNumberOfValues() before inserting data. + /** + * Set the data at a particular index. Does not do range checking. Make sure + * you use the method SetNumberOfValues() before inserting data. + */ void SetValue(vtkIdType id, int value); - // Description: - // Inserts values and checks to make sure there is enough memory + /** + * Inserts values and checks to make sure there is enough memory + */ void InsertValue(vtkIdType id, int i); - // Description: - // Set a value in the array from a variant. + /** + * Set a value in the array from a variant. + */ void SetVariantValue(vtkIdType idx, vtkVariant value) VTK_OVERRIDE; - // Description: - // Inserts values from a variant and checks to ensure there is enough memory + /** + * Inserts values from a variant and checks to ensure there is enough memory + */ void InsertVariantValue(vtkIdType idx, vtkVariant value) VTK_OVERRIDE; vtkIdType InsertNextValue(int i); - // Description: - // Insert the data component at ith tuple and jth component location. - // Note that memory allocation is performed as necessary to hold the data. + /** + * Insert the data component at ith tuple and jth component location. + * Note that memory allocation is performed as necessary to hold the data. + */ void InsertComponent(vtkIdType i, int j, double c) VTK_OVERRIDE; - // Description: - // Direct manipulation of the underlying data. + /** + * Direct manipulation of the underlying data. + */ unsigned char *GetPointer(vtkIdType id) { return this->Array + id/8; } - // Description: - // Get the address of a particular data index. Make sure data is allocated - // for the number of items requested. Set MaxId according to the number of - // data values requested. + /** + * Get the address of a particular data index. Make sure data is allocated + * for the number of items requested. Set MaxId according to the number of + * data values requested. + */ unsigned char *WritePointer(vtkIdType id, vtkIdType number); void* WriteVoidPointer(vtkIdType id, vtkIdType number) VTK_OVERRIDE @@ -191,20 +228,23 @@ public: return static_cast(this->GetPointer(id)); } - // Description: - // Deep copy of another bit array. + /** + * Deep copy of another bit array. + */ void DeepCopy(vtkDataArray *da) VTK_OVERRIDE; void DeepCopy(vtkAbstractArray* aa) VTK_OVERRIDE { this->Superclass::DeepCopy(aa); } - // Description: - // This method lets the user specify data to be held by the array. The - // array argument is a pointer to the data. size is the size of - // the array supplied by the user. Set save to 1 to keep the class - // from deleting the array when it cleans up or reallocates memory. - // The class uses the actual array provided; it does not copy the data - // from the supplied array. If save 0, the array must have been allocated - // with new[] not malloc. + //@{ + /** + * This method lets the user specify data to be held by the array. The + * array argument is a pointer to the data. size is the size of + * the array supplied by the user. Set save to 1 to keep the class + * from deleting the array when it cleans up or reallocates memory. + * The class uses the actual array provided; it does not copy the data + * from the supplied array. If save 0, the array must have been allocated + * with new[] not malloc. + */ #ifndef __VTK_WRAP__ void SetArray(unsigned char* array, vtkIdType size, int save); #endif @@ -217,31 +257,38 @@ public: { this->SetArray(static_cast(array), size, save); } + //@} - // Description: - // Returns a new vtkBitArrayIterator instance. + /** + * Returns a new vtkBitArrayIterator instance. + */ VTK_NEWINSTANCE vtkArrayIterator* NewIterator() VTK_OVERRIDE; - // Description: - // Return the indices where a specific value appears. + //@{ + /** + * Return the indices where a specific value appears. + */ vtkIdType LookupValue(vtkVariant value) VTK_OVERRIDE; void LookupValue(vtkVariant value, vtkIdList* ids) VTK_OVERRIDE; vtkIdType LookupValue(int value); void LookupValue(int value, vtkIdList* ids); - - // Description: - // Tell the array explicitly that the data has changed. - // This is only necessary to call when you modify the array contents - // without using the array's API (i.e. you retrieve a pointer to the - // data and modify the array contents). You need to call this so that - // the fast lookup will know to rebuild itself. Otherwise, the lookup - // functions will give incorrect results. + //@} + + /** + * Tell the array explicitly that the data has changed. + * This is only necessary to call when you modify the array contents + * without using the array's API (i.e. you retrieve a pointer to the + * data and modify the array contents). You need to call this so that + * the fast lookup will know to rebuild itself. Otherwise, the lookup + * functions will give incorrect results. + */ void DataChanged() VTK_OVERRIDE; - // Description: - // Delete the associated fast lookup data structure on this array, - // if it exists. The lookup will be rebuilt on the next call to a lookup - // function. + /** + * Delete the associated fast lookup data structure on this array, + * if it exists. The lookup will be rebuilt on the next call to a lookup + * function. + */ void ClearLookup() VTK_OVERRIDE; protected: diff --git a/Common/Core/vtkBitArrayIterator.h b/Common/Core/vtkBitArrayIterator.h index cc97c132128bbd8714f90006a48f979d287ddad4..4334c4d4f687faa83004a9d009f2090d7946ebbb 100644 --- a/Common/Core/vtkBitArrayIterator.h +++ b/Common/Core/vtkBitArrayIterator.h @@ -12,9 +12,12 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkBitArrayIterator - Iterator for vtkBitArray. -// This iterator iterates over a vtkBitArray. It uses the double interface -// to get/set bit values. +/** + * @class vtkBitArrayIterator + * @brief Iterator for vtkBitArray. + * This iterator iterates over a vtkBitArray. It uses the double interface + * to get/set bit values. +*/ #ifndef vtkBitArrayIterator_h #define vtkBitArrayIterator_h @@ -30,53 +33,64 @@ public: vtkTypeMacro(vtkBitArrayIterator, vtkArrayIterator); void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE; - // Description: - // Set the array this iterator will iterate over. - // After Initialize() has been called, the iterator is valid - // so long as the Array has not been modified - // (except using the iterator itself). - // If the array is modified, the iterator must be re-intialized. + /** + * Set the array this iterator will iterate over. + * After Initialize() has been called, the iterator is valid + * so long as the Array has not been modified + * (except using the iterator itself). + * If the array is modified, the iterator must be re-intialized. + */ void Initialize(vtkAbstractArray* array) VTK_OVERRIDE; - // Description: - // Get the array. + /** + * Get the array. + */ vtkAbstractArray* GetArray(); - // Description: - // Must be called only after Initialize. + /** + * Must be called only after Initialize. + */ int* GetTuple(vtkIdType id) ; - // Description: - // Must be called only after Initialize. + /** + * Must be called only after Initialize. + */ int GetValue(vtkIdType id); - // Description: - // Must be called only after Initialize. + /** + * Must be called only after Initialize. + */ vtkIdType GetNumberOfTuples(); - // Description: - // Must be called only after Initialize. + /** + * Must be called only after Initialize. + */ vtkIdType GetNumberOfValues(); - // Description: - // Must be called only after Initialize. + /** + * Must be called only after Initialize. + */ int GetNumberOfComponents(); - // Description: - // Get the data type from the underlying array. + /** + * Get the data type from the underlying array. + */ int GetDataType() VTK_OVERRIDE; - // Description: - // Get the data type size from the underlying array. + /** + * Get the data type size from the underlying array. + */ int GetDataTypeSize(); - // Description: - // Sets the value at the index. This does not verify if the index is valid. - // The caller must ensure that id is less than the maximum number of values. + /** + * Sets the value at the index. This does not verify if the index is valid. + * The caller must ensure that id is less than the maximum number of values. + */ void SetValue(vtkIdType id, int value); - // Description: - // Data type of a value. + /** + * Data type of a value. + */ typedef int ValueType; protected: diff --git a/Common/Core/vtkBoxMuellerRandomSequence.h b/Common/Core/vtkBoxMuellerRandomSequence.h index 6b0143c1a3afdd30608ebb32084eac79a1516f43..24f3f72b47784ac51582514c5ee7c9c8b55fe056 100644 --- a/Common/Core/vtkBoxMuellerRandomSequence.h +++ b/Common/Core/vtkBoxMuellerRandomSequence.h @@ -11,14 +11,17 @@ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkBoxMuellerRandomSequence - Gaussian sequence of pseudo random numbers implemented with the Box-Mueller transform -// .SECTION Description -// vtkGaussianRandomSequence is a sequence of pseudo random numbers -// distributed according to the Gaussian/normal distribution (mean=0 and -// standard deviation=1). -// -// It based is calculation from a uniformly distributed pseudo random sequence. -// The initial sequence is a vtkMinimalStandardRandomSequence. +/** + * @class vtkBoxMuellerRandomSequence + * @brief Gaussian sequence of pseudo random numbers implemented with the Box-Mueller transform + * + * vtkGaussianRandomSequence is a sequence of pseudo random numbers + * distributed according to the Gaussian/normal distribution (mean=0 and + * standard deviation=1). + * + * It based is calculation from a uniformly distributed pseudo random sequence. + * The initial sequence is a vtkMinimalStandardRandomSequence. +*/ #ifndef vtkBoxMuellerRandomSequence_h #define vtkBoxMuellerRandomSequence_h @@ -34,21 +37,25 @@ public: static vtkBoxMuellerRandomSequence* New(); - // Description: - // Current value. + /** + * Current value. + */ double GetValue() VTK_OVERRIDE; - // Description: - // Move to the next number in the random sequence. + /** + * Move to the next number in the random sequence. + */ void Next() VTK_OVERRIDE; - // Description: - // Return the uniformly distributed sequence of random numbers. + /** + * Return the uniformly distributed sequence of random numbers. + */ vtkRandomSequence *GetUniformSequence(); - // Description: - // Set the uniformly distributed sequence of random numbers. - // Default is a . + /** + * Set the uniformly distributed sequence of random numbers. + * Default is a . + */ void SetUniformSequence(vtkRandomSequence *uniformSequence); protected: diff --git a/Common/Core/vtkBreakPoint.h b/Common/Core/vtkBreakPoint.h index 5eb71d9165d6b49ad99bf3ee92c084371463b1a9..919e79b562a16cc813986f3d8c2e09986caa5846 100644 --- a/Common/Core/vtkBreakPoint.h +++ b/Common/Core/vtkBreakPoint.h @@ -12,23 +12,26 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkBreakPoint - Utility function to debug with gdb and MPI. -// .SECTION Description -// Wherever you need to set a break point inside a piece of code run by MPI, -// -// Step 1: call vtkBreakPoint::Break() in the code. -// Step 2: start MPI, each process will display its PID and sleep. -// Step 3: start gdb with the PID: gdb --pid= -// Step 4: set a breakpoint at the line of interest: (gdb) b

-// void func(vtkObject*, unsigned long eid, void* clientdata, void *calldata)
-// 
-// where the parameter vtkObject* is the object invoking the event; eid is -// the event id (see vtkCommand.h); clientdata is special data that should -// is associated with this instance of vtkCallbackCommand; and calldata is -// data that the vtkObject::InvokeEvent() may send with the callback. For -// example, the invocation of the ProgressEvent sends along the progress -// value as calldata. -// - -// .SECTION See Also -// vtkCommand vtkOldStyleCallbackCommand +/** + * @class vtkCallbackCommand + * @brief supports function callbacks + * + * Use vtkCallbackCommand for generic function callbacks. That is, this class + * can be used when you wish to execute a function (of the signature + * described below) using the Command/Observer design pattern in VTK. + * The callback function should have the form + *
+ * void func(vtkObject*, unsigned long eid, void* clientdata, void *calldata)
+ * 
+ * where the parameter vtkObject* is the object invoking the event; eid is + * the event id (see vtkCommand.h); clientdata is special data that should + * is associated with this instance of vtkCallbackCommand; and calldata is + * data that the vtkObject::InvokeEvent() may send with the callback. For + * example, the invocation of the ProgressEvent sends along the progress + * value as calldata. + * + * + * @sa + * vtkCommand vtkOldStyleCallbackCommand +*/ #ifndef vtkCallbackCommand_h #define vtkCallbackCommand_h @@ -46,18 +49,20 @@ public: static vtkCallbackCommand *New() {return new vtkCallbackCommand;}; - // Description: - // Satisfy the superclass API for callbacks. Recall that the caller is - // the instance invoking the event; eid is the event id (see - // vtkCommand.h); and calldata is information sent when the callback - // was invoked (e.g., progress value in the vtkCommand::ProgressEvent). + /** + * Satisfy the superclass API for callbacks. Recall that the caller is + * the instance invoking the event; eid is the event id (see + * vtkCommand.h); and calldata is information sent when the callback + * was invoked (e.g., progress value in the vtkCommand::ProgressEvent). + */ void Execute(vtkObject *caller, unsigned long eid, void *callData) VTK_OVERRIDE; - // Description: - // Methods to set and get client and callback information, and the callback - // function. + /** + * Methods to set and get client and callback information, and the callback + * function. + */ virtual void SetClientData(void *cd) { this->ClientData = cd; } virtual void* GetClientData() @@ -68,10 +73,11 @@ public: virtual void SetClientDataDeleteCallback(void (*f)(void *)) { this->ClientDataDeleteCallback = f; } - // Description: - // Set/Get the abort flag on execute. If this is set to true the AbortFlag - // will be set to On automatically when the Execute method is triggered *and* - // a callback is set. + /** + * Set/Get the abort flag on execute. If this is set to true the AbortFlag + * will be set to On automatically when the Execute method is triggered *and* + * a callback is set. + */ void SetAbortFlagOnExecute(int f) { this->AbortFlagOnExecute = f; } int GetAbortFlagOnExecute() diff --git a/Common/Core/vtkCharArray.h b/Common/Core/vtkCharArray.h index 1d4427fd62924f767a3a60c297666157481aa3f9..642006c1814781015231dbc5963b9b72f840e707 100644 --- a/Common/Core/vtkCharArray.h +++ b/Common/Core/vtkCharArray.h @@ -12,11 +12,14 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkCharArray - dynamic, self-adjusting array of char -// .SECTION Description -// vtkCharArray is an array of values of type char. It provides -// methods for insertion and retrieval of values and will -// automatically resize itself to hold new data. +/** + * @class vtkCharArray + * @brief dynamic, self-adjusting array of char + * + * vtkCharArray is an array of values of type char. It provides + * methods for insertion and retrieval of values and will + * automatically resize itself to hold new data. +*/ #ifndef vtkCharArray_h #define vtkCharArray_h @@ -46,19 +49,22 @@ public: vtkCreateWrappedArrayInterface(char); #endif - // Description: - // A faster alternative to SafeDownCast for downcasting vtkAbstractArrays. + /** + * A faster alternative to SafeDownCast for downcasting vtkAbstractArrays. + */ static vtkCharArray* FastDownCast(vtkAbstractArray *source) { return static_cast(Superclass::FastDownCast(source)); } - // Description: - // Get the minimum data value in its native type. + /** + * Get the minimum data value in its native type. + */ static char GetDataTypeValueMin() { return VTK_CHAR_MIN; } - // Description: - // Get the maximum data value in its native type. + /** + * Get the maximum data value in its native type. + */ static char GetDataTypeValueMax() { return VTK_CHAR_MAX; } protected: diff --git a/Common/Core/vtkCollection.h b/Common/Core/vtkCollection.h index 3f3cd85adb333a1deff6ae10d75a6fb436da4ab9..a133a1477296342c7d5a5202351bee7f5b4b658b 100644 --- a/Common/Core/vtkCollection.h +++ b/Common/Core/vtkCollection.h @@ -12,18 +12,21 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkCollection - create and manipulate unsorted lists of objects -// .SECTION Description -// vtkCollection is a general object for creating and manipulating lists -// of objects. The lists are unsorted and allow duplicate entries. -// vtkCollection also serves as a base class for lists of specific types -// of objects. - -// .SECTION See Also -// vtkActorCollection vtkAssemblyPaths vtkDataSetCollection -// vtkImplicitFunctionCollection vtkLightCollection vtkPolyDataCollection -// vtkRenderWindowCollection vtkRendererCollection -// vtkStructuredPointsCollection vtkTransformCollection vtkVolumeCollection +/** + * @class vtkCollection + * @brief create and manipulate unsorted lists of objects + * + * vtkCollection is a general object for creating and manipulating lists + * of objects. The lists are unsorted and allow duplicate entries. + * vtkCollection also serves as a base class for lists of specific types + * of objects. + * + * @sa + * vtkActorCollection vtkAssemblyPaths vtkDataSetCollection + * vtkImplicitFunctionCollection vtkLightCollection vtkPolyDataCollection + * vtkRenderWindowCollection vtkRendererCollection + * vtkStructuredPointsCollection vtkTransformCollection vtkVolumeCollection +*/ #ifndef vtkCollection_h #define vtkCollection_h @@ -48,88 +51,106 @@ public: vtkTypeMacro(vtkCollection,vtkObject); void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE; - // Description: - // Construct with empty list. + /** + * Construct with empty list. + */ static vtkCollection *New(); - // Description: - // Add an object to the list. Does not prevent duplicate entries. + /** + * Add an object to the list. Does not prevent duplicate entries. + */ void AddItem(vtkObject *); - // Description: - // Insert item into the list after the i'th item. Does not prevent duplicate entries. - // If i < 0 the item is placed at the top of the list. + /** + * Insert item into the list after the i'th item. Does not prevent duplicate entries. + * If i < 0 the item is placed at the top of the list. + */ void InsertItem(int i, vtkObject *); - // Description: - // Replace the i'th item in the collection with a + /** + * Replace the i'th item in the collection with a + */ void ReplaceItem(int i, vtkObject *); - // Description: - // Remove the i'th item in the list. - // Be careful if using this function during traversal of the list using - // GetNextItemAsObject (or GetNextItem in derived class). The list WILL - // be shortened if a valid index is given! If this->Current is equal to the - // element being removed, have it point to then next element in the list. + /** + * Remove the i'th item in the list. + * Be careful if using this function during traversal of the list using + * GetNextItemAsObject (or GetNextItem in derived class). The list WILL + * be shortened if a valid index is given! If this->Current is equal to the + * element being removed, have it point to then next element in the list. + */ void RemoveItem(int i); - // Description: - // Remove an object from the list. Removes the first object found, not - // all occurrences. If no object found, list is unaffected. See warning - // in description of RemoveItem(int). + /** + * Remove an object from the list. Removes the first object found, not + * all occurrences. If no object found, list is unaffected. See warning + * in description of RemoveItem(int). + */ void RemoveItem(vtkObject *); - // Description: - // Remove all objects from the list. + /** + * Remove all objects from the list. + */ void RemoveAllItems(); - // Description: - // Search for an object and return location in list. If the return value is - // 0, the object was not found. If the object was found, the location is - // the return value-1. + /** + * Search for an object and return location in list. If the return value is + * 0, the object was not found. If the object was found, the location is + * the return value-1. + */ int IsItemPresent(vtkObject *a); - // Description: - // Return the number of objects in the list. + /** + * Return the number of objects in the list. + */ int GetNumberOfItems() { return this->NumberOfItems; } - // Description: - // Initialize the traversal of the collection. This means the data pointer - // is set at the beginning of the list. + /** + * Initialize the traversal of the collection. This means the data pointer + * is set at the beginning of the list. + */ void InitTraversal() { this->Current = this->Top;}; - // Description: - // A reentrant safe way to iterate through a collection. - // Just pass the same cookie value around each time + /** + * A reentrant safe way to iterate through a collection. + * Just pass the same cookie value around each time + */ void InitTraversal(vtkCollectionSimpleIterator &cookie) { cookie = static_cast(this->Top);}; - // Description: - // Get the next item in the collection. NULL is returned if the collection - // is exhausted. + /** + * Get the next item in the collection. NULL is returned if the collection + * is exhausted. + */ vtkObject *GetNextItemAsObject(); - // Description: - // Get the i'th item in the collection. NULL is returned if i is out - // of range + /** + * Get the i'th item in the collection. NULL is returned if i is out + * of range + */ vtkObject *GetItemAsObject(int i); - // Description: - // A reentrant safe way to get the next object as a collection. Just pass the - // same cookie back and forth. + /** + * A reentrant safe way to get the next object as a collection. Just pass the + * same cookie back and forth. + */ vtkObject *GetNextItemAsObject(vtkCollectionSimpleIterator &cookie); - // Description: - // Get an iterator to traverse the objects in this collection. + /** + * Get an iterator to traverse the objects in this collection. + */ VTK_NEWINSTANCE vtkCollectionIterator* NewIterator(); - // Description: - // Participate in garbage collection. + //@{ + /** + * Participate in garbage collection. + */ void Register(vtkObjectBase* o) VTK_OVERRIDE; void UnRegister(vtkObjectBase* o) VTK_OVERRIDE; protected: vtkCollection(); ~vtkCollection() VTK_OVERRIDE; + //@} virtual void RemoveElement(vtkCollectionElement *element, vtkCollectionElement *previous); diff --git a/Common/Core/vtkCollectionIterator.h b/Common/Core/vtkCollectionIterator.h index 9a0dc788196b8bc258dc7a7f41224190f3ee87c5..f1a9aedd7feeab6d18be7432f6906955030292ce 100644 --- a/Common/Core/vtkCollectionIterator.h +++ b/Common/Core/vtkCollectionIterator.h @@ -12,15 +12,18 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkCollectionIterator - iterator through a vtkCollection. -// .SECTION Description -// vtkCollectionIterator provides an alternative way to traverse -// through the objects in a vtkCollection. Unlike the collection's -// built in interface, this allows multiple iterators to -// simultaneously traverse the collection. If items are removed from -// the collection, only the iterators currently pointing to those -// items are invalidated. Other iterators will still continue to -// function normally. +/** + * @class vtkCollectionIterator + * @brief iterator through a vtkCollection. + * + * vtkCollectionIterator provides an alternative way to traverse + * through the objects in a vtkCollection. Unlike the collection's + * built in interface, this allows multiple iterators to + * simultaneously traverse the collection. If items are removed from + * the collection, only the iterators currently pointing to those + * items are invalidated. Other iterators will still continue to + * function normally. +*/ #ifndef vtkCollectionIterator_h #define vtkCollectionIterator_h @@ -38,31 +41,39 @@ public: void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE; static vtkCollectionIterator* New(); - // Description: - // Set/Get the collection over which to iterate. + //@{ + /** + * Set/Get the collection over which to iterate. + */ virtual void SetCollection(vtkCollection*); vtkGetObjectMacro(Collection, vtkCollection); + //@} - // Description: - // Position the iterator at the first item in the collection. + /** + * Position the iterator at the first item in the collection. + */ void InitTraversal() { this->GoToFirstItem(); } - // Description: - // Position the iterator at the first item in the collection. + /** + * Position the iterator at the first item in the collection. + */ void GoToFirstItem(); - // Description: - // Move the iterator to the next item in the collection. + /** + * Move the iterator to the next item in the collection. + */ void GoToNextItem(); - // Description: - // Test whether the iterator is currently positioned at a valid item. - // Returns 1 for yes, 0 for no. + /** + * Test whether the iterator is currently positioned at a valid item. + * Returns 1 for yes, 0 for no. + */ int IsDoneWithTraversal(); - // Description: - // Get the item at the current iterator position. Valid only when - // IsDoneWithTraversal() returns 1. + /** + * Get the item at the current iterator position. Valid only when + * IsDoneWithTraversal() returns 1. + */ vtkObject* GetCurrentObject(); protected: diff --git a/Common/Core/vtkCommand.h b/Common/Core/vtkCommand.h index b8378b8e428dc9d3ec512b642af10d7aca0c2051..c89d25bdc1e8cd3f7d3a17755b5d6a148417d832 100644 --- a/Common/Core/vtkCommand.h +++ b/Common/Core/vtkCommand.h @@ -12,194 +12,197 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkCommand - superclass for callback/observer methods -// .SECTION Description -// vtkCommand is an implementation of the observer/command design -// pattern. In this design pattern, any instance of vtkObject can be -// "observed" for any events it might invoke. For example, -// vtkRenderer invokes a StartEvent as it begins to render and a -// EndEvent when it finishes rendering. Filters (subclasses of -// vtkProcessObject) invoke StartEvent, ProgressEvent, and EndEvent as -// the filter processes data. Observers of events are added with the -// AddObserver() method found in vtkObject. AddObserver(), besides -// requiring an event id or name, also takes an instance of vtkCommand -// (or a subclasses). Note that vtkCommand is meant to be subclassed, -// so that you can package the information necessary to support your -// callback. -// -// Event processing can be organized in priority lists, so it is -// possible to truncate the processing of a particular event by -// setting the AbortFlag variable. The priority is set using the -// AddObserver() method. By default the priority is 0, events of the -// same priority are processed in last-in-first-processed order. The -// ordering/aborting of events is important for things like 3D -// widgets, which handle an event if the widget is selected (and then -// aborting further processing of that event). Otherwise. the event -// is passed along for further processing. -// -// When an instance of vtkObject invokes an event, it also passes an optional -// void pointer to a callData. This callData is NULL most of the time. -// The callData is not specific to a type of event but specific to a type -// of vtkObject invoking a specific event. For instance, vtkCommand::PickEvent -// is invoked by vtkProp with a NULL callData but is invoked by -// vtkInteractorStyleImage with a pointer to the vtkInteractorStyleImage object -// itself. -// -// Here is the list of events that may be invoked with a non-NULL callData. -// - vtkCommand::ProgressEvent -// - most of the objects return a pointer to a double value ranged between -// 0.0 and 1.0 -// - Infovis/vtkFixedWidthTextReader returns a pointer to a float value equal -// to the number of lines read so far. -// - vtkCommand::ErrorEvent -// - an error message as a const char * string -// - vtkCommand::WarningEvent -// - a warning message as a const char * string -// - vtkCommand::StartAnimationCueEvent -// - a pointer to a vtkAnimationCue::AnimationCueInfo object -// - vtkCommand::EndAnimationCueEvent -// - a pointer to a vtkAnimationCue::AnimationCueInfo object -// - vtkCommand::AnimationCueTickEvent -// - a pointer to a vtkAnimationCue::AnimationCueInfo object -// - vtkCommand::PickEvent -// - Common/vtkProp returns NULL -// - Rendering/vtkInteractorStyleImage returns a pointer to itself -// - vtkCommand::StartPickEvent -// - Rendering/vtkPropPicker returns NULL -// - Rendering/vtkInteractorStyleImage returns a pointer to itself -// - vtkCommand::EndPickEvent -// - Rendering/vtkPropPicker returns NULL -// - Rendering/vtkInteractorStyleImage returns a pointer to itself -// - vtkCommand::WrongTagEvent -// - Parallel/vtkSocketCommunicator returns a received tag as a char * -// - vtkCommand::SelectionChangedEvent -// - Views/vtkView returns NULL -// - Views/vtkDataRepresentation returns a pointer to a vtkSelection -// - Rendering/vtkInteractorStyleRubberBand2D returns an array of 5 unsigned -// integers (p1x, p1y, p2x, p2y, mode), where mode is -// vtkInteractorStyleRubberBand2D::SELECT_UNION or -// vtkInteractorStyleRubberBand2D::SELECT_NORMAL -// - vtkCommand::AnnotationChangedEvent -// - GUISupport/Qt/vtkQtAnnotationView returns a pointer to a -// vtkAnnotationLayers -// - vtkCommand::PlacePointEvent -// - Widgets/vtkSeedWidget returns a pointer to an int, being the current -// handle number -// - vtkCommand::ResetWindowLevelEvent -// - Widgets/vtkImagePlaneWidget returns an array of 2 double values (window -// and level) -// - Rendering/vtkInteractorStyleImage returns a pointer to itself -// - vtkCommand::StartWindowLevelEvent -// - Widgets/vtkImagePlaneWidget returns an array of 2 double values (window -// and level) -// - Rendering/vtkInteractorStyleImage returns a pointer to itself -// - vtkCommand::EndWindowLevelEvent -// - Widgets/vtkImagePlaneWidget returns an array of 2 double values (window -// and level) -// - Rendering/vtkInteractorStyleImage returns a pointer to itself -// - vtkCommand::WindowLevelEvent -// - Widgets/vtkImagePlaneWidget returns an array of 2 double values (window -// and level) -// - Rendering/vtkInteractorStyleImage returns a pointer to itself -// - vtkCommand::CharEvent -// - most of the objects return NULL -// - GUISupport/Qt/QVTKWidget returns a QKeyEvent * -// - vtkCommand::TimerEvent -// - most of the objects return a to an int representing a timer id -// - Rendering/vtkXRenderWindowTclInteractor returns NULL -// - Widgets/vtkHoverWidget returns NULL -// - vtkCommand::CreateTimerEvent -// - Rendering/vtkGenericRenderWindowInteractor returns a to an int -// representing a timer id -// - vtkCommand::DestroyTimerEvent -// - Rendering/vtkGenericRenderWindowInteractor returns a to an int -// representing a timer id -// - vtkCommand::UserEvent -// - most of the objects return NULL -// - Infovis/vtkInteractorStyleTreeMapHover returns a pointer to a vtkIdType -// representing a pedigree id -// - vtkCommand::KeyPressEvent -// - most of the objects return NULL -// - GUISupport/Qt/QVTKWidget returns a QKeyEvent* -// - vtkCommand::KeyReleaseEvent -// - most of the objects return NULL -// - GUISupport/Qt/QVTKWidget returns a QKeyEvent* -// - vtkCommand::LeftButtonPressEvent -// - most of the objects return NULL -// - GUISupport/Qt/QVTKWidget returns a QMouseEvent* -// - vtkCommand::LeftButtonReleaseEvent -// - most of the objects return NULL -// - GUISupport/Qt/QVTKWidget returns a QMouseEvent* -// - vtkCommand::MouseMoveEvent -// - most of the objects return NULL -// - GUISupport/Qt/QVTKWidget returns a QMouseEvent* -// - vtkCommand::MouseWheelForwardEvent -// - most of the objects return NULL -// - GUISupport/Qt/QVTKWidget returns a QWheelEvent* -// - vtkCommand::MouseWheelBackwardEvent -// - most of the objects return NULL -// - GUISupport/Qt/QVTKWidget returns a QWheelEvent* -// - vtkCommand::RightButtonPressEvent -// - most of the objects return NULL -// - GUISupport/Qt/QVTKWidget returns a QMouseEvent* -// - vtkCommand::RightButtonReleaseEvent -// - most of the objects return NULL -// - GUISupport/Qt/QVTKWidget returns a QMouseEvent* -// - vtkCommand::MiddleButtonPressEvent -// - most of the objects return NULL -// - GUISupport/Qt/QVTKWidget returns a QMouseEvent* -// - vtkCommand::MiddleButtonReleaseEvent -// - most of the objects return NULL -// - GUISupport/Qt/QVTKWidget returns a QMouseEvent* -// - vtkCommand::CursorChangedEvent -// - most of the objects return a pointer to an int representing a shape -// - Rendering/vtkInteractorObserver returns NULL -// - vtkCommand::ResetCameraEvent -// - Rendering/vtkRenderer returns a pointer to itself -// - vtkCommand::ResetCameraClippingRangeEvent -// - Rendering/vtkRenderer returns a pointer to itself -// - vtkCommand::ActiveCameraEvent -// - Rendering/vtkRenderer returns a pointer to the active camera -// - vtkCommand::CreateCameraEvent -// - Rendering/vtkRenderer returns a pointer to the created camera -// - vtkCommand::EnterEvent -// - most of the objects return NULL -// - GUISupport/Qt/QVTKWidget returns a QEvent* -// - vtkCommand::LeaveEvent -// - most of the objects return NULL -// - GUISupport/Qt/QVTKWidget returns a QEvent* -// - vtkCommand::RenderWindowMessageEvent -// - Rendering/vtkWin32OpenGLRenderWindow return a pointer to a UINT message -// - vtkCommand::ComputeVisiblePropBoundsEvent -// - Rendering/vtkRenderer returns a pointer to itself -// - QVTKWidget::ContextMenuEvent -// - GUISupport/Qt/QVTKWidget returns a QContextMenuEvent* -// - QVTKWidget::DragEnterEvent -// - GUISupport/Qt/QVTKWidget returns a QDragEnterEvent* -// - QVTKWidget::DragMoveEvent -// - GUISupport/Qt/QVTKWidget returns a QDragMoveEvent* -// - QVTKWidget::DragLeaveEvent -// - GUISupport/Qt/QVTKWidget returns a QDragLeaveEvent* -// - QVTKWidget::DropEvent -// - GUISupport/Qt/QVTKWidget returns a QDropEvent* -// - vtkCommand::ViewProgressEvent -// - View/vtkView returns a ViewProgressEventCallData* -// - vtkCommand::VolumeMapperRenderProgressEvent -// - A pointer to a double value between 0.0 and 1.0 -// - vtkCommand::VolumeMapperComputeGradientsProgressEvent -// - A pointer to a double value between 0.0 and 1.0 -// - vtkCommand::TDxMotionEvent (TDx=3DConnexion) -// - A vtkTDxMotionEventInfo* -// - vtkCommand::TDxButtonPressEvent -// - A int* being the number of the button -// - vtkCommand::TDxButtonReleaseEvent -// - A int* being the number of the button -// - vtkCommand::UpdateShaderEvent -// - A vtkOpenGLHelper* currently being used -// -// .SECTION See Also -// vtkObject vtkCallbackCommand vtkOldStyleCallbackCommand -// vtkInteractorObserver vtk3DWidget +/** + * @class vtkCommand + * @brief superclass for callback/observer methods + * + * vtkCommand is an implementation of the observer/command design + * pattern. In this design pattern, any instance of vtkObject can be + * "observed" for any events it might invoke. For example, + * vtkRenderer invokes a StartEvent as it begins to render and a + * EndEvent when it finishes rendering. Filters (subclasses of + * vtkProcessObject) invoke StartEvent, ProgressEvent, and EndEvent as + * the filter processes data. Observers of events are added with the + * AddObserver() method found in vtkObject. AddObserver(), besides + * requiring an event id or name, also takes an instance of vtkCommand + * (or a subclasses). Note that vtkCommand is meant to be subclassed, + * so that you can package the information necessary to support your + * callback. + * + * Event processing can be organized in priority lists, so it is + * possible to truncate the processing of a particular event by + * setting the AbortFlag variable. The priority is set using the + * AddObserver() method. By default the priority is 0, events of the + * same priority are processed in last-in-first-processed order. The + * ordering/aborting of events is important for things like 3D + * widgets, which handle an event if the widget is selected (and then + * aborting further processing of that event). Otherwise. the event + * is passed along for further processing. + * + * When an instance of vtkObject invokes an event, it also passes an optional + * void pointer to a callData. This callData is NULL most of the time. + * The callData is not specific to a type of event but specific to a type + * of vtkObject invoking a specific event. For instance, vtkCommand::PickEvent + * is invoked by vtkProp with a NULL callData but is invoked by + * vtkInteractorStyleImage with a pointer to the vtkInteractorStyleImage object + * itself. + * + * Here is the list of events that may be invoked with a non-NULL callData. + * - vtkCommand::ProgressEvent + * - most of the objects return a pointer to a double value ranged between + * 0.0 and 1.0 + * - Infovis/vtkFixedWidthTextReader returns a pointer to a float value equal + * to the number of lines read so far. + * - vtkCommand::ErrorEvent + * - an error message as a const char * string + * - vtkCommand::WarningEvent + * - a warning message as a const char * string + * - vtkCommand::StartAnimationCueEvent + * - a pointer to a vtkAnimationCue::AnimationCueInfo object + * - vtkCommand::EndAnimationCueEvent + * - a pointer to a vtkAnimationCue::AnimationCueInfo object + * - vtkCommand::AnimationCueTickEvent + * - a pointer to a vtkAnimationCue::AnimationCueInfo object + * - vtkCommand::PickEvent + * - Common/vtkProp returns NULL + * - Rendering/vtkInteractorStyleImage returns a pointer to itself + * - vtkCommand::StartPickEvent + * - Rendering/vtkPropPicker returns NULL + * - Rendering/vtkInteractorStyleImage returns a pointer to itself + * - vtkCommand::EndPickEvent + * - Rendering/vtkPropPicker returns NULL + * - Rendering/vtkInteractorStyleImage returns a pointer to itself + * - vtkCommand::WrongTagEvent + * - Parallel/vtkSocketCommunicator returns a received tag as a char * + * - vtkCommand::SelectionChangedEvent + * - Views/vtkView returns NULL + * - Views/vtkDataRepresentation returns a pointer to a vtkSelection + * - Rendering/vtkInteractorStyleRubberBand2D returns an array of 5 unsigned + * integers (p1x, p1y, p2x, p2y, mode), where mode is + * vtkInteractorStyleRubberBand2D::SELECT_UNION or + * vtkInteractorStyleRubberBand2D::SELECT_NORMAL + * - vtkCommand::AnnotationChangedEvent + * - GUISupport/Qt/vtkQtAnnotationView returns a pointer to a + * vtkAnnotationLayers + * - vtkCommand::PlacePointEvent + * - Widgets/vtkSeedWidget returns a pointer to an int, being the current + * handle number + * - vtkCommand::ResetWindowLevelEvent + * - Widgets/vtkImagePlaneWidget returns an array of 2 double values (window + * and level) + * - Rendering/vtkInteractorStyleImage returns a pointer to itself + * - vtkCommand::StartWindowLevelEvent + * - Widgets/vtkImagePlaneWidget returns an array of 2 double values (window + * and level) + * - Rendering/vtkInteractorStyleImage returns a pointer to itself + * - vtkCommand::EndWindowLevelEvent + * - Widgets/vtkImagePlaneWidget returns an array of 2 double values (window + * and level) + * - Rendering/vtkInteractorStyleImage returns a pointer to itself + * - vtkCommand::WindowLevelEvent + * - Widgets/vtkImagePlaneWidget returns an array of 2 double values (window + * and level) + * - Rendering/vtkInteractorStyleImage returns a pointer to itself + * - vtkCommand::CharEvent + * - most of the objects return NULL + * - GUISupport/Qt/QVTKWidget returns a QKeyEvent * + * - vtkCommand::TimerEvent + * - most of the objects return a to an int representing a timer id + * - Rendering/vtkXRenderWindowTclInteractor returns NULL + * - Widgets/vtkHoverWidget returns NULL + * - vtkCommand::CreateTimerEvent + * - Rendering/vtkGenericRenderWindowInteractor returns a to an int + * representing a timer id + * - vtkCommand::DestroyTimerEvent + * - Rendering/vtkGenericRenderWindowInteractor returns a to an int + * representing a timer id + * - vtkCommand::UserEvent + * - most of the objects return NULL + * - Infovis/vtkInteractorStyleTreeMapHover returns a pointer to a vtkIdType + * representing a pedigree id + * - vtkCommand::KeyPressEvent + * - most of the objects return NULL + * - GUISupport/Qt/QVTKWidget returns a QKeyEvent* + * - vtkCommand::KeyReleaseEvent + * - most of the objects return NULL + * - GUISupport/Qt/QVTKWidget returns a QKeyEvent* + * - vtkCommand::LeftButtonPressEvent + * - most of the objects return NULL + * - GUISupport/Qt/QVTKWidget returns a QMouseEvent* + * - vtkCommand::LeftButtonReleaseEvent + * - most of the objects return NULL + * - GUISupport/Qt/QVTKWidget returns a QMouseEvent* + * - vtkCommand::MouseMoveEvent + * - most of the objects return NULL + * - GUISupport/Qt/QVTKWidget returns a QMouseEvent* + * - vtkCommand::MouseWheelForwardEvent + * - most of the objects return NULL + * - GUISupport/Qt/QVTKWidget returns a QWheelEvent* + * - vtkCommand::MouseWheelBackwardEvent + * - most of the objects return NULL + * - GUISupport/Qt/QVTKWidget returns a QWheelEvent* + * - vtkCommand::RightButtonPressEvent + * - most of the objects return NULL + * - GUISupport/Qt/QVTKWidget returns a QMouseEvent* + * - vtkCommand::RightButtonReleaseEvent + * - most of the objects return NULL + * - GUISupport/Qt/QVTKWidget returns a QMouseEvent* + * - vtkCommand::MiddleButtonPressEvent + * - most of the objects return NULL + * - GUISupport/Qt/QVTKWidget returns a QMouseEvent* + * - vtkCommand::MiddleButtonReleaseEvent + * - most of the objects return NULL + * - GUISupport/Qt/QVTKWidget returns a QMouseEvent* + * - vtkCommand::CursorChangedEvent + * - most of the objects return a pointer to an int representing a shape + * - Rendering/vtkInteractorObserver returns NULL + * - vtkCommand::ResetCameraEvent + * - Rendering/vtkRenderer returns a pointer to itself + * - vtkCommand::ResetCameraClippingRangeEvent + * - Rendering/vtkRenderer returns a pointer to itself + * - vtkCommand::ActiveCameraEvent + * - Rendering/vtkRenderer returns a pointer to the active camera + * - vtkCommand::CreateCameraEvent + * - Rendering/vtkRenderer returns a pointer to the created camera + * - vtkCommand::EnterEvent + * - most of the objects return NULL + * - GUISupport/Qt/QVTKWidget returns a QEvent* + * - vtkCommand::LeaveEvent + * - most of the objects return NULL + * - GUISupport/Qt/QVTKWidget returns a QEvent* + * - vtkCommand::RenderWindowMessageEvent + * - Rendering/vtkWin32OpenGLRenderWindow return a pointer to a UINT message + * - vtkCommand::ComputeVisiblePropBoundsEvent + * - Rendering/vtkRenderer returns a pointer to itself + * - QVTKWidget::ContextMenuEvent + * - GUISupport/Qt/QVTKWidget returns a QContextMenuEvent* + * - QVTKWidget::DragEnterEvent + * - GUISupport/Qt/QVTKWidget returns a QDragEnterEvent* + * - QVTKWidget::DragMoveEvent + * - GUISupport/Qt/QVTKWidget returns a QDragMoveEvent* + * - QVTKWidget::DragLeaveEvent + * - GUISupport/Qt/QVTKWidget returns a QDragLeaveEvent* + * - QVTKWidget::DropEvent + * - GUISupport/Qt/QVTKWidget returns a QDropEvent* + * - vtkCommand::ViewProgressEvent + * - View/vtkView returns a ViewProgressEventCallData* + * - vtkCommand::VolumeMapperRenderProgressEvent + * - A pointer to a double value between 0.0 and 1.0 + * - vtkCommand::VolumeMapperComputeGradientsProgressEvent + * - A pointer to a double value between 0.0 and 1.0 + * - vtkCommand::TDxMotionEvent (TDx=3DConnexion) + * - A vtkTDxMotionEventInfo* + * - vtkCommand::TDxButtonPressEvent + * - A int* being the number of the button + * - vtkCommand::TDxButtonReleaseEvent + * - A int* being the number of the button + * - vtkCommand::UpdateShaderEvent + * - A vtkOpenGLHelper* currently being used + * + * @sa + * vtkObject vtkCallbackCommand vtkOldStyleCallbackCommand + * vtkInteractorObserver vtk3DWidget +*/ #ifndef vtkCommand_h #define vtkCommand_h @@ -340,37 +343,43 @@ class VTKCOMMONCORE_EXPORT vtkCommand : public vtkObjectBase public: vtkBaseTypeMacro(vtkCommand,vtkObjectBase); - // Description: - // Decrease the reference count (release by another object). This has - // the same effect as invoking Delete() (i.e., it reduces the reference - // count by 1). + /** + * Decrease the reference count (release by another object). This has + * the same effect as invoking Delete() (i.e., it reduces the reference + * count by 1). + */ void UnRegister(); void UnRegister(vtkObjectBase *) VTK_OVERRIDE { this->UnRegister(); } - // Description: - // All derived classes of vtkCommand must implement this - // method. This is the method that actually does the work of the - // callback. The caller argument is the object invoking the event, - // the eventId parameter is the id of the event, and callData - // parameter is data that can be passed into the execute - // method. (Note: vtkObject::InvokeEvent() takes two parameters: the - // event id (or name) and call data. Typically call data is NULL, - // but the user can package data and pass it this - // way. Alternatively, a derived class of vtkCommand can be used to - // pass data.) + /** + * All derived classes of vtkCommand must implement this + * method. This is the method that actually does the work of the + * callback. The caller argument is the object invoking the event, + * the eventId parameter is the id of the event, and callData + * parameter is data that can be passed into the execute + * method. (Note: vtkObject::InvokeEvent() takes two parameters: the + * event id (or name) and call data. Typically call data is NULL, + * but the user can package data and pass it this + * way. Alternatively, a derived class of vtkCommand can be used to + * pass data.) + */ virtual void Execute(vtkObject *caller, unsigned long eventId, void *callData) = 0; - // Description: - // Convenience methods for translating between event names and event - // ids. + //@{ + /** + * Convenience methods for translating between event names and event + * ids. + */ static const char *GetStringFromEventId(unsigned long event); static unsigned long GetEventIdFromString(const char *event); + //@} - // Description: - // Set/Get the abort flag. If this is set to true no further - // commands are executed. + /** + * Set/Get the abort flag. If this is set to true no further + * commands are executed. + */ void SetAbortFlag(int f) { this->AbortFlag = f; } int GetAbortFlag() @@ -380,11 +389,12 @@ public: void AbortFlagOff() { this->SetAbortFlag(0); } - // Description: - // Set/Get the passive observer flag. If this is set to true, this - // indicates that this command does not change the state of the - // system in any way. Passive observers are processed first, and - // are not called even when another command has focus. + /** + * Set/Get the passive observer flag. If this is set to true, this + * indicates that this command does not change the state of the + * system in any way. Passive observers are processed first, and + * are not called even when another command has focus. + */ void SetPassiveObserver(int f) { this->PassiveObserver = f; } int GetPassiveObserver() @@ -394,11 +404,12 @@ public: void PassiveObserverOff() { this->SetPassiveObserver(0); } - // Description: - // All the currently defined events are listed here. Developers can - // use -- vtkCommand::UserEvent + int to specify their own event - // ids. - // Add new events by updating vtkAllEventsMacro. + /** + * All the currently defined events are listed here. Developers can + * use -- vtkCommand::UserEvent + int to specify their own event + * ids. + * Add new events by updating vtkAllEventsMacro. + */ #define _vtk_add_event(Enum) Enum, vtkEventDeclarationMacro(EventIds) #undef _vtk_add_event diff --git a/Common/Core/vtkCommonInformationKeyManager.h b/Common/Core/vtkCommonInformationKeyManager.h index 90f5f0210a21ffd27bf0f4fe439018b106058aca..b05bb8e4b45d14d19b9795fa4a70396f90eae84e 100644 --- a/Common/Core/vtkCommonInformationKeyManager.h +++ b/Common/Core/vtkCommonInformationKeyManager.h @@ -12,12 +12,15 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkCommonInformationKeyManager - Manages key types in vtkCommon. -// .SECTION Description -// vtkCommonInformationKeyManager is included in the header of any -// subclass of vtkInformationKey defined in the vtkCommon library. -// It makes sure that the table of keys is created before and -// destroyed after it is used. +/** + * @class vtkCommonInformationKeyManager + * @brief Manages key types in vtkCommon. + * + * vtkCommonInformationKeyManager is included in the header of any + * subclass of vtkInformationKey defined in the vtkCommon library. + * It makes sure that the table of keys is created before and + * destroyed after it is used. +*/ #ifndef vtkCommonInformationKeyManager_h #define vtkCommonInformationKeyManager_h @@ -35,11 +38,12 @@ public: vtkCommonInformationKeyManager(); ~vtkCommonInformationKeyManager(); - // Description: - // Called by constructors of vtkInformationKey subclasses defined in - // vtkCommon to register themselves with the manager. The - // instances will be deleted when vtkCommon is unloaded on - // program exit. + /** + * Called by constructors of vtkInformationKey subclasses defined in + * vtkCommon to register themselves with the manager. The + * instances will be deleted when vtkCommon is unloaded on + * program exit. + */ static void Register(vtkInformationKey* key); private: diff --git a/Common/Core/vtkConditionVariable.h b/Common/Core/vtkConditionVariable.h index 104f4bb6bb756173ff959e58fb813338ed941866..7da85dd7ae1188c10e70dce4e5d0ee9b2c3bfd77 100644 --- a/Common/Core/vtkConditionVariable.h +++ b/Common/Core/vtkConditionVariable.h @@ -12,17 +12,20 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkConditionVariable - mutual exclusion locking class -// .SECTION Description -// vtkConditionVariable allows the locking of variables which are accessed -// through different threads. This header file also defines -// vtkSimpleConditionVariable which is not a subclass of vtkObject. -// -// The win32 implementation is based on notes provided by -// Douglas C. Schmidt and Irfan Pyarali, -// Department of Computer Science, -// Washington University, St. Louis, Missouri. -// http://www.cs.wustl.edu/~schmidt/win32-cv-1.html +/** + * @class vtkConditionVariable + * @brief mutual exclusion locking class + * + * vtkConditionVariable allows the locking of variables which are accessed + * through different threads. This header file also defines + * vtkSimpleConditionVariable which is not a subclass of vtkObject. + * + * The win32 implementation is based on notes provided by + * Douglas C. Schmidt and Irfan Pyarali, + * Department of Computer Science, + * Washington University, St. Louis, Missouri. + * http://www.cs.wustl.edu/~schmidt/win32-cv-1.html +*/ #ifndef vtkConditionVariable_h #define vtkConditionVariable_h @@ -113,22 +116,25 @@ public: void Delete() { delete this; } - // Description: - // Wake one thread waiting for the condition to change. + /** + * Wake one thread waiting for the condition to change. + */ void Signal(); - // Description: - // Wake all threads waiting for the condition to change. + /** + * Wake all threads waiting for the condition to change. + */ void Broadcast(); - // Description: - // Wait for the condition to change. - // Upon entry, the mutex must be locked and the lock held by the calling thread. - // Upon exit, the mutex will be locked and held by the calling thread. - // Between entry and exit, the mutex will be unlocked and may be held by other threads. - // - // @param mutex The mutex that should be locked on entry and will be locked on exit (but not in between) - // @retval Normally, this function returns 0. Should a thread be interrupted by a signal, a non-zero value may be returned. + /** + * Wait for the condition to change. + * Upon entry, the mutex must be locked and the lock held by the calling thread. + * Upon exit, the mutex will be locked and held by the calling thread. + * Between entry and exit, the mutex will be unlocked and may be held by other threads. + + * @param mutex The mutex that should be locked on entry and will be locked on exit (but not in between) + * @retval Normally, this function returns 0. Should a thread be interrupted by a signal, a non-zero value may be returned. + */ int Wait( vtkSimpleMutexLock& mutex ); protected: @@ -146,22 +152,25 @@ public: vtkTypeMacro(vtkConditionVariable,vtkObject); void PrintSelf( ostream& os, vtkIndent indent ) VTK_OVERRIDE; - // Description: - // Wake one thread waiting for the condition to change. + /** + * Wake one thread waiting for the condition to change. + */ void Signal(); - // Description: - // Wake all threads waiting for the condition to change. + /** + * Wake all threads waiting for the condition to change. + */ void Broadcast(); - // Description: - // Wait for the condition to change. - // Upon entry, the mutex must be locked and the lock held by the calling thread. - // Upon exit, the mutex will be locked and held by the calling thread. - // Between entry and exit, the mutex will be unlocked and may be held by other threads. - // - // @param mutex The mutex that should be locked on entry and will be locked on exit (but not in between) - // @retval Normally, this function returns 0. Should a thread be interrupted by a signal, a non-zero value may be returned. + /** + * Wait for the condition to change. + * Upon entry, the mutex must be locked and the lock held by the calling thread. + * Upon exit, the mutex will be locked and held by the calling thread. + * Between entry and exit, the mutex will be unlocked and may be held by other threads. + + * @param mutex The mutex that should be locked on entry and will be locked on exit (but not in between) + * @retval Normally, this function returns 0. Should a thread be interrupted by a signal, a non-zero value may be returned. + */ int Wait( vtkMutexLock* mutex ); protected: diff --git a/Common/Core/vtkCriticalSection.h b/Common/Core/vtkCriticalSection.h index f71942fa01ed51262b5704d056426309ff56a2fe..6eb67b548cbc73e3818a5b2e2d014e45ffea33f6 100644 --- a/Common/Core/vtkCriticalSection.h +++ b/Common/Core/vtkCriticalSection.h @@ -12,23 +12,26 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkCriticalSection - Critical section locking class -// .SECTION Description -// vtkCriticalSection allows the locking of variables which are accessed -// through different threads. This header file also defines -// vtkSimpleCriticalSection which is not a subclass of vtkObject. -// The API is identical to that of vtkMutexLock, and the behavior is -// identical as well, except on Windows 9x/NT platforms. The only difference -// on these platforms is that vtkMutexLock is more flexible, in that -// it works across processes as well as across threads, but also costs -// more, in that it evokes a 600-cycle x86 ring transition. The -// vtkCriticalSection provides a higher-performance equivalent (on -// Windows) but won't work across processes. Since it is unclear how, -// in vtk, an object at the vtk level can be shared across processes -// in the first place, one should use vtkCriticalSection unless one has -// a very good reason to use vtkMutexLock. If higher-performance equivalents -// for non-Windows platforms (Irix, SunOS, etc) are discovered, they -// should replace the implementations in this class +/** + * @class vtkCriticalSection + * @brief Critical section locking class + * + * vtkCriticalSection allows the locking of variables which are accessed + * through different threads. This header file also defines + * vtkSimpleCriticalSection which is not a subclass of vtkObject. + * The API is identical to that of vtkMutexLock, and the behavior is + * identical as well, except on Windows 9x/NT platforms. The only difference + * on these platforms is that vtkMutexLock is more flexible, in that + * it works across processes as well as across threads, but also costs + * more, in that it evokes a 600-cycle x86 ring transition. The + * vtkCriticalSection provides a higher-performance equivalent (on + * Windows) but won't work across processes. Since it is unclear how, + * in vtk, an object at the vtk level can be shared across processes + * in the first place, one should use vtkCriticalSection unless one has + * a very good reason to use vtkMutexLock. If higher-performance equivalents + * for non-Windows platforms (Irix, SunOS, etc) are discovered, they + * should replace the implementations in this class +*/ #ifndef vtkCriticalSection_h #define vtkCriticalSection_h @@ -45,12 +48,14 @@ public: vtkTypeMacro(vtkCriticalSection,vtkObject); void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE; - // Description: - // Lock the vtkCriticalSection + /** + * Lock the vtkCriticalSection + */ void Lock(); - // Description: - // Unlock the vtkCriticalSection + /** + * Unlock the vtkCriticalSection + */ void Unlock(); protected: diff --git a/Common/Core/vtkDataArray.h b/Common/Core/vtkDataArray.h index 80a3b4d0cef6dafbc64a822f94baf8cb8adb86fd..cb2513691efb4c0d5a1cf7bd23a6c98fcb333f0e 100644 --- a/Common/Core/vtkDataArray.h +++ b/Common/Core/vtkDataArray.h @@ -12,22 +12,25 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkDataArray - abstract superclass for arrays of numeric data -// .SECTION Description -// -// vtkDataArray is an abstract superclass for data array objects -// containing numeric data. It extends the API defined in -// vtkAbstractArray. vtkDataArray is an abstract superclass for data -// array objects. This class defines an API that all array objects -// must support. Note that the concrete subclasses of this class -// represent data in native form (char, int, etc.) and often have -// specialized more efficient methods for operating on this data (for -// example, getting pointers to data or getting/inserting data in -// native form). Subclasses of vtkDataArray are assumed to contain -// data whose components are meaningful when cast to and from double. -// -// .SECTION See Also -// vtkBitArray vtkGenericDataArray +/** + * @class vtkDataArray + * @brief abstract superclass for arrays of numeric data + * + * + * vtkDataArray is an abstract superclass for data array objects + * containing numeric data. It extends the API defined in + * vtkAbstractArray. vtkDataArray is an abstract superclass for data + * array objects. This class defines an API that all array objects + * must support. Note that the concrete subclasses of this class + * represent data in native form (char, int, etc.) and often have + * specialized more efficient methods for operating on this data (for + * example, getting pointers to data or getting/inserting data in + * native form). Subclasses of vtkDataArray are assumed to contain + * data whose components are meaningful when cast to and from double. + * + * @sa + * vtkBitArray vtkGenericDataArray +*/ #ifndef vtkDataArray_h #define vtkDataArray_h @@ -48,25 +51,28 @@ public: vtkTypeMacro(vtkDataArray,vtkAbstractArray); void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE; - // Description: - // Perform a fast, safe cast from a vtkAbstractArray to a vtkDataArray. - // This method checks if source->GetArrayType() returns DataArray - // or a more derived type, and performs a static_cast to return - // source as a vtkDataArray pointer. Otherwise, NULL is returned. + /** + * Perform a fast, safe cast from a vtkAbstractArray to a vtkDataArray. + * This method checks if source->GetArrayType() returns DataArray + * or a more derived type, and performs a static_cast to return + * source as a vtkDataArray pointer. Otherwise, NULL is returned. + */ static vtkDataArray* FastDownCast(vtkAbstractArray *source); - // Description: - // This method is here to make backward compatibility easier. It - // must return true if and only if an array contains numeric data. - // All vtkDataArray subclasses contain numeric data, hence this method - // always returns 1(true). + /** + * This method is here to make backward compatibility easier. It + * must return true if and only if an array contains numeric data. + * All vtkDataArray subclasses contain numeric data, hence this method + * always returns 1(true). + */ int IsNumeric() VTK_OVERRIDE { return 1; } - // Description: - // Return the size, in bytes, of the lowest-level element of an - // array. For vtkDataArray and subclasses this is the size of the - // data type. + /** + * Return the size, in bytes, of the lowest-level element of an + * array. For vtkDataArray and subclasses this is the size of the + * data type. + */ int GetElementComponentSize() VTK_OVERRIDE { return this->GetDataTypeSize(); } @@ -87,43 +93,53 @@ public: vtkIdType srcTupleIdx1, vtkAbstractArray* source1, vtkIdType srcTupleIdx2, vtkAbstractArray* source2, double t) VTK_OVERRIDE; - // Description: - // Get the data tuple at tupleIdx. Return it as a pointer to an array. - // Note: this method is not thread-safe, and the pointer is only valid - // as long as another method invocation to a vtk object is not performed. + /** + * Get the data tuple at tupleIdx. Return it as a pointer to an array. + * Note: this method is not thread-safe, and the pointer is only valid + * as long as another method invocation to a vtk object is not performed. + */ virtual double *GetTuple(vtkIdType tupleIdx) = 0; - // Description: - // Get the data tuple at tupleIdx by filling in a user-provided array, - // Make sure that your array is large enough to hold the NumberOfComponents - // amount of data being returned. + /** + * Get the data tuple at tupleIdx by filling in a user-provided array, + * Make sure that your array is large enough to hold the NumberOfComponents + * amount of data being returned. + */ virtual void GetTuple(vtkIdType tupleIdx, double * tuple) = 0; - // Description: - // These methods are included as convenience for the wrappers. - // GetTuple() and SetTuple() which return/take arrays can not be - // used from wrapped languages. These methods can be used instead. + //@{ + /** + * These methods are included as convenience for the wrappers. + * GetTuple() and SetTuple() which return/take arrays can not be + * used from wrapped languages. These methods can be used instead. + */ double GetTuple1(vtkIdType tupleIdx); double* GetTuple2(vtkIdType tupleIdx); double* GetTuple3(vtkIdType tupleIdx); double* GetTuple4(vtkIdType tupleIdx); double* GetTuple6(vtkIdType tupleIdx); double* GetTuple9(vtkIdType tupleIdx); + //@} void SetTuple(vtkIdType dstTupleIdx, vtkIdType srcTupleIdx, vtkAbstractArray* source) VTK_OVERRIDE; - // Description: - // Set the data tuple at tupleIdx. Note that range checking or - // memory allocation is not performed; use this method in conjunction - // with SetNumberOfTuples() to allocate space. + //@{ + /** + * Set the data tuple at tupleIdx. Note that range checking or + * memory allocation is not performed; use this method in conjunction + * with SetNumberOfTuples() to allocate space. + */ virtual void SetTuple(vtkIdType tupleIdx, const float * tuple); virtual void SetTuple(vtkIdType tupleIdx, const double * tuple); - - // Description: - // These methods are included as convenience for the wrappers. - // GetTuple() and SetTuple() which return/take arrays can not be - // used from wrapped languages. These methods can be used instead. + //@} + + //@{ + /** + * These methods are included as convenience for the wrappers. + * GetTuple() and SetTuple() which return/take arrays can not be + * used from wrapped languages. These methods can be used instead. + */ void SetTuple1(vtkIdType tupleIdx, double value); void SetTuple2(vtkIdType tupleIdx, double val0, double val1); void SetTuple3(vtkIdType tupleIdx, double val0, double val1, double val2); @@ -134,17 +150,23 @@ public: void SetTuple9(vtkIdType tupleIdx, double val0, double val1, double val2, double val3, double val4, double val5, double val6, double val7, double val8); + //@} - // Description: - // Insert the data tuple at tupleIdx. Note that memory allocation - // is performed as necessary to hold the data. + //@{ + /** + * Insert the data tuple at tupleIdx. Note that memory allocation + * is performed as necessary to hold the data. + */ virtual void InsertTuple(vtkIdType tupleIdx, const float * tuple) = 0; virtual void InsertTuple(vtkIdType tupleIdx, const double * tuple) = 0; - - // Description: - // These methods are included as convenience for the wrappers. - // InsertTuple() which takes arrays can not be - // used from wrapped languages. These methods can be used instead. + //@} + + //@{ + /** + * These methods are included as convenience for the wrappers. + * InsertTuple() which takes arrays can not be + * used from wrapped languages. These methods can be used instead. + */ void InsertTuple1(vtkIdType tupleIdx, double value); void InsertTuple2(vtkIdType tupleIdx, double val0, double val1); void InsertTuple3(vtkIdType tupleIdx, double val0, double val1, double val2); @@ -155,18 +177,24 @@ public: void InsertTuple9(vtkIdType tupleIdx, double val0, double val1, double val2, double val3, double val4, double val5, double val6, double val7, double val8); - - // Description: - // Insert the data tuple at the end of the array and return the tuple index at - // which the data was inserted. Memory is allocated as necessary to hold - // the data. + //@} + + //@{ + /** + * Insert the data tuple at the end of the array and return the tuple index at + * which the data was inserted. Memory is allocated as necessary to hold + * the data. + */ virtual vtkIdType InsertNextTuple(const float * tuple) = 0; virtual vtkIdType InsertNextTuple(const double * tuple) = 0; - - // Description: - // These methods are included as convenience for the wrappers. - // InsertTuple() which takes arrays can not be - // used from wrapped languages. These methods can be used instead. + //@} + + //@{ + /** + * These methods are included as convenience for the wrappers. + * InsertTuple() which takes arrays can not be + * used from wrapped languages. These methods can be used instead. + */ void InsertNextTuple1(double value); void InsertNextTuple2(double val0, double val1); void InsertNextTuple3(double val0, double val1, double val2); @@ -177,224 +205,262 @@ public: void InsertNextTuple9(double val0, double val1, double val2, double val3, double val4, double val5, double val6, double val7, double val8); - - // Description: - // These methods remove tuples from the data array. They shift data and - // resize array, so the data array is still valid after this operation. Note, - // this operation is fairly slow. + //@} + + //@{ + /** + * These methods remove tuples from the data array. They shift data and + * resize array, so the data array is still valid after this operation. Note, + * this operation is fairly slow. + */ virtual void RemoveTuple(vtkIdType tupleIdx) = 0; virtual void RemoveFirstTuple() { this->RemoveTuple(0); } virtual void RemoveLastTuple(); + //@} - // Description: - // Return the data component at the location specified by tupleIdx and - // compIdx. + /** + * Return the data component at the location specified by tupleIdx and + * compIdx. + */ virtual double GetComponent(vtkIdType tupleIdx, int compIdx); - // Description: - // Set the data component at the location specified by tupleIdx and compIdx - // to value. - // Note that i is less than NumberOfTuples and j is less than - // NumberOfComponents. Make sure enough memory has been allocated - // (use SetNumberOfTuples() and SetNumberOfComponents()). + /** + * Set the data component at the location specified by tupleIdx and compIdx + * to value. + * Note that i is less than NumberOfTuples and j is less than + * NumberOfComponents. Make sure enough memory has been allocated + * (use SetNumberOfTuples() and SetNumberOfComponents()). + */ virtual void SetComponent(vtkIdType tupleIdx, int compIdx, double value); - // Description: - // Insert value at the location specified by tupleIdx and compIdx. - // Note that memory allocation is performed as necessary to hold the data. + /** + * Insert value at the location specified by tupleIdx and compIdx. + * Note that memory allocation is performed as necessary to hold the data. + */ virtual void InsertComponent(vtkIdType tupleIdx, int compIdx, double value); - // Description: - // Get the data as a double array in the range (tupleMin,tupleMax) and - // (compMin, compMax). The resulting double array consists of all data in - // the tuple range specified and only the component range specified. This - // process typically requires casting the data from native form into - // doubleing point values. This method is provided as a convenience for data - // exchange, and is not very fast. + /** + * Get the data as a double array in the range (tupleMin,tupleMax) and + * (compMin, compMax). The resulting double array consists of all data in + * the tuple range specified and only the component range specified. This + * process typically requires casting the data from native form into + * doubleing point values. This method is provided as a convenience for data + * exchange, and is not very fast. + */ virtual void GetData(vtkIdType tupleMin, vtkIdType tupleMax, int compMin, int compMax, vtkDoubleArray* data); - // Description: - // Deep copy of data. Copies data from different data arrays even if - // they are different types (using doubleing-point exchange). + //@{ + /** + * Deep copy of data. Copies data from different data arrays even if + * they are different types (using doubleing-point exchange). + */ void DeepCopy(vtkAbstractArray *aa) VTK_OVERRIDE; virtual void DeepCopy(vtkDataArray *da); - - // Description: - // Create a shallow copy of other into this, if possible. Shallow copies are - // only possible: - // (a) if both arrays are the same data type - // (b) if both arrays are the same array type (e.g. AOS vs. SOA) - // (c) if both arrays support shallow copies (e.g. vtkBitArray currently - // does not.) - // If a shallow copy is not possible, a deep copy will be performed instead. + //@} + + /** + * Create a shallow copy of other into this, if possible. Shallow copies are + * only possible: + * (a) if both arrays are the same data type + * (b) if both arrays are the same array type (e.g. AOS vs. SOA) + * (c) if both arrays support shallow copies (e.g. vtkBitArray currently + * does not.) + * If a shallow copy is not possible, a deep copy will be performed instead. + */ virtual void ShallowCopy(vtkDataArray *other); - // Description: - // Fill a component of a data array with a specified value. This method - // sets the specified component to specified value for all tuples in the - // data array. This methods can be used to initialize or reinitialize a - // single component of a multi-component array. + /** + * Fill a component of a data array with a specified value. This method + * sets the specified component to specified value for all tuples in the + * data array. This methods can be used to initialize or reinitialize a + * single component of a multi-component array. + */ virtual void FillComponent(int compIdx, double value); - // Description: - // Copy a component from one data array into a component on this data array. - // This method copies the specified component ("srcComponent") from the - // specified data array ("src") to the specified component ("dstComponent") - // over all the tuples in this data array. This method can be used to extract - // a component (column) from one data array and paste that data into - // a component on this data array. + /** + * Copy a component from one data array into a component on this data array. + * This method copies the specified component ("srcComponent") from the + * specified data array ("src") to the specified component ("dstComponent") + * over all the tuples in this data array. This method can be used to extract + * a component (column) from one data array and paste that data into + * a component on this data array. + */ virtual void CopyComponent(int dstComponent, vtkDataArray *src, int srcComponent); - // Description: - // Get the address of a particular data index. Make sure data is allocated - // for the number of items requested. If needed, increase MaxId to mark any - // new value ranges as in-use. + /** + * Get the address of a particular data index. Make sure data is allocated + * for the number of items requested. If needed, increase MaxId to mark any + * new value ranges as in-use. + */ virtual void* WriteVoidPointer(vtkIdType valueIdx, vtkIdType numValues) = 0; - // Description: - // Return the memory in kibibytes (1024 bytes) consumed by this data array. Used to - // support streaming and reading/writing data. The value returned is - // guaranteed to be greater than or equal to the memory required to - // actually represent the data represented by this object. The - // information returned is valid only after the pipeline has - // been updated. + /** + * Return the memory in kibibytes (1024 bytes) consumed by this data array. Used to + * support streaming and reading/writing data. The value returned is + * guaranteed to be greater than or equal to the memory required to + * actually represent the data represented by this object. The + * information returned is valid only after the pipeline has + * been updated. + */ unsigned long GetActualMemorySize() VTK_OVERRIDE; - // Description: - // Create default lookup table. Generally used to create one when none - // is available. + /** + * Create default lookup table. Generally used to create one when none + * is available. + */ void CreateDefaultLookupTable(); - // Description: - // Set/get the lookup table associated with this scalar data, if any. + //@{ + /** + * Set/get the lookup table associated with this scalar data, if any. + */ void SetLookupTable(vtkLookupTable *lut); vtkGetObjectMacro(LookupTable,vtkLookupTable); - - // Description: - // The range of the data array values for the given component will be - // returned in the provided range array argument. If comp is -1, the range - // of the magnitude (L2 norm) over all components will be provided. The - // range is computed and then cached, and will not be re-computed on - // subsequent calls to GetRange() unless the array is modified or the - // requested component changes. - // THIS METHOD IS NOT THREAD SAFE. + //@} + + /** + * The range of the data array values for the given component will be + * returned in the provided range array argument. If comp is -1, the range + * of the magnitude (L2 norm) over all components will be provided. The + * range is computed and then cached, and will not be re-computed on + * subsequent calls to GetRange() unless the array is modified or the + * requested component changes. + * THIS METHOD IS NOT THREAD SAFE. + */ void GetRange(double range[2], int comp) { this->ComputeRange(range, comp); } - // Description: - // Return the range of the data array values for the given component. If - // comp is -1, return the range of the magnitude (L2 norm) over all - // components.The range is computed and then cached, and will not be - // re-computed on subsequent calls to GetRange() unless the array is - // modified or the requested component changes. - // THIS METHOD IS NOT THREAD SAFE. + //@{ + /** + * Return the range of the data array values for the given component. If + * comp is -1, return the range of the magnitude (L2 norm) over all + * components.The range is computed and then cached, and will not be + * re-computed on subsequent calls to GetRange() unless the array is + * modified or the requested component changes. + * THIS METHOD IS NOT THREAD SAFE. + */ double* GetRange(int comp) { this->GetRange(this->Range, comp); return this->Range; } - - // Description: - // Return the range of the data array. If the array has multiple components, - // then this will return the range of only the first component (component - // zero). The range is computed and then cached, and will not be re-computed - // on subsequent calls to GetRange() unless the array is modified. - // THIS METHOD IS NOT THREAD SAFE. + //@} + + /** + * Return the range of the data array. If the array has multiple components, + * then this will return the range of only the first component (component + * zero). The range is computed and then cached, and will not be re-computed + * on subsequent calls to GetRange() unless the array is modified. + * THIS METHOD IS NOT THREAD SAFE. + */ double* GetRange() { return this->GetRange(0); } - // Description: - // The the range of the data array values will be returned in the provided - // range array argument. If the data array has multiple components, then - // this will return the range of only the first component (component zero). - // The range is computend and then cached, and will not be re-computed on - // subsequent calls to GetRange() unless the array is modified. - // THIS METHOD IS NOT THREAD SAFE. + /** + * The the range of the data array values will be returned in the provided + * range array argument. If the data array has multiple components, then + * this will return the range of only the first component (component zero). + * The range is computend and then cached, and will not be re-computed on + * subsequent calls to GetRange() unless the array is modified. + * THIS METHOD IS NOT THREAD SAFE. + */ void GetRange(double range[2]) { this->GetRange(range,0); } - // Description: - // These methods return the Min and Max possible range of the native - // data type. For example if a vtkScalars consists of unsigned char - // data these will return (0,255). + //@{ + /** + * These methods return the Min and Max possible range of the native + * data type. For example if a vtkScalars consists of unsigned char + * data these will return (0,255). + */ void GetDataTypeRange(double range[2]); double GetDataTypeMin(); double GetDataTypeMax(); static void GetDataTypeRange(int type, double range[2]); static double GetDataTypeMin(int type); static double GetDataTypeMax(int type); + //@} - // Description: - // Return the maximum norm for the tuples. - // Note that the max. is computed every time GetMaxNorm is called. + /** + * Return the maximum norm for the tuples. + * Note that the max. is computed every time GetMaxNorm is called. + */ virtual double GetMaxNorm(); - // Description: - // Creates an array for dataType where dataType is one of - // VTK_BIT, VTK_CHAR, VTK_SIGNED_CHAR, VTK_UNSIGNED_CHAR, VTK_SHORT, - // VTK_UNSIGNED_SHORT, VTK_INT, VTK_UNSIGNED_INT, VTK_LONG, - // VTK_UNSIGNED_LONG, VTK_DOUBLE, VTK_DOUBLE, VTK_ID_TYPE. - // Note that the data array returned has be deleted by the - // user. + /** + * Creates an array for dataType where dataType is one of + * VTK_BIT, VTK_CHAR, VTK_SIGNED_CHAR, VTK_UNSIGNED_CHAR, VTK_SHORT, + * VTK_UNSIGNED_SHORT, VTK_INT, VTK_UNSIGNED_INT, VTK_LONG, + * VTK_UNSIGNED_LONG, VTK_DOUBLE, VTK_DOUBLE, VTK_ID_TYPE. + * Note that the data array returned has be deleted by the + * user. + */ VTK_NEWINSTANCE static vtkDataArray* CreateDataArray(int dataType); - // Description: - // This key is used to hold tight bounds on the range of - // one component over all tuples of the array. - // Two values (a minimum and maximum) are stored for each component. - // When GetRange() is called when no tuples are present in the array - // this value is set to { VTK_DOUBLE_MAX, VTK_DOUBLE_MIN }. + /** + * This key is used to hold tight bounds on the range of + * one component over all tuples of the array. + * Two values (a minimum and maximum) are stored for each component. + * When GetRange() is called when no tuples are present in the array + * this value is set to { VTK_DOUBLE_MAX, VTK_DOUBLE_MIN }. + */ static vtkInformationDoubleVectorKey* COMPONENT_RANGE(); - // Description: - // This key is used to hold tight bounds on the $L_2$ norm - // of tuples in the array. - // Two values (a minimum and maximum) are stored for each component. - // When GetRange() is called when no tuples are present in the array - // this value is set to { VTK_DOUBLE_MAX, VTK_DOUBLE_MIN }. + /** + * This key is used to hold tight bounds on the $L_2$ norm + * of tuples in the array. + * Two values (a minimum and maximum) are stored for each component. + * When GetRange() is called when no tuples are present in the array + * this value is set to { VTK_DOUBLE_MAX, VTK_DOUBLE_MIN }. + */ static vtkInformationDoubleVectorKey* L2_NORM_RANGE(); - // Description: - // A human-readable string indicating the units for the array data. + /** + * A human-readable string indicating the units for the array data. + */ static vtkInformationStringKey *UNITS_LABEL(); - // Description: - // Copy information instance. Arrays use information objects - // in a variety of ways. It is important to have flexibility in - // this regard because certain keys should not be coppied, while - // others must be. NOTE: Up to the implmeneter to make sure that - // keys not inteneded to be coppied are excluded here. + /** + * Copy information instance. Arrays use information objects + * in a variety of ways. It is important to have flexibility in + * this regard because certain keys should not be coppied, while + * others must be. NOTE: Up to the implmeneter to make sure that + * keys not inteneded to be coppied are excluded here. + */ int CopyInformation(vtkInformation *infoFrom, int deep=1) VTK_OVERRIDE; - // Description: - // Method for type-checking in FastDownCast implementations. + /** + * Method for type-checking in FastDownCast implementations. + */ int GetArrayType() VTK_OVERRIDE { return DataArray; } protected: friend class vtkPoints; - // Description: - // Compute the range for a specific component. If comp is set -1 - // then L2 norm is computed on all components. Call ClearRange - // to force a recomputation if it is needed. The range is copied - // to the range argument. - // THIS METHOD IS NOT THREAD SAFE. + /** + * Compute the range for a specific component. If comp is set -1 + * then L2 norm is computed on all components. Call ClearRange + * to force a recomputation if it is needed. The range is copied + * to the range argument. + * THIS METHOD IS NOT THREAD SAFE. + */ virtual void ComputeRange(double range[2], int comp); - // Description: - // Computes the range for each component of an array, the length - // of \a ranges must be two times the number of components. - // Returns true if the range was computed. Will return false - // if you try to compute the range of an array of length zero. + /** + * Computes the range for each component of an array, the length + * of \a ranges must be two times the number of components. + * Returns true if the range was computed. Will return false + * if you try to compute the range of an array of length zero. + */ virtual bool ComputeScalarRange(double* ranges); // Returns true if the range was computed. Will return false diff --git a/Common/Core/vtkDataArrayAccessor.h b/Common/Core/vtkDataArrayAccessor.h index 97482d4f61d78fbf269d6cd2b968e4d32524b025..dfadcf7733591bc33135471214e23463938d5edb 100644 --- a/Common/Core/vtkDataArrayAccessor.h +++ b/Common/Core/vtkDataArrayAccessor.h @@ -13,79 +13,82 @@ =========================================================================*/ -// .NAME vtkDataArrayAccessor - Efficient templated access to vtkDataArray. -// -// .SECTION Description -// vtkDataArrayAccessor provides access to data stored in a vtkDataArray. It -// is intended to be used in conjunction with vtkArrayDispatcher. -// -// A more detailed description of this class and related tools can be found -// \ref VTK-7-1-ArrayDispatch "here". -// -// The goal of this helper template is to allow developers to write a single -// templated worker function that will generates code to use the efficient typed -// APIs provided by vtkGenericDataArray when the array type is known, but -// fallback to the slower vtkDataArray virtual double API if needed. -// -// This can be used to reduce template-explosion issues by restricting the -// vtkArrayDispatch call to only dispatch a few common cases/array types, and -// route all other arrays through a slower implementation using vtkDataArray's -// API. With vtkDataArrayAccessor, a single templated worker function can be -// used to generate both. -// -// Note that while this interface provides both component-wise and -// tuple access, the tuple methods are discouraged as they are -// significantly slower as they copy data into a temporary array, and -// prevent many advanced compiler optimizations that are possible when -// using the component accessors. In other words, prefer the methods -// that operate on a single component instead of an entire tuple when -// performance matters. -// -// A standard usage pattern of this class would be: -// -// @code -// // vtkArrayDispatch worker struct: -// struct Worker -// { -// // Templated worker function: -// template -// void operator()(ArrayT *array) -// { -// // The accessor: -// vtkDataArrayAccessor accessor(array); -// // The data type used by ArrayT's API, use this for -// // temporary/intermediate results: -// typedef typename vtkDataArrayAccessor::APIType APIType; -// -// // Do work using accessor to set/get values.... -// } -// }; -// -// // Usage: -// Worker worker; -// vtkDataArray *array = ...; -// if (!vtkArrayDispatch::Dispatch::Execute(array, worker)) -// { -// // Dispatch failed: unknown array type. Fallback to vtkDataArray API: -// worker(array); -// } -// @endcode -// -// We define Worker::operator() as the templated worker function, restricting -// all data accesses to go through the 'accessor' object (methods like -// GetNumberOfTuples, GetNumberOfComponents, etc should be called on the array -// itself). -// -// This worker is passed into an array dispatcher, which tests 'array' to see -// if it can figure out the array subclass. If it does, Worker is instantiated -// with ArrayT set to the array's subclass, resulting in efficient code. If -// Dispatch::Execute returns false (meaning the array type is not recognized), -// the worker is executed using the vtkDataArray pointer. While slower, this -// ensures that less-common cases will still be handled -- all from one worker -// function template. -// -// .SEE ALSO -// vtkArrayDispatch +/** + * @class vtkDataArrayAccessor + * @brief Efficient templated access to vtkDataArray. + * + * + * vtkDataArrayAccessor provides access to data stored in a vtkDataArray. It + * is intended to be used in conjunction with vtkArrayDispatcher. + * + * A more detailed description of this class and related tools can be found + * \ref VTK-7-1-ArrayDispatch "here". + * + * The goal of this helper template is to allow developers to write a single + * templated worker function that will generates code to use the efficient typed + * APIs provided by vtkGenericDataArray when the array type is known, but + * fallback to the slower vtkDataArray virtual double API if needed. + * + * This can be used to reduce template-explosion issues by restricting the + * vtkArrayDispatch call to only dispatch a few common cases/array types, and + * route all other arrays through a slower implementation using vtkDataArray's + * API. With vtkDataArrayAccessor, a single templated worker function can be + * used to generate both. + * + * Note that while this interface provides both component-wise and + * tuple access, the tuple methods are discouraged as they are + * significantly slower as they copy data into a temporary array, and + * prevent many advanced compiler optimizations that are possible when + * using the component accessors. In other words, prefer the methods + * that operate on a single component instead of an entire tuple when + * performance matters. + * + * A standard usage pattern of this class would be: + * + * @code + * // vtkArrayDispatch worker struct: + * struct Worker + * { + * // Templated worker function: + * template + * void operator()(ArrayT *array) + * { + * // The accessor: + * vtkDataArrayAccessor accessor(array); + * // The data type used by ArrayT's API, use this for + * // temporary/intermediate results: + * typedef typename vtkDataArrayAccessor::APIType APIType; + * + * // Do work using accessor to set/get values.... + * } + * }; + * + * // Usage: + * Worker worker; + * vtkDataArray *array = ...; + * if (!vtkArrayDispatch::Dispatch::Execute(array, worker)) + * { + * // Dispatch failed: unknown array type. Fallback to vtkDataArray API: + * worker(array); + * } + * @endcode + * + * We define Worker::operator() as the templated worker function, restricting + * all data accesses to go through the 'accessor' object (methods like + * GetNumberOfTuples, GetNumberOfComponents, etc should be called on the array + * itself). + * + * This worker is passed into an array dispatcher, which tests 'array' to see + * if it can figure out the array subclass. If it does, Worker is instantiated + * with ArrayT set to the array's subclass, resulting in efficient code. If + * Dispatch::Execute returns false (meaning the array type is not recognized), + * the worker is executed using the vtkDataArray pointer. While slower, this + * ensures that less-common cases will still be handled -- all from one worker + * function template. + * + * .SEE ALSO + * vtkArrayDispatch +*/ #include "vtkDataArray.h" #include "vtkGenericDataArray.h" diff --git a/Common/Core/vtkDataArrayCollection.h b/Common/Core/vtkDataArrayCollection.h index 39dd1e9686b6dfcfa1c456689cbc3c1ca7222c06..7f69f2971be72c99d0508a331cddb76034177d8e 100644 --- a/Common/Core/vtkDataArrayCollection.h +++ b/Common/Core/vtkDataArrayCollection.h @@ -12,10 +12,13 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkDataArrayCollection - maintain an unordered list of dataarray objects -// .SECTION Description -// vtkDataArrayCollection is an object that creates and manipulates lists of -// datasets. See also vtkCollection and subclasses. +/** + * @class vtkDataArrayCollection + * @brief maintain an unordered list of dataarray objects + * + * vtkDataArrayCollection is an object that creates and manipulates lists of + * datasets. See also vtkCollection and subclasses. +*/ #ifndef vtkDataArrayCollection_h #define vtkDataArrayCollection_h @@ -31,26 +34,30 @@ public: static vtkDataArrayCollection *New(); vtkTypeMacro(vtkDataArrayCollection,vtkCollection); - // Description: - // Add a dataarray to the list. + /** + * Add a dataarray to the list. + */ void AddItem(vtkDataArray *ds) { this->vtkCollection::AddItem(ds); } - // Description: - // Get the next dataarray in the list. + /** + * Get the next dataarray in the list. + */ vtkDataArray *GetNextItem() { return static_cast(this->GetNextItemAsObject());}; - // Description: - // Get the ith dataarray in the list. + /** + * Get the ith dataarray in the list. + */ vtkDataArray *GetItem(int i) { return static_cast(this->GetItemAsObject(i));}; - // Description: - // Reentrant safe way to get an object in a collection. Just pass the - // same cookie back and forth. + /** + * Reentrant safe way to get an object in a collection. Just pass the + * same cookie back and forth. + */ vtkDataArray *GetNextDataArray(vtkCollectionSimpleIterator &cookie) { return static_cast(this->GetNextItemAsObject(cookie));}; diff --git a/Common/Core/vtkDataArrayCollectionIterator.h b/Common/Core/vtkDataArrayCollectionIterator.h index 77b3c2bfdc6aab3d4d9f9f60f2e506a3d1bf5b0d..c35ef83e12579f0c0f631b05da3fc64450283a0e 100644 --- a/Common/Core/vtkDataArrayCollectionIterator.h +++ b/Common/Core/vtkDataArrayCollectionIterator.h @@ -12,11 +12,14 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkDataArrayCollectionIterator - iterator through a vtkDataArrayCollection. -// .SECTION Description -// vtkDataArrayCollectionIterator provides an implementation of -// vtkCollectionIterator which allows the items to be retrieved with -// the proper subclass pointer type for vtkDataArrayCollection. +/** + * @class vtkDataArrayCollectionIterator + * @brief iterator through a vtkDataArrayCollection. + * + * vtkDataArrayCollectionIterator provides an implementation of + * vtkCollectionIterator which allows the items to be retrieved with + * the proper subclass pointer type for vtkDataArrayCollection. +*/ #ifndef vtkDataArrayCollectionIterator_h #define vtkDataArrayCollectionIterator_h @@ -34,14 +37,18 @@ public: void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE; static vtkDataArrayCollectionIterator* New(); - // Description: - // Set the collection over which to iterate. + //@{ + /** + * Set the collection over which to iterate. + */ void SetCollection(vtkCollection*) VTK_OVERRIDE; void SetCollection(vtkDataArrayCollection*); + //@} - // Description: - // Get the item at the current iterator position. Valid only when - // IsDoneWithTraversal() returns 1. + /** + * Get the item at the current iterator position. Valid only when + * IsDoneWithTraversal() returns 1. + */ vtkDataArray* GetDataArray(); protected: diff --git a/Common/Core/vtkDataArrayIteratorMacro.h b/Common/Core/vtkDataArrayIteratorMacro.h index 7c4638bf93f4e6ee49325b70d367e45001a49ff7..bcfc61e25d2468248c7301a0ba284e4f14be780c 100644 --- a/Common/Core/vtkDataArrayIteratorMacro.h +++ b/Common/Core/vtkDataArrayIteratorMacro.h @@ -12,72 +12,75 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkDataArrayIteratorMacro - A macro for obtaining iterators to -// vtkDataArray data when the array implementation and type are unknown. -// -// .SECTION Description -// -// NOTE: This macro is deprecated and should not be used any longer. Use -// vtkArrayDispatch and the vtkGenericDataArray API instead of -// vtkDataArrayIteratorMacro and vtkTypedDataArrayIterator. -// -// See vtkTemplateMacro. -// This macro is similar, but defines several additional typedefs and variables -// for safely iterating through data in a vtkAbstractArray container: -// - vtkDAValueType is typedef'd to the array's element value type. -// - vtkDAContainerType is typedef'd to the most derived class of -// vtkAbstractArray for which a suitable iterator has been found. -// - vtkDAIteratorType is typedef'd to the most suitable iterator type found. -// - vtkDABegin is an object of vtkDAIteratorType that points to the first -// component of the first tuple in the array. -// - vtkDAEnd is an object of vtkDAIteratorType that points to the element -// *after* the last component of the last tuple in the array. -// The primary advantage to using this macro is that arrays with non-standard -// memory layouts will be safely handled, and dangerous calls to GetVoidPointer -// are avoided. -// For arrays with > 1 component, the iterator will proceed through all -// components of a tuple before moving on to the next tuple. -// This matches the memory layout of the standard vtkDataArray subclasses such -// as vtkFloatArray. -// -// For the standard vtkDataArray implementations (which are subclasses of -// vtkAOSDataArrayTemplate), the iterators will simply be pointers to the raw -// memory of the array. -// This allows very fast iteration when possible, and permits compiler -// optimizations in the standard template library to occur (such as reducing -// std::copy to memmove). -// -// For arrays that are subclasses of vtkTypedDataArray, a -// vtkTypedDataArrayIterator is used. -// Such iterators safely traverse the array using API calls and have -// pointer-like semantics, but add about a 35% performance overhead compared -// with iterating over the raw memory (measured by summing a vtkFloatArray -// containing 10M values on GCC 4.8.1 with -O3 optimization using both iterator -// types -- see TestDataArrayIterators). -// -// For arrays that are not subclasses of vtkTypedDataArray, there is no reliably -// safe way to iterate over the array elements. -// In such cases, this macro performs the legacy behavior of casting -// vtkAbstractArray::GetVoidPointer(...) to vtkDAValueType* to create the -// iterators. -// -// To use this macro, create a templated worker function: -// -// template -// void myFunc(Iterator begin, Iterator end, ...) {...} -// -// and then call the vtkDataArrayIteratorMacro inside of a switch statement -// using the above objects and typedefs as needed: -// -// vtkAbstractArray *someArray = ...; -// switch (someArray->GetDataType()) -// { -// vtkDataArrayIteratorMacro(someArray, myFunc(vtkDABegin, vtkDAEnd, ...)); -// } -// -// .SECTION See Also -// vtkArrayDispatch vtkGenericDataArray -// vtkTemplateMacro vtkTypedDataArrayIterator +/** + * @class vtkDataArrayIteratorMacro + * @brief A macro for obtaining iterators to + * vtkDataArray data when the array implementation and type are unknown. + * + * + * + * NOTE: This macro is deprecated and should not be used any longer. Use + * vtkArrayDispatch and the vtkGenericDataArray API instead of + * vtkDataArrayIteratorMacro and vtkTypedDataArrayIterator. + * + * See vtkTemplateMacro. + * This macro is similar, but defines several additional typedefs and variables + * for safely iterating through data in a vtkAbstractArray container: + * - vtkDAValueType is typedef'd to the array's element value type. + * - vtkDAContainerType is typedef'd to the most derived class of + * vtkAbstractArray for which a suitable iterator has been found. + * - vtkDAIteratorType is typedef'd to the most suitable iterator type found. + * - vtkDABegin is an object of vtkDAIteratorType that points to the first + * component of the first tuple in the array. + * - vtkDAEnd is an object of vtkDAIteratorType that points to the element + * *after* the last component of the last tuple in the array. + * The primary advantage to using this macro is that arrays with non-standard + * memory layouts will be safely handled, and dangerous calls to GetVoidPointer + * are avoided. + * For arrays with > 1 component, the iterator will proceed through all + * components of a tuple before moving on to the next tuple. + * This matches the memory layout of the standard vtkDataArray subclasses such + * as vtkFloatArray. + * + * For the standard vtkDataArray implementations (which are subclasses of + * vtkAOSDataArrayTemplate), the iterators will simply be pointers to the raw + * memory of the array. + * This allows very fast iteration when possible, and permits compiler + * optimizations in the standard template library to occur (such as reducing + * std::copy to memmove). + * + * For arrays that are subclasses of vtkTypedDataArray, a + * vtkTypedDataArrayIterator is used. + * Such iterators safely traverse the array using API calls and have + * pointer-like semantics, but add about a 35% performance overhead compared + * with iterating over the raw memory (measured by summing a vtkFloatArray + * containing 10M values on GCC 4.8.1 with -O3 optimization using both iterator + * types -- see TestDataArrayIterators). + * + * For arrays that are not subclasses of vtkTypedDataArray, there is no reliably + * safe way to iterate over the array elements. + * In such cases, this macro performs the legacy behavior of casting + * vtkAbstractArray::GetVoidPointer(...) to vtkDAValueType* to create the + * iterators. + * + * To use this macro, create a templated worker function: + * + * template + * void myFunc(Iterator begin, Iterator end, ...) {...} + * + * and then call the vtkDataArrayIteratorMacro inside of a switch statement + * using the above objects and typedefs as needed: + * + * vtkAbstractArray *someArray = ...; + * switch (someArray->GetDataType()) + * { + * vtkDataArrayIteratorMacro(someArray, myFunc(vtkDABegin, vtkDAEnd, ...)); + * } + * + * @sa + * vtkArrayDispatch vtkGenericDataArray + * vtkTemplateMacro vtkTypedDataArrayIterator +*/ #ifndef vtkDataArrayIteratorMacro_h #define vtkDataArrayIteratorMacro_h diff --git a/Common/Core/vtkDataArraySelection.h b/Common/Core/vtkDataArraySelection.h index c34f0209cdf984844b43a734348bc494889fa1f2..04b8b918e9ea3ba51b6577ed949bbdedeea96fdf 100644 --- a/Common/Core/vtkDataArraySelection.h +++ b/Common/Core/vtkDataArraySelection.h @@ -12,13 +12,16 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkDataArraySelection - Store on/off settings for data arrays for a vtkSource. -// .SECTION Description -// vtkDataArraySelection can be used by vtkSource subclasses to store -// on/off settings for whether each vtkDataArray in its input should -// be passed in the source's output. This is primarily intended to -// allow file readers to configure what data arrays are read from the -// file. +/** + * @class vtkDataArraySelection + * @brief Store on/off settings for data arrays for a vtkSource. + * + * vtkDataArraySelection can be used by vtkSource subclasses to store + * on/off settings for whether each vtkDataArray in its input should + * be passed in the source's output. This is primarily intended to + * allow file readers to configure what data arrays are read from the + * file. +*/ #ifndef vtkDataArraySelection_h #define vtkDataArraySelection_h @@ -35,101 +38,125 @@ public: void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE; static vtkDataArraySelection* New(); - // Description: - // Enable the array with the given name. Creates a new entry if - // none exists. + /** + * Enable the array with the given name. Creates a new entry if + * none exists. + */ void EnableArray(const char* name); - // Description: - // Disable the array with the given name. Creates a new entry if - // none exists. + /** + * Disable the array with the given name. Creates a new entry if + * none exists. + */ void DisableArray(const char* name); - // Description: - // Return whether the array with the given name is enabled. If - // there is no entry, the array is assumed to be disabled. + /** + * Return whether the array with the given name is enabled. If + * there is no entry, the array is assumed to be disabled. + */ int ArrayIsEnabled(const char* name); - // Description: - // Return whether the array with the given name exists. + /** + * Return whether the array with the given name exists. + */ int ArrayExists(const char* name); - // Description: - // Enable all arrays that currently have an entry. + /** + * Enable all arrays that currently have an entry. + */ void EnableAllArrays(); - // Description: - // Disable all arrays that currently have an entry. + /** + * Disable all arrays that currently have an entry. + */ void DisableAllArrays(); - // Description: - // Get the number of arrays that currently have an entry. + /** + * Get the number of arrays that currently have an entry. + */ int GetNumberOfArrays(); - // Description: - // Get the number of arrays that are enabled. + /** + * Get the number of arrays that are enabled. + */ int GetNumberOfArraysEnabled(); - // Description: - // Get the name of the array entry at the given index. + /** + * Get the name of the array entry at the given index. + */ const char* GetArrayName(int index); - // Description: - // Get an index of the array with the given name. + /** + * Get an index of the array with the given name. + */ int GetArrayIndex(const char *name); - // Description: - // Get the index of an array with the given name among those - // that are enabled. Returns -1 if the array is not enabled. + /** + * Get the index of an array with the given name among those + * that are enabled. Returns -1 if the array is not enabled. + */ int GetEnabledArrayIndex(const char* name); - // Description: - // Get whether the array at the given index is enabled. + //@{ + /** + * Get whether the array at the given index is enabled. + */ int GetArraySetting(const char* name) { return this->GetArraySetting(this->GetArrayIndex(name)); } int GetArraySetting(int index); + //@} - // Description: - // Remove all array entries. + /** + * Remove all array entries. + */ void RemoveAllArrays(); - // Description: - // Add to the list of arrays that have entries. For arrays that - // already have entries, the settings are untouched. For arrays - // that don't already have an entry, they are assumed to be enabled. - // This method should be called only by the filter owning this - // object. + /** + * Add to the list of arrays that have entries. For arrays that + * already have entries, the settings are untouched. For arrays + * that don't already have an entry, they are assumed to be enabled. + * This method should be called only by the filter owning this + * object. + */ int AddArray(const char* name); - // Description: - // Remove an array setting given its index. + /** + * Remove an array setting given its index. + */ void RemoveArrayByIndex(int index); - // Description: - // Remove an array setting given its name. + /** + * Remove an array setting given its name. + */ void RemoveArrayByName(const char* name); - // Description: - // Set the list of arrays that have entries. For arrays that - // already have entries, the settings are copied. For arrays that - // don't already have an entry, they are assigned the given default - // status. If no default status is given, it is assumed to be on. - // There will be no more entries than the names given. This method - // should be called only by the filter owning this object. The - // signature with the default must have a different name due to a - // bug in the Borland C++ 5.5 compiler. + //@{ + /** + * Set the list of arrays that have entries. For arrays that + * already have entries, the settings are copied. For arrays that + * don't already have an entry, they are assigned the given default + * status. If no default status is given, it is assumed to be on. + * There will be no more entries than the names given. This method + * should be called only by the filter owning this object. The + * signature with the default must have a different name due to a + * bug in the Borland C++ 5.5 compiler. + */ void SetArrays(const char* const* names, int numArrays); void SetArraysWithDefault(const char* const* names, int numArrays, int defaultStatus); + //@} - // Description: - // Copy the selections from the given vtkDataArraySelection instance. + //@{ + /** + * Copy the selections from the given vtkDataArraySelection instance. + */ void CopySelections(vtkDataArraySelection* selections); protected: vtkDataArraySelection(); ~vtkDataArraySelection() VTK_OVERRIDE; + //@} // Internal implementation details. vtkDataArraySelectionInternals* Internal; diff --git a/Common/Core/vtkDataArrayTemplate.h b/Common/Core/vtkDataArrayTemplate.h index 448d7d83de594a3e7751db52929bebb5e7ac2afb..cca9cc8657a12e696aa5e899362fad9270555e0b 100644 --- a/Common/Core/vtkDataArrayTemplate.h +++ b/Common/Core/vtkDataArrayTemplate.h @@ -12,9 +12,11 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkDataArrayTemplate -// .SECTION Description -// vtkDataArrayTemplate is deprecated, use vtkAOSDataArrayTemplate instead. +/** + * @class vtkDataArrayTemplate + * + * vtkDataArrayTemplate is deprecated, use vtkAOSDataArrayTemplate instead. +*/ #ifndef vtkDataArrayTemplate_h #define vtkDataArrayTemplate_h diff --git a/Common/Core/vtkDebugLeaks.h b/Common/Core/vtkDebugLeaks.h index 8ecd9abd4a195f23d17e22ad556d84c9944b3ba5..e4c0de6788f7a3d02715f8f02b11540ba043b04c 100644 --- a/Common/Core/vtkDebugLeaks.h +++ b/Common/Core/vtkDebugLeaks.h @@ -12,16 +12,19 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkDebugLeaks - identify memory leaks at program termination -// .SECTION Description -// vtkDebugLeaks is used to report memory leaks at the exit of the program. -// It uses the vtkObjectFactory to intercept the construction of all VTK -// objects. It uses the UnRegister method of vtkObject to intercept the -// destruction of all objects. A table of object name to number of instances -// is kept. At the exit of the program if there are still VTK objects around -// it will print them out. To enable this class add the flag -// -DVTK_DEBUG_LEAKS to the compile line, and rebuild vtkObject and -// vtkObjectFactory. +/** + * @class vtkDebugLeaks + * @brief identify memory leaks at program termination + * + * vtkDebugLeaks is used to report memory leaks at the exit of the program. + * It uses the vtkObjectFactory to intercept the construction of all VTK + * objects. It uses the UnRegister method of vtkObject to intercept the + * destruction of all objects. A table of object name to number of instances + * is kept. At the exit of the program if there are still VTK objects around + * it will print them out. To enable this class add the flag + * -DVTK_DEBUG_LEAKS to the compile line, and rebuild vtkObject and + * vtkObjectFactory. +*/ #ifndef vtkDebugLeaks_h #define vtkDebugLeaks_h @@ -42,24 +45,30 @@ public: static vtkDebugLeaks *New(); vtkTypeMacro(vtkDebugLeaks,vtkObject); - // Description: - // Call this when creating a class of a given name. + /** + * Call this when creating a class of a given name. + */ static void ConstructClass(const char* classname); - // Description: - // Call this when deleting a class of a given name. + /** + * Call this when deleting a class of a given name. + */ static void DestructClass(const char* classname); - // Description: - // Print all the values in the table. Returns non-zero if there - // were leaks. + /** + * Print all the values in the table. Returns non-zero if there + * were leaks. + */ static int PrintCurrentLeaks(); - // Description: - // Get/Set flag for exiting with an error when leaks are present. - // Default is on when VTK_DEBUG_LEAKS is on and off otherwise. + //@{ + /** + * Get/Set flag for exiting with an error when leaks are present. + * Default is on when VTK_DEBUG_LEAKS is on and off otherwise. + */ static int GetExitError(); static void SetExitError(int); + //@} static void SetDebugLeaksObserver(vtkDebugLeaksObserver* observer); static vtkDebugLeaksObserver* GetDebugLeaksObserver(); diff --git a/Common/Core/vtkDebugLeaksManager.h b/Common/Core/vtkDebugLeaksManager.h index c479794701acf5470728c919af8912e772511b50..028b27f17c2fe4b0ea54d77f7da39c8545256a49 100644 --- a/Common/Core/vtkDebugLeaksManager.h +++ b/Common/Core/vtkDebugLeaksManager.h @@ -12,12 +12,15 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkDebugLeaksManager - Manages the vtkDebugLeaks singleton. -// .SECTION Description -// vtkDebugLeaksManager should be included in any translation unit -// that will use vtkDebugLeaks or that implements the singleton -// pattern. It makes sure that the vtkDebugLeaks singleton is created -// before and destroyed after all other singletons in VTK. +/** + * @class vtkDebugLeaksManager + * @brief Manages the vtkDebugLeaks singleton. + * + * vtkDebugLeaksManager should be included in any translation unit + * that will use vtkDebugLeaks or that implements the singleton + * pattern. It makes sure that the vtkDebugLeaks singleton is created + * before and destroyed after all other singletons in VTK. +*/ #ifndef vtkDebugLeaksManager_h #define vtkDebugLeaksManager_h diff --git a/Common/Core/vtkDenseArray.h b/Common/Core/vtkDenseArray.h index 4b0e37814f001df6239ab5ae08e5aeb94cfc5775..c068ba46f289e71dad2b6c4ba21c652fadf1443d 100644 --- a/Common/Core/vtkDenseArray.h +++ b/Common/Core/vtkDenseArray.h @@ -19,26 +19,29 @@ =========================================================================*/ -// .NAME vtkDenseArray - Contiguous storage for N-way arrays. -// -// .SECTION Description -// vtkDenseArray is a concrete vtkArray implementation that stores values -// using a contiguous block of memory. Values are stored with fortran ordering, -// meaning that if you iterated over the memory block, the left-most coordinates -// would vary the fastest. -// -// In addition to the retrieval and update methods provided by vtkTypedArray, -// vtkDenseArray provides methods to: -// -// Fill the entire array with a specific value. -// -// Retrieve a pointer to the storage memory block. -// -// .SECTION See Also -// vtkArray, vtkTypedArray, vtkSparseArray -// -// .SECTION Thanks -// Developed by Timothy M. Shead (tshead@sandia.gov) at Sandia National Laboratories. +/** + * @class vtkDenseArray + * @brief Contiguous storage for N-way arrays. + * + * + * vtkDenseArray is a concrete vtkArray implementation that stores values + * using a contiguous block of memory. Values are stored with fortran ordering, + * meaning that if you iterated over the memory block, the left-most coordinates + * would vary the fastest. + * + * In addition to the retrieval and update methods provided by vtkTypedArray, + * vtkDenseArray provides methods to: + * + * Fill the entire array with a specific value. + * + * Retrieve a pointer to the storage memory block. + * + * @sa + * vtkArray, vtkTypedArray, vtkSparseArray + * + * @par Thanks: + * Developed by Timothy M. Shead (tshead@sandia.gov) at Sandia National Laboratories. +*/ #ifndef vtkDenseArray_h #define vtkDenseArray_h @@ -80,23 +83,29 @@ public: // vtkDenseArray API - // Description: - // Strategy object that contains a block of memory to be used by vtkDenseArray - // for value storage. The MemoryBlock object is responsible for freeing - // memory when destroyed. + /** + * Strategy object that contains a block of memory to be used by vtkDenseArray + * for value storage. The MemoryBlock object is responsible for freeing + * memory when destroyed. + */ class MemoryBlock { public: virtual ~MemoryBlock(); - // Description: - // Returns a pointer to the block of memory to be used for storage. + //@{ + /** + * Returns a pointer to the block of memory to be used for storage. + */ virtual T* GetAddress() = 0; }; - - // Description: - // MemoryBlock implementation that manages internally-allocated memory using - // new[] and delete[]. Note: HeapMemoryBlock is the default used by vtkDenseArray - // for its "normal" internal memory allocation. + //@} + + //@{ + /** + * MemoryBlock implementation that manages internally-allocated memory using + * new[] and delete[]. Note: HeapMemoryBlock is the default used by vtkDenseArray + * for its "normal" internal memory allocation. + */ class HeapMemoryBlock : public MemoryBlock { @@ -104,57 +113,66 @@ public: HeapMemoryBlock(const vtkArrayExtents& extents); ~HeapMemoryBlock() VTK_OVERRIDE; T* GetAddress() VTK_OVERRIDE; + //@} private: T* Storage; }; - // Description: - // MemoryBlock implementation that manages a static (will not be freed) memory block. + //@{ + /** + * MemoryBlock implementation that manages a static (will not be freed) memory block. + */ class StaticMemoryBlock : public MemoryBlock { public: StaticMemoryBlock(T* const storage); virtual T* GetAddress(); + //@} private: T* Storage; }; - // Description: - // Initializes the array to use an externally-allocated memory block. The supplied - // MemoryBlock must be large enough to store extents.GetSize() values. The contents of - // the memory must be stored contiguously with fortran ordering, - // - // Dimension-labels are undefined after calling ExternalStorage() - you should - // initialize them accordingly. - // - // The array will use the supplied memory for storage until the array goes out of - // scope, is configured to use a different memory block by calling ExternalStorage() - // again, or is configured to use internally-allocated memory by calling Resize(). - // - // Note that the array will delete the supplied memory block when it is no longer in use. - // caller's responsibility to ensure that the memory does not go out-of-scope until - // the array has been destroyed or is no longer using it. + /** + * Initializes the array to use an externally-allocated memory block. The supplied + * MemoryBlock must be large enough to store extents.GetSize() values. The contents of + * the memory must be stored contiguously with fortran ordering, + + * Dimension-labels are undefined after calling ExternalStorage() - you should + * initialize them accordingly. + + * The array will use the supplied memory for storage until the array goes out of + * scope, is configured to use a different memory block by calling ExternalStorage() + * again, or is configured to use internally-allocated memory by calling Resize(). + + * Note that the array will delete the supplied memory block when it is no longer in use. + * caller's responsibility to ensure that the memory does not go out-of-scope until + * the array has been destroyed or is no longer using it. + */ void ExternalStorage(const vtkArrayExtents& extents, MemoryBlock* storage); - // Description: - // Fills every element in the array with the given value. + /** + * Fills every element in the array with the given value. + */ void Fill(const T& value); - // Description: - // Returns a value by-reference, which is useful for performance and code-clarity. + /** + * Returns a value by-reference, which is useful for performance and code-clarity. + */ T& operator[](const vtkArrayCoordinates& coordinates); - // Description: - // Returns a read-only reference to the underlying storage. Values are stored - // contiguously with fortran ordering. + /** + * Returns a read-only reference to the underlying storage. Values are stored + * contiguously with fortran ordering. + */ const T* GetStorage() const; - // Description: - // Returns a mutable reference to the underlying storage. Values are stored - // contiguously with fortran ordering. Use at your own risk! + /** + * Returns a mutable reference to the underlying storage. Values are stored + * contiguously with fortran ordering. Use at your own risk! + */ T* GetStorage(); protected: @@ -177,31 +195,41 @@ private: typedef vtkDenseArray ThisT; - // Description: - // Stores the current array extents (its size along each dimension) + /** + * Stores the current array extents (its size along each dimension) + */ vtkArrayExtents Extents; - // Description: - // Stores labels for each array dimension + /** + * Stores labels for each array dimension + */ std::vector DimensionLabels; - // Description: - // Manages array value memory storage. + /** + * Manages array value memory storage. + */ MemoryBlock* Storage; - // Description: - // Stores array values using a contiguous range of memory - // with constant-time value lookup. + //@{ + /** + * Stores array values using a contiguous range of memory + * with constant-time value lookup. + */ T* Begin; T* End; + //@} - // Description: - // Stores the offset along each array dimension (used for fast lookups). + /** + * Stores the offset along each array dimension (used for fast lookups). + */ std::vector Offsets; - // Description: - // Stores the stride along each array dimension (used for fast lookups). + //@{ + /** + * Stores the stride along each array dimension (used for fast lookups). + */ std::vector Strides; }; + //@} #include "vtkDenseArray.txx" diff --git a/Common/Core/vtkDoubleArray.h b/Common/Core/vtkDoubleArray.h index 6408196bf0b2ed4a7156bae32d73eb5dbff8e5c8..dec3c6bf23b65f10c2cdb61242d05fd2e3d98062 100644 --- a/Common/Core/vtkDoubleArray.h +++ b/Common/Core/vtkDoubleArray.h @@ -12,11 +12,14 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkDoubleArray - dynamic, self-adjusting array of double -// .SECTION Description -// vtkDoubleArray is an array of values of type double. It provides -// methods for insertion and retrieval of values and will -// automatically resize itself to hold new data. +/** + * @class vtkDoubleArray + * @brief dynamic, self-adjusting array of double + * + * vtkDoubleArray is an array of values of type double. It provides + * methods for insertion and retrieval of values and will + * automatically resize itself to hold new data. +*/ #ifndef vtkDoubleArray_h #define vtkDoubleArray_h @@ -46,19 +49,22 @@ public: vtkCreateWrappedArrayInterface(double); #endif - // Description: - // A faster alternative to SafeDownCast for downcasting vtkAbstractArrays. + /** + * A faster alternative to SafeDownCast for downcasting vtkAbstractArrays. + */ static vtkDoubleArray* FastDownCast(vtkAbstractArray *source) { return static_cast(Superclass::FastDownCast(source)); } - // Description: - // Get the minimum data value in its native type. + /** + * Get the minimum data value in its native type. + */ static double GetDataTypeValueMin() { return VTK_DOUBLE_MIN; } - // Description: - // Get the maximum data value in its native type. + /** + * Get the maximum data value in its native type. + */ static double GetDataTypeValueMax() { return VTK_DOUBLE_MAX; } protected: diff --git a/Common/Core/vtkDynamicLoader.h b/Common/Core/vtkDynamicLoader.h index 3e04c50e333a98e95317fbae88a130bf48bbc156..076118be1b60c67ccd3e4d864223f6e66bce2ebb 100644 --- a/Common/Core/vtkDynamicLoader.h +++ b/Common/Core/vtkDynamicLoader.h @@ -12,12 +12,15 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkDynamicLoader - class interface to system dynamic libraries -// .SECTION Description -// vtkDynamicLoader provides a portable interface to loading dynamic -// libraries into a process. -// .SECTION See Also -// A more portable and lightweight solution is kwsys::DynamicLoader +/** + * @class vtkDynamicLoader + * @brief class interface to system dynamic libraries + * + * vtkDynamicLoader provides a portable interface to loading dynamic + * libraries into a process. + * @sa + * A more portable and lightweight solution is kwsys::DynamicLoader +*/ #ifndef vtkDynamicLoader_h #define vtkDynamicLoader_h @@ -36,32 +39,38 @@ public: static vtkDynamicLoader* New(); vtkTypeMacro(vtkDynamicLoader,vtkObject); - // Description: - // Load a dynamic library into the current process. - // The returned vtkLibHandle can be used to access the symbols in the - // library. + /** + * Load a dynamic library into the current process. + * The returned vtkLibHandle can be used to access the symbols in the + * library. + */ static vtkLibHandle OpenLibrary(const char*); - // Description: - // Attempt to detach a dynamic library from the - // process. A value of true is returned if it is successful. + /** + * Attempt to detach a dynamic library from the + * process. A value of true is returned if it is successful. + */ static int CloseLibrary(vtkLibHandle); - // Description: - // Find the address of the symbol in the given library - //static vtkSymbolPointer GetSymbolAddress(vtkLibHandle, const char*); + /** + * Find the address of the symbol in the given library + * static vtkSymbolPointer GetSymbolAddress(vtkLibHandle, const char*); + */ static void* GetSymbolAddress(vtkLibHandle, const char*); - // Description: - // Return the library prefix for the given architecture + /** + * Return the library prefix for the given architecture + */ static const char* LibPrefix(); - // Description: - // Return the library extension for the given architecture + /** + * Return the library extension for the given architecture + */ static const char* LibExtension(); - // Description: - // Return the last error produced from a calls made on this class. + /** + * Return the last error produced from a calls made on this class. + */ static const char* LastError(); protected: diff --git a/Common/Core/vtkEventForwarderCommand.h b/Common/Core/vtkEventForwarderCommand.h index baabcb2096d413b83b506e69ebffc2ee9f0a4c8a..72bec30ae0d19007400727970f929bcd7f6d2606 100644 --- a/Common/Core/vtkEventForwarderCommand.h +++ b/Common/Core/vtkEventForwarderCommand.h @@ -12,15 +12,18 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkEventForwarderCommand - a simple event forwarder command -// .SECTION Description -// Use vtkEventForwarderCommand to forward an event to a new object. -// This command will intercept the event, and use InvokeEvent -// on a 'target' as if that object was the one that invoked the event instead -// of the object this commmand was attached to using AddObserver. -// -// .SECTION See Also -// vtkCommand +/** + * @class vtkEventForwarderCommand + * @brief a simple event forwarder command + * + * Use vtkEventForwarderCommand to forward an event to a new object. + * This command will intercept the event, and use InvokeEvent + * on a 'target' as if that object was the one that invoked the event instead + * of the object this commmand was attached to using AddObserver. + * + * @sa + * vtkCommand +*/ #ifndef vtkEventForwarderCommand_h #define vtkEventForwarderCommand_h @@ -36,18 +39,20 @@ public: static vtkEventForwarderCommand *New() {return new vtkEventForwarderCommand;}; - // Description: - // Satisfy the superclass API for callbacks. Recall that the caller is - // the instance invoking the event; eid is the event id (see - // vtkCommand.h); and calldata is information sent when the callback - // was invoked (e.g., progress value in the vtkCommand::ProgressEvent). + /** + * Satisfy the superclass API for callbacks. Recall that the caller is + * the instance invoking the event; eid is the event id (see + * vtkCommand.h); and calldata is information sent when the callback + * was invoked (e.g., progress value in the vtkCommand::ProgressEvent). + */ void Execute(vtkObject *caller, unsigned long eid, void *callData) VTK_OVERRIDE; - // Description: - // Methods to set and get client and callback information, and the callback - // function. + /** + * Methods to set and get client and callback information, and the callback + * function. + */ virtual void SetTarget(vtkObject *obj) { this->Target = obj; } virtual void* GetTarget() diff --git a/Common/Core/vtkFileOutputWindow.h b/Common/Core/vtkFileOutputWindow.h index a926505ef42b298130d03211c0f8535a59ca43c9..13deee3d85f6a7371b259f67e67d93d8c3dfd534 100644 --- a/Common/Core/vtkFileOutputWindow.h +++ b/Common/Core/vtkFileOutputWindow.h @@ -12,11 +12,14 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkFileOutputWindow - File Specific output window class -// .SECTION Description -// Writes debug/warning/error output to a log file instead of the console. -// To use this class, instantiate it and then call SetInstance(this). -// +/** + * @class vtkFileOutputWindow + * @brief File Specific output window class + * + * Writes debug/warning/error output to a log file instead of the console. + * To use this class, instantiate it and then call SetInstance(this). + * +*/ #ifndef vtkFileOutputWindow_h #define vtkFileOutputWindow_h @@ -34,31 +37,41 @@ public: void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE; - // Description: - // Put the text into the log file. - // New lines are converted to carriage return new lines. + /** + * Put the text into the log file. + * New lines are converted to carriage return new lines. + */ void DisplayText(const char*) VTK_OVERRIDE; - // Description: - // Sets the name for the log file. + //@{ + /** + * Sets the name for the log file. + */ vtkSetStringMacro(FileName); vtkGetStringMacro(FileName); + //@} - // Description: - // Turns on buffer flushing for the output - // to the log file. + //@{ + /** + * Turns on buffer flushing for the output + * to the log file. + */ vtkSetMacro(Flush, int); vtkGetMacro(Flush, int); vtkBooleanMacro(Flush, int); - - // Description: - // Setting append will cause the log file to be - // opened in append mode. Otherwise, if the log file exists, - // it will be overwritten each time the vtkFileOutputWindow - // is created. + //@} + + //@{ + /** + * Setting append will cause the log file to be + * opened in append mode. Otherwise, if the log file exists, + * it will be overwritten each time the vtkFileOutputWindow + * is created. + */ vtkSetMacro(Append, int); vtkGetMacro(Append, int); vtkBooleanMacro(Append, int); + //@} protected: vtkFileOutputWindow(); diff --git a/Common/Core/vtkFloatArray.h b/Common/Core/vtkFloatArray.h index 9903ab8aee9f718630f13c6650c5a5d997248cf5..0421896554e59d6a468a83738c78052d6f11c6ec 100644 --- a/Common/Core/vtkFloatArray.h +++ b/Common/Core/vtkFloatArray.h @@ -12,11 +12,14 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkFloatArray - dynamic, self-adjusting array of float -// .SECTION Description -// vtkFloatArray is an array of values of type float. It provides -// methods for insertion and retrieval of values and will -// automatically resize itself to hold new data. +/** + * @class vtkFloatArray + * @brief dynamic, self-adjusting array of float + * + * vtkFloatArray is an array of values of type float. It provides + * methods for insertion and retrieval of values and will + * automatically resize itself to hold new data. +*/ #ifndef vtkFloatArray_h #define vtkFloatArray_h @@ -47,19 +50,22 @@ public: vtkCreateWrappedArrayInterface(float); #endif - // Description: - // A faster alternative to SafeDownCast for downcasting vtkAbstractArrays. + /** + * A faster alternative to SafeDownCast for downcasting vtkAbstractArrays. + */ static vtkFloatArray* FastDownCast(vtkAbstractArray *source) { return static_cast(Superclass::FastDownCast(source)); } - // Description: - // Get the minimum data value in its native type. + /** + * Get the minimum data value in its native type. + */ static float GetDataTypeValueMin() { return VTK_FLOAT_MIN; } - // Description: - // Get the maximum data value in its native type. + /** + * Get the maximum data value in its native type. + */ static float GetDataTypeValueMax() { return VTK_FLOAT_MAX; } diff --git a/Common/Core/vtkFloatingPointExceptions.h b/Common/Core/vtkFloatingPointExceptions.h index 14f3cb13ce25dd39b97ed6c94eba28e2ec45ca30..c79b1ce37ac223f4dcc5e570944250da16a34b63 100644 --- a/Common/Core/vtkFloatingPointExceptions.h +++ b/Common/Core/vtkFloatingPointExceptions.h @@ -12,13 +12,16 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkFloatingPointExceptions - Deal with floating-point exceptions -// .SECTION Description -// Right now it is really basic and it only provides a function to enable -// floating point exceptions on some compilers. -// Note that Borland C++ has floating-point exceptions by default, not -// Visual studio nor gcc. It is mainly use to optionally enable floating -// point exceptions in the C++ tests. +/** + * @class vtkFloatingPointExceptions + * @brief Deal with floating-point exceptions + * + * Right now it is really basic and it only provides a function to enable + * floating point exceptions on some compilers. + * Note that Borland C++ has floating-point exceptions by default, not + * Visual studio nor gcc. It is mainly use to optionally enable floating + * point exceptions in the C++ tests. +*/ #ifndef vtkFloatingPointExceptions_h #define vtkFloatingPointExceptions_h @@ -29,12 +32,14 @@ class VTKCOMMONCORE_EXPORT vtkFloatingPointExceptions { public: - // Description: - // Enable floating point exceptions. + /** + * Enable floating point exceptions. + */ static void Enable(); - // Description: - // Disable floating point exceptions. + /** + * Disable floating point exceptions. + */ static void Disable(); private: diff --git a/Common/Core/vtkGarbageCollector.h b/Common/Core/vtkGarbageCollector.h index 41348b49eefbc26d44c4bb69864bb08153378320..8c25046d42a864001be0f5221db919c30903ac40 100644 --- a/Common/Core/vtkGarbageCollector.h +++ b/Common/Core/vtkGarbageCollector.h @@ -12,66 +12,69 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkGarbageCollector - Detect and break reference loops -// .SECTION Description -// vtkGarbageCollector is used by VTK classes that may be involved in -// reference counting loops (such as Algorithm <-> Executive). It -// detects strongly connected components of the reference graph that -// have been leaked deletes them. The garbage collector uses the -// ReportReferences method to search the reference graph and construct -// a net reference count for each connected component. If the net -// reference count is zero the entire set of objects is deleted. -// Deleting each component may leak other components, which are then -// collected recursively. -// -// To enable garbage collection for a class, add these members: -// -// \code -// -// public: -// void Register(vtkObjectBase* o) VTK_OVERRIDE -// { -// this->RegisterInternal(o, true); -// } -// void UnRegister(vtkObjectBase* o) VTK_OVERRIDE -// { -// this->UnRegisterInternal(o, true); -// } -// -// protected: -// -// void ReportReferences(vtkGarbageCollector* collector) VTK_OVERRIDE -// { -// // Report references held by this object that may be in a loop. -// this->Superclass::ReportReferences(collector); -// vtkGarbageCollectorReport(collector, this->OtherObject, "Other Object"); -// } -// \endcode -// -// The implementations should be in the .cxx file in practice. -// It is important that the reference be reported using the real -// pointer or smart pointer instance that holds the reference. When -// collecting the garbage collector will actually set this pointer to -// NULL. The destructor of the class should be written to deal with -// this. It is also expected that an invariant is maintained for any -// reference that is reported. The variable holding the reference -// must always either be NULL or refer to a fully constructed valid -// object. Therefore code like "this->Object->UnRegister(this)" must -// be avoided if "this->Object" is a reported reference because it -// is possible that the object is deleted before UnRegister returns -// but then "this->Object" will be left as a dangling pointer. Instead -// use code like -// -// \code -// vtkObjectBase* obj = this->Object; -// this->Object = 0; -// obj->UnRegister(this); -// \endcode -// -// so that the reported reference maintains the invariant. -// -// If subclassing from a class that already supports garbage -// collection, one need only provide the ReportReferences method. +/** + * @class vtkGarbageCollector + * @brief Detect and break reference loops + * + * vtkGarbageCollector is used by VTK classes that may be involved in + * reference counting loops (such as Algorithm <-> Executive). It + * detects strongly connected components of the reference graph that + * have been leaked deletes them. The garbage collector uses the + * ReportReferences method to search the reference graph and construct + * a net reference count for each connected component. If the net + * reference count is zero the entire set of objects is deleted. + * Deleting each component may leak other components, which are then + * collected recursively. + * + * To enable garbage collection for a class, add these members: + * + * \code + * + * public: + * void Register(vtkObjectBase* o) VTK_OVERRIDE + * { + * this->RegisterInternal(o, true); + * } + * void UnRegister(vtkObjectBase* o) VTK_OVERRIDE + * { + * this->UnRegisterInternal(o, true); + * } + * + * protected: + * + * void ReportReferences(vtkGarbageCollector* collector) VTK_OVERRIDE + * { + * // Report references held by this object that may be in a loop. + * this->Superclass::ReportReferences(collector); + * vtkGarbageCollectorReport(collector, this->OtherObject, "Other Object"); + * } + * \endcode + * + * The implementations should be in the .cxx file in practice. + * It is important that the reference be reported using the real + * pointer or smart pointer instance that holds the reference. When + * collecting the garbage collector will actually set this pointer to + * NULL. The destructor of the class should be written to deal with + * this. It is also expected that an invariant is maintained for any + * reference that is reported. The variable holding the reference + * must always either be NULL or refer to a fully constructed valid + * object. Therefore code like "this->Object->UnRegister(this)" must + * be avoided if "this->Object" is a reported reference because it + * is possible that the object is deleted before UnRegister returns + * but then "this->Object" will be left as a dangling pointer. Instead + * use code like + * + * \code + * vtkObjectBase* obj = this->Object; + * this->Object = 0; + * obj->UnRegister(this); + * \endcode + * + * so that the reported reference maintains the invariant. + * + * If subclassing from a class that already supports garbage + * collection, one need only provide the ReportReferences method. +*/ #ifndef vtkGarbageCollector_h #define vtkGarbageCollector_h @@ -97,44 +100,52 @@ public: void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE; static vtkGarbageCollector* New(); - // Description: - // Collect immediately using any objects whose collection was - // previously deferred as a root for the reference graph walk. - // Strongly connected components in the reference graph are - // identified. Those with a net reference count of zero are - // deleted. When a component is deleted it may remove references to - // other components that are not part of the same reference loop but - // are held by objects in the original component. These removed - // references are handled as any other and their corresponding - // checks may be deferred. This method keeps collecting until no - // deferred collection checks remain. + /** + * Collect immediately using any objects whose collection was + * previously deferred as a root for the reference graph walk. + * Strongly connected components in the reference graph are + * identified. Those with a net reference count of zero are + * deleted. When a component is deleted it may remove references to + * other components that are not part of the same reference loop but + * are held by objects in the original component. These removed + * references are handled as any other and their corresponding + * checks may be deferred. This method keeps collecting until no + * deferred collection checks remain. + */ static void Collect(); - // Description: - // Collect immediately using the given object as the root for a - // reference graph walk. Strongly connected components in the - // reference graph are identified. Those with a net reference count - // of zero are deleted. When a component is deleted it may remove - // references to other components that are not part of the same - // reference loop but are held by objects in the original component. - // These removed references are handled as any other and their - // corresponding checks may be deferred. This method does continue - // collecting in this case. + /** + * Collect immediately using the given object as the root for a + * reference graph walk. Strongly connected components in the + * reference graph are identified. Those with a net reference count + * of zero are deleted. When a component is deleted it may remove + * references to other components that are not part of the same + * reference loop but are held by objects in the original component. + * These removed references are handled as any other and their + * corresponding checks may be deferred. This method does continue + * collecting in this case. + */ static void Collect(vtkObjectBase* root); - // Description: - // Push/Pop whether to do deferred collection. Whenever the total - // number of pushes exceeds the total number of pops collection will - // be deferred. Code can call the Collect method directly to force - // collection. + //@{ + /** + * Push/Pop whether to do deferred collection. Whenever the total + * number of pushes exceeds the total number of pops collection will + * be deferred. Code can call the Collect method directly to force + * collection. + */ static void DeferredCollectionPush(); static void DeferredCollectionPop(); + //@} - // Description: - // Set/Get global garbage collection debugging flag. When set to true, - // all garbage collection checks will produce debugging information. + //@{ + /** + * Set/Get global garbage collection debugging flag. When set to true, + * all garbage collection checks will produce debugging information. + */ static void SetGlobalDebugFlag(bool flag); static bool GetGlobalDebugFlag(); + //@} protected: vtkGarbageCollector(); @@ -142,24 +153,26 @@ protected: private: - // Description: - // Called by UnRegister method of an object that supports garbage - // collection. The UnRegister may not actually decrement the - // reference count, but instead hands the reference to the garbage - // collector. If a reference can be given, this method accepts it - // from the caller by returning 1. If the reference cannot be - // accepted then it returns 0. This may be the case when delayed - // garbage collection is disabled, or when the collector has decided - // it is time to do a check. + /** + * Called by UnRegister method of an object that supports garbage + * collection. The UnRegister may not actually decrement the + * reference count, but instead hands the reference to the garbage + * collector. If a reference can be given, this method accepts it + * from the caller by returning 1. If the reference cannot be + * accepted then it returns 0. This may be the case when delayed + * garbage collection is disabled, or when the collector has decided + * it is time to do a check. + */ static int GiveReference(vtkObjectBase* obj); - // Description: - // Called by Register method of an object that supports garbage - // collection. The Register may not actually increment the - // reference count if it can take a reference previously handed to - // the garbage collector. If a reference can be taken, this method - // hands it back to the caller by returning 1. If no reference is - // available, returns 0. + /** + * Called by Register method of an object that supports garbage + * collection. The Register may not actually increment the + * reference count if it can take a reference previously handed to + * the garbage collector. If a reference can be taken, this method + * hands it back to the caller by returning 1. If no reference is + * available, returns 0. + */ static int TakeReference(vtkObjectBase* obj); // Singleton management functions. @@ -183,15 +196,17 @@ private: class vtkSmartPointerBase; -// Description: -// Function to report a reference held by a smart pointer to a collector. +/** + * Function to report a reference held by a smart pointer to a collector. + */ void VTKCOMMONCORE_EXPORT vtkGarbageCollectorReport(vtkGarbageCollector* collector, vtkSmartPointerBase& ptr, const char* desc); -// Description: -// Function to report a reference held by a raw pointer to a collector. +/** + * Function to report a reference held by a raw pointer to a collector. + */ template void vtkGarbageCollectorReport(vtkGarbageCollector* collector, T*& ptr, const char* desc) diff --git a/Common/Core/vtkGarbageCollectorManager.h b/Common/Core/vtkGarbageCollectorManager.h index 5ca86d9efcc609d7f3adfb2a12c260ba812805f9..81379f0038b4c1a679c3dc99a23fdecb9934b33e 100644 --- a/Common/Core/vtkGarbageCollectorManager.h +++ b/Common/Core/vtkGarbageCollectorManager.h @@ -12,12 +12,15 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkGarbageCollectorManager - Manages the vtkGarbageCollector singleton. -// .SECTION Description -// vtkGarbageCollectorManager should be included in any translation unit -// that will use vtkGarbageCollector or that implements the singleton -// pattern. It makes sure that the vtkGarbageCollector singleton is created -// before and destroyed after it is used. +/** + * @class vtkGarbageCollectorManager + * @brief Manages the vtkGarbageCollector singleton. + * + * vtkGarbageCollectorManager should be included in any translation unit + * that will use vtkGarbageCollector or that implements the singleton + * pattern. It makes sure that the vtkGarbageCollector singleton is created + * before and destroyed after it is used. +*/ #ifndef vtkGarbageCollectorManager_h #define vtkGarbageCollectorManager_h diff --git a/Common/Core/vtkGaussianRandomSequence.h b/Common/Core/vtkGaussianRandomSequence.h index 6bee5fdcfd885b256752c31cbf95401f33f0ef1f..d12dbc40af915d282a4a219bf3b378ce61a4039c 100644 --- a/Common/Core/vtkGaussianRandomSequence.h +++ b/Common/Core/vtkGaussianRandomSequence.h @@ -11,13 +11,16 @@ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkGaussianRandomSequence - Gaussian sequence of pseudo random numbers -// .SECTION Description -// vtkGaussianRandomSequence is a sequence of pseudo random numbers -// distributed according to the Gaussian/normal distribution (mean=0 and -// standard deviation=1) -// -// This is just an interface. +/** + * @class vtkGaussianRandomSequence + * @brief Gaussian sequence of pseudo random numbers + * + * vtkGaussianRandomSequence is a sequence of pseudo random numbers + * distributed according to the Gaussian/normal distribution (mean=0 and + * standard deviation=1) + * + * This is just an interface. +*/ #ifndef vtkGaussianRandomSequence_h #define vtkGaussianRandomSequence_h @@ -31,11 +34,12 @@ public: vtkTypeMacro(vtkGaussianRandomSequence,vtkRandomSequence); void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE; - // Description: - // Convenient method to return a value given the mean and standard deviation - // of the Gaussian distribution from the the Gaussian distribution of mean=0 - // and standard deviation=1.0. There is an initial implementation that can - // be overridden by a subclass. + /** + * Convenient method to return a value given the mean and standard deviation + * of the Gaussian distribution from the the Gaussian distribution of mean=0 + * and standard deviation=1.0. There is an initial implementation that can + * be overridden by a subclass. + */ virtual double GetScaledValue(double mean, double standardDeviation); diff --git a/Common/Core/vtkGenericDataArray.h b/Common/Core/vtkGenericDataArray.h index f5053af667efa8505c23278c0f10c64da3d0e49d..d48f770accd0682fc5e11654767b9c4bf38c624b 100644 --- a/Common/Core/vtkGenericDataArray.h +++ b/Common/Core/vtkGenericDataArray.h @@ -12,53 +12,56 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkGenericDataArray - Base interface for all typed vtkDataArray -// subclasses. -// -// .SECTION Description -// -// A more detailed description of this class and related tools can be found -// \ref VTK-7-1-ArrayDispatch "here". -// -// The vtkGenericDataArray class provides a generic implementation of the -// vtkDataArray API. It relies on subclasses providing access to data -// via 8 "concept methods", which should be implemented as non-virtual -// methods of the subclass. These methods are: -// -// - ValueType GetValue(vtkIdType valueIdx) const -// - [public] void SetValue(vtkIdType valueIdx, ValueType value) -// - [public] void GetTypedTuple(vtkIdType tupleIdx, ValueType* tuple) const -// - [public] void SetTypedTuple(vtkIdType tupleIdx, const ValueType* tuple) -// - [public] ValueType GetTypedComponent(vtkIdType tupleIdx, int compIdx) const -// - [public] void SetTypedComponent(vtkIdType tupleIdx, int compIdx, -// ValueType value) -// - [protected] bool AllocateTuples(vtkIdType numTuples) -// - [protected] bool ReallocateTuples(vtkIdType numTuples) -// -// Note that these methods use the CRTP idiom, which provides static binding to -// avoid virtual calls. This allows the compiler to optimize away layers of -// indirection when these methods are used. Well-designed implementations -// of these methods will reduce to raw memory accesses, providing efficient -// performance comparable to working with the pointer data. -// -// See vtkAOSDataArrayTemplate and vtkSOADataArrayTemplate for example -// implementations. -// -// In practice, code should not be written to use vtkGenericDataArray objects. -// Doing so is rather unweildy due to the CRTP pattern requiring the derived -// class be provided as a template argument. Instead, the vtkArrayDispatch -// framework can be used to detect a vtkDataArray's implementation type and -// instantiate appropriate templated worker code. -// -// vtkArrayDispatch is also intended to replace code that currently relies on -// the encapsulation-breaking GetVoidPointer method. Not all subclasses of -// vtkDataArray use the memory layout assumed by GetVoidPointer; calling this -// method on, e.g. a vtkSOADataArrayTemplate will trigger a deep copy of the -// array data into an AOS buffer. This is very inefficient and should be -// avoided. -// -// .SECTION See Also -// vtkArrayDispatcher vtkDataArrayAccessor +/** + * @class vtkGenericDataArray + * @brief Base interface for all typed vtkDataArray + * subclasses. + * + * + * + * A more detailed description of this class and related tools can be found + * \ref VTK-7-1-ArrayDispatch "here". + * + * The vtkGenericDataArray class provides a generic implementation of the + * vtkDataArray API. It relies on subclasses providing access to data + * via 8 "concept methods", which should be implemented as non-virtual + * methods of the subclass. These methods are: + * + * - ValueType GetValue(vtkIdType valueIdx) const + * - [public] void SetValue(vtkIdType valueIdx, ValueType value) + * - [public] void GetTypedTuple(vtkIdType tupleIdx, ValueType* tuple) const + * - [public] void SetTypedTuple(vtkIdType tupleIdx, const ValueType* tuple) + * - [public] ValueType GetTypedComponent(vtkIdType tupleIdx, int compIdx) const + * - [public] void SetTypedComponent(vtkIdType tupleIdx, int compIdx, + * ValueType value) + * - [protected] bool AllocateTuples(vtkIdType numTuples) + * - [protected] bool ReallocateTuples(vtkIdType numTuples) + * + * Note that these methods use the CRTP idiom, which provides static binding to + * avoid virtual calls. This allows the compiler to optimize away layers of + * indirection when these methods are used. Well-designed implementations + * of these methods will reduce to raw memory accesses, providing efficient + * performance comparable to working with the pointer data. + * + * See vtkAOSDataArrayTemplate and vtkSOADataArrayTemplate for example + * implementations. + * + * In practice, code should not be written to use vtkGenericDataArray objects. + * Doing so is rather unweildy due to the CRTP pattern requiring the derived + * class be provided as a template argument. Instead, the vtkArrayDispatch + * framework can be used to detect a vtkDataArray's implementation type and + * instantiate appropriate templated worker code. + * + * vtkArrayDispatch is also intended to replace code that currently relies on + * the encapsulation-breaking GetVoidPointer method. Not all subclasses of + * vtkDataArray use the memory layout assumed by GetVoidPointer; calling this + * method on, e.g. a vtkSOADataArrayTemplate will trigger a deep copy of the + * array data into an AOS buffer. This is very inefficient and should be + * avoided. + * + * @sa + * vtkArrayDispatcher vtkDataArrayAccessor +*/ #ifndef vtkGenericDataArray_h #define vtkGenericDataArray_h @@ -78,8 +81,9 @@ public: typedef ValueTypeT ValueType; vtkTemplateTypeMacro(SelfType, vtkDataArray) - // Description: - // Compile time access to the VTK type identifier. + /** + * Compile time access to the VTK type identifier. + */ enum { VTK_DATA_TYPE = vtkTypeTraits::VTK_TYPE_ID }; /// @defgroup vtkGDAConceptMethods vtkGenericDataArray Concept Methods @@ -87,125 +91,145 @@ public: /// non-virtual methods. Ideally, they should be inlined and as efficient as /// possible to ensure the best performance possible. - // Description: - // Get the value at @a valueIdx. @a valueIdx assumes AOS ordering. - // @note GetTypedComponent is preferred over this method. It is faster for - // SOA arrays, and shows equivalent performance for AOS arrays when - // NumberOfComponents is known to the compiler (See vtkAssume.h). - // @ingroup vtkGDAConceptMethods + /** + * Get the value at @a valueIdx. @a valueIdx assumes AOS ordering. + * @note GetTypedComponent is preferred over this method. It is faster for + * SOA arrays, and shows equivalent performance for AOS arrays when + * NumberOfComponents is known to the compiler (See vtkAssume.h). + * @ingroup vtkGDAConceptMethods + */ inline ValueType GetValue(vtkIdType valueIdx) const { return static_cast(this)->GetValue(valueIdx); } - // Description: - // Set the value at @a valueIdx to @a value. @a valueIdx assumes AOS ordering. - // @note SetTypedComponent is preferred over this method. It is faster for - // SOA arrays, and shows equivalent performance for AOS arrays when - // NumberOfComponents is known to the compiler (See vtkAssume.h). - // @ingroup vtkGDAConceptMethods + /** + * Set the value at @a valueIdx to @a value. @a valueIdx assumes AOS ordering. + * @note SetTypedComponent is preferred over this method. It is faster for + * SOA arrays, and shows equivalent performance for AOS arrays when + * NumberOfComponents is known to the compiler (See vtkAssume.h). + * @ingroup vtkGDAConceptMethods + */ inline void SetValue(vtkIdType valueIdx, ValueType value) { static_cast(this)->SetValue(valueIdx, value); } - // Description: - // Copy the tuple at @a tupleIdx into @a tuple. - // @note GetTypedComponent is preferred over this method. The overhead of - // copying the tuple is significant compared to the more performant - // component-wise access methods, which typically optimize to raw memory - // access. - // @ingroup vtkGDAConceptMethods + /** + * Copy the tuple at @a tupleIdx into @a tuple. + * @note GetTypedComponent is preferred over this method. The overhead of + * copying the tuple is significant compared to the more performant + * component-wise access methods, which typically optimize to raw memory + * access. + * @ingroup vtkGDAConceptMethods + */ inline void GetTypedTuple(vtkIdType tupleIdx, ValueType* tuple) const { static_cast(this)->GetTypedTuple(tupleIdx, tuple); } - // Description: - // Set this array's tuple at @a tupleIdx to the values in @a tuple. - // @note SetTypedComponent is preferred over this method. The overhead of - // copying the tuple is significant compared to the more performant - // component-wise access methods, which typically optimize to raw memory - // access. - // @ingroup vtkGDAConceptMethods + /** + * Set this array's tuple at @a tupleIdx to the values in @a tuple. + * @note SetTypedComponent is preferred over this method. The overhead of + * copying the tuple is significant compared to the more performant + * component-wise access methods, which typically optimize to raw memory + * access. + * @ingroup vtkGDAConceptMethods + */ inline void SetTypedTuple(vtkIdType tupleIdx, const ValueType* tuple) { static_cast(this)->SetTypedTuple(tupleIdx, tuple); } - // Description: - // Get component @a compIdx of the tuple at @a tupleIdx. This is typically - // the fastest way to access array data. - // @ingroup vtkGDAConceptMethods + /** + * Get component @a compIdx of the tuple at @a tupleIdx. This is typically + * the fastest way to access array data. + * @ingroup vtkGDAConceptMethods + */ inline ValueType GetTypedComponent(vtkIdType tupleIdx, int compIdx) const { return static_cast(this)->GetTypedComponent(tupleIdx, compIdx); } - // Description: - // Set component @a compIdx of the tuple at @a tupleIdx to @a value. This is - // typically the fastest way to set array data. - // @ingroup vtkGDAConceptMethods + /** + * Set component @a compIdx of the tuple at @a tupleIdx to @a value. This is + * typically the fastest way to set array data. + * @ingroup vtkGDAConceptMethods + */ inline void SetTypedComponent(vtkIdType tupleIdx, int compIdx, ValueType value) { static_cast(this)->SetTypedComponent(tupleIdx, compIdx, value); } - // Description: - // Default implementation raises a runtime error. If subclasses keep on - // supporting this API, they should override this method. + //@{ + /** + * Default implementation raises a runtime error. If subclasses keep on + * supporting this API, they should override this method. + */ void *GetVoidPointer(vtkIdType valueIdx) VTK_OVERRIDE; ValueType* GetPointer(vtkIdType valueIdx); void SetVoidArray(void*, vtkIdType, int) VTK_OVERRIDE; void SetVoidArray(void*, vtkIdType, int, int) VTK_OVERRIDE; void* WriteVoidPointer(vtkIdType valueIdx, vtkIdType numValues) VTK_OVERRIDE; ValueType* WritePointer(vtkIdType valueIdx, vtkIdType numValues); - - // Description: - // Removes a tuple at the given index. Default implementation - // iterates over tuples to move elements. Subclasses are - // encouraged to reimplemented this method to support faster implementations, - // if needed. + //@} + + /** + * Removes a tuple at the given index. Default implementation + * iterates over tuples to move elements. Subclasses are + * encouraged to reimplemented this method to support faster implementations, + * if needed. + */ void RemoveTuple(vtkIdType tupleIdx) VTK_OVERRIDE; - // Description: - // Insert data at the end of the array. Return its location in the array. + /** + * Insert data at the end of the array. Return its location in the array. + */ vtkIdType InsertNextValue(ValueType value); - // Description: - // Insert data at a specified position in the array. + /** + * Insert data at a specified position in the array. + */ void InsertValue(vtkIdType valueIdx, ValueType value); - // Description: - // Insert (memory allocation performed) the tuple t at tupleIdx. + /** + * Insert (memory allocation performed) the tuple t at tupleIdx. + */ void InsertTypedTuple(vtkIdType tupleIdx, const ValueType *t); - // Description: - // Insert (memory allocation performed) the tuple onto the end of the array. + /** + * Insert (memory allocation performed) the tuple onto the end of the array. + */ vtkIdType InsertNextTypedTuple(const ValueType *t); - // Description: - // Insert (memory allocation performed) the value at the specified tuple and - // component location. + /** + * Insert (memory allocation performed) the value at the specified tuple and + * component location. + */ void InsertTypedComponent(vtkIdType tupleIdx, int compIdx, ValueType val); - // Description: - // Get the range of array values for the given component in the - // native data type. + //@{ + /** + * Get the range of array values for the given component in the + * native data type. + */ void GetValueRange(ValueType range[2], int comp); ValueType *GetValueRange(int comp); + //@} - // Description: - // Get the range of array values for the 0th component in the - // native data type. + /** + * Get the range of array values for the 0th component in the + * native data type. + */ ValueType *GetValueRange() { return this->GetValueRange(0); } void GetValueRange(ValueType range[2]) { this->GetValueRange(range, 0); } - // Description: - // Return the capacity in typeof T units of the current array. - // TODO Leftover from vtkDataArrayTemplate, redundant with GetSize. Deprecate? + /** + * Return the capacity in typeof T units of the current array. + * TODO Leftover from vtkDataArrayTemplate, redundant with GetSize. Deprecate? + */ vtkIdType Capacity() { return this->Size; } int GetDataType() VTK_OVERRIDE; @@ -273,19 +297,21 @@ protected: vtkGenericDataArray(); ~vtkGenericDataArray() VTK_OVERRIDE; - // Description: - // Allocate space for numTuples. Old data is not preserved. If numTuples == 0, - // all data is freed. - // @ingroup vtkGDAConceptMethods + /** + * Allocate space for numTuples. Old data is not preserved. If numTuples == 0, + * all data is freed. + * @ingroup vtkGDAConceptMethods + */ inline bool AllocateTuples(vtkIdType numTuples) { return static_cast(this)->AllocateTuples(numTuples); } - // Description: - // Allocate space for numTuples. Old data is preserved. If numTuples == 0, - // all data is freed. - // @ingroup vtkGDAConceptMethods + /** + * Allocate space for numTuples. Old data is preserved. If numTuples == 0, + * all data is freed. + * @ingroup vtkGDAConceptMethods + */ inline bool ReallocateTuples(vtkIdType numTuples) { return static_cast(this)->ReallocateTuples(numTuples); diff --git a/Common/Core/vtkGenericDataArrayLookupHelper.h b/Common/Core/vtkGenericDataArrayLookupHelper.h index 764acbc4ea26d93bf76418d744c80212aba295a5..34038e430bf8a00d85777876fd880dee929f2276 100644 --- a/Common/Core/vtkGenericDataArrayLookupHelper.h +++ b/Common/Core/vtkGenericDataArrayLookupHelper.h @@ -12,9 +12,12 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkGenericDataArrayLookupHelper - internal class used by -// vtkGenericDataArray to support LookupValue. -// .SECTION Description +/** + * @class vtkGenericDataArrayLookupHelper + * @brief internal class used by + * vtkGenericDataArray to support LookupValue. + * +*/ #ifndef vtkGenericDataArrayLookupHelper_h #define vtkGenericDataArrayLookupHelper_h @@ -91,14 +94,17 @@ public: } } - // Description: - // Release any allocated memory for internal data-structures. + //@{ + /** + * Release any allocated memory for internal data-structures. + */ void ClearLookup() { free(this->SortedArray); this->SortedArray = NULL; this->SortedArraySize = 0; } + //@} private: vtkGenericDataArrayLookupHelper(const vtkGenericDataArrayLookupHelper&) VTK_DELETE_FUNCTION; diff --git a/Common/Core/vtkIOStream.h b/Common/Core/vtkIOStream.h index 5dc252facec58b0df5ab36e15a39e9029abd0b0a..34036c29e9b9be93111d5ad33fc0f67e746dcae6 100644 --- a/Common/Core/vtkIOStream.h +++ b/Common/Core/vtkIOStream.h @@ -12,9 +12,12 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkIOStream - Include C++ iostreams as used by VTK. -// .SECTION Description -// This header includes the proper streams. +/** + * @class vtkIOStream + * @brief Include C++ iostreams as used by VTK. + * + * This header includes the proper streams. +*/ #ifndef vtkIOStream_h #define vtkIOStream_h diff --git a/Common/Core/vtkIOStreamFwd.h b/Common/Core/vtkIOStreamFwd.h index 5b694291acc19b5f69416303d0f800056e1ebe22..569f1e32f8cf1cc2aa354a955add8e87d219bc4a 100644 --- a/Common/Core/vtkIOStreamFwd.h +++ b/Common/Core/vtkIOStreamFwd.h @@ -12,9 +12,12 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkIOStreamFwd - Forward-declare C++ iostreams as used by VTK. -// .SECTION Description -// This header forward-declares the proper streams. +/** + * @class vtkIOStreamFwd + * @brief Forward-declare C++ iostreams as used by VTK. + * + * This header forward-declares the proper streams. +*/ #ifndef vtkIOStreamFwd_h #define vtkIOStreamFwd_h diff --git a/Common/Core/vtkIdList.h b/Common/Core/vtkIdList.h index 3f7e836e3708f082df12d4ca32fd18555333882d..84c62e045fc57f5f42d87db40178250af5c30ebd 100644 --- a/Common/Core/vtkIdList.h +++ b/Common/Core/vtkIdList.h @@ -12,11 +12,14 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkIdList - list of point or cell ids -// .SECTION Description -// vtkIdList is used to represent and pass data id's between -// objects. vtkIdList may represent any type of integer id, but -// usually represents point and cell ids. +/** + * @class vtkIdList + * @brief list of point or cell ids + * + * vtkIdList is used to represent and pass data id's between + * objects. vtkIdList may represent any type of integer id, but + * usually represents point and cell ids. +*/ #ifndef vtkIdList_h #define vtkIdList_h @@ -31,93 +34,111 @@ public: void Initialize(); - // Description: - // Allocate a capacity for sz ids in the list and - // set the number of stored ids in the list to 0. - // strategy is not used. + /** + * Allocate a capacity for sz ids in the list and + * set the number of stored ids in the list to 0. + * strategy is not used. + */ int Allocate(const vtkIdType sz, const int strategy=0); vtkTypeMacro(vtkIdList,vtkObject); void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE; - // Description: - // Return the number of id's in the list. + /** + * Return the number of id's in the list. + */ vtkIdType GetNumberOfIds() {return this->NumberOfIds;}; - // Description: - // Return the id at location i. + /** + * Return the id at location i. + */ vtkIdType GetId(const vtkIdType i) {return this->Ids[i];}; - // Description: - // Specify the number of ids for this object to hold. Does an - // allocation as well as setting the number of ids. + /** + * Specify the number of ids for this object to hold. Does an + * allocation as well as setting the number of ids. + */ void SetNumberOfIds(const vtkIdType number); - // Description: - // Set the id at location i. Doesn't do range checking so it's a bit - // faster than InsertId. Make sure you use SetNumberOfIds() to allocate - // memory prior to using SetId(). + /** + * Set the id at location i. Doesn't do range checking so it's a bit + * faster than InsertId. Make sure you use SetNumberOfIds() to allocate + * memory prior to using SetId(). + */ void SetId(const vtkIdType i, const vtkIdType vtkid) {this->Ids[i] = vtkid;}; - // Description: - // Set the id at location i. Does range checking and allocates memory - // as necessary. + /** + * Set the id at location i. Does range checking and allocates memory + * as necessary. + */ void InsertId(const vtkIdType i, const vtkIdType vtkid); - // Description: - // Add the id specified to the end of the list. Range checking is performed. + /** + * Add the id specified to the end of the list. Range checking is performed. + */ vtkIdType InsertNextId(const vtkIdType vtkid); - // Description: - // If id is not already in list, insert it and return location in - // list. Otherwise return just location in list. + /** + * If id is not already in list, insert it and return location in + * list. Otherwise return just location in list. + */ vtkIdType InsertUniqueId(const vtkIdType vtkid); - // Description: - // Get a pointer to a particular data index. + /** + * Get a pointer to a particular data index. + */ vtkIdType *GetPointer(const vtkIdType i) {return this->Ids + i;}; - // Description: - // Get a pointer to a particular data index. Make sure data is allocated - // for the number of items requested. Set MaxId according to the number of - // data values requested. + /** + * Get a pointer to a particular data index. Make sure data is allocated + * for the number of items requested. Set MaxId according to the number of + * data values requested. + */ vtkIdType *WritePointer(const vtkIdType i, const vtkIdType number); - // Description: - // Specify an array of vtkIdType to use as the id list. This replaces the - // underlying array. This instance of vtkIdList takes ownership of the - // array, meaning that it deletes it on destruction (using delete[]). + /** + * Specify an array of vtkIdType to use as the id list. This replaces the + * underlying array. This instance of vtkIdList takes ownership of the + * array, meaning that it deletes it on destruction (using delete[]). + */ void SetArray(vtkIdType *array, vtkIdType size); - // Description: - // Reset to an empty state. + /** + * Reset to an empty state. + */ void Reset() {this->NumberOfIds = 0;}; - // Description: - // Free any unused memory. + /** + * Free any unused memory. + */ void Squeeze() {this->Resize(this->NumberOfIds);}; - // Description: - // Copy an id list by explicitly copying the internal array. + /** + * Copy an id list by explicitly copying the internal array. + */ void DeepCopy(vtkIdList *ids); - // Description: - // Delete specified id from list. Will remove all occurrences of id in list. + /** + * Delete specified id from list. Will remove all occurrences of id in list. + */ void DeleteId(vtkIdType vtkid); - // Description: - // Return -1 if id specified is not contained in the list; otherwise return - // the position in the list. + /** + * Return -1 if id specified is not contained in the list; otherwise return + * the position in the list. + */ vtkIdType IsId(vtkIdType vtkid); - // Description: - // Intersect this list with another vtkIdList. Updates current list according - // to result of intersection operation. + /** + * Intersect this list with another vtkIdList. Updates current list according + * to result of intersection operation. + */ void IntersectWith(vtkIdList* otherIds); - // Description: - // Adjust the size of the id list while maintaining its content (except - // when being truncated). + /** + * Adjust the size of the id list while maintaining its content (except + * when being truncated). + */ vtkIdType *Resize(const vtkIdType sz); // This method should become legacy diff --git a/Common/Core/vtkIdListCollection.h b/Common/Core/vtkIdListCollection.h index ba8f5416c210aae45170d14db755c6eefa65bf53..4511bfa322eda1df3dd4d2cbcd02d1638a97517d 100644 --- a/Common/Core/vtkIdListCollection.h +++ b/Common/Core/vtkIdListCollection.h @@ -12,10 +12,13 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkIdListCollection - maintain an unordered list of dataarray objects -// .SECTION Description -// vtkIdListCollection is an object that creates and manipulates lists of -// datasets. See also vtkCollection and subclasses. +/** + * @class vtkIdListCollection + * @brief maintain an unordered list of dataarray objects + * + * vtkIdListCollection is an object that creates and manipulates lists of + * datasets. See also vtkCollection and subclasses. +*/ #ifndef vtkIdListCollection_h #define vtkIdListCollection_h @@ -31,26 +34,30 @@ public: static vtkIdListCollection *New(); vtkTypeMacro(vtkIdListCollection,vtkCollection); - // Description: - // Add a dataset to the list. + /** + * Add a dataset to the list. + */ void AddItem(vtkIdList *ds) { this->vtkCollection::AddItem(ds); } - // Description: - // Get the next dataset in the list. + /** + * Get the next dataset in the list. + */ vtkIdList *GetNextItem() { return static_cast(this->GetNextItemAsObject());}; - // Description: - // Get the ith dataset in the list. + /** + * Get the ith dataset in the list. + */ vtkIdList *GetItem(int i) { return static_cast(this->GetItemAsObject(i));}; - // Description: - // Reentrant safe way to get an object in a collection. Just pass the - // same cookie back and forth. + /** + * Reentrant safe way to get an object in a collection. Just pass the + * same cookie back and forth. + */ vtkIdList *GetNextIdList(vtkCollectionSimpleIterator &cookie) { return static_cast(this->GetNextItemAsObject(cookie));}; diff --git a/Common/Core/vtkIdTypeArray.h b/Common/Core/vtkIdTypeArray.h index 82d6f6fbc483f475d5cbb90746e0883da66b21f3..5bb237af39f65e96ac55578d8f98059b2ef6d826 100644 --- a/Common/Core/vtkIdTypeArray.h +++ b/Common/Core/vtkIdTypeArray.h @@ -12,11 +12,14 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkIdTypeArray - dynamic, self-adjusting array of vtkIdType -// .SECTION Description -// vtkIdTypeArray is an array of values of type vtkIdType. -// It provides methods for insertion and retrieval of values and will -// automatically resize itself to hold new data. +/** + * @class vtkIdTypeArray + * @brief dynamic, self-adjusting array of vtkIdType + * + * vtkIdTypeArray is an array of values of type vtkIdType. + * It provides methods for insertion and retrieval of values and will + * automatically resize itself to hold new data. +*/ #ifndef vtkIdTypeArray_h #define vtkIdTypeArray_h @@ -46,8 +49,9 @@ public: vtkCreateWrappedArrayInterface(vtkIdType); #else - // Description: - // Get the data type. + /** + * Get the data type. + */ int GetDataType() VTK_OVERRIDE { // This needs to overwritten from superclass because @@ -59,19 +63,22 @@ public: } #endif - // Description: - // A faster alternative to SafeDownCast for downcasting vtkAbstractArrays. + /** + * A faster alternative to SafeDownCast for downcasting vtkAbstractArrays. + */ static vtkIdTypeArray* FastDownCast(vtkAbstractArray *source) { return static_cast(Superclass::FastDownCast(source)); } - // Description: - // Get the minimum data value in its native type. + /** + * Get the minimum data value in its native type. + */ static vtkIdType GetDataTypeValueMin() { return VTK_ID_MIN; } - // Description: - // Get the maximum data value in its native type. + /** + * Get the maximum data value in its native type. + */ static vtkIdType GetDataTypeValueMax() { return VTK_ID_MAX; } protected: diff --git a/Common/Core/vtkIndent.h b/Common/Core/vtkIndent.h index 33572e5c2e7250906aeea4b27c00ed6047d8546d..c1a158d9dbb1b1c1eef5e491207091f5b3de2422 100644 --- a/Common/Core/vtkIndent.h +++ b/Common/Core/vtkIndent.h @@ -13,10 +13,13 @@ =========================================================================*/ -// .NAME vtkIndent - a simple class to control print indentation -// .SECTION Description -// vtkIndent is used to control indentation during the chaining print -// process. This way nested objects can correctly indent themselves. +/** + * @class vtkIndent + * @brief a simple class to control print indentation + * + * vtkIndent is used to control indentation during the chaining print + * process. This way nested objects can correctly indent themselves. +*/ #ifndef vtkIndent_h #define vtkIndent_h @@ -34,13 +37,15 @@ public: explicit vtkIndent(int ind=0) {this->Indent=ind;}; static vtkIndent *New(); - // Description: - // Determine the next indentation level. Keep indenting by two until the - // max of forty. + /** + * Determine the next indentation level. Keep indenting by two until the + * max of forty. + */ vtkIndent GetNextIndent(); - // Description: - // Print out the indentation. Basically output a bunch of spaces. + /** + * Print out the indentation. Basically output a bunch of spaces. + */ friend VTKCOMMONCORE_EXPORT ostream& operator<<(ostream& os, const vtkIndent& o); protected: diff --git a/Common/Core/vtkInformation.h b/Common/Core/vtkInformation.h index 0d7729d841937a46401f1cd78a62deb7b7699964..633f78679a9eeac6242cb27ba4f8ff2d29a392ea 100644 --- a/Common/Core/vtkInformation.h +++ b/Common/Core/vtkInformation.h @@ -12,15 +12,18 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkInformation - Store vtkAlgorithm input/output information. -// .SECTION Description -// vtkInformation represents information and/or data for one input or -// one output of a vtkAlgorithm. It maps from keys to values of -// several data types. Instances of this class are collected in -// vtkInformationVector instances and passed to -// vtkAlgorithm::ProcessRequest calls. The information and -// data referenced by the instance on a particular input or output -// define the request made to the vtkAlgorithm instance. +/** + * @class vtkInformation + * @brief Store vtkAlgorithm input/output information. + * + * vtkInformation represents information and/or data for one input or + * one output of a vtkAlgorithm. It maps from keys to values of + * several data types. Instances of this class are collected in + * vtkInformationVector instances and passed to + * vtkAlgorithm::ProcessRequest calls. The information and + * data referenced by the instance on a particular input or output + * define the request made to the vtkAlgorithm instance. +*/ #ifndef vtkInformation_h #define vtkInformation_h @@ -82,46 +85,54 @@ public: VTKCOMMONCORE_EXPORT void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE; VTKCOMMONCORE_EXPORT void PrintKeys(ostream& os, vtkIndent indent); - // Description: - // Modified signature with no arguments that calls Modified - // on vtkObject superclass. + /** + * Modified signature with no arguments that calls Modified + * on vtkObject superclass. + */ VTKCOMMONCORE_EXPORT void Modified() VTK_OVERRIDE; - // Description: - // Modified signature that takes an information key as an argument. - // Sets the new MTime and invokes a modified event with the - // information key as call data. + /** + * Modified signature that takes an information key as an argument. + * Sets the new MTime and invokes a modified event with the + * information key as call data. + */ VTKCOMMONCORE_EXPORT void Modified(vtkInformationKey* key); - // Description: - // Clear all information entries. + /** + * Clear all information entries. + */ VTKCOMMONCORE_EXPORT void Clear(); - // Description: - // Return the number of keys in this information object (as would be returned - // by iterating over the keys). + /** + * Return the number of keys in this information object (as would be returned + * by iterating over the keys). + */ VTKCOMMONCORE_EXPORT int GetNumberOfKeys(); - // Description: - // Copy all information entries from the given vtkInformation - // instance. Any previously existing entries are removed. If - // deep==1, a deep copy of the information structure is performed (new - // instances of any contained vtkInformation and vtkInformationVector - // objects are created). + /** + * Copy all information entries from the given vtkInformation + * instance. Any previously existing entries are removed. If + * deep==1, a deep copy of the information structure is performed (new + * instances of any contained vtkInformation and vtkInformationVector + * objects are created). + */ VTKCOMMONCORE_EXPORT void Copy(vtkInformation* from, int deep=0); - // Description: - // Append all information entries from the given vtkInformation - // instance. If deep==1, a deep copy of the information structure is performed - // (new instances of any contained vtkInformation and vtkInformationVector - // objects are created). + /** + * Append all information entries from the given vtkInformation + * instance. If deep==1, a deep copy of the information structure is performed + * (new instances of any contained vtkInformation and vtkInformationVector + * objects are created). + */ VTKCOMMONCORE_EXPORT void Append(vtkInformation* from, int deep=0); - // Description: - // Copy the key/value pair associated with the given key in the - // given information object. If deep=1, a deep copy of the information - // structure is performed (new instances of any contained vtkInformation and - // vtkInformationVector objects are created). + //@{ + /** + * Copy the key/value pair associated with the given key in the + * given information object. If deep=1, a deep copy of the information + * structure is performed (new instances of any contained vtkInformation and + * vtkInformationVector objects are created). + */ VTKCOMMONCORE_EXPORT void CopyEntry(vtkInformation* from, vtkInformationKey* key, int deep=0); VTKCOMMONCORE_EXPORT void CopyEntry(vtkInformation* from, vtkInformationDataObjectKey* key, int deep=0); VTKCOMMONCORE_EXPORT void CopyEntry(vtkInformation* from, vtkInformationDoubleVectorKey* key, int deep=0); @@ -136,58 +147,79 @@ public: VTKCOMMONCORE_EXPORT void CopyEntry(vtkInformation* from, vtkInformationStringKey* key, int deep=0); VTKCOMMONCORE_EXPORT void CopyEntry(vtkInformation* from, vtkInformationStringVectorKey* key, int deep=0); VTKCOMMONCORE_EXPORT void CopyEntry(vtkInformation* from, vtkInformationUnsignedLongKey* key, int deep=0); - - // Description: - // Use the given key to lookup a list of other keys in the given - // information object. The key/value pairs associated with these - // other keys will be copied. If deep==1, a deep copy of the - // information structure is performed. + //@} + + /** + * Use the given key to lookup a list of other keys in the given + * information object. The key/value pairs associated with these + * other keys will be copied. If deep==1, a deep copy of the + * information structure is performed. + */ VTKCOMMONCORE_EXPORT void CopyEntries(vtkInformation* from, vtkInformationKeyVectorKey* key, int deep=0); - // Description: - // Check whether the given key appears in this information object. + /** + * Check whether the given key appears in this information object. + */ VTKCOMMONCORE_EXPORT int Has(vtkInformationKey* key); - // Description: - // Remove the given key and its data from this information object. + /** + * Remove the given key and its data from this information object. + */ VTKCOMMONCORE_EXPORT void Remove(vtkInformationKey* key); - // Description: - // Get/Set a request-valued entry. + //@{ + /** + * Get/Set a request-valued entry. + */ VTKCOMMONCORE_EXPORT void Set(vtkInformationRequestKey* key); VTKCOMMONCORE_EXPORT void Remove(vtkInformationRequestKey* key); VTKCOMMONCORE_EXPORT int Has(vtkInformationRequestKey* key); + //@} - // Description: - // Get/Set an integer-valued entry. + //@{ + /** + * Get/Set an integer-valued entry. + */ VTKCOMMONCORE_EXPORT void Set(vtkInformationIntegerKey* key, int value); VTKCOMMONCORE_EXPORT int Get(vtkInformationIntegerKey* key); VTKCOMMONCORE_EXPORT void Remove(vtkInformationIntegerKey* key); VTKCOMMONCORE_EXPORT int Has(vtkInformationIntegerKey* key); + //@} - // Description: - // Get/Set a vtkIdType-valued entry. + //@{ + /** + * Get/Set a vtkIdType-valued entry. + */ VTKCOMMONCORE_EXPORT void Set(vtkInformationIdTypeKey* key, vtkIdType value); VTKCOMMONCORE_EXPORT vtkIdType Get(vtkInformationIdTypeKey* key); VTKCOMMONCORE_EXPORT void Remove(vtkInformationIdTypeKey* key); VTKCOMMONCORE_EXPORT int Has(vtkInformationIdTypeKey* key); + //@} - // Description: - // Get/Set an double-valued entry. + //@{ + /** + * Get/Set an double-valued entry. + */ VTKCOMMONCORE_EXPORT void Set(vtkInformationDoubleKey* key, double value); VTKCOMMONCORE_EXPORT double Get(vtkInformationDoubleKey* key); VTKCOMMONCORE_EXPORT void Remove(vtkInformationDoubleKey* key); VTKCOMMONCORE_EXPORT int Has(vtkInformationDoubleKey* key); + //@} - // Description: - // Get/Set an variant-valued entry. + //@{ + /** + * Get/Set an variant-valued entry. + */ VTKCOMMONCORE_EXPORT void Set(vtkInformationVariantKey* key, const vtkVariant& value); VTKCOMMONCORE_EXPORT const vtkVariant& Get(vtkInformationVariantKey* key); VTKCOMMONCORE_EXPORT void Remove(vtkInformationVariantKey* key); VTKCOMMONCORE_EXPORT int Has(vtkInformationVariantKey* key); + //@} - // Description: - // Get/Set an integer-vector-valued entry. + //@{ + /** + * Get/Set an integer-vector-valued entry. + */ VTKCOMMONCORE_EXPORT void Append(vtkInformationIntegerVectorKey* key, int value); VTKCOMMONCORE_EXPORT void Set(vtkInformationIntegerVectorKey* key, const int* value, int length); VTKCOMMONCORE_EXPORT void Set(vtkInformationIntegerVectorKey* key, int value1, @@ -201,9 +233,12 @@ public: VTKCOMMONCORE_EXPORT int Length(vtkInformationIntegerVectorKey* key); VTKCOMMONCORE_EXPORT void Remove(vtkInformationIntegerVectorKey* key); VTKCOMMONCORE_EXPORT int Has(vtkInformationIntegerVectorKey* key); + //@} - // Description: - // Get/Set a string-vector-valued entry. + //@{ + /** + * Get/Set a string-vector-valued entry. + */ VTKCOMMONCORE_EXPORT void Append(vtkInformationStringVectorKey* key, const char* value); VTKCOMMONCORE_EXPORT void Set(vtkInformationStringVectorKey* key, const char* value, int idx = 0); VTKCOMMONCORE_EXPORT void Append(vtkInformationStringVectorKey* key, const std::string &value); @@ -212,25 +247,34 @@ public: VTKCOMMONCORE_EXPORT int Length(vtkInformationStringVectorKey* key); VTKCOMMONCORE_EXPORT void Remove(vtkInformationStringVectorKey* key); VTKCOMMONCORE_EXPORT int Has(vtkInformationStringVectorKey* key); + //@} - // Description: - // Get/Set an integer-pointer-valued entry. + //@{ + /** + * Get/Set an integer-pointer-valued entry. + */ VTKCOMMONCORE_EXPORT void Set(vtkInformationIntegerPointerKey* key, int* value, int length); VTKCOMMONCORE_EXPORT int* Get(vtkInformationIntegerPointerKey* key); VTKCOMMONCORE_EXPORT void Get(vtkInformationIntegerPointerKey* key, int* value); VTKCOMMONCORE_EXPORT int Length(vtkInformationIntegerPointerKey* key); VTKCOMMONCORE_EXPORT void Remove(vtkInformationIntegerPointerKey* key); VTKCOMMONCORE_EXPORT int Has(vtkInformationIntegerPointerKey* key); + //@} - // Description: - // Get/Set an unsigned-long-valued entry. + //@{ + /** + * Get/Set an unsigned-long-valued entry. + */ VTKCOMMONCORE_EXPORT void Set(vtkInformationUnsignedLongKey* key, unsigned long value); VTKCOMMONCORE_EXPORT unsigned long Get(vtkInformationUnsignedLongKey* key); VTKCOMMONCORE_EXPORT void Remove(vtkInformationUnsignedLongKey* key); VTKCOMMONCORE_EXPORT int Has(vtkInformationUnsignedLongKey* key); + //@} - // Description: - // Get/Set an double-vector-valued entry. + //@{ + /** + * Get/Set an double-vector-valued entry. + */ VTKCOMMONCORE_EXPORT void Append(vtkInformationDoubleVectorKey* key, double value); VTKCOMMONCORE_EXPORT void Set(vtkInformationDoubleVectorKey* key, const double* value, int length); VTKCOMMONCORE_EXPORT void Set(vtkInformationDoubleVectorKey* key, double value1, @@ -244,9 +288,12 @@ public: VTKCOMMONCORE_EXPORT int Length(vtkInformationDoubleVectorKey* key); VTKCOMMONCORE_EXPORT void Remove(vtkInformationDoubleVectorKey* key); VTKCOMMONCORE_EXPORT int Has(vtkInformationDoubleVectorKey* key); + //@} - // Description: - // Get/Set an variant-vector-valued entry. + //@{ + /** + * Get/Set an variant-vector-valued entry. + */ VTKCOMMONCORE_EXPORT void Append(vtkInformationVariantVectorKey* key, const vtkVariant& value); VTKCOMMONCORE_EXPORT void Set(vtkInformationVariantVectorKey* key, const vtkVariant* value, int length); VTKCOMMONCORE_EXPORT void Set(vtkInformationVariantVectorKey* key, const vtkVariant& value1, @@ -260,9 +307,12 @@ public: VTKCOMMONCORE_EXPORT int Length(vtkInformationVariantVectorKey* key); VTKCOMMONCORE_EXPORT void Remove(vtkInformationVariantVectorKey* key); VTKCOMMONCORE_EXPORT int Has(vtkInformationVariantVectorKey* key); + //@} - // Description: - // Get/Set an InformationKey-vector-valued entry. + //@{ + /** + * Get/Set an InformationKey-vector-valued entry. + */ VTKCOMMONCORE_EXPORT void Append(vtkInformationKeyVectorKey* key, vtkInformationKey* value); VTKCOMMONCORE_EXPORT void AppendUnique(vtkInformationKeyVectorKey* key, vtkInformationKey* value); VTKCOMMONCORE_EXPORT void Set(vtkInformationKeyVectorKey* key, vtkInformationKey*const * value, int length); @@ -273,6 +323,7 @@ public: VTKCOMMONCORE_EXPORT int Length(vtkInformationKeyVectorKey* key); VTKCOMMONCORE_EXPORT void Remove(vtkInformationKeyVectorKey* key); VTKCOMMONCORE_EXPORT int Has(vtkInformationKeyVectorKey* key); + //@} // Provide extra overloads of this method to avoid requiring user // code to include the headers for these key types. Avoid wrapping @@ -323,37 +374,51 @@ public: VTKCOMMONCORE_EXPORT void AppendUnique(vtkInformationKeyVectorKey* key, vtkInformationUnsignedLongKey* value); - // Description: - // Get/Set a string-valued entry. + //@{ + /** + * Get/Set a string-valued entry. + */ VTKCOMMONCORE_EXPORT void Set(vtkInformationStringKey* key, const char*); VTKCOMMONCORE_EXPORT void Set(vtkInformationStringKey* key, const std::string&); VTKCOMMONCORE_EXPORT const char* Get(vtkInformationStringKey* key); VTKCOMMONCORE_EXPORT void Remove(vtkInformationStringKey* key); VTKCOMMONCORE_EXPORT int Has(vtkInformationStringKey* key); + //@} - // Description: - // Get/Set an entry storing another vtkInformation instance. + //@{ + /** + * Get/Set an entry storing another vtkInformation instance. + */ VTKCOMMONCORE_EXPORT void Set(vtkInformationInformationKey* key, vtkInformation*); VTKCOMMONCORE_EXPORT vtkInformation* Get(vtkInformationInformationKey* key); VTKCOMMONCORE_EXPORT void Remove(vtkInformationInformationKey* key); VTKCOMMONCORE_EXPORT int Has(vtkInformationInformationKey* key); + //@} - // Description: - // Get/Set an entry storing a vtkInformationVector instance. + //@{ + /** + * Get/Set an entry storing a vtkInformationVector instance. + */ VTKCOMMONCORE_EXPORT void Set(vtkInformationInformationVectorKey* key, vtkInformationVector*); VTKCOMMONCORE_EXPORT vtkInformationVector* Get(vtkInformationInformationVectorKey* key); VTKCOMMONCORE_EXPORT void Remove(vtkInformationInformationVectorKey* key); VTKCOMMONCORE_EXPORT int Has(vtkInformationInformationVectorKey* key); + //@} - // Description: - // Get/Set an entry storing a vtkObjectBase instance. + //@{ + /** + * Get/Set an entry storing a vtkObjectBase instance. + */ VTKCOMMONCORE_EXPORT void Set(vtkInformationObjectBaseKey* key, vtkObjectBase*); VTKCOMMONCORE_EXPORT vtkObjectBase* Get(vtkInformationObjectBaseKey* key); VTKCOMMONCORE_EXPORT void Remove(vtkInformationObjectBaseKey* key); VTKCOMMONCORE_EXPORT int Has(vtkInformationObjectBaseKey* key); + //@} - // Description: - // Manipulate a ObjectBaseVector entry. + //@{ + /** + * Manipulate a ObjectBaseVector entry. + */ VTKCOMMONCORE_EXPORT void Append(vtkInformationObjectBaseVectorKey* key, vtkObjectBase *data); VTKCOMMONCORE_EXPORT void Set(vtkInformationObjectBaseVectorKey *key, @@ -367,17 +432,23 @@ public: VTKCOMMONCORE_EXPORT void Remove(vtkInformationObjectBaseVectorKey *key, int indexToRemove); VTKCOMMONCORE_EXPORT int Has(vtkInformationObjectBaseVectorKey *key); + //@} - // Description: - // Get/Set an entry storing a vtkDataObject instance. + //@{ + /** + * Get/Set an entry storing a vtkDataObject instance. + */ VTKCOMMONCORE_EXPORT void Set(vtkInformationDataObjectKey* key, vtkDataObject VTK_WRAP_EXTERN *); VTKCOMMONCORE_EXPORT vtkDataObject VTK_WRAP_EXTERN* Get(vtkInformationDataObjectKey* key); VTKCOMMONCORE_EXPORT void Remove(vtkInformationDataObjectKey* key); VTKCOMMONCORE_EXPORT int Has(vtkInformationDataObjectKey* key); + //@} - // Description: - // Upcast the given key instance. + //@{ + /** + * Upcast the given key instance. + */ VTKCOMMONCORE_EXPORT static vtkInformationKey* GetKey(vtkInformationDataObjectKey* key); VTKCOMMONCORE_EXPORT static vtkInformationKey* GetKey(vtkInformationDoubleKey* key); VTKCOMMONCORE_EXPORT static vtkInformationKey* GetKey(vtkInformationDoubleVectorKey* key); @@ -392,16 +463,23 @@ public: VTKCOMMONCORE_EXPORT static vtkInformationKey* GetKey(vtkInformationUnsignedLongKey* key); VTKCOMMONCORE_EXPORT static vtkInformationKey* GetKey(vtkInformationVariantKey* key); VTKCOMMONCORE_EXPORT static vtkInformationKey* GetKey(vtkInformationVariantVectorKey* key); + //@} - // Description: - // Initiate garbage collection when a reference is removed. + //@{ + /** + * Initiate garbage collection when a reference is removed. + */ VTKCOMMONCORE_EXPORT void Register(vtkObjectBase* o) VTK_OVERRIDE; VTKCOMMONCORE_EXPORT void UnRegister(vtkObjectBase* o) VTK_OVERRIDE; + //@} - // Description: - // Get/Set the Request ivar + //@{ + /** + * Get/Set the Request ivar + */ VTKCOMMONCORE_EXPORT void SetRequest(vtkInformationRequestKey* request); VTKCOMMONCORE_EXPORT vtkInformationRequestKey* GetRequest(); + //@} protected: VTKCOMMONCORE_EXPORT vtkInformation(); diff --git a/Common/Core/vtkInformationDataObjectKey.h b/Common/Core/vtkInformationDataObjectKey.h index 94e4232ff0d1602acbcc21b2de83559bbd0101d6..cd69d4406b4dee44cb39040f2bd93a29e9578283 100644 --- a/Common/Core/vtkInformationDataObjectKey.h +++ b/Common/Core/vtkInformationDataObjectKey.h @@ -12,10 +12,13 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkInformationDataObjectKey - Key for vtkDataObject values. -// .SECTION Description -// vtkInformationDataObjectKey is used to represent keys in -// vtkInformation for values that are vtkDataObject instances. +/** + * @class vtkInformationDataObjectKey + * @brief Key for vtkDataObject values. + * + * vtkInformationDataObjectKey is used to represent keys in + * vtkInformation for values that are vtkDataObject instances. +*/ #ifndef vtkInformationDataObjectKey_h #define vtkInformationDataObjectKey_h @@ -36,29 +39,35 @@ public: vtkInformationDataObjectKey(const char* name, const char* location); ~vtkInformationDataObjectKey() VTK_OVERRIDE; - // Description: - // This method simply returns a new vtkInformationDataObjectKey, given a - // name and a location. This method is provided for wrappers. Use the - // constructor directly from C++ instead. + /** + * This method simply returns a new vtkInformationDataObjectKey, given a + * name and a location. This method is provided for wrappers. Use the + * constructor directly from C++ instead. + */ static vtkInformationDataObjectKey* MakeKey(const char* name, const char* location) { return new vtkInformationDataObjectKey(name, location); } - // Description: - // Get/Set the value associated with this key in the given - // information object. + //@{ + /** + * Get/Set the value associated with this key in the given + * information object. + */ void Set(vtkInformation* info, vtkDataObject*); vtkDataObject* Get(vtkInformation* info); + //@} - // Description: - // Copy the entry associated with this key from one information - // object to another. If there is no entry in the first information - // object for this key, the value is removed from the second. + /** + * Copy the entry associated with this key from one information + * object to another. If there is no entry in the first information + * object for this key, the value is removed from the second. + */ void ShallowCopy(vtkInformation* from, vtkInformation* to) VTK_OVERRIDE; - // Description: - // Report a reference this key has in the given information object. + /** + * Report a reference this key has in the given information object. + */ void Report(vtkInformation* info, vtkGarbageCollector* collector) VTK_OVERRIDE; private: diff --git a/Common/Core/vtkInformationDoubleKey.h b/Common/Core/vtkInformationDoubleKey.h index 889545bec9a920bb61bef90ac60b82592122a484..7fb43292b5afa34b55915094ecdfe864461c9a04 100644 --- a/Common/Core/vtkInformationDoubleKey.h +++ b/Common/Core/vtkInformationDoubleKey.h @@ -12,10 +12,13 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkInformationDoubleKey - Key for double values in vtkInformation. -// .SECTION Description -// vtkInformationDoubleKey is used to represent keys for double values -// in vtkInformation. +/** + * @class vtkInformationDoubleKey + * @brief Key for double values in vtkInformation. + * + * vtkInformationDoubleKey is used to represent keys for double values + * in vtkInformation. +*/ #ifndef vtkInformationDoubleKey_h #define vtkInformationDoubleKey_h @@ -34,36 +37,43 @@ public: vtkInformationDoubleKey(const char* name, const char* location); ~vtkInformationDoubleKey() VTK_OVERRIDE; - // Description: - // This method simply returns a new vtkInformationDoubleKey, given a - // name and a location. This method is provided for wrappers. Use the - // constructor directly from C++ instead. + /** + * This method simply returns a new vtkInformationDoubleKey, given a + * name and a location. This method is provided for wrappers. Use the + * constructor directly from C++ instead. + */ static vtkInformationDoubleKey* MakeKey(const char* name, const char* location) { return new vtkInformationDoubleKey(name, location); } - // Description: - // Get/Set the value associated with this key in the given - // information object. + //@{ + /** + * Get/Set the value associated with this key in the given + * information object. + */ void Set(vtkInformation* info, double); double Get(vtkInformation* info); + //@} - // Description: - // Copy the entry associated with this key from one information - // object to another. If there is no entry in the first information - // object for this key, the value is removed from the second. + /** + * Copy the entry associated with this key from one information + * object to another. If there is no entry in the first information + * object for this key, the value is removed from the second. + */ void ShallowCopy(vtkInformation* from, vtkInformation* to) VTK_OVERRIDE; - // Description: - // Print the key's value in an information object to a stream. + /** + * Print the key's value in an information object to a stream. + */ void Print(ostream& os, vtkInformation* info) VTK_OVERRIDE; protected: - // Description: - // Get the address at which the actual value is stored. This is - // meant for use from a debugger to add watches and is therefore not - // a public method. + /** + * Get the address at which the actual value is stored. This is + * meant for use from a debugger to add watches and is therefore not + * a public method. + */ double* GetWatchAddress(vtkInformation* info); private: diff --git a/Common/Core/vtkInformationDoubleVectorKey.h b/Common/Core/vtkInformationDoubleVectorKey.h index 9ebceb5fa63f0c7a5c6130211a67216ca5084593..eafa7a4c03a4f0449ccff15443fe3bdd5b4e8cd2 100644 --- a/Common/Core/vtkInformationDoubleVectorKey.h +++ b/Common/Core/vtkInformationDoubleVectorKey.h @@ -12,10 +12,13 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkInformationDoubleVectorKey - Key for double vector values. -// .SECTION Description -// vtkInformationDoubleVectorKey is used to represent keys for double -// vector values in vtkInformation.h +/** + * @class vtkInformationDoubleVectorKey + * @brief Key for double vector values. + * + * vtkInformationDoubleVectorKey is used to represent keys for double + * vector values in vtkInformation.h +*/ #ifndef vtkInformationDoubleVectorKey_h #define vtkInformationDoubleVectorKey_h @@ -35,34 +38,40 @@ public: int length=-1); ~vtkInformationDoubleVectorKey() VTK_OVERRIDE; - // Description: - // This method simply returns a new vtkInformationDoubleVectorKey, given a - // name, a location and a required length. This method is provided for - // wrappers. Use the constructor directly from C++ instead. + /** + * This method simply returns a new vtkInformationDoubleVectorKey, given a + * name, a location and a required length. This method is provided for + * wrappers. Use the constructor directly from C++ instead. + */ static vtkInformationDoubleVectorKey* MakeKey(const char* name, const char* location, int length=-1) { return new vtkInformationDoubleVectorKey(name, location, length); } - // Description: - // Get/Set the value associated with this key in the given - // information object. + //@{ + /** + * Get/Set the value associated with this key in the given + * information object. + */ void Append(vtkInformation* info, double value); void Set(vtkInformation* info, const double* value, int length); double* Get(vtkInformation* info); double Get(vtkInformation* info, int idx); void Get(vtkInformation* info, double* value); int Length(vtkInformation* info); + //@} - // Description: - // Copy the entry associated with this key from one information - // object to another. If there is no entry in the first information - // object for this key, the value is removed from the second. + /** + * Copy the entry associated with this key from one information + * object to another. If there is no entry in the first information + * object for this key, the value is removed from the second. + */ void ShallowCopy(vtkInformation* from, vtkInformation* to) VTK_OVERRIDE; - // Description: - // Print the key's value in an information object to a stream. + /** + * Print the key's value in an information object to a stream. + */ void Print(ostream& os, vtkInformation* info) VTK_OVERRIDE; protected: diff --git a/Common/Core/vtkInformationIdTypeKey.h b/Common/Core/vtkInformationIdTypeKey.h index 4b833e69553b04fb818a8981ed881d4476948423..de3e75fcead5909dc2c719c6f38be464b59b3c96 100644 --- a/Common/Core/vtkInformationIdTypeKey.h +++ b/Common/Core/vtkInformationIdTypeKey.h @@ -12,10 +12,13 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkInformationIdTypeKey - Key for vtkIdType values in vtkInformation. -// .SECTION Description -// vtkInformationIdTypeKey is used to represent keys for vtkIdType values -// in vtkInformation. +/** + * @class vtkInformationIdTypeKey + * @brief Key for vtkIdType values in vtkInformation. + * + * vtkInformationIdTypeKey is used to represent keys for vtkIdType values + * in vtkInformation. +*/ #ifndef vtkInformationIdTypeKey_h #define vtkInformationIdTypeKey_h @@ -34,36 +37,43 @@ public: vtkInformationIdTypeKey(const char* name, const char* location); ~vtkInformationIdTypeKey() VTK_OVERRIDE; - // Description: - // This method simply returns a new vtkInformationIdTypeKey, given a - // name and a location. This method is provided for wrappers. Use the - // constructor directly from C++ instead. + /** + * This method simply returns a new vtkInformationIdTypeKey, given a + * name and a location. This method is provided for wrappers. Use the + * constructor directly from C++ instead. + */ static vtkInformationIdTypeKey* MakeKey(const char* name, const char* location) { return new vtkInformationIdTypeKey(name, location); } - // Description: - // Get/Set the value associated with this key in the given - // information object. + //@{ + /** + * Get/Set the value associated with this key in the given + * information object. + */ void Set(vtkInformation* info, vtkIdType); vtkIdType Get(vtkInformation* info); + //@} - // Description: - // Copy the entry associated with this key from one information - // object to another. If there is no entry in the first information - // object for this key, the value is removed from the second. + /** + * Copy the entry associated with this key from one information + * object to another. If there is no entry in the first information + * object for this key, the value is removed from the second. + */ void ShallowCopy(vtkInformation* from, vtkInformation* to) VTK_OVERRIDE; - // Description: - // Print the key's value in an information object to a stream. + /** + * Print the key's value in an information object to a stream. + */ void Print(ostream& os, vtkInformation* info) VTK_OVERRIDE; protected: - // Description: - // Get the address at which the actual value is stored. This is - // meant for use from a debugger to add watches and is therefore not - // a public method. + /** + * Get the address at which the actual value is stored. This is + * meant for use from a debugger to add watches and is therefore not + * a public method. + */ vtkIdType* GetWatchAddress(vtkInformation* info); private: diff --git a/Common/Core/vtkInformationInformationKey.h b/Common/Core/vtkInformationInformationKey.h index fcef05cfad47c7f52b371a4695e8dedb442dfc92..e7f968b442188a1167bc0f7f18b631a572907443 100644 --- a/Common/Core/vtkInformationInformationKey.h +++ b/Common/Core/vtkInformationInformationKey.h @@ -12,10 +12,13 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkInformationInformationKey - Key for vtkInformation values. -// .SECTION Description -// vtkInformationInformationKey is used to represent keys in vtkInformation -// for other information objects. +/** + * @class vtkInformationInformationKey + * @brief Key for vtkInformation values. + * + * vtkInformationInformationKey is used to represent keys in vtkInformation + * for other information objects. +*/ #ifndef vtkInformationInformationKey_h #define vtkInformationInformationKey_h @@ -34,31 +37,37 @@ public: vtkInformationInformationKey(const char* name, const char* location); ~vtkInformationInformationKey() VTK_OVERRIDE; - // Description: - // This method simply returns a new vtkInformationInformationKey, given a - // name and a location. This method is provided for wrappers. Use the - // constructor directly from C++ instead. + /** + * This method simply returns a new vtkInformationInformationKey, given a + * name and a location. This method is provided for wrappers. Use the + * constructor directly from C++ instead. + */ static vtkInformationInformationKey* MakeKey(const char* name, const char* location) { return new vtkInformationInformationKey(name, location); } - // Description: - // Get/Set the value associated with this key in the given - // information object. + //@{ + /** + * Get/Set the value associated with this key in the given + * information object. + */ void Set(vtkInformation* info, vtkInformation*); vtkInformation* Get(vtkInformation* info); + //@} - // Description: - // Copy the entry associated with this key from one information - // object to another. If there is no entry in the first information - // object for this key, the value is removed from the second. + /** + * Copy the entry associated with this key from one information + * object to another. If there is no entry in the first information + * object for this key, the value is removed from the second. + */ void ShallowCopy(vtkInformation* from, vtkInformation* to) VTK_OVERRIDE; - // Description: - // Duplicate (new instance created) the entry associated with this key from - // one information object to another (new instances of any contained - // vtkInformation and vtkInformationVector objects are created). + /** + * Duplicate (new instance created) the entry associated with this key from + * one information object to another (new instances of any contained + * vtkInformation and vtkInformationVector objects are created). + */ void DeepCopy(vtkInformation* from, vtkInformation* to) VTK_OVERRIDE; private: diff --git a/Common/Core/vtkInformationInformationVectorKey.h b/Common/Core/vtkInformationInformationVectorKey.h index 1beaa92381abd0a683effcd69ada44d40e0d6333..71471092e04b2872599f1c4d6bdb06b27bdf794f 100644 --- a/Common/Core/vtkInformationInformationVectorKey.h +++ b/Common/Core/vtkInformationInformationVectorKey.h @@ -12,10 +12,13 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkInformationInformationVectorKey - Key for vtkInformation vectors. -// .SECTION Description -// vtkInformationInformationVectorKey is used to represent keys in -// vtkInformation for vectors of other vtkInformation objects. +/** + * @class vtkInformationInformationVectorKey + * @brief Key for vtkInformation vectors. + * + * vtkInformationInformationVectorKey is used to represent keys in + * vtkInformation for vectors of other vtkInformation objects. +*/ #ifndef vtkInformationInformationVectorKey_h #define vtkInformationInformationVectorKey_h @@ -36,26 +39,32 @@ public: vtkInformationInformationVectorKey(const char* name, const char* location); ~vtkInformationInformationVectorKey() VTK_OVERRIDE; - // Description: - // Get/Set the value associated with this key in the given - // information object. + //@{ + /** + * Get/Set the value associated with this key in the given + * information object. + */ void Set(vtkInformation* info, vtkInformationVector*); vtkInformationVector* Get(vtkInformation* info); + //@} - // Description: - // Copy the entry associated with this key from one information - // object to another. If there is no entry in the first information - // object for this key, the value is removed from the second. + /** + * Copy the entry associated with this key from one information + * object to another. If there is no entry in the first information + * object for this key, the value is removed from the second. + */ void ShallowCopy(vtkInformation* from, vtkInformation* to) VTK_OVERRIDE; - // Description: - // Duplicate (new instance created) the entry associated with this key from - // one information object to another (new instances of any contained - // vtkInformation and vtkInformationVector objects are created). + /** + * Duplicate (new instance created) the entry associated with this key from + * one information object to another (new instances of any contained + * vtkInformation and vtkInformationVector objects are created). + */ void DeepCopy(vtkInformation* from, vtkInformation* to) VTK_OVERRIDE; - // Description: - // Report a reference this key has in the given information object. + /** + * Report a reference this key has in the given information object. + */ void Report(vtkInformation* info, vtkGarbageCollector* collector) VTK_OVERRIDE; private: diff --git a/Common/Core/vtkInformationIntegerKey.h b/Common/Core/vtkInformationIntegerKey.h index 392410f120c76d988da7f37c64f4a868fb3e7b57..6c19c9e83c0070638ecf7b4268aa818e8b882545 100644 --- a/Common/Core/vtkInformationIntegerKey.h +++ b/Common/Core/vtkInformationIntegerKey.h @@ -12,10 +12,13 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkInformationIntegerKey - Key for integer values in vtkInformation. -// .SECTION Description -// vtkInformationIntegerKey is used to represent keys for integer values -// in vtkInformation. +/** + * @class vtkInformationIntegerKey + * @brief Key for integer values in vtkInformation. + * + * vtkInformationIntegerKey is used to represent keys for integer values + * in vtkInformation. +*/ #ifndef vtkInformationIntegerKey_h #define vtkInformationIntegerKey_h @@ -34,36 +37,43 @@ public: vtkInformationIntegerKey(const char* name, const char* location); ~vtkInformationIntegerKey() VTK_OVERRIDE; - // Description: - // This method simply returns a new vtkInformationIntegerKey, given a - // name and a location. This method is provided for wrappers. Use the - // constructor directly from C++ instead. + /** + * This method simply returns a new vtkInformationIntegerKey, given a + * name and a location. This method is provided for wrappers. Use the + * constructor directly from C++ instead. + */ static vtkInformationIntegerKey* MakeKey(const char* name, const char* location) { return new vtkInformationIntegerKey(name, location); } - // Description: - // Get/Set the value associated with this key in the given - // information object. + //@{ + /** + * Get/Set the value associated with this key in the given + * information object. + */ void Set(vtkInformation* info, int); int Get(vtkInformation* info); + //@} - // Description: - // Copy the entry associated with this key from one information - // object to another. If there is no entry in the first information - // object for this key, the value is removed from the second. + /** + * Copy the entry associated with this key from one information + * object to another. If there is no entry in the first information + * object for this key, the value is removed from the second. + */ void ShallowCopy(vtkInformation* from, vtkInformation* to) VTK_OVERRIDE; - // Description: - // Print the key's value in an information object to a stream. + /** + * Print the key's value in an information object to a stream. + */ void Print(ostream& os, vtkInformation* info) VTK_OVERRIDE; protected: - // Description: - // Get the address at which the actual value is stored. This is - // meant for use from a debugger to add watches and is therefore not - // a public method. + /** + * Get the address at which the actual value is stored. This is + * meant for use from a debugger to add watches and is therefore not + * a public method. + */ int* GetWatchAddress(vtkInformation* info); private: diff --git a/Common/Core/vtkInformationIntegerPointerKey.h b/Common/Core/vtkInformationIntegerPointerKey.h index a64db64fb43321adac20a4fc1061c9e16812f2ed..20a992d1c83f4dad58d41a9392c25da5ac28e61d 100644 --- a/Common/Core/vtkInformationIntegerPointerKey.h +++ b/Common/Core/vtkInformationIntegerPointerKey.h @@ -12,10 +12,13 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkInformationIntegerPointerKey - Key for pointer to integer. -// .SECTION Description -// vtkInformationIntegerPointerKey is used to represent keys for pointer -// to integer values in vtkInformation.h +/** + * @class vtkInformationIntegerPointerKey + * @brief Key for pointer to integer. + * + * vtkInformationIntegerPointerKey is used to represent keys for pointer + * to integer values in vtkInformation.h +*/ #ifndef vtkInformationIntegerPointerKey_h #define vtkInformationIntegerPointerKey_h @@ -35,32 +38,38 @@ public: int length=-1); ~vtkInformationIntegerPointerKey() VTK_OVERRIDE; - // Description: - // Get/Set the value associated with this key in the given - // information object. + //@{ + /** + * Get/Set the value associated with this key in the given + * information object. + */ void Set(vtkInformation* info, int* value, int length); int* Get(vtkInformation* info); void Get(vtkInformation* info, int* value); int Length(vtkInformation* info); + //@} - // Description: - // Copy the entry associated with this key from one information - // object to another. If there is no entry in the first information - // object for this key, the value is removed from the second. + /** + * Copy the entry associated with this key from one information + * object to another. If there is no entry in the first information + * object for this key, the value is removed from the second. + */ void ShallowCopy(vtkInformation* from, vtkInformation* to) VTK_OVERRIDE; - // Description: - // Print the key's value in an information object to a stream. + /** + * Print the key's value in an information object to a stream. + */ void Print(ostream& os, vtkInformation* info) VTK_OVERRIDE; protected: // The required length of the vector value (-1 is no restriction). int RequiredLength; - // Description: - // Get the address at which the actual value is stored. This is - // meant for use from a debugger to add watches and is therefore not - // a public method. + /** + * Get the address at which the actual value is stored. This is + * meant for use from a debugger to add watches and is therefore not + * a public method. + */ int* GetWatchAddress(vtkInformation* info); private: diff --git a/Common/Core/vtkInformationIntegerVectorKey.h b/Common/Core/vtkInformationIntegerVectorKey.h index e4c539d31687ce9d33698bd5b74b8fdaef3c663c..c6ff1b9dc04e09d0d714b44a01cb413ff1c7ab90 100644 --- a/Common/Core/vtkInformationIntegerVectorKey.h +++ b/Common/Core/vtkInformationIntegerVectorKey.h @@ -12,10 +12,13 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkInformationIntegerVectorKey - Key for integer vector values. -// .SECTION Description -// vtkInformationIntegerVectorKey is used to represent keys for integer -// vector values in vtkInformation.h +/** + * @class vtkInformationIntegerVectorKey + * @brief Key for integer vector values. + * + * vtkInformationIntegerVectorKey is used to represent keys for integer + * vector values in vtkInformation.h +*/ #ifndef vtkInformationIntegerVectorKey_h #define vtkInformationIntegerVectorKey_h @@ -35,19 +38,22 @@ public: int length=-1); ~vtkInformationIntegerVectorKey() VTK_OVERRIDE; - // Description: - // This method simply returns a new vtkInformationIntegerVectorKey, given a - // name, a location and a required length. This method is provided for - // wrappers. Use the constructor directly from C++ instead. + /** + * This method simply returns a new vtkInformationIntegerVectorKey, given a + * name, a location and a required length. This method is provided for + * wrappers. Use the constructor directly from C++ instead. + */ static vtkInformationIntegerVectorKey* MakeKey(const char* name, const char* location, int length=-1) { return new vtkInformationIntegerVectorKey(name, location, length); } - // Description: - // Get/Set the value associated with this key in the given - // information object. + //@{ + /** + * Get/Set the value associated with this key in the given + * information object. + */ void Append(vtkInformation* info, int value); void Set(vtkInformation* info, const int* value, int length); void Set(vtkInformation* info); @@ -55,25 +61,29 @@ public: int Get(vtkInformation* info, int idx); void Get(vtkInformation* info, int* value); int Length(vtkInformation* info); + //@} - // Description: - // Copy the entry associated with this key from one information - // object to another. If there is no entry in the first information - // object for this key, the value is removed from the second. + /** + * Copy the entry associated with this key from one information + * object to another. If there is no entry in the first information + * object for this key, the value is removed from the second. + */ void ShallowCopy(vtkInformation* from, vtkInformation* to) VTK_OVERRIDE; - // Description: - // Print the key's value in an information object to a stream. + /** + * Print the key's value in an information object to a stream. + */ void Print(ostream& os, vtkInformation* info) VTK_OVERRIDE; protected: // The required length of the vector value (-1 is no restriction). int RequiredLength; - // Description: - // Get the address at which the actual value is stored. This is - // meant for use from a debugger to add watches and is therefore not - // a public method. + /** + * Get the address at which the actual value is stored. This is + * meant for use from a debugger to add watches and is therefore not + * a public method. + */ int* GetWatchAddress(vtkInformation* info); private: diff --git a/Common/Core/vtkInformationInternals.h b/Common/Core/vtkInformationInternals.h index 2d248be5abef9852f20295e01281392929fc0603..7df019484c14a025cd89a9fdf2954671c94b4ff5 100644 --- a/Common/Core/vtkInformationInternals.h +++ b/Common/Core/vtkInformationInternals.h @@ -12,11 +12,14 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkInformationInternals - internal structure for vtkInformation -// .SECTION Description -// vtkInformationInternals is used in internal implementation of -// vtkInformation. This should only be accessed by friends -// and sub-classes of that class. +/** + * @class vtkInformationInternals + * @brief internal structure for vtkInformation + * + * vtkInformationInternals is used in internal implementation of + * vtkInformation. This should only be accessed by friends + * and sub-classes of that class. +*/ #ifndef vtkInformationInternals_h #define vtkInformationInternals_h diff --git a/Common/Core/vtkInformationIterator.h b/Common/Core/vtkInformationIterator.h index aaaa96797bf89be76804368fce02f9738bc12ff7..1ffb968eaa9f35a8266cc1416493c5eb3e9cf361 100644 --- a/Common/Core/vtkInformationIterator.h +++ b/Common/Core/vtkInformationIterator.h @@ -12,14 +12,17 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkInformationIterator - Iterates over keys of an information object -// .SECTION Description -// vtkInformationIterator can be used to iterate over the keys of an -// information object. The corresponding values can then be directly -// obtained from the information object using the keys. -// -// .SECTION See Also -// vtkInformation vtkInformationKey +/** + * @class vtkInformationIterator + * @brief Iterates over keys of an information object + * + * vtkInformationIterator can be used to iterate over the keys of an + * information object. The corresponding values can then be directly + * obtained from the information object using the keys. + * + * @sa + * vtkInformation vtkInformationKey +*/ #ifndef vtkInformationIterator_h #define vtkInformationIterator_h @@ -38,38 +41,47 @@ public: vtkTypeMacro(vtkInformationIterator,vtkObject); void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE; - // Description: - // Set/Get the information to iterator over. + //@{ + /** + * Set/Get the information to iterator over. + */ void SetInformation(vtkInformation*); vtkGetObjectMacro(Information, vtkInformation); - - // Description: - // Set the function to iterate over. The iterator - // will not hold a reference to the information object. - // Can be used to optimize certain places by avoiding - // garbage collection. + //@} + + /** + * Set the function to iterate over. The iterator + * will not hold a reference to the information object. + * Can be used to optimize certain places by avoiding + * garbage collection. + */ void SetInformationWeak(vtkInformation*); - // Description: - // Move the iterator to the beginning of the collection. + /** + * Move the iterator to the beginning of the collection. + */ void InitTraversal() { this->GoToFirstItem(); } - // Description: - // Move the iterator to the beginning of the collection. + /** + * Move the iterator to the beginning of the collection. + */ virtual void GoToFirstItem(); - // Description: - // Move the iterator to the next item in the collection. + /** + * Move the iterator to the next item in the collection. + */ virtual void GoToNextItem(); - // Description: - // Test whether the iterator is currently pointing to a valid - // item. Returns 1 for yes, 0 for no. + /** + * Test whether the iterator is currently pointing to a valid + * item. Returns 1 for yes, 0 for no. + */ virtual int IsDoneWithTraversal(); - // Description: - // Get the current item. Valid only when IsDoneWithTraversal() - // returns 1. + /** + * Get the current item. Valid only when IsDoneWithTraversal() + * returns 1. + */ virtual vtkInformationKey* GetCurrentKey(); protected: diff --git a/Common/Core/vtkInformationKey.h b/Common/Core/vtkInformationKey.h index 8be25657534fbb35cf506fe7a97418075473f3cc..121379be0d63cc058882e219a5cbe397881d3d04 100644 --- a/Common/Core/vtkInformationKey.h +++ b/Common/Core/vtkInformationKey.h @@ -12,16 +12,19 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkInformationKey - Superclass for vtkInformation keys. -// .SECTION Description -// vtkInformationKey is the superclass for all keys used to access the -// map represented by vtkInformation. The vtkInformation::Set and -// vtkInformation::Get methods of vtkInformation are accessed by -// information keys. A key is a pointer to an instance of a subclass -// of vtkInformationKey. The type of the subclass determines the -// overload of Set/Get that is selected. This ensures that the type -// of value stored in a vtkInformation instance corresponding to a -// given key matches the type expected for that key. +/** + * @class vtkInformationKey + * @brief Superclass for vtkInformation keys. + * + * vtkInformationKey is the superclass for all keys used to access the + * map represented by vtkInformation. The vtkInformation::Set and + * vtkInformation::Get methods of vtkInformation are accessed by + * information keys. A key is a pointer to an instance of a subclass + * of vtkInformationKey. The type of the subclass determines the + * overload of Set/Get that is selected. This ensures that the type + * of value stored in a vtkInformation instance corresponding to a + * given key matches the type expected for that key. +*/ #ifndef vtkInformationKey_h #define vtkInformationKey_h @@ -38,99 +41,117 @@ public: vtkBaseTypeMacro(vtkInformationKey,vtkObjectBase); void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE; - // Description: - // Prevent normal vtkObject reference counting behavior. + /** + * Prevent normal vtkObject reference counting behavior. + */ void Register(vtkObjectBase*) VTK_OVERRIDE; - // Description: - // Prevent normal vtkObject reference counting behavior. + /** + * Prevent normal vtkObject reference counting behavior. + */ void UnRegister(vtkObjectBase*) VTK_OVERRIDE; - // Description: - // Get the name of the key. This is not the type of the key, but - // the name of the key instance. + /** + * Get the name of the key. This is not the type of the key, but + * the name of the key instance. + */ const char* GetName(); - // Description: - // Get the location of the key. This is the name of the class in - // which the key is defined. + /** + * Get the location of the key. This is the name of the class in + * which the key is defined. + */ const char* GetLocation(); - // Description: - // Key instances are static data that need to be created and - // destroyed. The constructor and destructor must be public. The - // name of the static instance and the class in which it is defined - // should be passed to the constructor. They must be string - // literals because the strings are not copied. + //@{ + /** + * Key instances are static data that need to be created and + * destroyed. The constructor and destructor must be public. The + * name of the static instance and the class in which it is defined + * should be passed to the constructor. They must be string + * literals because the strings are not copied. + */ vtkInformationKey(const char* name, const char* location); ~vtkInformationKey() VTK_OVERRIDE; + //@} - // Description: - // Copy the entry associated with this key from one information - // object to another. If there is no entry in the first information - // object for this key, the value is removed from the second. + /** + * Copy the entry associated with this key from one information + * object to another. If there is no entry in the first information + * object for this key, the value is removed from the second. + */ virtual void ShallowCopy(vtkInformation* from, vtkInformation* to)=0; - // Description: - // Duplicate (new instance created) the entry associated with this key from - // one information object to another (new instances of any contained - // vtkInformation and vtkInformationVector objects are created). - // Default implementation simply calls ShallowCopy(). + /** + * Duplicate (new instance created) the entry associated with this key from + * one information object to another (new instances of any contained + * vtkInformation and vtkInformationVector objects are created). + * Default implementation simply calls ShallowCopy(). + */ virtual void DeepCopy(vtkInformation *from, vtkInformation *to) { this->ShallowCopy(from, to); } - // Description: - // Check whether this key appears in the given information object. + /** + * Check whether this key appears in the given information object. + */ virtual int Has(vtkInformation* info); - // Description: - // Remove this key from the given information object. + /** + * Remove this key from the given information object. + */ virtual void Remove(vtkInformation* info); - // Description: - // Report a reference this key has in the given information object. + /** + * Report a reference this key has in the given information object. + */ virtual void Report(vtkInformation* info, vtkGarbageCollector* collector); - // Description: - // Print the key's value in an information object to a stream. + //@{ + /** + * Print the key's value in an information object to a stream. + */ void Print(vtkInformation* info); virtual void Print(ostream& os, vtkInformation* info); - - // Description: - // This function is only relevant when the pertaining key - // is used in a VTK pipeline. Specific keys that handle - // pipeline data requests (for example, UPDATE_PIECE_NUMBER) - // can overwrite this method to notify the pipeline that a - // a filter should be (re-)executed because what is in - // the current output is different that what is being requested - // by the key. For example, DATA_PIECE_NUMBER != UPDATE_PIECE_NUMBER. + //@} + + /** + * This function is only relevant when the pertaining key + * is used in a VTK pipeline. Specific keys that handle + * pipeline data requests (for example, UPDATE_PIECE_NUMBER) + * can overwrite this method to notify the pipeline that a + * a filter should be (re-)executed because what is in + * the current output is different that what is being requested + * by the key. For example, DATA_PIECE_NUMBER != UPDATE_PIECE_NUMBER. + */ virtual bool NeedToExecute(vtkInformation* vtkNotUsed(pipelineInfo), vtkInformation* vtkNotUsed(dobjInfo)) {return false;} - // Description: - // This function is only relevant when the pertaining key - // is used in a VTK pipeline. Specific keys that handle - // pipeline data requests (for example, UPDATE_PIECE_NUMBER) - // can overwrite this method to store in the data information - // meta-data about the request that led to the current filter - // execution. This meta-data can later be used to compare what - // is being requested to decide whether the filter needs to - // re-execute. For example, a filter may store the current - // UPDATE_PIECE_NUMBER in the data object's information as - // the DATA_PIECE_NUMBER. DATA_PIECE_NUMBER can later be compared - // to a new UPDATA_PIECE_NUMBER to decide whether a filter should - // re-execute. + /** + * This function is only relevant when the pertaining key + * is used in a VTK pipeline. Specific keys that handle + * pipeline data requests (for example, UPDATE_PIECE_NUMBER) + * can overwrite this method to store in the data information + * meta-data about the request that led to the current filter + * execution. This meta-data can later be used to compare what + * is being requested to decide whether the filter needs to + * re-execute. For example, a filter may store the current + * UPDATE_PIECE_NUMBER in the data object's information as + * the DATA_PIECE_NUMBER. DATA_PIECE_NUMBER can later be compared + * to a new UPDATA_PIECE_NUMBER to decide whether a filter should + * re-execute. + */ virtual void StoreMetaData(vtkInformation* vtkNotUsed(request), vtkInformation* vtkNotUsed(pipelineInfo), vtkInformation* vtkNotUsed(dobjInfo)) {} - // Description: - // This function is only relevant when the pertaining key - // is used in a VTK pipeline. By overwriting this method, a - // key can decide if/how to copy itself downstream or upstream - // during a particular pipeline pass. For example, meta-data keys - // can copy themselves during REQUEST_INFORMATION whereas request - // keys can copy themselves during REQUEST_UPDATE_EXTENT. + /** + * This function is only relevant when the pertaining key + * is used in a VTK pipeline. By overwriting this method, a + * key can decide if/how to copy itself downstream or upstream + * during a particular pipeline pass. For example, meta-data keys + * can copy themselves during REQUEST_INFORMATION whereas request + * keys can copy themselves during REQUEST_UPDATE_EXTENT. + */ virtual void CopyDefaultInformation(vtkInformation* vtkNotUsed(request), vtkInformation* vtkNotUsed(fromInfo), vtkInformation* vtkNotUsed(toInfo)) {} diff --git a/Common/Core/vtkInformationKeyLookup.h b/Common/Core/vtkInformationKeyLookup.h index 28d88430ca4741520267736ad6095c31c2a719b8..347913d919c915340525bc0df5d8a9ee94dec1a0 100644 --- a/Common/Core/vtkInformationKeyLookup.h +++ b/Common/Core/vtkInformationKeyLookup.h @@ -13,8 +13,11 @@ =========================================================================*/ -// .NAME vtkInformationKeyLookup - Find vtkInformationKeys from name and -// location strings. +/** + * @class vtkInformationKeyLookup + * @brief Find vtkInformationKeys from name and + * location strings. +*/ #ifndef vtkInformationKeyLookup_h #define vtkInformationKeyLookup_h @@ -34,15 +37,17 @@ public: static vtkInformationKeyLookup* New(); vtkTypeMacro(vtkInformationKeyLookup, vtkObject) - // Description: - // Lists all known keys. + /** + * Lists all known keys. + */ void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE; - // Description: - // Find an information key from name and location strings. For example, - // Find("GUI_HIDE", "vtkAbstractArray") returns vtkAbstractArray::GUI_HIDE. - // Note that this class only knows about keys in modules that are currently - // linked to the running executable. + /** + * Find an information key from name and location strings. For example, + * Find("GUI_HIDE", "vtkAbstractArray") returns vtkAbstractArray::GUI_HIDE. + * Note that this class only knows about keys in modules that are currently + * linked to the running executable. + */ static vtkInformationKey* Find(const std::string &name, const std::string &location); @@ -52,9 +57,10 @@ protected: friend class vtkInformationKey; - // Description: - // Add a key to the KeyMap. This is done automatically in the - // vtkInformationKey constructor. + /** + * Add a key to the KeyMap. This is done automatically in the + * vtkInformationKey constructor. + */ static void RegisterKey(vtkInformationKey *key, const std::string &name, const std::string &location); diff --git a/Common/Core/vtkInformationKeyVectorKey.h b/Common/Core/vtkInformationKeyVectorKey.h index c887ae540578867bde409c955f7170a438ea97a7..251d14f023925d46eaeb51d5491748d45d25f75b 100644 --- a/Common/Core/vtkInformationKeyVectorKey.h +++ b/Common/Core/vtkInformationKeyVectorKey.h @@ -12,10 +12,13 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkInformationKeyVectorKey - Key for vector-of-keys values. -// .SECTION Description -// vtkInformationKeyVectorKey is used to represent keys for -// vector-of-keys values in vtkInformation. +/** + * @class vtkInformationKeyVectorKey + * @brief Key for vector-of-keys values. + * + * vtkInformationKeyVectorKey is used to represent keys for + * vector-of-keys values in vtkInformation. +*/ #ifndef vtkInformationKeyVectorKey_h #define vtkInformationKeyVectorKey_h @@ -34,18 +37,21 @@ public: vtkInformationKeyVectorKey(const char* name, const char* location); ~vtkInformationKeyVectorKey() VTK_OVERRIDE; - // Description: - // This method simply returns a new vtkInformationKeyVectorKey, given a - // name and a location. This method is provided for wrappers. Use the - // constructor directly from C++ instead. + /** + * This method simply returns a new vtkInformationKeyVectorKey, given a + * name and a location. This method is provided for wrappers. Use the + * constructor directly from C++ instead. + */ static vtkInformationKeyVectorKey* MakeKey(const char* name, const char* location) { return new vtkInformationKeyVectorKey(name, location); } - // Description: - // Get/Set the value associated with this key in the given - // information object. + //@{ + /** + * Get/Set the value associated with this key in the given + * information object. + */ void Append(vtkInformation* info, vtkInformationKey* value); void AppendUnique(vtkInformation* info, vtkInformationKey* value); void Set(vtkInformation* info, vtkInformationKey*const * value, int length); @@ -54,15 +60,18 @@ public: vtkInformationKey* Get(vtkInformation* info, int idx); void Get(vtkInformation* info, vtkInformationKey** value); int Length(vtkInformation* info); + //@} - // Description: - // Copy the entry associated with this key from one information - // object to another. If there is no entry in the first information - // object for this key, the value is removed from the second. + /** + * Copy the entry associated with this key from one information + * object to another. If there is no entry in the first information + * object for this key, the value is removed from the second. + */ void ShallowCopy(vtkInformation* from, vtkInformation* to) VTK_OVERRIDE; - // Description: - // Print the key's value in an information object to a stream. + /** + * Print the key's value in an information object to a stream. + */ void Print(ostream& os, vtkInformation* info) VTK_OVERRIDE; private: diff --git a/Common/Core/vtkInformationObjectBaseKey.h b/Common/Core/vtkInformationObjectBaseKey.h index 17672b28b7404ef9200b1116aad2e91574803baa..454d5d9c1da70234429ad89f537f262ccfcc8770 100644 --- a/Common/Core/vtkInformationObjectBaseKey.h +++ b/Common/Core/vtkInformationObjectBaseKey.h @@ -12,10 +12,13 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkInformationObjectBaseKey - Key for vtkObjectBase values. -// .SECTION Description -// vtkInformationObjectBaseKey is used to represent keys in -// vtkInformation for values that are vtkObjectBase instances. +/** + * @class vtkInformationObjectBaseKey + * @brief Key for vtkObjectBase values. + * + * vtkInformationObjectBaseKey is used to represent keys in + * vtkInformation for values that are vtkObjectBase instances. +*/ #ifndef vtkInformationObjectBaseKey_h #define vtkInformationObjectBaseKey_h @@ -37,31 +40,37 @@ public: const char* requiredClass=0); ~vtkInformationObjectBaseKey() VTK_OVERRIDE; - // Description: - // This method simply returns a new vtkInformationObjectBaseKey, given a - // name, location and optionally a required class (a classname to restrict - // which class types can be set with this key). This method is provided - // for wrappers. Use the constructor directly from C++ instead. + /** + * This method simply returns a new vtkInformationObjectBaseKey, given a + * name, location and optionally a required class (a classname to restrict + * which class types can be set with this key). This method is provided + * for wrappers. Use the constructor directly from C++ instead. + */ static vtkInformationObjectBaseKey* MakeKey(const char* name, const char* location, const char* requiredClass=0) { return new vtkInformationObjectBaseKey(name, location, requiredClass); } - // Description: - // Get/Set the value associated with this key in the given - // information object. + //@{ + /** + * Get/Set the value associated with this key in the given + * information object. + */ void Set(vtkInformation* info, vtkObjectBase*); vtkObjectBase* Get(vtkInformation* info); + //@} - // Description: - // Copy the entry associated with this key from one information - // object to another. If there is no entry in the first information - // object for this key, the value is removed from the second. + /** + * Copy the entry associated with this key from one information + * object to another. If there is no entry in the first information + * object for this key, the value is removed from the second. + */ void ShallowCopy(vtkInformation* from, vtkInformation* to) VTK_OVERRIDE; - // Description: - // Report a reference this key has in the given information object. + /** + * Report a reference this key has in the given information object. + */ void Report(vtkInformation* info, vtkGarbageCollector* collector) VTK_OVERRIDE; protected: diff --git a/Common/Core/vtkInformationObjectBaseVectorKey.h b/Common/Core/vtkInformationObjectBaseVectorKey.h index 81a388893d30903210d4a2fd35a06912d4c04dfc..9e9ecf01fe166592a838250263b9d05ed511de46 100644 --- a/Common/Core/vtkInformationObjectBaseVectorKey.h +++ b/Common/Core/vtkInformationObjectBaseVectorKey.h @@ -12,12 +12,15 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkInformationObjectBaseVectorKey - Key for vtkObjectBase vector values. -// .SECTION Description -// vtkInformationObjectBaseVectorKey is used to represent keys for double -// vector values in vtkInformation.h. NOTE the interface in this key differs -// from that in other similar keys because of our internal use of smart -// pointers. +/** + * @class vtkInformationObjectBaseVectorKey + * @brief Key for vtkObjectBase vector values. + * + * vtkInformationObjectBaseVectorKey is used to represent keys for double + * vector values in vtkInformation.h. NOTE the interface in this key differs + * from that in other similar keys because of our internal use of smart + * pointers. +*/ #ifndef vtkInformationObjectBaseVectorKey_h #define vtkInformationObjectBaseVectorKey_h @@ -33,82 +36,97 @@ class VTKCOMMONCORE_EXPORT vtkInformationObjectBaseVectorKey : public vtkInforma public: vtkTypeMacro(vtkInformationObjectBaseVectorKey,vtkInformationKey); void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE; - // Description: - // The name of the static instance and the class in which - // it is defined(location) should be passed to the constructor. - // Providing "requiredClass" name one can insure that only - // objects of type "requiredClass" are stored in vectors - // associated with the instance of this key type created. - // These should be string literals as they are not coppied. + //@{ + /** + * The name of the static instance and the class in which + * it is defined(location) should be passed to the constructor. + * Providing "requiredClass" name one can insure that only + * objects of type "requiredClass" are stored in vectors + * associated with the instance of this key type created. + * These should be string literals as they are not coppied. + */ vtkInformationObjectBaseVectorKey(const char* name, const char* location, const char* requiredClass=0); // ~vtkInformationObjectBaseVectorKey() VTK_OVERRIDE; - - // Description: - // This method simply returns a new vtkInformationObjectBaseVectorKey, given a - // name, location and optionally a required class (a classname to restrict - // which class types can be set with this key). This method is provided - // for wrappers. Use the constructor directly from C++ instead. + //@} + + /** + * This method simply returns a new vtkInformationObjectBaseVectorKey, given a + * name, location and optionally a required class (a classname to restrict + * which class types can be set with this key). This method is provided + * for wrappers. Use the constructor directly from C++ instead. + */ static vtkInformationObjectBaseVectorKey* MakeKey(const char* name, const char* location, const char* requiredClass=0) { return new vtkInformationObjectBaseVectorKey(name, location, requiredClass); } - // Description: - // Clear the vector. + /** + * Clear the vector. + */ void Clear(vtkInformation* info); - // Description: - // Resize (extend) the vector to hold n objects. Any new elements - // created will be null initialized. + /** + * Resize (extend) the vector to hold n objects. Any new elements + * created will be null initialized. + */ void Resize(vtkInformation* info, int n); - // Description: - // Get the vector's length. + /** + * Get the vector's length. + */ int Size(vtkInformation* info); int Length(vtkInformation* info){ return this->Size(info); } - // Description: - // Put the value on the back of the vector, with ref counting. + /** + * Put the value on the back of the vector, with ref counting. + */ void Append(vtkInformation* info, vtkObjectBase *value); - // Description: - // Set element i of the vector to value. Resizes the vector - // if needed. + /** + * Set element i of the vector to value. Resizes the vector + * if needed. + */ void Set(vtkInformation* info, vtkObjectBase *value, int i); - // Description: - // Remove all instances of val from the list. If using the indexed overload, - // the object at the specified position is removed. + //@{ + /** + * Remove all instances of val from the list. If using the indexed overload, + * the object at the specified position is removed. + */ void Remove(vtkInformation *info, vtkObjectBase *val); void Remove(vtkInformation *info, int idx); using Superclass::Remove; // Don't hide base class methods + //@} - // Description: - // Copy n values from the range in source defined by [from from+n-1] - // into the range in this vector defined by [to to+n-1]. Resizes - // the vector if needed. + /** + * Copy n values from the range in source defined by [from from+n-1] + * into the range in this vector defined by [to to+n-1]. Resizes + * the vector if needed. + */ void SetRange(vtkInformation* info, vtkObjectBase **source, int from, int to, int n); - // Description: - // Copy n values from the range in this vector defined by [from from+n-1] - // into the range in the destination vector defined by [to to+n-1]. Up - // to you to make sure the destination is big enough. + /** + * Copy n values from the range in this vector defined by [from from+n-1] + * into the range in the destination vector defined by [to to+n-1]. Up + * to you to make sure the destination is big enough. + */ void GetRange(vtkInformation *info, vtkObjectBase **dest, int from, int to, int n); - // Description: - // Get the vtkObjectBase at a specific location in the vector. + /** + * Get the vtkObjectBase at a specific location in the vector. + */ vtkObjectBase *Get(vtkInformation* info, int idx); // _escription: @@ -117,14 +135,16 @@ public: // implement. // vtkObjectBase **Get(vtkInformation* info); - // Description: - // Copy the entry associated with this key from one information - // object to another. If there is no entry in the first information - // object for this key, the value is removed from the second. + /** + * Copy the entry associated with this key from one information + * object to another. If there is no entry in the first information + * object for this key, the value is removed from the second. + */ void ShallowCopy(vtkInformation* from, vtkInformation* to) VTK_OVERRIDE; - // Description: - // Print the key's value in an information object to a stream. + /** + * Print the key's value in an information object to a stream. + */ void Print(ostream& os, vtkInformation* info) VTK_OVERRIDE; protected: @@ -132,18 +152,21 @@ protected: const char* RequiredClass; private: - // Description: - // Used to create the underlying vector that will be associated - // with this key. + /** + * Used to create the underlying vector that will be associated + * with this key. + */ void CreateObjectBase(); - // Description: - // Check insures that if RequiredClass is set then the - // type of aValue matches. return true if the two match. + /** + * Check insures that if RequiredClass is set then the + * type of aValue matches. return true if the two match. + */ bool ValidateDerivedType(vtkInformation* info,vtkObjectBase* aValue); - // Description: - // Get the vector associated with this key, if there is - // none then associate a new vector with this key and return - // that. + /** + * Get the vector associated with this key, if there is + * none then associate a new vector with this key and return + * that. + */ vtkInformationObjectBaseVectorValue *GetObjectBaseVector(vtkInformation *info); // diff --git a/Common/Core/vtkInformationRequestKey.h b/Common/Core/vtkInformationRequestKey.h index b69aa37dc767c2f169f5d898d1e4ef0c051a0604..ffcaaa18b01d5d87cd4aa5db94706264540c2a57 100644 --- a/Common/Core/vtkInformationRequestKey.h +++ b/Common/Core/vtkInformationRequestKey.h @@ -12,10 +12,13 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkInformationRequestKey - Key for pointer to pointer. -// .SECTION Description -// vtkInformationRequestKey is used to represent keys for pointer -// to pointer values in vtkInformation.h +/** + * @class vtkInformationRequestKey + * @brief Key for pointer to pointer. + * + * vtkInformationRequestKey is used to represent keys for pointer + * to pointer values in vtkInformation.h +*/ #ifndef vtkInformationRequestKey_h #define vtkInformationRequestKey_h @@ -34,30 +37,36 @@ public: vtkInformationRequestKey(const char* name, const char* location); ~vtkInformationRequestKey() VTK_OVERRIDE; - // Description: - // This method simply returns a new vtkInformationRequestKey, given a - // name and a location. This method is provided for wrappers. Use the - // constructor directly from C++ instead. + /** + * This method simply returns a new vtkInformationRequestKey, given a + * name and a location. This method is provided for wrappers. Use the + * constructor directly from C++ instead. + */ static vtkInformationRequestKey* MakeKey(const char* name, const char* location) { return new vtkInformationRequestKey(name, location); } - // Description: - // Get/Set the value associated with this key in the given - // information object. + //@{ + /** + * Get/Set the value associated with this key in the given + * information object. + */ void Set(vtkInformation* info); void Remove(vtkInformation* info) VTK_OVERRIDE; int Has(vtkInformation* info) VTK_OVERRIDE; + //@} - // Description: - // Copy the entry associated with this key from one information - // object to another. If there is no entry in the first information - // object for this key, the value is removed from the second. + /** + * Copy the entry associated with this key from one information + * object to another. If there is no entry in the first information + * object for this key, the value is removed from the second. + */ void ShallowCopy(vtkInformation* from, vtkInformation* to) VTK_OVERRIDE; - // Description: - // Print the key's value in an information object to a stream. + /** + * Print the key's value in an information object to a stream. + */ void Print(ostream& os, vtkInformation* info) VTK_OVERRIDE; private: diff --git a/Common/Core/vtkInformationStringKey.h b/Common/Core/vtkInformationStringKey.h index 31a6f5625a753822771fdefc44de8029297e9b6b..ae64673c6c32f65ba44866298687cb8f479e6d61 100644 --- a/Common/Core/vtkInformationStringKey.h +++ b/Common/Core/vtkInformationStringKey.h @@ -12,10 +12,13 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkInformationStringKey - Key for string values in vtkInformation. -// .SECTION Description -// vtkInformationStringKey is used to represent keys for string values -// in vtkInformation. +/** + * @class vtkInformationStringKey + * @brief Key for string values in vtkInformation. + * + * vtkInformationStringKey is used to represent keys for string values + * in vtkInformation. +*/ #ifndef vtkInformationStringKey_h #define vtkInformationStringKey_h @@ -36,30 +39,36 @@ public: vtkInformationStringKey(const char* name, const char* location); ~vtkInformationStringKey() VTK_OVERRIDE; - // Description: - // This method simply returns a new vtkInformationStringKey, given a - // name and a location. This method is provided for wrappers. Use the - // constructor directly from C++ instead. + /** + * This method simply returns a new vtkInformationStringKey, given a + * name and a location. This method is provided for wrappers. Use the + * constructor directly from C++ instead. + */ static vtkInformationStringKey* MakeKey(const char* name, const char* location) { return new vtkInformationStringKey(name, location); } - // Description: - // Get/Set the value associated with this key in the given - // information object. + //@{ + /** + * Get/Set the value associated with this key in the given + * information object. + */ void Set(vtkInformation* info, const char*); void Set(vtkInformation* info, const std::string &str); const char* Get(vtkInformation* info); + //@} - // Description: - // Copy the entry associated with this key from one information - // object to another. If there is no entry in the first information - // object for this key, the value is removed from the second. + /** + * Copy the entry associated with this key from one information + * object to another. If there is no entry in the first information + * object for this key, the value is removed from the second. + */ void ShallowCopy(vtkInformation* from, vtkInformation* to) VTK_OVERRIDE; - // Description: - // Print the key's value in an information object to a stream. + /** + * Print the key's value in an information object to a stream. + */ void Print(ostream& os, vtkInformation* info) VTK_OVERRIDE; private: diff --git a/Common/Core/vtkInformationStringVectorKey.h b/Common/Core/vtkInformationStringVectorKey.h index 4dde517bba2d7274b40eb2ad525674f9ee9dfb97..c3ac344170de27638e29b297afa9213dfe668054 100644 --- a/Common/Core/vtkInformationStringVectorKey.h +++ b/Common/Core/vtkInformationStringVectorKey.h @@ -12,10 +12,13 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkInformationStringVectorKey - Key for String vector values. -// .SECTION Description -// vtkInformationStringVectorKey is used to represent keys for String -// vector values in vtkInformation.h +/** + * @class vtkInformationStringVectorKey + * @brief Key for String vector values. + * + * vtkInformationStringVectorKey is used to represent keys for String + * vector values in vtkInformation.h +*/ #ifndef vtkInformationStringVectorKey_h #define vtkInformationStringVectorKey_h @@ -37,34 +40,40 @@ public: int length=-1); ~vtkInformationStringVectorKey() VTK_OVERRIDE; - // Description: - // This method simply returns a new vtkInformationStringVectorKey, given a - // name, a location and a required length. This method is provided for - // wrappers. Use the constructor directly from C++ instead. + /** + * This method simply returns a new vtkInformationStringVectorKey, given a + * name, a location and a required length. This method is provided for + * wrappers. Use the constructor directly from C++ instead. + */ static vtkInformationStringVectorKey* MakeKey(const char* name, const char* location, int length=-1) { return new vtkInformationStringVectorKey(name, location, length); } - // Description: - // Get/Set the value associated with this key in the given - // information object. + //@{ + /** + * Get/Set the value associated with this key in the given + * information object. + */ void Append(vtkInformation* info, const char* value); void Set(vtkInformation* info, const char* value, int idx = 0); void Append(vtkInformation* info, const std::string &value); void Set(vtkInformation* info, const std::string &value, int idx = 0); const char* Get(vtkInformation* info, int idx = 0); int Length(vtkInformation* info); + //@} - // Description: - // Copy the entry associated with this key from one information - // object to another. If there is no entry in the first information - // object for this key, the value is removed from the second. + /** + * Copy the entry associated with this key from one information + * object to another. If there is no entry in the first information + * object for this key, the value is removed from the second. + */ void ShallowCopy(vtkInformation* from, vtkInformation* to) VTK_OVERRIDE; - // Description: - // Print the key's value in an information object to a stream. + /** + * Print the key's value in an information object to a stream. + */ void Print(ostream& os, vtkInformation* info) VTK_OVERRIDE; protected: diff --git a/Common/Core/vtkInformationUnsignedLongKey.h b/Common/Core/vtkInformationUnsignedLongKey.h index 37f65d9b01f48e5026140d4b427a0943b7935776..effb1bfa9d5f94b98d4ac99a1b1f9d5f1f35d8c1 100644 --- a/Common/Core/vtkInformationUnsignedLongKey.h +++ b/Common/Core/vtkInformationUnsignedLongKey.h @@ -12,10 +12,13 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkInformationUnsignedLongKey - Key for unsigned long values in vtkInformation. -// .SECTION Description -// vtkInformationUnsignedLongKey is used to represent keys for unsigned long values -// in vtkInformation. +/** + * @class vtkInformationUnsignedLongKey + * @brief Key for unsigned long values in vtkInformation. + * + * vtkInformationUnsignedLongKey is used to represent keys for unsigned long values + * in vtkInformation. +*/ #ifndef vtkInformationUnsignedLongKey_h #define vtkInformationUnsignedLongKey_h @@ -34,36 +37,43 @@ public: vtkInformationUnsignedLongKey(const char* name, const char* location); ~vtkInformationUnsignedLongKey() VTK_OVERRIDE; - // Description: - // This method simply returns a new vtkInformationUnsignedLongKey, given a - // name and a location. This method is provided for wrappers. Use the - // constructor directly from C++ instead. + /** + * This method simply returns a new vtkInformationUnsignedLongKey, given a + * name and a location. This method is provided for wrappers. Use the + * constructor directly from C++ instead. + */ static vtkInformationUnsignedLongKey* MakeKey(const char* name, const char* location) { return new vtkInformationUnsignedLongKey(name, location); } - // Description: - // Get/Set the value associated with this key in the given - // information object. + //@{ + /** + * Get/Set the value associated with this key in the given + * information object. + */ void Set(vtkInformation* info, unsigned long); unsigned long Get(vtkInformation* info); + //@} - // Description: - // Copy the entry associated with this key from one information - // object to another. If there is no entry in the first information - // object for this key, the value is removed from the second. + /** + * Copy the entry associated with this key from one information + * object to another. If there is no entry in the first information + * object for this key, the value is removed from the second. + */ void ShallowCopy(vtkInformation* from, vtkInformation* to) VTK_OVERRIDE; - // Description: - // Print the key's value in an information object to a stream. + /** + * Print the key's value in an information object to a stream. + */ void Print(ostream& os, vtkInformation* info) VTK_OVERRIDE; protected: - // Description: - // Get the address at which the actual value is stored. This is - // meant for use from a debugger to add watches and is therefore not - // a public method. + /** + * Get the address at which the actual value is stored. This is + * meant for use from a debugger to add watches and is therefore not + * a public method. + */ unsigned long* GetWatchAddress(vtkInformation* info); private: diff --git a/Common/Core/vtkInformationVariantKey.h b/Common/Core/vtkInformationVariantKey.h index ec018186a4f3a94fe7b07d8083bd3e25a63b1b5f..a59cbd3b677604284973bb536f9f014a06adc897 100644 --- a/Common/Core/vtkInformationVariantKey.h +++ b/Common/Core/vtkInformationVariantKey.h @@ -12,10 +12,13 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkInformationVariantKey - Key for variant values in vtkInformation. -// .SECTION Description -// vtkInformationVariantKey is used to represent keys for variant values -// in vtkInformation. +/** + * @class vtkInformationVariantKey + * @brief Key for variant values in vtkInformation. + * + * vtkInformationVariantKey is used to represent keys for variant values + * in vtkInformation. +*/ #ifndef vtkInformationVariantKey_h #define vtkInformationVariantKey_h @@ -36,36 +39,43 @@ public: vtkInformationVariantKey(const char* name, const char* location); ~vtkInformationVariantKey() VTK_OVERRIDE; - // Description: - // This method simply returns a new vtkInformationVariantKey, given a - // name and a location. This method is provided for wrappers. Use the - // constructor directly from C++ instead. + /** + * This method simply returns a new vtkInformationVariantKey, given a + * name and a location. This method is provided for wrappers. Use the + * constructor directly from C++ instead. + */ static vtkInformationVariantKey* MakeKey(const char* name, const char* location) { return new vtkInformationVariantKey(name, location); } - // Description: - // Get/Set the value associated with this key in the given - // information object. + //@{ + /** + * Get/Set the value associated with this key in the given + * information object. + */ void Set(vtkInformation* info, const vtkVariant&); const vtkVariant& Get(vtkInformation* info); + //@} - // Description: - // Copy the entry associated with this key from one information - // object to another. If there is no entry in the first information - // object for this key, the value is removed from the second. + /** + * Copy the entry associated with this key from one information + * object to another. If there is no entry in the first information + * object for this key, the value is removed from the second. + */ void ShallowCopy(vtkInformation* from, vtkInformation* to) VTK_OVERRIDE; - // Description: - // Print the key's value in an information object to a stream. + /** + * Print the key's value in an information object to a stream. + */ void Print(ostream& os, vtkInformation* info) VTK_OVERRIDE; protected: - // Description: - // Get the address at which the actual value is stored. This is - // meant for use from a debugger to add watches and is therefore not - // a public method. + /** + * Get the address at which the actual value is stored. This is + * meant for use from a debugger to add watches and is therefore not + * a public method. + */ vtkVariant* GetWatchAddress(vtkInformation* info); private: diff --git a/Common/Core/vtkInformationVariantVectorKey.h b/Common/Core/vtkInformationVariantVectorKey.h index 568495956e21fc6bae4d7d73db8bb394a78db17e..7f993303dd932056c3e4311f9245dd253757f3e6 100644 --- a/Common/Core/vtkInformationVariantVectorKey.h +++ b/Common/Core/vtkInformationVariantVectorKey.h @@ -12,10 +12,13 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkInformationVariantVectorKey - Key for variant vector values. -// .SECTION Description -// vtkInformationVariantVectorKey is used to represent keys for variant -// vector values in vtkInformation.h +/** + * @class vtkInformationVariantVectorKey + * @brief Key for variant vector values. + * + * vtkInformationVariantVectorKey is used to represent keys for variant + * vector values in vtkInformation.h +*/ #ifndef vtkInformationVariantVectorKey_h #define vtkInformationVariantVectorKey_h @@ -37,34 +40,40 @@ public: int length=-1); ~vtkInformationVariantVectorKey() VTK_OVERRIDE; - // Description: - // This method simply returns a new vtkInformationVariantVectorKey, given a - // name, a location and a required length. This method is provided for - // wrappers. Use the constructor directly from C++ instead. + /** + * This method simply returns a new vtkInformationVariantVectorKey, given a + * name, a location and a required length. This method is provided for + * wrappers. Use the constructor directly from C++ instead. + */ static vtkInformationVariantVectorKey* MakeKey(const char* name, const char* location, int length=-1) { return new vtkInformationVariantVectorKey(name, location, length); } - // Description: - // Get/Set the value associated with this key in the given - // information object. + //@{ + /** + * Get/Set the value associated with this key in the given + * information object. + */ void Append(vtkInformation* info, const vtkVariant& value); void Set(vtkInformation* info, const vtkVariant* value, int length); const vtkVariant* Get(vtkInformation* info) const; const vtkVariant& Get(vtkInformation* info, int idx) const; void Get(vtkInformation* info, vtkVariant* value) const; int Length(vtkInformation* info) const; + //@} - // Description: - // Copy the entry associated with this key from one information - // object to another. If there is no entry in the first information - // object for this key, the value is removed from the second. + /** + * Copy the entry associated with this key from one information + * object to another. If there is no entry in the first information + * object for this key, the value is removed from the second. + */ void ShallowCopy(vtkInformation* from, vtkInformation* to) VTK_OVERRIDE; - // Description: - // Print the key's value in an information object to a stream. + /** + * Print the key's value in an information object to a stream. + */ void Print(ostream& os, vtkInformation* info) VTK_OVERRIDE; protected: diff --git a/Common/Core/vtkInformationVector.h b/Common/Core/vtkInformationVector.h index 38745dfe0c98ccc05c5fb54c688b0500d1f4ab66..571dcbc829a928a14cd28c5587fe9f442f58a4fa 100644 --- a/Common/Core/vtkInformationVector.h +++ b/Common/Core/vtkInformationVector.h @@ -12,13 +12,16 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkInformationVector - Store zero or more vtkInformation instances. -// .SECTION Description - -// vtkInformationVector stores a vector of zero or more vtkInformation -// objects corresponding to the input or output information for a -// vtkAlgorithm. An instance of this class is passed to -// vtkAlgorithm::ProcessRequest calls. +/** + * @class vtkInformationVector + * @brief Store zero or more vtkInformation instances. + * + * + * vtkInformationVector stores a vector of zero or more vtkInformation + * objects corresponding to the input or output information for a + * vtkAlgorithm. An instance of this class is passed to + * vtkAlgorithm::ProcessRequest calls. +*/ #ifndef vtkInformationVector_h #define vtkInformationVector_h @@ -36,39 +39,52 @@ public: vtkTypeMacro(vtkInformationVector,vtkObject); void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE; - // Description: - // Get/Set the number of information objects in the vector. Setting - // the number to larger than the current number will create empty - // vtkInformation instances. Setting the number to smaller than the - // current number will remove entries from higher indices. + //@{ + /** + * Get/Set the number of information objects in the vector. Setting + * the number to larger than the current number will create empty + * vtkInformation instances. Setting the number to smaller than the + * current number will remove entries from higher indices. + */ int GetNumberOfInformationObjects() { return this->NumberOfInformationObjects; }; void SetNumberOfInformationObjects(int n); - - // Description: - // Get/Set the vtkInformation instance stored at the given index in - // the vector. The vector will automatically expand to include the - // index given if necessary. Missing entries in-between will be - // filled with empty vtkInformation instances. + //@} + + //@{ + /** + * Get/Set the vtkInformation instance stored at the given index in + * the vector. The vector will automatically expand to include the + * index given if necessary. Missing entries in-between will be + * filled with empty vtkInformation instances. + */ void SetInformationObject(int index, vtkInformation* info); vtkInformation* GetInformationObject(int index); + //@} - // Description: - // Append/Remove an information object. + //@{ + /** + * Append/Remove an information object. + */ void Append(vtkInformation* info); void Remove(vtkInformation* info); void Remove(int idx); + //@} - // Description: - // Initiate garbage collection when a reference is removed. + //@{ + /** + * Initiate garbage collection when a reference is removed. + */ void Register(vtkObjectBase* o) VTK_OVERRIDE; void UnRegister(vtkObjectBase* o) VTK_OVERRIDE; - - // Description: - // Copy all information entries from the given vtkInformation - // instance. Any previously existing entries are removed. If - // deep==1, a deep copy of the information structure is performed (new - // instances of any contained vtkInformation and vtkInformationVector - // objects are created). + //@} + + /** + * Copy all information entries from the given vtkInformation + * instance. Any previously existing entries are removed. If + * deep==1, a deep copy of the information structure is performed (new + * instances of any contained vtkInformation and vtkInformationVector + * objects are created). + */ void Copy(vtkInformationVector* from, int deep=0); protected: diff --git a/Common/Core/vtkInstantiator.h b/Common/Core/vtkInstantiator.h index bd06b81737ea2e42fed5ddd74ee2788072760cf0..d9601a1f9ecf39466887c867460c2b787060e679 100644 --- a/Common/Core/vtkInstantiator.h +++ b/Common/Core/vtkInstantiator.h @@ -12,43 +12,46 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkInstantiator - create an instance of any VTK class from its name. -// .SECTION Description -// vtkInstantiator provides an interface to create an instance of any -// VTK class from its name. Instances are created through registered -// pointers to functions returning the objects. New classes can also be -// registered with the creator. VTK libraries automatically register -// their classes with the creator when they are loaded. Instances are -// created using the static New() method, so the normal vtkObjectFactory -// mechanism is still invoked. -// -// When using this class from language wrappers (Tcl, Python, or Java), -// the vtkInstantiator should be able to create any class from any kit -// that has been loaded. -// -// In C++ code, one should include the header for each kit from which -// one wishes to create instances through vtkInstantiator. This is -// necessary to ensure proper linking when building static libraries. -// Be careful, though, because including each kit's header means every -// class from that kit will be linked into your executable whether or -// not the class is used. The headers are: -// -// vtkCommon - vtkCommonInstantiator.h -// vtkFiltering - vtkFilteringInstantiator.h -// vtkIO - vtkIOInstantiator.h -// vtkImaging - vtkImagingInstantiator.h -// vtkGraphics - vtkGraphicsInstantiator.h -// vtkRendering - vtkRenderingInstantiator.h -// vtkVolumeRendering - vtkVolumeRenderingInstantiator.h -// vtkHybrid - vtkHybridInstantiator.h -// vtkParallel - vtkParallelInstantiator.h -// -// The VTK_MAKE_INSTANTIATOR() command in CMake is used to automatically -// generate the creator registration for each VTK library. It can also -// be used to create registration code for VTK-style user libraries -// that are linked to vtkCommon. After using this command to register -// classes from a new library, the generated header must be included. -// +/** + * @class vtkInstantiator + * @brief create an instance of any VTK class from its name. + * + * vtkInstantiator provides an interface to create an instance of any + * VTK class from its name. Instances are created through registered + * pointers to functions returning the objects. New classes can also be + * registered with the creator. VTK libraries automatically register + * their classes with the creator when they are loaded. Instances are + * created using the static New() method, so the normal vtkObjectFactory + * mechanism is still invoked. + * + * When using this class from language wrappers (Tcl, Python, or Java), + * the vtkInstantiator should be able to create any class from any kit + * that has been loaded. + * + * In C++ code, one should include the header for each kit from which + * one wishes to create instances through vtkInstantiator. This is + * necessary to ensure proper linking when building static libraries. + * Be careful, though, because including each kit's header means every + * class from that kit will be linked into your executable whether or + * not the class is used. The headers are: + * + * vtkCommon - vtkCommonInstantiator.h + * vtkFiltering - vtkFilteringInstantiator.h + * vtkIO - vtkIOInstantiator.h + * vtkImaging - vtkImagingInstantiator.h + * vtkGraphics - vtkGraphicsInstantiator.h + * vtkRendering - vtkRenderingInstantiator.h + * vtkVolumeRendering - vtkVolumeRenderingInstantiator.h + * vtkHybrid - vtkHybridInstantiator.h + * vtkParallel - vtkParallelInstantiator.h + * + * The VTK_MAKE_INSTANTIATOR() command in CMake is used to automatically + * generate the creator registration for each VTK library. It can also + * be used to create registration code for VTK-style user libraries + * that are linked to vtkCommon. After using this command to register + * classes from a new library, the generated header must be included. + * +*/ #ifndef vtkInstantiator_h #define vtkInstantiator_h @@ -70,26 +73,29 @@ public: vtkTypeMacro(vtkInstantiator,vtkObject); void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE; - // Description: - // Create an instance of the class whose name is given. If creation - // fails, a NULL pointer is returned. + /** + * Create an instance of the class whose name is given. If creation + * fails, a NULL pointer is returned. + */ VTK_NEWINSTANCE static vtkObject* CreateInstance(const char* className); typedef vtkObject* (*CreateFunction)(); - // Description: - // Register a function to create instances of the class whose name - // is given. This allows more than one create function to be - // registered for the same class. The first one registered is used - // until it is unregistered. + /** + * Register a function to create instances of the class whose name + * is given. This allows more than one create function to be + * registered for the same class. The first one registered is used + * until it is unregistered. + */ static void RegisterInstantiator(const char* className, CreateFunction createFunction); - // Description: - // Unregister the instance creation of the class whose name is - // given. This will unregister the function given, but any other - // function registered for the same class will be left untouched. + /** + * Unregister the instance creation of the class whose name is + * given. This will unregister the function given, but any other + * function registered for the same class will be left untouched. + */ static void UnRegisterInstantiator(const char* className, CreateFunction createFunction); diff --git a/Common/Core/vtkIntArray.h b/Common/Core/vtkIntArray.h index 9b96b3b857ecf9fa82e4bd9f006d57245d7c3009..9ad37e2ce084d31e55e3b2ce67aed7b2e9e32195 100644 --- a/Common/Core/vtkIntArray.h +++ b/Common/Core/vtkIntArray.h @@ -12,15 +12,18 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkIntArray - dynamic, self-adjusting array of int -// .SECTION Description -// vtkIntArray is an array of values of type int. It provides -// methods for insertion and retrieval of values and will -// automatically resize itself to hold new data. -// -// The C++ standard does not define the exact size of the int type, so use -// of this type directly is discouraged. If an array of 32 bit integers is -// needed, prefer vtkTypeInt32Array to this class. +/** + * @class vtkIntArray + * @brief dynamic, self-adjusting array of int + * + * vtkIntArray is an array of values of type int. It provides + * methods for insertion and retrieval of values and will + * automatically resize itself to hold new data. + * + * The C++ standard does not define the exact size of the int type, so use + * of this type directly is discouraged. If an array of 32 bit integers is + * needed, prefer vtkTypeInt32Array to this class. +*/ #ifndef vtkIntArray_h #define vtkIntArray_h @@ -50,19 +53,22 @@ public: vtkCreateWrappedArrayInterface(int); #endif - // Description: - // A faster alternative to SafeDownCast for downcasting vtkAbstractArrays. + /** + * A faster alternative to SafeDownCast for downcasting vtkAbstractArrays. + */ static vtkIntArray* FastDownCast(vtkAbstractArray *source) { return static_cast(Superclass::FastDownCast(source)); } - // Description: - // Get the minimum data value in its native type. + /** + * Get the minimum data value in its native type. + */ static int GetDataTypeValueMin() { return VTK_INT_MIN; } - // Description: - // Get the maximum data value in its native type. + /** + * Get the maximum data value in its native type. + */ static int GetDataTypeValueMax() { return VTK_INT_MAX; } protected: diff --git a/Common/Core/vtkLargeInteger.h b/Common/Core/vtkLargeInteger.h index cb8219bbb63b1af5743d1138494feaef8ffe8fad..651be8ac059a8531a81e83aed8838ec08f738c2b 100644 --- a/Common/Core/vtkLargeInteger.h +++ b/Common/Core/vtkLargeInteger.h @@ -12,7 +12,10 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkLargeInteger - class for arbitrarily large ints +/** + * @class vtkLargeInteger + * @brief class for arbitrarily large ints +*/ #ifndef vtkLargeInteger_h #define vtkLargeInteger_h diff --git a/Common/Core/vtkLongArray.h b/Common/Core/vtkLongArray.h index 3e2a26a913c217e474d743e05bc23df40aff36eb..5f70d9ff3aef8ef5ea5b959da7b3df27d1916638 100644 --- a/Common/Core/vtkLongArray.h +++ b/Common/Core/vtkLongArray.h @@ -12,16 +12,19 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkLongArray - dynamic, self-adjusting array of long -// .SECTION Description -// vtkLongArray is an array of values of type long. It provides -// methods for insertion and retrieval of values and will -// automatically resize itself to hold new data. -// -// The C++ standard does not define the exact size of the long type, so use -// of this type directly is discouraged. If an array of 32 bit integers is -// needed, prefer vtkTypeInt32Array to this class. If an array of 64 bit -// integers is needed, prefer vtkTypeInt64Array to this class. +/** + * @class vtkLongArray + * @brief dynamic, self-adjusting array of long + * + * vtkLongArray is an array of values of type long. It provides + * methods for insertion and retrieval of values and will + * automatically resize itself to hold new data. + * + * The C++ standard does not define the exact size of the long type, so use + * of this type directly is discouraged. If an array of 32 bit integers is + * needed, prefer vtkTypeInt32Array to this class. If an array of 64 bit + * integers is needed, prefer vtkTypeInt64Array to this class. +*/ #ifndef vtkLongArray_h #define vtkLongArray_h @@ -51,19 +54,22 @@ public: vtkCreateWrappedArrayInterface(long); #endif - // Description: - // A faster alternative to SafeDownCast for downcasting vtkAbstractArrays. + /** + * A faster alternative to SafeDownCast for downcasting vtkAbstractArrays. + */ static vtkLongArray* FastDownCast(vtkAbstractArray *source) { return static_cast(Superclass::FastDownCast(source)); } - // Description: - // Get the minimum data value in its native type. + /** + * Get the minimum data value in its native type. + */ static long GetDataTypeValueMin() { return VTK_LONG_MIN; } - // Description: - // Get the maximum data value in its native type. + /** + * Get the maximum data value in its native type. + */ static long GetDataTypeValueMax() { return VTK_LONG_MAX; } protected: diff --git a/Common/Core/vtkLongLongArray.h b/Common/Core/vtkLongLongArray.h index e5bd4355c41452ab3721c1762c1aa5fa1e8e9a43..59b310e323a467edf9ba977556289dade2035478 100644 --- a/Common/Core/vtkLongLongArray.h +++ b/Common/Core/vtkLongLongArray.h @@ -12,15 +12,18 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkLongLongArray - dynamic, self-adjusting array of long long -// .SECTION Description -// vtkLongLongArray is an array of values of type long long. -// It provides methods for insertion and retrieval of values and will -// automatically resize itself to hold new data. -// -// This class should not be used directly, as it only exists on systems -// where the long long type is defined. If you need a 64 bit integer -// data array, use vtkTypeInt64Array instead. +/** + * @class vtkLongLongArray + * @brief dynamic, self-adjusting array of long long + * + * vtkLongLongArray is an array of values of type long long. + * It provides methods for insertion and retrieval of values and will + * automatically resize itself to hold new data. + * + * This class should not be used directly, as it only exists on systems + * where the long long type is defined. If you need a 64 bit integer + * data array, use vtkTypeInt64Array instead. +*/ #ifndef vtkLongLongArray_h #define vtkLongLongArray_h @@ -50,19 +53,22 @@ public: vtkCreateWrappedArrayInterface(long long); #endif - // Description: - // A faster alternative to SafeDownCast for downcasting vtkAbstractArrays. + /** + * A faster alternative to SafeDownCast for downcasting vtkAbstractArrays. + */ static vtkLongLongArray* FastDownCast(vtkAbstractArray *source) { return static_cast(Superclass::FastDownCast(source)); } - // Description: - // Get the minimum data value in its native type. + /** + * Get the minimum data value in its native type. + */ static long long GetDataTypeValueMin() { return VTK_LONG_LONG_MIN; } - // Description: - // Get the maximum data value in its native type. + /** + * Get the maximum data value in its native type. + */ static long long GetDataTypeValueMax() { return VTK_LONG_LONG_MAX; } protected: diff --git a/Common/Core/vtkLookupTable.h b/Common/Core/vtkLookupTable.h index 514a1048daaee1f9021873b9e09f7bea28db5599..8512f7c661e0af96dafa50a4f522c6c5d96a47df 100644 --- a/Common/Core/vtkLookupTable.h +++ b/Common/Core/vtkLookupTable.h @@ -12,41 +12,44 @@ PURPOSE. See the above copyright notice for more information. =========================================================================*/ -// .NAME vtkLookupTable - map scalar values into colors via a lookup table -// .SECTION Description -// vtkLookupTable is an object that is used by mapper objects to map scalar -// values into RGBA (red-green-blue-alpha transparency) color specification, -// or RGBA into scalar values. The color table can be created by direct -// insertion of color values, or by specifying a hue, saturation, value, and -// alpha range and generating a table. -// -// A special color for NaN values in the data can be specified via -// SetNanColor(). In addition, a color for data values below the -// lookup table range minimum can be specified with -// SetBelowRangeColor(), and that color will be used for values below -// the range minimum when UseBelowRangeColor is on. Likewise, a color -// for data values above the lookup table range maximum can be -// specified with SetAboveRangeColor(), and it is used when -// UseAboveRangeColor is on. -// -// This class behaves differently depending on how \a IndexedLookup is set. -// When true, vtkLookupTable enters a mode for representing categorical color maps. -// By setting \a IndexedLookup to true, you indicate that the annotated -// values are the only valid values for which entries in the color table -// should be returned. The colors in the lookup \a Table are assigned -// to annotated values by taking the modulus of their index in the list -// of annotations. \a IndexedLookup changes the behavior of \a GetIndex, -// which in turn changes the way \a MapScalarsThroughTable2 behaves; -// when \a IndexedLookup is true, \a MapScalarsThroughTable2 will search for -// scalar values in \a AnnotatedValues and use the resulting index to -// determine the color. If a scalar value is not present in \a AnnotatedValues, -// then \a NanColor will be used. -// -// .SECTION Caveats -// You need to explicitly call Build() when constructing the LUT by hand. -// -// .SECTION See Also -// vtkLogLookupTable vtkWindowLevelLookupTable +/** + * @class vtkLookupTable + * @brief map scalar values into colors via a lookup table + * + * vtkLookupTable is an object that is used by mapper objects to map scalar + * values into RGBA (red-green-blue-alpha transparency) color specification, + * or RGBA into scalar values. The color table can be created by direct + * insertion of color values, or by specifying a hue, saturation, value, and + * alpha range and generating a table. + * + * A special color for NaN values in the data can be specified via + * SetNanColor(). In addition, a color for data values below the + * lookup table range minimum can be specified with + * SetBelowRangeColor(), and that color will be used for values below + * the range minimum when UseBelowRangeColor is on. Likewise, a color + * for data values above the lookup table range maximum can be + * specified with SetAboveRangeColor(), and it is used when + * UseAboveRangeColor is on. + * + * This class behaves differently depending on how \a IndexedLookup is set. + * When true, vtkLookupTable enters a mode for representing categorical color maps. + * By setting \a IndexedLookup to true, you indicate that the annotated + * values are the only valid values for which entries in the color table + * should be returned. The colors in the lookup \a Table are assigned + * to annotated values by taking the modulus of their index in the list + * of annotations. \a IndexedLookup changes the behavior of \a GetIndex, + * which in turn changes the way \a MapScalarsThroughTable2 behaves; + * when \a IndexedLookup is true, \a MapScalarsThroughTable2 will search for + * scalar values in \a AnnotatedValues and use the resulting index to + * determine the color. If a scalar value is not present in \a AnnotatedValues, + * then \a NanColor will be used. + * + * @warning + * You need to explicitly call Build() when constructing the LUT by hand. + * + * @sa + * vtkLogLookupTable vtkWindowLevelLookupTable +*/ #ifndef vtkLookupTable_h #define vtkLookupTable_h @@ -65,256 +68,328 @@ class VTKCOMMONCORE_EXPORT vtkLookupTable : public vtkScalarsToColors { public: - // Description: - // Constants for offsets of special colors (e.g., NanColor, BelowRangeColor, - // AboveRangeColor) from the maximum index in the lookup table. + //@{ + /** + * Constants for offsets of special colors (e.g., NanColor, BelowRangeColor, + * AboveRangeColor) from the maximum index in the lookup table. + */ const static vtkIdType BELOW_RANGE_COLOR_INDEX; const static vtkIdType ABOVE_RANGE_COLOR_INDEX; const static vtkIdType NAN_COLOR_INDEX; const static vtkIdType NUMBER_OF_SPECIAL_COLORS; + //@} - // Description: - // Construct with range=[0,1]; and hsv ranges set up for rainbow color table - // (from red to blue). + /** + * Construct with range=[0,1]; and hsv ranges set up for rainbow color table + * (from red to blue). + */ static vtkLookupTable *New(); vtkTypeMacro(vtkLookupTable,vtkScalarsToColors); void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE; - // Description: - // Return true if all of the values defining the mapping have an opacity - // equal to 1. + /** + * Return true if all of the values defining the mapping have an opacity + * equal to 1. + */ int IsOpaque() VTK_OVERRIDE; - // Description: - // Allocate a color table of specified size. + /** + * Allocate a color table of specified size. + */ int Allocate(int sz=256, int ext=256); - // Description: - // Generate lookup table from hue, saturation, value, alpha min/max values. - // Table is built from linear ramp of each value. + /** + * Generate lookup table from hue, saturation, value, alpha min/max values. + * Table is built from linear ramp of each value. + */ void Build() VTK_OVERRIDE; - // Description: - // Force the lookup table to regenerate from hue, saturation, value, - // and alpha min/max values. Table is built from a linear ramp of - // each value. ForceBuild() is useful if a lookup table has been - // defined manually (using SetTableValue) and then an application - // decides to rebuild the lookup table using the implicit process. + /** + * Force the lookup table to regenerate from hue, saturation, value, + * and alpha min/max values. Table is built from a linear ramp of + * each value. ForceBuild() is useful if a lookup table has been + * defined manually (using SetTableValue) and then an application + * decides to rebuild the lookup table using the implicit process. + */ virtual void ForceBuild(); - // Description: - // Copies the "special" colors into the given table. + /** + * Copies the "special" colors into the given table. + */ void BuildSpecialColors(); - // Description: - // Set the shape of the table ramp to either linear or S-curve. - // The default is S-curve, which tails off gradually at either end. - // The equation used for the S-curve is y = (sin((x - 1/2)*pi) + 1)/2, - // while the equation for the linear ramp is simply y = x. For an - // S-curve greyscale ramp, you should set NumberOfTableValues to 402 - // (which is 256*pi/2) to provide room for the tails of the ramp. - // The equation for the SQRT is y = sqrt(x). + //@{ + /** + * Set the shape of the table ramp to either linear or S-curve. + * The default is S-curve, which tails off gradually at either end. + * The equation used for the S-curve is y = (sin((x - 1/2)*pi) + 1)/2, + * while the equation for the linear ramp is simply y = x. For an + * S-curve greyscale ramp, you should set NumberOfTableValues to 402 + * (which is 256*pi/2) to provide room for the tails of the ramp. + * The equation for the SQRT is y = sqrt(x). + */ vtkSetMacro(Ramp,int); void SetRampToLinear() { this->SetRamp(VTK_RAMP_LINEAR); }; void SetRampToSCurve() { this->SetRamp(VTK_RAMP_SCURVE); }; void SetRampToSQRT() { this->SetRamp(VTK_RAMP_SQRT); }; vtkGetMacro(Ramp,int); - - // Description: - // Set the type of scale to use, linear or logarithmic. The default - // is linear. If the scale is logarithmic, then the TableRange must not - // cross the value zero. + //@} + + //@{ + /** + * Set the type of scale to use, linear or logarithmic. The default + * is linear. If the scale is logarithmic, then the TableRange must not + * cross the value zero. + */ void SetScale(int scale); void SetScaleToLinear() { this->SetScale(VTK_SCALE_LINEAR); }; void SetScaleToLog10() { this->SetScale(VTK_SCALE_LOG10); }; vtkGetMacro(Scale,int); + //@} + + //@{ + /** + * Set/Get the minimum/maximum scalar values for scalar mapping. Scalar + * values less than minimum range value are clamped to minimum range value. + * Scalar values greater than maximum range value are clamped to maximum + * range value. - // Description: - // Set/Get the minimum/maximum scalar values for scalar mapping. Scalar - // values less than minimum range value are clamped to minimum range value. - // Scalar values greater than maximum range value are clamped to maximum - // range value. - // - // The \a TableRange values are only used when \a IndexedLookup is false. + * The \a TableRange values are only used when \a IndexedLookup is false. + */ void SetTableRange(double r[2]); virtual void SetTableRange(double min, double max); vtkGetVectorMacro(TableRange,double,2); + //@} - // Description: - // Set the range in hue (using automatic generation). Hue ranges -