Slicer  4.8
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkSlicerScalarBarActor.h
Go to the documentation of this file.
1 /*==============================================================================
2 
3  Program: 3D Slicer
4 
5  Portions (c) Copyright Brigham and Women's Hospital (BWH) All Rights Reserved.
6 
7  See COPYRIGHT.txt
8  or http://www.slicer.org/copyright/copyright.txt for details.
9 
10  Unless required by applicable law or agreed to in writing, software
11  distributed under the License is distributed on an "AS IS" BASIS,
12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  See the License for the specific language governing permissions and
14  limitations under the License.
15 
16  This file was originally developed by Kevin Wang, Princess Margaret Cancer Centre
17  and was supported by Cancer Care Ontario (CCO)'s ACRU program
18  with funds provided by the Ontario Ministry of Health and Long-Term Care
19  and Ontario Consortium for Adaptive Interventions in Radiation Oncology (OCAIRO)
20 
21 ==============================================================================*/
22 
27 
28 #ifndef __vtkSlicerScalarBarActor_h
29 #define __vtkSlicerScalarBarActor_h
30 
31 // VTK includes
32 #include "vtkScalarBarActor.h"
33 #include "vtkStringArray.h"
34 #include "vtkVersion.h"
35 
36 // MRMLLogic includes
37 #include "vtkSlicerColorsModuleVTKWidgetsExport.h"
38 
40 class VTK_SLICER_COLORS_VTKWIDGETS_EXPORT vtkSlicerScalarBarActor
41  : public vtkScalarBarActor
42 {
43 public:
44  // The usual VTK class functions
45  static vtkSlicerScalarBarActor *New();
46  vtkTypeMacro(vtkSlicerScalarBarActor,vtkScalarBarActor);
47  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
48 
50  vtkGetMacro(UseAnnotationAsLabel, int);
52  vtkSetMacro(UseAnnotationAsLabel, int);
54  vtkBooleanMacro(UseAnnotationAsLabel, int);
55 
56 protected:
59 
60  // Description:
61  // Determine the size and placement of any tick marks to be rendered.
62  //
63  // This method must set this->P->TickBox.
64  // It may depend on layout performed by ComputeScalarBarLength.
65  //
66  // The default implementation creates exactly this->NumberOfLabels
67  // tick marks, uniformly spaced on a linear or logarithmic scale.
68  virtual void LayoutTicks() VTK_OVERRIDE;
69 
71  int UseAnnotationAsLabel;
72 
73 private:
74  vtkSlicerScalarBarActor(const vtkSlicerScalarBarActor&); // Not implemented.
75  void operator=(const vtkSlicerScalarBarActor&); // Not implemented.
76 };
77 
78 #endif