Commit 5e718ccb authored by Ben Boeckel's avatar Ben Boeckel

Common/Core: use VTK_SIZEHINT

parent f6321f11
......@@ -324,8 +324,8 @@ vtkArrayDownCast_TemplateFastCastMacro(vtkAOSDataArrayTemplate)
void InsertValue(vtkIdType id, T f) \
VTK_EXPECTS(0 <= id); \
vtkIdType InsertNextValue(T f); \
T *GetValueRange(int comp); \
T *GetValueRange(); \
T *GetValueRange(int comp) VTK_SIZEHINT(2); \
T *GetValueRange() VTK_SIZEHINT(2); \
T* WritePointer(vtkIdType id, vtkIdType number); \
T* GetPointer(vtkIdType id); \
void SetArray(VTK_ZEROCOPY T* array, vtkIdType size, int save); \
......
......@@ -118,15 +118,20 @@ public:
double GetTuple1(vtkIdType tupleIdx)
VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples());
double* GetTuple2(vtkIdType tupleIdx)
VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples());
VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples())
VTK_SIZEHINT(2);
double* GetTuple3(vtkIdType tupleIdx)
VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples());
VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples())
VTK_SIZEHINT(3);
double* GetTuple4(vtkIdType tupleIdx)
VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples());
VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples())
VTK_SIZEHINT(4);
double* GetTuple6(vtkIdType tupleIdx)
VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples());
VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples())
VTK_SIZEHINT(6);
double* GetTuple9(vtkIdType tupleIdx)
VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples());
VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples())
VTK_SIZEHINT(9);
//@}
void SetTuple(vtkIdType dstTupleIdx, vtkIdType srcTupleIdx,
......@@ -380,7 +385,7 @@ public:
* modified or the requested component changes.
* THIS METHOD IS NOT THREAD SAFE.
*/
double* GetRange(int comp)
double* GetRange(int comp) VTK_SIZEHINT(2)
{
this->GetRange(this->Range, comp);
return this->Range;
......@@ -394,7 +399,7 @@ public:
* on subsequent calls to GetRange() unless the array is modified.
* THIS METHOD IS NOT THREAD SAFE.
*/
double* GetRange()
double* GetRange() VTK_SIZEHINT(2)
{
return this->GetRange(0);
}
......@@ -435,7 +440,7 @@ public:
* modified or the requested component changes.
* THIS METHOD IS NOT THREAD SAFE.
*/
double *GetFiniteRange(int comp)
double *GetFiniteRange(int comp) VTK_SIZEHINT(2)
{
this->GetFiniteRange(this->FiniteRange, comp);
return this->FiniteRange;
......@@ -449,7 +454,7 @@ public:
* on subsequent calls to GetRange() unless the array is modified.
* THIS METHOD IS NOT THREAD SAFE.
*/
double *GetFiniteRange()
double *GetFiniteRange() VTK_SIZEHINT(2)
{
return this->GetFiniteRange(0);
}
......
......@@ -222,14 +222,14 @@ public:
* native data type.
*/
void GetValueRange(ValueType range[2], int comp);
ValueType *GetValueRange(int comp);
ValueType *GetValueRange(int comp) VTK_SIZEHINT(2);
//@}
/**
* Get the range of array values for the 0th component in the
* native data type.
*/
ValueType *GetValueRange() { return this->GetValueRange(0); }
ValueType *GetValueRange() VTK_SIZEHINT(2) { return this->GetValueRange(0); }
void GetValueRange(ValueType range[2]) { this->GetValueRange(range, 0); }
/**
......
......@@ -316,7 +316,7 @@ public:
* Return an RGBA color value for the given index into the lookup table. Color
* components are expressed as [0,1] double values.
*/
double *GetTableValue(vtkIdType id);
double *GetTableValue(vtkIdType id) VTK_SIZEHINT(4);
/**
* Return an RGBA color value for the given index into the lookup table. Color
......@@ -348,7 +348,7 @@ public:
* Sets/Gets the range of scalars which will be mapped. This is a duplicate
* of Get/SetTableRange.
*/
double *GetRange() override
double *GetRange() VTK_SIZEHINT(2) override
{ return this->GetTableRange(); }
void SetRange(double min, double max) override
{ this->SetTableRange(min, max); }
......
......@@ -956,8 +956,8 @@ public:
static void RGBToHSV(const float rgb[3], float hsv[3])
{ RGBToHSV(rgb[0], rgb[1], rgb[2], hsv, hsv+1, hsv+2); }
static void RGBToHSV(float r, float g, float b, float *h, float *s, float *v);
static double* RGBToHSV(const double rgb[3]);
static double* RGBToHSV(double r, double g, double b);
static double* RGBToHSV(const double rgb[3]) VTK_SIZEHINT(3);
static double* RGBToHSV(double r, double g, double b) VTK_SIZEHINT(3);
static void RGBToHSV(const double rgb[3], double hsv[3])
{ RGBToHSV(rgb[0], rgb[1], rgb[2], hsv, hsv+1, hsv+2); }
static void RGBToHSV(double r, double g, double b, double *h, double *s, double *v);
......@@ -974,8 +974,8 @@ public:
static void HSVToRGB(const float hsv[3], float rgb[3])
{ HSVToRGB(hsv[0], hsv[1], hsv[2], rgb, rgb+1, rgb+2); }
static void HSVToRGB(float h, float s, float v, float *r, float *g, float *b);
static double* HSVToRGB(const double hsv[3]);
static double* HSVToRGB(double h, double s, double v);
static double* HSVToRGB(const double hsv[3]) VTK_SIZEHINT(3);
static double* HSVToRGB(double h, double s, double v) VTK_SIZEHINT(3);
static void HSVToRGB(const double hsv[3], double rgb[3])
{ HSVToRGB(hsv[0], hsv[1], hsv[2], rgb, rgb+1, rgb+2); }
static void HSVToRGB(double h, double s, double v, double *r, double *g, double *b);
......@@ -990,7 +990,7 @@ public:
}
static void LabToXYZ(double L, double a, double b,
double *x, double *y, double *z);
static double *LabToXYZ(const double lab[3]);
static double *LabToXYZ(const double lab[3]) VTK_SIZEHINT(3);
//@}
//@{
......@@ -1002,7 +1002,7 @@ public:
}
static void XYZToLab(double x, double y, double z,
double *L, double *a, double *b);
static double *XYZToLab(const double xyz[3]);
static double *XYZToLab(const double xyz[3]) VTK_SIZEHINT(3);
//@}
//@{
......@@ -1014,7 +1014,7 @@ public:
}
static void XYZToRGB(double x, double y, double z,
double *r, double *g, double *b);
static double *XYZToRGB(const double xyz[3]);
static double *XYZToRGB(const double xyz[3]) VTK_SIZEHINT(3);
//@}
//@{
......@@ -1026,7 +1026,7 @@ public:
}
static void RGBToXYZ(double r, double g, double b,
double *x, double *y, double *z);
static double *RGBToXYZ(const double rgb[3]);
static double *RGBToXYZ(const double rgb[3]) VTK_SIZEHINT(3);
//@}
//@{
......@@ -1041,7 +1041,7 @@ public:
}
static void RGBToLab(double red, double green, double blue,
double *L, double *a, double *b);
static double *RGBToLab(const double rgb[3]);
static double *RGBToLab(const double rgb[3]) VTK_SIZEHINT(3);
//@}
//@{
......@@ -1053,7 +1053,7 @@ public:
}
static void LabToRGB(double L, double a, double b,
double *red, double *green, double *blue);
static double *LabToRGB(const double lab[3]);
static double *LabToRGB(const double lab[3]) VTK_SIZEHINT(3);
//@}
//@{
......
......@@ -133,6 +133,7 @@ public:
*/
double *GetPoint(vtkIdType id)
VTK_EXPECTS(0 <= id && id < GetNumberOfPoints())
VTK_SIZEHINT(3)
{ return this->Data->GetTuple(id); }
/**
......@@ -141,6 +142,7 @@ public:
*/
void GetPoint(vtkIdType id, double x[3])
VTK_EXPECTS(0 <= id && id < GetNumberOfPoints())
VTK_SIZEHINT(3)
{ this->Data->GetTuple(id,x); }
/**
......@@ -225,7 +227,7 @@ public:
/**
* Return the bounds of the points.
*/
double *GetBounds();
double *GetBounds() VTK_SIZEHINT(6);
/**
* Return the bounds of the points.
......
......@@ -131,7 +131,7 @@ public:
* and its values are only valid as long as another method invocation is not
* performed. Prefer GetPoint() with the return value in argument.
*/
double *GetPoint(vtkIdType id) { return this->Data->GetTuple(id);}
double *GetPoint(vtkIdType id) VTK_SIZEHINT(2) { return this->Data->GetTuple(id);}
/**
* Copy point components into user provided array v[2] for specified id.
......@@ -197,7 +197,7 @@ public:
/**
* Return the bounds of the points.
*/
double *GetBounds();
double *GetBounds() VTK_SIZEHINT(4);
/**
* Return the bounds of the points.
......
......@@ -80,7 +80,7 @@ public:
/**
* Sets/Gets the range of scalars that will be mapped.
*/
virtual double *GetRange();
virtual double *GetRange() VTK_SIZEHINT(2);
virtual void SetRange(double min, double max);
virtual void SetRange(const double rng[2])
{this->SetRange(rng[0],rng[1]);}
......@@ -102,7 +102,7 @@ public:
* Map one value through the lookup table and return the color as
* an RGB array of doubles between 0 and 1.
*/
double *GetColor(double v)
double *GetColor(double v) VTK_SIZEHINT(3)
{this->GetColor(v,this->RGB); return this->RGB;}
/**
......
......@@ -59,7 +59,7 @@ public:
* Set/Get the position in screen coordinates of the rendering window.
* Measured in pixels.
*/
virtual int *GetPosition();
virtual int *GetPosition() VTK_SIZEHINT(2);
virtual void SetPosition(int,int);
virtual void SetPosition(int a[2]);
//@}
......@@ -68,7 +68,7 @@ public:
/**
* Set/Get the size of the window in screen coordinates in pixels.
*/
virtual int *GetSize();
virtual int *GetSize() VTK_SIZEHINT(2);
virtual void SetSize(int,int);
virtual void SetSize(int a[2]);
//@}
......@@ -77,12 +77,12 @@ public:
* GetSize() returns the size * this->TileScale, whereas this method returns
* the size without multiplying with the tile scale. Measured in pixels.
*/
int *GetActualSize();
int *GetActualSize() VTK_SIZEHINT(2);
/**
* Get the current size of the screen in pixels.
*/
virtual int *GetScreenSize() = 0;
virtual int *GetScreenSize() VTK_SIZEHINT(2) = 0;
//@{
/**
......
......@@ -2,16 +2,9 @@ vtkBoundingBox GetMinPoint 307 3
vtkBoundingBox GetMaxPoint 307 3
vtkBox GetBounds 307 6
vtkCell GetBounds 307 6
vtkCharArray GetValueRange 303 2
vtkCocoaRenderWindow GetPosition 304 2
vtkCocoaRenderWindow GetScreenSize 304 2
vtkCocoaRenderWindow GetSize 304 2
vtkDataArray GetRange 307 2
vtkDataArray GetTuple2 307 2
vtkDataArray GetTuple3 307 3
vtkDataArray GetTuple4 307 4
vtkDataArray GetTuple6 307 6
vtkDataArray GetTuple9 307 9
vtkDataObject GetUpdateExtent 304 6
vtkDataObject GetWholeExtent 304 6
vtkDataSet GetBounds 307 6
......@@ -22,13 +15,11 @@ vtkDICOMImageReader GetImageOrientationPatient 301 6
vtkDICOMImageReader GetImagePositionPatient 301 3
vtkDICOMImageReader GetPixelSpacing 307 3
vtkDirectionEncoder GetDecodedGradient 301 3
vtkDoubleArray GetValueRange 307 2
vtkEGLRenderWindow GetPosition 304 2
vtkEGLRenderWindow GetScreenSize 304 2
vtkEGLRenderWindow GetSize 304 2
vtkExodusIIReader GetModeShapesRange 304 2
vtkExtractUnstructuredGrid GetExtent 307 6
vtkFloatArray GetValueRange 301 2
vtkFunctionParser GetVectorResult 307 3
vtkFunctionParser GetVectorVariableValue 307 3
vtkGenericOpenGLRenderWindow GetPosition 304 2
......@@ -41,7 +32,6 @@ vtkHexahedron GetEdgeArray 304 2
vtkHexahedron GetFaceArray 304 4
vtkHyperOctree GetPoint 307 3
vtkHyperStreamline GetStartPosition 307 3
vtkIDTypeArray GetValueRange 30A 2
vtkImageAccumulate GetComponentExtent 304 6
vtkImageButterworthHighPass GetCutOff 307 3
vtkImageButterworthLowPass GetCutOff 307 3
......@@ -74,7 +64,6 @@ vtkImageVectorConvolve GetKernel 301 3
vtkImageViewer GetPosition 304 2
vtkImageViewer GetSize 304 2
vtkImplicitFunction FunctionGradient 307 3
vtkIntArray GetValueRange 304 2
vtkIOSRenderWindow GetPosition 304 2
vtkIOSRenderWindow GetScreenSize 304 2
vtkIOSRenderWindow GetSize 304 2
......@@ -92,25 +81,6 @@ vtkLinearTransform TransformFloatNormal 301 3
vtkLinearTransform TransformFloatVector 301 3
vtkLinearTransform TransformNormal 307 3
vtkLinearTransform TransformVector 307 3
vtkLongArray GetValueRange 306 2
vtkLongLongArray GetValueRange 30B 2
vtkLookupTable GetColor 307 3
vtkLookupTable GetRange 307 2
vtkLookupTable GetAlphaRange 307 2
vtkLookupTable GetHueRange 307 2
vtkLookupTable GetSaturationRange 307 2
vtkLookupTable GetTableValue 307 4
vtkMath HSVToRGB 307 3
vtkMath LabToRGB 307 3
vtkMath LabToXYZ 307 3
vtkMath RGBToHSV 307 3
vtkMath RGBToLab 307 3
vtkMath RGBToXYZ 307 3
vtkMath SolveCubic 307 5
vtkMath SolveLinear 307 3
vtkMath SolveQuadratic 307 4
vtkMath XYZToLab 307 3
vtkMath XYZToRGB 307 3
vtkMatrix4x4 MultiplyDoublePoint 307 4
vtkMatrix4x4 MultiplyFloatPoint 301 4
vtkMatrix4x4 MultiplyPoint 301 4
......@@ -123,10 +93,6 @@ vtkOSOpenGLRenderWindow GetSize 304 2
vtkPainterPolyDataMapper GetBounds 307 6
vtkPiecewiseFunction GetRange 307 2
vtkPointSet GetPoint 307 3
vtkPoints GetBounds 307 6
vtkPoints GetPoint 307 3
vtkPoints2D GetBounds 307 4
vtkPoints2D GetPoint 307 2
vtkPolyData GetUpdateExtent 304 6
vtkPolygon ConvertEllipseToImplicit 307 5
vtkPolygon FitEllipse 307 6
......@@ -142,10 +108,6 @@ vtkRayCaster GetParallelStartPosition 301 3
vtkRectilinearGrid GetExtent 304 6
vtkRectilinearGrid GetPoint 307 3
vtkRecursiveSphereDirectionEncoder GetDecodedGradient 301 3
vtkScalarsToColors GetColor 307 3
vtkScalarsToColors GetRange 307 2
vtkShortArray GetValueRange 305 2
vtkSignedCharArray GetValueRange 30D 2
vtkSphericalDirectionEncoder GetDecodedGradient 301 3
vtkStreamer GetStartPosition 307 3
vtkStructuredGrid GetDimensions 304 3
......@@ -162,15 +124,6 @@ vtkTransform GetOrientationWXYZ 307 4
vtkTransform GetPoint 307 4
vtkTransform GetPosition 307 3
vtkTransform GetScale 307 3
vtkTypeInt64Array GetValueRange 30B 2
vtkTypeInt64Array GetValueRange 30C 2
vtkTypeUInt64Array GetValueRange 31B 2
vtkTypeUInt64Array GetValueRange 31C 2
vtkUnsignedCharArray GetValueRange 313 2
vtkUnsignedIntArray GetValueRange 314 2
vtkUnsignedLongArray GetValueRange 316 2
vtkUnsignedLongLongArray GetValueRange 31B 2
vtkUnsignedShortArray GetValueRange 315 2
vtkUnstructuredGrid GetUpdateExtent 304 6
vtkViewRays GetParallelIncrements 301 2
vtkViewRays GetParallelStartPosition 301 3
......@@ -183,9 +136,6 @@ vtkWedge GetFaceArray 304 4
vtkWin32OpenGLRenderWindow GetPosition 304 2
vtkWin32OpenGLRenderWindow GetScreenSize 304 2
vtkWin32OpenGLRenderWindow GetSize 304 2
vtkWindow GetPosition 304 2
vtkWindow GetSize 304 2
vtkWindow GetScreenSize 304 2
vtkWindowLevelLookupTable GetMaximumTableValue 307 4
vtkWindowLevelLookupTable GetMinimumTableValue 307 4
vtkXOpenGLRenderWindow GetPosition 304 2
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment