debian/tmp/usr/include/KWWidgets/vtkKWHistogramSet.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Module:    $RCSfile: vtkKWHistogramSet.h,v $
00004 
00005   Copyright (c) Kitware, Inc.
00006   All rights reserved.
00007   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00008 
00009      This software is distributed WITHOUT ANY WARRANTY; without even
00010      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00011      PURPOSE.  See the above copyright notice for more information.
00012 
00013 =========================================================================*/
00014 // .NAME vtkKWHistogramSet - a set of histograms
00015 // .SECTION Description
00016 // A set of histograms.
00017 
00018 #ifndef __vtkKWHistogramSet_h
00019 #define __vtkKWHistogramSet_h
00020 
00021 #include "vtkObject.h"
00022 #include "vtkKWWidgets.h" // Needed for export symbols directives
00023 
00024 class vtkDataArray;
00025 class vtkKWHistogram;
00026 class vtkKWHistogramCallback;
00027 class vtkKWHistogramSetInternals;
00028 
00029 class KWWidgets_EXPORT vtkKWHistogramSet : public vtkObject
00030 {
00031 public:
00032   static vtkKWHistogramSet* New();
00033   vtkTypeRevisionMacro(vtkKWHistogramSet,vtkObject);
00034   void PrintSelf(ostream& os, vtkIndent indent);
00035 
00036   // Description:
00037   // Add an histogram to the pool under a given name. 
00038   // Return 1 on success, 0 otherwise.
00039   virtual int AddHistogram(vtkKWHistogram*, const char *name);
00040 
00041   // Description:
00042   // Allocate an histogram and add it in the pool under a given name. 
00043   // Return a pointer to the new histogram on success, NULL otherwise.
00044   virtual vtkKWHistogram* AllocateAndAddHistogram(const char *name);
00045 
00046   // Description:
00047   // Get the number of histogram in the pool
00048   virtual int GetNumberOfHistograms();
00049 
00050   // Description:
00051   // Retrieve an histogram (or its name) from the pool.
00052   virtual vtkKWHistogram* GetHistogramWithName(const char *name);
00053   virtual const char* GetHistogramName(vtkKWHistogram *hist);
00054   virtual vtkKWHistogram* GetNthHistogram(int index);
00055 
00056   // Description:
00057   // Query if the pool has a given histogram
00058   virtual int HasHistogramWithName(const char *name);
00059   virtual int HasHistogram(vtkKWHistogram *hist);
00060 
00061   // Description:
00062   // Remove one or all histograms. 
00063   // Return 1 on success, 0 otherwise.
00064   virtual int RemoveHistogramWithName(const char *name);
00065   virtual int RemoveHistogram(vtkKWHistogram *hist);
00066   virtual void RemoveAllHistograms();
00067 
00068   // Description:
00069   // The histogram set class is designed to share histogram between several
00070   // classes in an application. As such, since histogram are retrieved by
00071   // names, it makes sense to follow some naming guidelines. This method
00072   // provides such a guideline by computing an histogram name given the 
00073   // name of the array this histogram will be built upon, the component
00074   // that will be used in that array, and an optional tag.
00075   // The histogram name is stored in 'buffer', which should be large enough.
00076   // Return 1 on success, 0 otherwise.
00077   static int ComputeHistogramName(
00078     const char *array_name, int comp, const char *tag, char *buffer);
00079 
00080   // Description:
00081   // Allocate, add and build histograms for all components of a scalar array.
00082   // Each histogram name is built by calling ComputeHistogramName with
00083   // the scalar array, component index and 'tag' arguments.
00084   // The 'skip_components_mask' is a binary mask specifying which component
00085   // should be skipped (i.e., if the n-th bit in that mask is set, then the
00086   // histogram for that n-th component will not be considered)
00087   // Return 1 on success, 0 otherwise.
00088   virtual int AddHistograms(vtkDataArray *array, 
00089                             const char *tag = NULL, 
00090                             int skip_components_mask = 0);
00091 
00092 protected:
00093   vtkKWHistogramSet();
00094   ~vtkKWHistogramSet();
00095 
00096   //BTX
00097   // PIMPL Encapsulation for STL containers
00098   vtkKWHistogramSetInternals *Internals;
00099   //ETX
00100 
00101 private:
00102   vtkKWHistogramSet(const vtkKWHistogramSet&); // Not implemented
00103   void operator=(const vtkKWHistogramSet&); // Not implemented
00104 };
00105 
00106 #endif
00107 

Generated on Sat Dec 12 16:04:54 2009 for KWWidgets by  doxygen 1.6.1