19 unsigned int xDim,
unsigned int yDim,
unsigned int zDim,
double spacing)
23 mitkThrow() <<
"You may not initialize a mitk::Volume with a nullptr";
47 MITK_INFO <<
"Initialized by mitk::Image";
50 mitkThrow() <<
"You may not initialize a mitk::Volume with a null reference to an mitk image";
52 unsigned int* dimensions = image->GetDimensions();
78 mitk::pa::Volume::Pointer
mitk::pa::Volume::New(
double* data,
unsigned int xDim,
unsigned int yDim,
unsigned int zDim,
double spacing)
80 mitk::pa::Volume::Pointer smartPtr =
new mitk::pa::Volume(data, xDim, yDim, zDim, spacing);
81 smartPtr->UnRegister();
88 smartPtr->UnRegister();
100 auto* data =
new double[length];
101 memcpy(data,
GetData(), length *
sizeof(
double));
134 return (
double*)imgRead.
GetData();
143 MITK_ERROR <<
"Index out of bounds at " << x <<
"|" << y <<
"|" << z;
144 mitkThrow() <<
"Index out of bounds exception!";
void SetData(double data, unsigned int x, unsigned int y, unsigned int z)
SetData.
void * GetData()
Gives full data access.
Image::Pointer AsMitkImage()
returns the Volume instance as an mitk image
unsigned int GetYDim()
GetYDim.
unsigned int GetXDim()
GetXDim.
unsigned int GetZDim()
GetZDim.
The Volume class is designed to encapsulate volumetric information and to provide convenience methods...
Volume::Pointer DeepCopy()
DeepCopy.
Volume(double *data, unsigned int xDim, unsigned int yDim, unsigned int zDim, double spacing)
Initialize initializes this volume with the given pointer to the data array. It is assumed...
double * m_FastAccessDataPointer
mitk::Image::Pointer image
Image::Pointer m_InternalMitkImage
void SetSpacing(double spacing)
const int NUMBER_OF_SPATIAL_DIMENSIONS
ImageWriteAccessor class to get locked write-access for a particular image part.
static Volume::Pointer New(double *data, unsigned int xDim, unsigned int yDim, unsigned int zDim, double spacing)
returns smartpointer reference to a new instance of this objects. The given data array will be freed ...
long long GetIndex(unsigned int x, unsigned int y, unsigned int z)
convenience method to enable consistent access to the dat array
Class for defining the data type of pixels.