Commit 77a35070 authored by David Gobbi's avatar David Gobbi

ENH: Change vtkImageData::Increments from int to vtkIdType to allow processing of large images

parent a0f42de9
......@@ -42,7 +42,7 @@
#include "vtkVoxel.h"
#include "vtkInformationVector.h"
vtkCxxRevisionMacro(vtkImageData, "1.12");
vtkCxxRevisionMacro(vtkImageData, "1.13");
vtkStandardNewMacro(vtkImageData);
//----------------------------------------------------------------------------
......@@ -1224,7 +1224,7 @@ int vtkImageData::GetNumberOfScalarComponents()
}
//----------------------------------------------------------------------------
int *vtkImageData::GetIncrements()
vtkIdType *vtkImageData::GetIncrements()
{
// Make sure the increments are up to date. The filter bypass and update
// mechanism make it tricky to update the increments anywhere other than here
......@@ -1233,7 +1233,7 @@ int *vtkImageData::GetIncrements()
return this->Increments;
}
void vtkImageData::GetIncrements(int &incX, int &incY, int &incZ)
void vtkImageData::GetIncrements(vtkIdType &incX, vtkIdType &incY, vtkIdType &incZ)
{
// Make sure the increments are up to date. The filter bypass and update
// mechanism make it tricky to update the increments anywhere other than here
......@@ -1244,7 +1244,7 @@ void vtkImageData::GetIncrements(int &incX, int &incY, int &incZ)
incZ = this->Increments[2];
}
void vtkImageData::GetIncrements(int inc[3])
void vtkImageData::GetIncrements(vtkIdType inc[3])
{
// Make sure the increments are up to date. The filter bypass and update
// mechanism make it tricky to update the increments anywhere other than here
......@@ -1257,8 +1257,8 @@ void vtkImageData::GetIncrements(int inc[3])
//----------------------------------------------------------------------------
void vtkImageData::GetContinuousIncrements(int extent[6], int &incX,
int &incY, int &incZ)
void vtkImageData::GetContinuousIncrements(int extent[6], vtkIdType &incX,
vtkIdType &incY, vtkIdType &incZ)
{
int e0, e1, e2, e3;
......@@ -1304,7 +1304,7 @@ void vtkImageData::ComputeIncrements()
{
return;
}
int inc = this->GetPointData()->GetScalars()->GetNumberOfComponents();
vtkIdType inc = this->GetPointData()->GetScalars()->GetNumberOfComponents();
const int* extent = this->Extent;
for (idx = 0; idx < 3; ++idx)
......@@ -1662,8 +1662,8 @@ void vtkImageDataCastExecute(vtkImageData *inData, IT *inPtr,
{
int idxR, idxY, idxZ;
int maxY, maxZ;
int inIncX, inIncY, inIncZ;
int outIncX, outIncY, outIncZ;
vtkIdType inIncX, inIncY, inIncZ;
vtkIdType outIncX, outIncY, outIncZ;
int rowLength;
// find the region to loop over
......@@ -2152,7 +2152,7 @@ vtkIdType vtkImageData::GetNumberOfCells()
// This Method returns a pointer to a location in the vtkImageData.
// Coordinates are in pixel units and are relative to the whole
// image origin.
void vtkImageData::GetArrayIncrements(vtkDataArray* array, int increments[3])
void vtkImageData::GetArrayIncrements(vtkDataArray* array, vtkIdType increments[3])
{
const int* extent = this->Extent;
// We could store tupple increments and just
......@@ -2179,7 +2179,7 @@ void *vtkImageData::GetArrayPointerForExtent(vtkDataArray* array,
// image origin.
void *vtkImageData::GetArrayPointer(vtkDataArray* array, int coordinate[3])
{
int incs[3];
vtkIdType incs[3];
int idx;
if (array == NULL)
......
......@@ -175,9 +175,9 @@ public:
// Different ways to get the increments for moving around the data.
// GetIncrements() calls ComputeIncrements() to ensure the increments are
// up to date.
int *GetIncrements();
void GetIncrements(int &incX, int &incY, int &incZ);
void GetIncrements(int inc[3]);
vtkIdType *GetIncrements();
void GetIncrements(vtkIdType &incX, vtkIdType &incY, vtkIdType &incZ);
void GetIncrements(vtkIdType inc[3]);
// Description:
// Different ways to get the increments for moving around the data.
......@@ -189,7 +189,7 @@ public:
// over Z, Y, X, C, incrementing the pointer by 1 after each
// component. When the end of the component is reached, the pointer
// is set to the beginning of the next pixel, thus incX is properly set to 0.
void GetContinuousIncrements(int extent[6], int &incX, int &incY, int &incZ);
void GetContinuousIncrements(int extent[6], vtkIdType &incX, vtkIdType &incY, vtkIdType &incZ);
// Description:
// Access the native pointer for the scalar data
......@@ -314,7 +314,7 @@ public:
// Description:
// Since various arrays have different number of components,
// the will have different increments.
void GetArrayIncrements(vtkDataArray *array, int increments[3]);
void GetArrayIncrements(vtkDataArray *array, vtkIdType increments[3]);
// Description:
// Given how many pixel are required on a side for bounrary conditions (in
......@@ -342,7 +342,7 @@ protected:
// Its contents are out of data until GetDimensions is called.
int Dimensions[3];
int DataDescription;
int Increments[3];
vtkIdType Increments[3];
double Origin[3];
double Spacing[3];
......
......@@ -22,7 +22,7 @@
#include "vtkPointData.h"
#include "vtkStreamingDemandDrivenPipeline.h"
vtkCxxRevisionMacro(vtkImageInPlaceFilter, "1.44");
vtkCxxRevisionMacro(vtkImageInPlaceFilter, "1.45");
//----------------------------------------------------------------------------
vtkImageInPlaceFilter::vtkImageInPlaceFilter()
......@@ -87,8 +87,8 @@ void vtkImageInPlaceFilter::CopyData(vtkImageData *inData,
char *inPtr = (char *) inData->GetScalarPointerForExtent(outExt);
char *outPtr = (char *) outData->GetScalarPointerForExtent(outExt);
int rowLength, size;
int inIncX, inIncY, inIncZ;
int outIncX, outIncY, outIncZ;
vtkIdType inIncX, inIncY, inIncZ;
vtkIdType outIncX, outIncY, outIncZ;
int idxY, idxZ, maxY, maxZ;
rowLength = (outExt[1] - outExt[0]+1)*inData->GetNumberOfScalarComponents();
......
......@@ -66,8 +66,8 @@ protected:
DType *SpanEndPointer;
DType *SliceEndPointer;
DType *EndPointer;
int Increments[3];
int ContinuousIncrements[3];
vtkIdType Increments[3];
vtkIdType ContinuousIncrements[3];
};
#ifdef VTK_NO_EXPLICIT_TEMPLATE_INSTANTIATION
......
......@@ -25,7 +25,7 @@
#include <math.h>
vtkCxxRevisionMacro(vtkImageToStructuredPoints, "1.61");
vtkCxxRevisionMacro(vtkImageToStructuredPoints, "1.62");
vtkStandardNewMacro(vtkImageToStructuredPoints);
//----------------------------------------------------------------------------
......@@ -81,7 +81,8 @@ int vtkImageToStructuredPoints::RequestData(
int maxX = 0;
int maxY = 0;
int maxZ = 0;;
int inIncX, inIncY, inIncZ, rowLength;
vtkIdType inIncX, inIncY, inIncZ;
int rowLength;
unsigned char *inPtr1, *inPtr, *outPtr;
vtkStructuredPoints *output = vtkStructuredPoints::SafeDownCast(
outInfo->Get(vtkDataObject::DATA_OBJECT()));
......
......@@ -36,7 +36,7 @@
#include <math.h>
vtkCxxRevisionMacro(vtkSynchronizedTemplates2D, "1.5");
vtkCxxRevisionMacro(vtkSynchronizedTemplates2D, "1.6");
vtkStandardNewMacro(vtkSynchronizedTemplates2D);
//----------------------------------------------------------------------------
......@@ -102,7 +102,7 @@ void vtkContourImage(vtkSynchronizedTemplates2D *self,
// The only problem with using the update extent is that one or two
// sources enlarge the update extent. This behavior is slated to be
// eliminated.
int *incs = input->GetIncrements();
vtkIdType *incs = input->GetIncrements();
int *ext = input->GetExtent();
int axis0, axis1;
int min0, max0, dim0;
......
......@@ -20,7 +20,7 @@
#include "math.h"
vtkCxxRevisionMacro(vtkGridTransform, "1.28");
vtkCxxRevisionMacro(vtkGridTransform, "1.29");
vtkStandardNewMacro(vtkGridTransform);
vtkCxxSetObjectMacro(vtkGridTransform,DisplacementGrid,vtkImageData);
......@@ -89,7 +89,8 @@ inline void vtkNearestHelper(double displacement[3], T *gridPtr, int increment)
inline void vtkNearestNeighborInterpolation(double point[3],
double displacement[3],
void *gridPtr, int gridType,
int gridExt[6], int gridInc[3])
int gridExt[6],
vtkIdType gridInc[3])
{
int gridId[3];
gridId[0] = vtkGridRound(point[0])-gridExt[0];
......@@ -120,9 +121,9 @@ inline void vtkNearestNeighborInterpolation(double point[3],
}
// do nearest-neighbor interpolation
int increment = gridId[0]*gridInc[0] +
gridId[1]*gridInc[1] +
gridId[2]*gridInc[2];
vtkIdType increment = gridId[0]*gridInc[0] +
gridId[1]*gridInc[1] +
gridId[2]*gridInc[2];
switch (gridType)
{
......@@ -133,11 +134,11 @@ inline void vtkNearestNeighborInterpolation(double point[3],
template <class T>
inline void vtkNearestHelper(double displacement[3], double derivatives[3][3],
T *gridPtr, int gridId[3], int gridId0[3],
int gridId1[3], int gridInc[3])
int gridId1[3], vtkIdType gridInc[3])
{
int incX = gridId[0]*gridInc[0];
int incY = gridId[1]*gridInc[1];
int incZ = gridId[2]*gridInc[2];
vtkIdType incX = gridId[0]*gridInc[0];
vtkIdType incY = gridId[1]*gridInc[1];
vtkIdType incZ = gridId[2]*gridInc[2];
T *gridPtr0;
T *gridPtr1 = gridPtr + incX + incY + incZ;
......@@ -146,13 +147,13 @@ inline void vtkNearestHelper(double displacement[3], double derivatives[3][3],
displacement[1] = gridPtr1[1];
displacement[2] = gridPtr1[2];
int incX0 = gridId0[0]*gridInc[0];
int incX1 = gridId1[0]*gridInc[0];
int incY0 = gridId0[1]*gridInc[1];
vtkIdType incX0 = gridId0[0]*gridInc[0];
vtkIdType incX1 = gridId1[0]*gridInc[0];
vtkIdType incY0 = gridId0[1]*gridInc[1];
int incY1 = gridId1[1]*gridInc[1];
int incZ0 = gridId0[2]*gridInc[2];
int incZ1 = gridId1[2]*gridInc[2];
vtkIdType incY1 = gridId1[1]*gridInc[1];
vtkIdType incZ0 = gridId0[2]*gridInc[2];
vtkIdType incZ1 = gridId1[2]*gridInc[2];
gridPtr0 = gridPtr + incX0 + incY + incZ;
gridPtr1 = gridPtr + incX1 + incY + incZ;
......@@ -178,7 +179,8 @@ inline void vtkNearestHelper(double displacement[3], double derivatives[3][3],
void vtkNearestNeighborInterpolation(double point[3], double displacement[3],
double derivatives[3][3], void *gridPtr,
int gridType, int gridExt[6], int gridInc[3])
int gridType, int gridExt[6],
vtkIdType gridInc[3])
{
if (derivatives == NULL)
{
......@@ -332,7 +334,7 @@ inline void vtkLinearHelper(double displacement[3], double derivatives[3][3],
void vtkTrilinearInterpolation(double point[3], double displacement[3],
double derivatives[3][3], void *gridPtr, int gridType,
int gridExt[6], int gridInc[3])
int gridExt[6], vtkIdType gridInc[3])
{
// change point into integer plus fraction
double f[3];
......@@ -378,22 +380,22 @@ void vtkTrilinearInterpolation(double point[3], double displacement[3],
}
// do trilinear interpolation
int factX0 = gridId0[0]*gridInc[0];
int factY0 = gridId0[1]*gridInc[1];
int factZ0 = gridId0[2]*gridInc[2];
vtkIdType factX0 = gridId0[0]*gridInc[0];
vtkIdType factY0 = gridId0[1]*gridInc[1];
vtkIdType factZ0 = gridId0[2]*gridInc[2];
int factX1 = gridId1[0]*gridInc[0];
int factY1 = gridId1[1]*gridInc[1];
int factZ1 = gridId1[2]*gridInc[2];
vtkIdType factX1 = gridId1[0]*gridInc[0];
vtkIdType factY1 = gridId1[1]*gridInc[1];
vtkIdType factZ1 = gridId1[2]*gridInc[2];
int i000 = factX0+factY0+factZ0;
int i001 = factX0+factY0+factZ1;
int i010 = factX0+factY1+factZ0;
int i011 = factX0+factY1+factZ1;
int i100 = factX1+factY0+factZ0;
int i101 = factX1+factY0+factZ1;
int i110 = factX1+factY1+factZ0;
int i111 = factX1+factY1+factZ1;
vtkIdType i000 = factX0+factY0+factZ0;
vtkIdType i001 = factX0+factY0+factZ1;
vtkIdType i010 = factX0+factY1+factZ0;
vtkIdType i011 = factX0+factY1+factZ1;
vtkIdType i100 = factX1+factY0+factZ0;
vtkIdType i101 = factX1+factY0+factZ1;
vtkIdType i110 = factX1+factY1+factZ0;
vtkIdType i111 = factX1+factY1+factZ1;
switch (gridType)
{
......@@ -547,7 +549,8 @@ template <class T>
inline void vtkCubicHelper(double displacement[3], double derivatives[3][3],
double fx, double fy, double fz, T *gridPtr,
int interpModeX, int interpModeY, int interpModeZ,
int factX[4], int factY[4], int factZ[4])
vtkIdType factX[4], vtkIdType factY[4],
vtkIdType factZ[4])
{
double fX[4],fY[4],fZ[4];
double gX[4],gY[4],gZ[4];
......@@ -639,9 +642,10 @@ inline void vtkCubicHelper(double displacement[3], double derivatives[3][3],
void vtkTricubicInterpolation(double point[3], double displacement[3],
double derivatives[3][3], void *gridPtr,
int gridType, int gridExt[6], int gridInc[3])
int gridType, int gridExt[6],
vtkIdType gridInc[3])
{
int factX[4],factY[4],factZ[4];
vtkIdType factX[4],factY[4],factZ[4];
// change point into integer plus fraction
double f[3];
......@@ -825,7 +829,7 @@ void vtkGridTransform::ForwardTransformPoint(const double inPoint[3],
double *spacing = this->GridSpacing;
double *origin = this->GridOrigin;
int *extent = this->GridExtent;
int *increments = this->GridIncrements;
vtkIdType *increments = this->GridIncrements;
double scale = this->DisplacementScale;
double shift = this->DisplacementShift;
......@@ -886,7 +890,7 @@ void vtkGridTransform::ForwardTransformDerivative(const double inPoint[3],
double *spacing = this->GridSpacing;
double *origin = this->GridOrigin;
int *extent = this->GridExtent;
int *increments = this->GridIncrements;
vtkIdType *increments = this->GridIncrements;
double scale = this->DisplacementScale;
double shift = this->DisplacementShift;
......@@ -962,7 +966,7 @@ void vtkGridTransform::InverseTransformDerivative(const double inPoint[3],
double *spacing = this->GridSpacing;
double *origin = this->GridOrigin;
int *extent = this->GridExtent;
int *increments = this->GridIncrements;
vtkIdType *increments = this->GridIncrements;
double invSpacing[3];
invSpacing[0] = 1.0/spacing[0];
......
......@@ -118,7 +118,7 @@ protected:
void (*InterpolationFunction)(double point[3], double displacement[3],
double derivatives[3][3],
void *gridPtr, int gridType,
int inExt[6], int inInc[3]);
int inExt[6], vtkIdType inInc[3]);
//ETX
int InterpolationMode;
vtkImageData *DisplacementGrid;
......@@ -130,7 +130,7 @@ protected:
double GridSpacing[3];
double GridOrigin[3];
int GridExtent[6];
int GridIncrements[3];
vtkIdType GridIncrements[3];
private:
vtkGridTransform(const vtkGridTransform&); // Not implemented.
......
......@@ -28,7 +28,7 @@
#include "vtkProp.h"
#include <vtkstd/vector>
//----------------------------------------------------------------------------
vtkCxxRevisionMacro(vtkRenderLargeImage, "1.33");
vtkCxxRevisionMacro(vtkRenderLargeImage, "1.34");
vtkStandardNewMacro(vtkRenderLargeImage);
vtkCxxSetObjectMacro(vtkRenderLargeImage,Input,vtkRenderer);
......@@ -181,7 +181,7 @@ void vtkRenderLargeImage::RequestData(
data->SetExtent(data->GetUpdateExtent());
data->AllocateScalars();
int inExtent[6];
int inIncr[3];
vtkIdType inIncr[3];
int *size;
int inWindowExtent[4];
double viewAngle, parallelScale, windowCenter[2];
......
......@@ -22,7 +22,7 @@
#include "vtkObjectFactory.h"
#include "vtkStreamingDemandDrivenPipeline.h"
vtkCxxRevisionMacro(vtkTransformToGrid, "1.20");
vtkCxxRevisionMacro(vtkTransformToGrid, "1.21");
vtkStandardNewMacro(vtkTransformToGrid);
vtkCxxSetObjectMacro(vtkTransformToGrid,Input,vtkAbstractTransform);
......@@ -293,7 +293,7 @@ void vtkTransformToGridExecute(vtkTransformToGrid *self,
double *spacing = grid->GetSpacing();
double *origin = grid->GetOrigin();
int *increments = grid->GetIncrements();
vtkIdType *increments = grid->GetIncrements();
double invScale = 1.0/scale;
......
......@@ -20,7 +20,7 @@
#include "vtkObjectFactory.h"
#include "vtkPointData.h"
vtkCxxRevisionMacro(vtkBMPReader, "1.51");
vtkCxxRevisionMacro(vtkBMPReader, "1.52");
vtkStandardNewMacro(vtkBMPReader);
#ifdef read
......@@ -308,7 +308,7 @@ void vtkBMPReader::ExecuteInformation()
void vtkBMPReader::ComputeDataIncrements()
{
int idx;
int fileDataLength;
vtkIdType fileDataLength;
// Determine the expected length of the data ...
switch (this->DataScalarType)
......@@ -358,10 +358,10 @@ void vtkBMPReader::ComputeDataIncrements()
template <class OT>
void vtkBMPReaderUpdate2(vtkBMPReader *self, vtkImageData *data, OT *outPtr)
{
int inIncr[3], outIncr[3];
vtkIdType inIncr[3], outIncr[3];
OT *outPtr0, *outPtr1, *outPtr2;
long streamSkip0, streamSkip1;
long streamRead;
vtkIdType streamSkip0, streamSkip1;
vtkIdType streamRead;
int idx0, idx1, idx2, pixelRead;
unsigned char *buf;
int inExtent[6];
......@@ -408,16 +408,16 @@ void vtkBMPReaderUpdate2(vtkBMPReader *self, vtkImageData *data, OT *outPtr)
// length of a row, num pixels read at a time
pixelRead = dataExtent[1] - dataExtent[0] + 1;
streamRead = (long) (pixelRead * self->GetDataIncrements()[0]);
streamSkip0 = (long) (self->GetDataIncrements()[1] - streamRead);
streamSkip1 = (long) (self->GetDataIncrements()[2] -
streamRead = (vtkIdType) (pixelRead * self->GetDataIncrements()[0]);
streamSkip0 = (vtkIdType) (self->GetDataIncrements()[1] - streamRead);
streamSkip1 = (vtkIdType) (self->GetDataIncrements()[2] -
(dataExtent[3] - dataExtent[2] + 1)* self->GetDataIncrements()[1]);
pixelSkip = self->GetDepth()/8;
// read from the bottom up
if (!self->GetFileLowerLeft())
{
streamSkip0 = (long) (-streamRead - self->GetDataIncrements()[1]);
streamSkip0 = (vtkIdType) (-streamRead - self->GetDataIncrements()[1]);
}
// create a buffer to hold a row of the data
......
......@@ -27,7 +27,7 @@
#include <sys/stat.h>
vtkCxxRevisionMacro(vtkDICOMImageReader, "1.31");
vtkCxxRevisionMacro(vtkDICOMImageReader, "1.32");
vtkStandardNewMacro(vtkDICOMImageReader);
class vtkDICOMImageReaderVector : public vtkstd::vector<vtkstd::string>
......@@ -286,7 +286,7 @@ void vtkDICOMImageReader::ExecuteData(vtkDataObject *output)
// DICOM stores the upper left pixel as the first pixel in an
// image. VTK stores the lower left pixel as the first pixel in
// an image. Need to flip the data.
unsigned long rowLength;
vtkIdType rowLength;
rowLength = this->DataIncrements[1];
unsigned char *b = (unsigned char *)buffer;
unsigned char *iData = (unsigned char *)imgData;
......@@ -336,7 +336,7 @@ void vtkDICOMImageReader::ExecuteData(vtkDataObject *output)
// DICOM stores the upper left pixel as the first pixel in an
// image. VTK stores the lower left pixel as the first pixel in
// an image. Need to flip the data.
unsigned long rowLength;
vtkIdType rowLength;
rowLength = this->DataIncrements[1];
unsigned char *b = (unsigned char *)buffer;
unsigned char *iData = (unsigned char *)imgData;
......
......@@ -19,7 +19,7 @@
#include "vtkObjectFactory.h"
#include "vtkPointData.h"
vtkCxxRevisionMacro(vtkGESignaReader, "1.18");
vtkCxxRevisionMacro(vtkGESignaReader, "1.19");
vtkStandardNewMacro(vtkGESignaReader);
......@@ -302,7 +302,7 @@ void vtkcopygenesisimage(FILE *infp, int width, int height, int compress,
void vtkGESignaReaderUpdate2(vtkGESignaReader *self, unsigned short *outPtr,
int *outExt, int *)
int *outExt, vtkIdType *)
{
FILE *fp = fopen(self->GetInternalFileName(), "rb");
if (!fp)
......@@ -401,7 +401,7 @@ void vtkGESignaReaderUpdate2(vtkGESignaReader *self, unsigned short *outPtr,
void vtkGESignaReaderUpdate(vtkGESignaReader *self, vtkImageData *data,
unsigned short *outPtr)
{
int outIncr[3];
vtkIdType outIncr[3];
int outExtent[6];
unsigned short *outPtr2;
......
......@@ -23,7 +23,7 @@
#include "vtkStreamingDemandDrivenPipeline.h"
#include "vtkTransform.h"
vtkCxxRevisionMacro(vtkImageReader, "1.119");
vtkCxxRevisionMacro(vtkImageReader, "1.120");
vtkStandardNewMacro(vtkImageReader);
vtkCxxSetObjectMacro(vtkImageReader,Transform,vtkTransform);
......@@ -199,7 +199,7 @@ template <class IT, class OT>
void vtkImageReaderUpdate2(vtkImageReader *self, vtkImageData *data,
IT *inPtr, OT *outPtr)
{
int inIncr[3], outIncr[3];
vtkIdType inIncr[3], outIncr[3];
OT *outPtr0, *outPtr1, *outPtr2;
long streamSkip0, streamSkip1;
unsigned long streamRead;
......@@ -684,14 +684,14 @@ void vtkImageReader::ComputeInverseTransformedExtent(int inExtent[6],
<< outExtent[4] << ", " << outExtent[5]);
}
void vtkImageReader::ComputeTransformedIncrements(int inIncr[3],
int outIncr[3])
void vtkImageReader::ComputeTransformedIncrements(vtkIdType inIncr[3],
vtkIdType outIncr[3])
{
double transformedIncr[3];
if (!this->Transform)
{
memcpy (outIncr, inIncr, 3 * sizeof (int));
memcpy (outIncr, inIncr, 3 * sizeof (vtkIdType));
}
else
{
......@@ -699,23 +699,23 @@ void vtkImageReader::ComputeTransformedIncrements(int inIncr[3],
transformedIncr[1] = inIncr[1];
transformedIncr[2] = inIncr[2];
this->Transform->TransformVector(transformedIncr, transformedIncr);
outIncr[0] = (int) transformedIncr[0];
outIncr[1] = (int) transformedIncr[1];
outIncr[2] = (int) transformedIncr[2];
outIncr[0] = (vtkIdType) transformedIncr[0];
outIncr[1] = (vtkIdType) transformedIncr[1];
outIncr[2] = (vtkIdType) transformedIncr[2];
vtkDebugMacro(<< "Transformed Incr are:"
<< outIncr[0] << ", " << outIncr[1] << ", " << outIncr[2]);
}
}
void vtkImageReader::ComputeInverseTransformedIncrements(int inIncr[3],
int outIncr[3])
void vtkImageReader::ComputeInverseTransformedIncrements(vtkIdType inIncr[3],
vtkIdType outIncr[3])
{
double transformedIncr[3];
if (!this->Transform)
{
memcpy (outIncr, inIncr, 3 * sizeof (int));
memcpy (outIncr, inIncr, 3 * sizeof (vtkIdType));
}
else
{
......@@ -724,9 +724,9 @@ void vtkImageReader::ComputeInverseTransformedIncrements(int inIncr[3],
transformedIncr[2] = inIncr[2];
this->Transform->GetLinearInverse()->TransformVector(transformedIncr,
transformedIncr);
outIncr[0] = (int) transformedIncr[0];
outIncr[1] = (int) transformedIncr[1];
outIncr[2] = (int) transformedIncr[2];
outIncr[0] = (vtkIdType) transformedIncr[0];
outIncr[1] = (vtkIdType) transformedIncr[1];
outIncr[2] = (vtkIdType) transformedIncr[2];
vtkDebugMacro(<< "Inverse Transformed Incr are:"
<< outIncr[0] << ", " << outIncr[1] << ", " << outIncr[2]);
}
......
......@@ -62,8 +62,8 @@ public:
// following should only be used by methods or template helpers, not users
void ComputeInverseTransformedExtent(int inExtent[6],
int outExtent[6]);
void ComputeInverseTransformedIncrements(int inIncr[3],
int outIncr[3]);
void ComputeInverseTransformedIncrements(vtkIdType inIncr[3],
vtkIdType outIncr[3]);
int OpenAndSeekFile(int extent[6], int slice);
......@@ -84,8 +84,8 @@ protected:
void ComputeTransformedOrigin (double origin[3]);
void ComputeTransformedExtent(int inExtent[6],
int outExtent[6]);
void ComputeTransformedIncrements(int inIncr[3],
int outIncr[3]);
void ComputeTransformedIncrements(vtkIdType inIncr[3],
vtkIdType outIncr[3]);
int DataVOI[6];
......
......@@ -24,7 +24,7 @@
#include <sys/stat.h>
vtkCxxRevisionMacro(vtkImageReader2, "1.34");
vtkCxxRevisionMacro(vtkImageReader2, "1.35");
vtkStandardNewMacro(vtkImageReader2);
#ifdef read
......@@ -629,7 +629,7 @@ void vtkImageReader2::SeekFile(int i, int j, int k)
template <class OT>
void vtkImageReader2Update(vtkImageReader2 *self, vtkImageData *data, OT *outPtr)
{
int outIncr[3];
vtkIdType outIncr[3];
OT *outPtr1, *outPtr2;
long streamRead;
int idx1, idx2, nComponents;
......
......@@ -30,7 +30,7 @@ extern "C" {
}
vtkCxxRevisionMacro(vtkJPEGReader, "1.22");
vtkCxxRevisionMacro(vtkJPEGReader, "1.23");
vtkStandardNewMacro(vtkJPEGReader);
......@@ -140,7 +140,7 @@ void vtkJPEGReader::ExecuteInformation()
template <class OT>
int vtkJPEGReaderUpdate2(vtkJPEGReader *self, OT *outPtr,
int *outExt, int *outInc, long)
int *outExt, vtkIdType *outInc, long)
{
unsigned int ui;
int i;
......@@ -231,7 +231,7 @@ int vtkJPEGReaderUpdate2(vtkJPEGReader *self, OT *outPtr,
template <class OT>
void vtkJPEGReaderUpdate(vtkJPEGReader *self, vtkImageData *data, OT *outPtr)
{
int outIncr[3];
vtkIdType outIncr[3];
int outExtent[6];
OT *outPtr2;
......
......@@ -30,7 +30,7 @@ extern "C" {
#include <setjmp.h>
}
vtkCxxRevisionMacro(vtkJPEGWriter, "1.29");
vtkCxxRevisionMacro(vtkJPEGWriter, "1.30");
vtkStandardNewMacro(vtkJPEGWriter);
vtkCxxSetObjectMacro(vtkJPEGWriter,Result,vtkUnsignedCharArray);
......@@ -317,8 +317,8 @@ void vtkJPEGWriter::WriteSlice(vtkImageData *data)
void *outPtr;
outPtr = data->GetScalarPointer(uExtent[0], uExtent[2], uExtent[4]);
JSAMPROW *row_pointers = new JSAMPROW [height];
int *outInc = data->GetIncrements();
int rowInc = outInc[1];
vtkIdType *outInc = data->GetIncrements();
vtkIdType rowInc = outInc[1];
for (ui = 0; ui < height; ui++)
{
row_pointers[height - ui - 1] = (JSAMPROW) outPtr;
......