SimpleITK
2.0.0
|
The Image class for SimpleITK. More...
#include <sitkImage.h>
Classes | |
struct | AllocateMemberFunctionAddressor |
Public Types | |
using | Self = Image |
Public Member Functions | |
void | CopyInformation (const Image &srcImage) |
Copy common meta-data from an image to this one. More... | |
bool | EraseMetaData (const std::string &key) |
Remove an entry from the meta-data dictionary. More... | |
unsigned int | GetDepth () const |
unsigned int | GetDimension () const |
unsigned int | GetHeight () const |
std::string | GetMetaData (const std::string &key) const |
Get the value of a meta-data dictionary entry as a string. More... | |
std::vector< std::string > | GetMetaDataKeys () const |
get a vector of keys in from the meta-data dictionary More... | |
unsigned int | GetNumberOfComponentsPerPixel () const |
Get the number of components for each pixel. More... | |
uint64_t | GetNumberOfPixels () const |
Get the number of pixels in the image. More... | |
PixelIDValueEnum | GetPixelID () const |
std::string | GetPixelIDTypeAsString () const |
PixelIDValueType | GetPixelIDValue () const |
std::vector< unsigned int > | GetSize () const |
unsigned int | GetWidth () const |
bool | HasMetaDataKey (const std::string &key) const |
Query the meta-data dictionary for the existence of a key. More... | |
Image () | |
Default constructor, creates an image of size 0. More... | |
Image (const Image &img) | |
Image (Image &&img) noexcept | |
Move constructor and assignment. More... | |
bool | IsUnique () const |
Returns true if no other SimpleITK Image object refers to the same internal data structure. More... | |
void | MakeUnique () |
Performs actually coping if needed to make object unique. More... | |
Image & | operator= (const Image &img) |
Image & | operator= (Image &&img) noexcept |
void | SetMetaData (const std::string &key, const std::string &value) |
Set an entry in the meta-data dictionary. More... | |
std::string | ToString () const |
std::vector< double > | TransformContinuousIndexToPhysicalPoint (const std::vector< double > &index) const |
std::vector< double > | TransformIndexToPhysicalPoint (const std::vector< int64_t > &index) const |
std::vector< double > | TransformPhysicalPointToContinuousIndex (const std::vector< double > &point) const |
std::vector< int64_t > | TransformPhysicalPointToIndex (const std::vector< double > &point) const |
virtual | ~Image () |
Image (unsigned int width, unsigned int height, PixelIDValueEnum valueEnum) | |
Constructors for 2D, 3D an optionally 4D images where pixel type and number of components can be specified. More... | |
Image (unsigned int width, unsigned int height, unsigned int depth, PixelIDValueEnum valueEnum) | |
Constructors for 2D, 3D an optionally 4D images where pixel type and number of components can be specified. More... | |
Image (const std::vector< unsigned int > &size, PixelIDValueEnum valueEnum, unsigned int numberOfComponents=0) | |
Constructors for 2D, 3D an optionally 4D images where pixel type and number of components can be specified. More... | |
template<typename TImageType > | |
Image (itk::SmartPointer< TImageType > image) | |
Construct an SimpleITK Image from an pointer to an ITK image. More... | |
template<typename TImageType > | |
Image (TImageType *image) | |
Construct an SimpleITK Image from an pointer to an ITK image. More... | |
itk::DataObject * | GetITKBase () |
const itk::DataObject * | GetITKBase () const |
std::vector< double > | GetOrigin () const |
void | SetOrigin (const std::vector< double > &origin) |
std::vector< double > | GetSpacing () const |
void | SetSpacing (const std::vector< double > &spacing) |
std::vector< double > | GetDirection () const |
Set/Get the Direction. More... | |
void | SetDirection (const std::vector< double > &direction) |
Set/Get the Direction. More... | |
int8_t | GetPixelAsInt8 (const std::vector< uint32_t > &idx) const |
Get the value of a pixel. More... | |
uint8_t | GetPixelAsUInt8 (const std::vector< uint32_t > &idx) const |
Get the value of a pixel. More... | |
int16_t | GetPixelAsInt16 (const std::vector< uint32_t > &idx) const |
Get the value of a pixel. More... | |
uint16_t | GetPixelAsUInt16 (const std::vector< uint32_t > &idx) const |
Get the value of a pixel. More... | |
int32_t | GetPixelAsInt32 (const std::vector< uint32_t > &idx) const |
Get the value of a pixel. More... | |
uint32_t | GetPixelAsUInt32 (const std::vector< uint32_t > &idx) const |
Get the value of a pixel. More... | |
int64_t | GetPixelAsInt64 (const std::vector< uint32_t > &idx) const |
Get the value of a pixel. More... | |
uint64_t | GetPixelAsUInt64 (const std::vector< uint32_t > &idx) const |
Get the value of a pixel. More... | |
float | GetPixelAsFloat (const std::vector< uint32_t > &idx) const |
Get the value of a pixel. More... | |
double | GetPixelAsDouble (const std::vector< uint32_t > &idx) const |
Get the value of a pixel. More... | |
std::vector< int8_t > | GetPixelAsVectorInt8 (const std::vector< uint32_t > &idx) const |
Get the value of a pixel. More... | |
std::vector< uint8_t > | GetPixelAsVectorUInt8 (const std::vector< uint32_t > &idx) const |
Get the value of a pixel. More... | |
std::vector< int16_t > | GetPixelAsVectorInt16 (const std::vector< uint32_t > &idx) const |
Get the value of a pixel. More... | |
std::vector< uint16_t > | GetPixelAsVectorUInt16 (const std::vector< uint32_t > &idx) const |
Get the value of a pixel. More... | |
std::vector< int32_t > | GetPixelAsVectorInt32 (const std::vector< uint32_t > &idx) const |
Get the value of a pixel. More... | |
std::vector< uint32_t > | GetPixelAsVectorUInt32 (const std::vector< uint32_t > &idx) const |
Get the value of a pixel. More... | |
std::vector< int64_t > | GetPixelAsVectorInt64 (const std::vector< uint32_t > &idx) const |
Get the value of a pixel. More... | |
std::vector< uint64_t > | GetPixelAsVectorUInt64 (const std::vector< uint32_t > &idx) const |
Get the value of a pixel. More... | |
std::vector< float > | GetPixelAsVectorFloat32 (const std::vector< uint32_t > &idx) const |
Get the value of a pixel. More... | |
std::vector< double > | GetPixelAsVectorFloat64 (const std::vector< uint32_t > &idx) const |
Get the value of a pixel. More... | |
std::complex< float > | GetPixelAsComplexFloat32 (const std::vector< uint32_t > &idx) const |
Get the value of a pixel. More... | |
std::complex< double > | GetPixelAsComplexFloat64 (const std::vector< uint32_t > &idx) const |
Get the value of a pixel. More... | |
void | SetPixelAsInt8 (const std::vector< uint32_t > &idx, int8_t v) |
Set the value of a pixel. More... | |
void | SetPixelAsUInt8 (const std::vector< uint32_t > &idx, uint8_t v) |
Set the value of a pixel. More... | |
void | SetPixelAsInt16 (const std::vector< uint32_t > &idx, int16_t v) |
Set the value of a pixel. More... | |
void | SetPixelAsUInt16 (const std::vector< uint32_t > &idx, uint16_t v) |
Set the value of a pixel. More... | |
void | SetPixelAsInt32 (const std::vector< uint32_t > &idx, int32_t v) |
Set the value of a pixel. More... | |
void | SetPixelAsUInt32 (const std::vector< uint32_t > &idx, uint32_t v) |
Set the value of a pixel. More... | |
void | SetPixelAsInt64 (const std::vector< uint32_t > &idx, int64_t v) |
Set the value of a pixel. More... | |
void | SetPixelAsUInt64 (const std::vector< uint32_t > &idx, uint64_t v) |
Set the value of a pixel. More... | |
void | SetPixelAsFloat (const std::vector< uint32_t > &idx, float v) |
Set the value of a pixel. More... | |
void | SetPixelAsDouble (const std::vector< uint32_t > &idx, double v) |
Set the value of a pixel. More... | |
void | SetPixelAsVectorInt8 (const std::vector< uint32_t > &idx, const std::vector< int8_t > &v) |
Set the value of a pixel. More... | |
void | SetPixelAsVectorUInt8 (const std::vector< uint32_t > &idx, const std::vector< uint8_t > &v) |
Set the value of a pixel. More... | |
void | SetPixelAsVectorInt16 (const std::vector< uint32_t > &idx, const std::vector< int16_t > &v) |
Set the value of a pixel. More... | |
void | SetPixelAsVectorUInt16 (const std::vector< uint32_t > &idx, const std::vector< uint16_t > &v) |
Set the value of a pixel. More... | |
void | SetPixelAsVectorInt32 (const std::vector< uint32_t > &idx, const std::vector< int32_t > &v) |
Set the value of a pixel. More... | |
void | SetPixelAsVectorUInt32 (const std::vector< uint32_t > &idx, const std::vector< uint32_t > &v) |
Set the value of a pixel. More... | |
void | SetPixelAsVectorInt64 (const std::vector< uint32_t > &idx, const std::vector< int64_t > &v) |
Set the value of a pixel. More... | |
void | SetPixelAsVectorUInt64 (const std::vector< uint32_t > &idx, const std::vector< uint64_t > &v) |
Set the value of a pixel. More... | |
void | SetPixelAsVectorFloat32 (const std::vector< uint32_t > &idx, const std::vector< float > &v) |
Set the value of a pixel. More... | |
void | SetPixelAsVectorFloat64 (const std::vector< uint32_t > &idx, const std::vector< double > &v) |
Set the value of a pixel. More... | |
void | SetPixelAsComplexFloat32 (const std::vector< uint32_t > &idx, const std::complex< float > v) |
Set the value of a pixel. More... | |
void | SetPixelAsComplexFloat64 (const std::vector< uint32_t > &idx, const std::complex< double > v) |
Set the value of a pixel. More... | |
int8_t * | GetBufferAsInt8 () |
Get a pointer to the image buffer. More... | |
uint8_t * | GetBufferAsUInt8 () |
Get a pointer to the image buffer. More... | |
int16_t * | GetBufferAsInt16 () |
Get a pointer to the image buffer. More... | |
uint16_t * | GetBufferAsUInt16 () |
Get a pointer to the image buffer. More... | |
int32_t * | GetBufferAsInt32 () |
Get a pointer to the image buffer. More... | |
uint32_t * | GetBufferAsUInt32 () |
Get a pointer to the image buffer. More... | |
int64_t * | GetBufferAsInt64 () |
Get a pointer to the image buffer. More... | |
uint64_t * | GetBufferAsUInt64 () |
Get a pointer to the image buffer. More... | |
float * | GetBufferAsFloat () |
Get a pointer to the image buffer. More... | |
double * | GetBufferAsDouble () |
Get a pointer to the image buffer. More... | |
void * | GetBufferAsVoid () |
Get a pointer to the image buffer. More... | |
const int8_t * | GetBufferAsInt8 () const |
Get a pointer to the image buffer. More... | |
const uint8_t * | GetBufferAsUInt8 () const |
Get a pointer to the image buffer. More... | |
const int16_t * | GetBufferAsInt16 () const |
Get a pointer to the image buffer. More... | |
const uint16_t * | GetBufferAsUInt16 () const |
Get a pointer to the image buffer. More... | |
const int32_t * | GetBufferAsInt32 () const |
Get a pointer to the image buffer. More... | |
const uint32_t * | GetBufferAsUInt32 () const |
Get a pointer to the image buffer. More... | |
const int64_t * | GetBufferAsInt64 () const |
Get a pointer to the image buffer. More... | |
const uint64_t * | GetBufferAsUInt64 () const |
Get a pointer to the image buffer. More... | |
const float * | GetBufferAsFloat () const |
Get a pointer to the image buffer. More... | |
const double * | GetBufferAsDouble () const |
Get a pointer to the image buffer. More... | |
const void * | GetBufferAsVoid () const |
Get a pointer to the image buffer. More... | |
Protected Member Functions | |
void | Allocate (const std::vector< unsigned int > &size, PixelIDValueEnum valueEnum, unsigned int numberOfComponents) |
Methods called by the constructor to allocate and initialize an image. More... | |
template<class TImageType > | |
std::enable_if< IsBasic< TImageType >::Value >::type | AllocateInternal (const std::vector< unsigned int > &size, unsigned int numberOfComponents) |
Dispatched methods for allocating images. More... | |
template<class TImageType > | |
std::enable_if< IsVector< TImageType >::Value >::type | AllocateInternal (const std::vector< unsigned int > &size, unsigned int numberOfComponents) |
Dispatched methods for allocating images. More... | |
template<class TImageType > | |
std::enable_if< IsLabel< TImageType >::Value >::type | AllocateInternal (const std::vector< unsigned int > &size, unsigned int numberOfComponents) |
Dispatched methods for allocating images. More... | |
Private Member Functions | |
template<int VPixelIDValue, unsigned int VImageDimension> | |
void | InternalInitialization (typename PixelIDToImageType< typename typelist::TypeAt< InstantiatedPixelIDTypeList, VPixelIDValue >::Result, VImageDimension >::ImageType *i) |
template<int VPixelIDValue, typename TImageType > | |
std::enable_if<!std::is_same< TImageType, void >::value >::type | ConditionalInternalInitialization (TImageType *i) |
template<int VPixelIDValue, typename TImageType > | |
std::enable_if< std::is_same< TImageType, void >::value >::type | ConditionalInternalInitialization (TImageType *) |
Private Attributes | |
PimpleImageBase * | m_PimpleImage |
The Image class for SimpleITK.
This Image class can represent 2D, 3D, and 4D images. The pixel types may be a scalar, a multi-component vector or a run-length-encoded (RLE) "label". The dimension, pixel type and size is specified at construction.
A fundamental concept of ITK images is that they occupy physical space where the image is defined by an origin, spacing, and direction cosine matrix. The attributes are taken into consideration when doing most operations on an image. A meta-data dictionary is also associated with the image, which may contain additional fields from reading but these attributes are not propagated by image filters.
The SimpleITK Image provides a single facade interface to several ITK image types. Internally, the SimpleITK Image maintains a pointer to the ITK image class, and performs reference counting and lazy copying. This means that deep copying of an image including it's buffer is delayed until the image is modified. This removes the need to use pointers to SimpleITK Image class, as copying and returning by value do not unnecessarily duplicate the data.
/sa itk::Image itk::VectorImage itk::LabelMap itk::ImageBase
Definition at line 75 of file sitkImage.h.
using itk::simple::Image::Self = Image |
Definition at line 78 of file sitkImage.h.
|
virtual |
itk::simple::Image::Image | ( | ) |
Default constructor, creates an image of size 0.
itk::simple::Image::Image | ( | const Image & | img | ) |
|
noexcept |
Move constructor and assignment.
img | After the operation img is valid only for destructing and assignment; all other operations have undefined behavior. |
itk::simple::Image::Image | ( | unsigned int | width, |
unsigned int | height, | ||
PixelIDValueEnum | valueEnum | ||
) |
Constructors for 2D, 3D an optionally 4D images where pixel type and number of components can be specified.
If the pixel type is a scalar or a label pixel type, then the number of components must be specified as 0 or 1.
If the pixel type is a vector pixel type, then the number of components defaults to the image dimension, unless the numberOfComponents is explicitly specified.
Unlike the standard convention for Dimensional Vectors the size parameter must be the exact dimension requesting. That is, it must be of length 2 of a 2D image, 3 for a 3D image and 4 for a 4D image.
itk::simple::Image::Image | ( | unsigned int | width, |
unsigned int | height, | ||
unsigned int | depth, | ||
PixelIDValueEnum | valueEnum | ||
) |
Constructors for 2D, 3D an optionally 4D images where pixel type and number of components can be specified.
If the pixel type is a scalar or a label pixel type, then the number of components must be specified as 0 or 1.
If the pixel type is a vector pixel type, then the number of components defaults to the image dimension, unless the numberOfComponents is explicitly specified.
Unlike the standard convention for Dimensional Vectors the size parameter must be the exact dimension requesting. That is, it must be of length 2 of a 2D image, 3 for a 3D image and 4 for a 4D image.
itk::simple::Image::Image | ( | const std::vector< unsigned int > & | size, |
PixelIDValueEnum | valueEnum, | ||
unsigned int | numberOfComponents = 0 |
||
) |
Constructors for 2D, 3D an optionally 4D images where pixel type and number of components can be specified.
If the pixel type is a scalar or a label pixel type, then the number of components must be specified as 0 or 1.
If the pixel type is a vector pixel type, then the number of components defaults to the image dimension, unless the numberOfComponents is explicitly specified.
Unlike the standard convention for Dimensional Vectors the size parameter must be the exact dimension requesting. That is, it must be of length 2 of a 2D image, 3 for a 3D image and 4 for a 4D image.
|
inlineexplicit |
Construct an SimpleITK Image from an pointer to an ITK image.
The SimpleITK image will add a reference to the underlying the ITK image and hold a pointer to the image. If the image is manipulated directly from the ITK interface, SimpleITK may be unaware of it, and may cause complication related to aliasing and SimpleITK copy on write policy.
If simpleITK does not support the image type, a compile-time error or assertion will fail.
The ITK image must be fully buffered, and must have a zero starting index for the Buffered/Largest regions.
Definition at line 140 of file sitkImage.h.
|
inlineexplicit |
Construct an SimpleITK Image from an pointer to an ITK image.
The SimpleITK image will add a reference to the underlying the ITK image and hold a pointer to the image. If the image is manipulated directly from the ITK interface, SimpleITK may be unaware of it, and may cause complication related to aliasing and SimpleITK copy on write policy.
If simpleITK does not support the image type, a compile-time error or assertion will fail.
The ITK image must be fully buffered, and must have a zero starting index for the Buffered/Largest regions.
Definition at line 145 of file sitkImage.h.
References itk::simple::sitkUnknown.
|
protected |
Methods called by the constructor to allocate and initialize an image.
This method internally utlizes the member function factory to dispatch to methods instantiated on the image of the pixel ID
|
protected |
Dispatched methods for allocating images.
The enable if idiom is used here to enable different methods for different pixel/image types.
|
protected |
Dispatched methods for allocating images.
The enable if idiom is used here to enable different methods for different pixel/image types.
|
protected |
Dispatched methods for allocating images.
The enable if idiom is used here to enable different methods for different pixel/image types.
|
inlineprivate |
Dispatched from the InternalInitialization method. The "enable-if" idiom is used here for method overloading. The second method is for non-instantiated image, which turn into a void pointer for the parameter. However, this second method should never be executed.
Definition at line 522 of file sitkImage.h.
|
private |
Dispatched from the InternalInitialization method. The "enable-if" idiom is used here for method overloading. The second method is for non-instantiated image, which turn into a void pointer for the parameter. However, this second method should never be executed.
void itk::simple::Image::CopyInformation | ( | const Image & | srcImage | ) |
Copy common meta-data from an image to this one.
Copies the Origin, Spacing, and Direction from the source image to this image. The meta-data dictionary is not copied.
It is required for the source Image's dimension and size to match, this image's attributes, otherwise an exception will be generated.
bool itk::simple::Image::EraseMetaData | ( | const std::string & | key | ) |
Remove an entry from the meta-data dictionary.
Returns true, when the value exists in the dictionary and is removed, false otherwise.
double* itk::simple::Image::GetBufferAsDouble | ( | ) |
Get a pointer to the image buffer.
The size of the buffer is the number of components*Xsize*Ysize and then Zsize of a 3D image. The buffer should be accessed as a 1-D array. For example a 3D image buffer should be accessed:
The pointer to the buffer is not referenced counted. Additionally, while this image is made unique before returning the pointer, additional copying and usage may introduce unexpected aliasing of the image's buffer.
Vector and Complex pixel types are both accessed via the appropriate component type method.
The correct method for the current pixel type of the image must be called or else an exception will be generated. For vector pixel types the type of the component of the vector must be called.
const double* itk::simple::Image::GetBufferAsDouble | ( | ) | const |
Get a pointer to the image buffer.
The size of the buffer is the number of components*Xsize*Ysize and then Zsize of a 3D image. The buffer should be accessed as a 1-D array. For example a 3D image buffer should be accessed:
The pointer to the buffer is not referenced counted. Additionally, while this image is made unique before returning the pointer, additional copying and usage may introduce unexpected aliasing of the image's buffer.
Vector and Complex pixel types are both accessed via the appropriate component type method.
The correct method for the current pixel type of the image must be called or else an exception will be generated. For vector pixel types the type of the component of the vector must be called.
float* itk::simple::Image::GetBufferAsFloat | ( | ) |
Get a pointer to the image buffer.
The size of the buffer is the number of components*Xsize*Ysize and then Zsize of a 3D image. The buffer should be accessed as a 1-D array. For example a 3D image buffer should be accessed:
The pointer to the buffer is not referenced counted. Additionally, while this image is made unique before returning the pointer, additional copying and usage may introduce unexpected aliasing of the image's buffer.
Vector and Complex pixel types are both accessed via the appropriate component type method.
The correct method for the current pixel type of the image must be called or else an exception will be generated. For vector pixel types the type of the component of the vector must be called.
const float* itk::simple::Image::GetBufferAsFloat | ( | ) | const |
Get a pointer to the image buffer.
The size of the buffer is the number of components*Xsize*Ysize and then Zsize of a 3D image. The buffer should be accessed as a 1-D array. For example a 3D image buffer should be accessed:
The pointer to the buffer is not referenced counted. Additionally, while this image is made unique before returning the pointer, additional copying and usage may introduce unexpected aliasing of the image's buffer.
Vector and Complex pixel types are both accessed via the appropriate component type method.
The correct method for the current pixel type of the image must be called or else an exception will be generated. For vector pixel types the type of the component of the vector must be called.
int16_t* itk::simple::Image::GetBufferAsInt16 | ( | ) |
Get a pointer to the image buffer.
The size of the buffer is the number of components*Xsize*Ysize and then Zsize of a 3D image. The buffer should be accessed as a 1-D array. For example a 3D image buffer should be accessed:
The pointer to the buffer is not referenced counted. Additionally, while this image is made unique before returning the pointer, additional copying and usage may introduce unexpected aliasing of the image's buffer.
Vector and Complex pixel types are both accessed via the appropriate component type method.
The correct method for the current pixel type of the image must be called or else an exception will be generated. For vector pixel types the type of the component of the vector must be called.
const int16_t* itk::simple::Image::GetBufferAsInt16 | ( | ) | const |
Get a pointer to the image buffer.
The size of the buffer is the number of components*Xsize*Ysize and then Zsize of a 3D image. The buffer should be accessed as a 1-D array. For example a 3D image buffer should be accessed:
The pointer to the buffer is not referenced counted. Additionally, while this image is made unique before returning the pointer, additional copying and usage may introduce unexpected aliasing of the image's buffer.
Vector and Complex pixel types are both accessed via the appropriate component type method.
The correct method for the current pixel type of the image must be called or else an exception will be generated. For vector pixel types the type of the component of the vector must be called.
int32_t* itk::simple::Image::GetBufferAsInt32 | ( | ) |
Get a pointer to the image buffer.
The size of the buffer is the number of components*Xsize*Ysize and then Zsize of a 3D image. The buffer should be accessed as a 1-D array. For example a 3D image buffer should be accessed:
The pointer to the buffer is not referenced counted. Additionally, while this image is made unique before returning the pointer, additional copying and usage may introduce unexpected aliasing of the image's buffer.
Vector and Complex pixel types are both accessed via the appropriate component type method.
The correct method for the current pixel type of the image must be called or else an exception will be generated. For vector pixel types the type of the component of the vector must be called.
const int32_t* itk::simple::Image::GetBufferAsInt32 | ( | ) | const |
Get a pointer to the image buffer.
The size of the buffer is the number of components*Xsize*Ysize and then Zsize of a 3D image. The buffer should be accessed as a 1-D array. For example a 3D image buffer should be accessed:
The pointer to the buffer is not referenced counted. Additionally, while this image is made unique before returning the pointer, additional copying and usage may introduce unexpected aliasing of the image's buffer.
Vector and Complex pixel types are both accessed via the appropriate component type method.
The correct method for the current pixel type of the image must be called or else an exception will be generated. For vector pixel types the type of the component of the vector must be called.
int64_t* itk::simple::Image::GetBufferAsInt64 | ( | ) |
Get a pointer to the image buffer.
The size of the buffer is the number of components*Xsize*Ysize and then Zsize of a 3D image. The buffer should be accessed as a 1-D array. For example a 3D image buffer should be accessed:
The pointer to the buffer is not referenced counted. Additionally, while this image is made unique before returning the pointer, additional copying and usage may introduce unexpected aliasing of the image's buffer.
Vector and Complex pixel types are both accessed via the appropriate component type method.
The correct method for the current pixel type of the image must be called or else an exception will be generated. For vector pixel types the type of the component of the vector must be called.
const int64_t* itk::simple::Image::GetBufferAsInt64 | ( | ) | const |
Get a pointer to the image buffer.
The size of the buffer is the number of components*Xsize*Ysize and then Zsize of a 3D image. The buffer should be accessed as a 1-D array. For example a 3D image buffer should be accessed:
The pointer to the buffer is not referenced counted. Additionally, while this image is made unique before returning the pointer, additional copying and usage may introduce unexpected aliasing of the image's buffer.
Vector and Complex pixel types are both accessed via the appropriate component type method.
The correct method for the current pixel type of the image must be called or else an exception will be generated. For vector pixel types the type of the component of the vector must be called.
int8_t* itk::simple::Image::GetBufferAsInt8 | ( | ) |
Get a pointer to the image buffer.
The size of the buffer is the number of components*Xsize*Ysize and then Zsize of a 3D image. The buffer should be accessed as a 1-D array. For example a 3D image buffer should be accessed:
The pointer to the buffer is not referenced counted. Additionally, while this image is made unique before returning the pointer, additional copying and usage may introduce unexpected aliasing of the image's buffer.
Vector and Complex pixel types are both accessed via the appropriate component type method.
The correct method for the current pixel type of the image must be called or else an exception will be generated. For vector pixel types the type of the component of the vector must be called.
const int8_t* itk::simple::Image::GetBufferAsInt8 | ( | ) | const |
Get a pointer to the image buffer.
The size of the buffer is the number of components*Xsize*Ysize and then Zsize of a 3D image. The buffer should be accessed as a 1-D array. For example a 3D image buffer should be accessed:
The pointer to the buffer is not referenced counted. Additionally, while this image is made unique before returning the pointer, additional copying and usage may introduce unexpected aliasing of the image's buffer.
Vector and Complex pixel types are both accessed via the appropriate component type method.
The correct method for the current pixel type of the image must be called or else an exception will be generated. For vector pixel types the type of the component of the vector must be called.
uint16_t* itk::simple::Image::GetBufferAsUInt16 | ( | ) |
Get a pointer to the image buffer.
The size of the buffer is the number of components*Xsize*Ysize and then Zsize of a 3D image. The buffer should be accessed as a 1-D array. For example a 3D image buffer should be accessed:
The pointer to the buffer is not referenced counted. Additionally, while this image is made unique before returning the pointer, additional copying and usage may introduce unexpected aliasing of the image's buffer.
Vector and Complex pixel types are both accessed via the appropriate component type method.
The correct method for the current pixel type of the image must be called or else an exception will be generated. For vector pixel types the type of the component of the vector must be called.
const uint16_t* itk::simple::Image::GetBufferAsUInt16 | ( | ) | const |
Get a pointer to the image buffer.
The size of the buffer is the number of components*Xsize*Ysize and then Zsize of a 3D image. The buffer should be accessed as a 1-D array. For example a 3D image buffer should be accessed:
The pointer to the buffer is not referenced counted. Additionally, while this image is made unique before returning the pointer, additional copying and usage may introduce unexpected aliasing of the image's buffer.
Vector and Complex pixel types are both accessed via the appropriate component type method.
The correct method for the current pixel type of the image must be called or else an exception will be generated. For vector pixel types the type of the component of the vector must be called.
uint32_t* itk::simple::Image::GetBufferAsUInt32 | ( | ) |
Get a pointer to the image buffer.
The size of the buffer is the number of components*Xsize*Ysize and then Zsize of a 3D image. The buffer should be accessed as a 1-D array. For example a 3D image buffer should be accessed:
The pointer to the buffer is not referenced counted. Additionally, while this image is made unique before returning the pointer, additional copying and usage may introduce unexpected aliasing of the image's buffer.
Vector and Complex pixel types are both accessed via the appropriate component type method.
The correct method for the current pixel type of the image must be called or else an exception will be generated. For vector pixel types the type of the component of the vector must be called.
const uint32_t* itk::simple::Image::GetBufferAsUInt32 | ( | ) | const |
Get a pointer to the image buffer.
The size of the buffer is the number of components*Xsize*Ysize and then Zsize of a 3D image. The buffer should be accessed as a 1-D array. For example a 3D image buffer should be accessed:
The pointer to the buffer is not referenced counted. Additionally, while this image is made unique before returning the pointer, additional copying and usage may introduce unexpected aliasing of the image's buffer.
Vector and Complex pixel types are both accessed via the appropriate component type method.
The correct method for the current pixel type of the image must be called or else an exception will be generated. For vector pixel types the type of the component of the vector must be called.
uint64_t* itk::simple::Image::GetBufferAsUInt64 | ( | ) |
Get a pointer to the image buffer.
The size of the buffer is the number of components*Xsize*Ysize and then Zsize of a 3D image. The buffer should be accessed as a 1-D array. For example a 3D image buffer should be accessed:
The pointer to the buffer is not referenced counted. Additionally, while this image is made unique before returning the pointer, additional copying and usage may introduce unexpected aliasing of the image's buffer.
Vector and Complex pixel types are both accessed via the appropriate component type method.
The correct method for the current pixel type of the image must be called or else an exception will be generated. For vector pixel types the type of the component of the vector must be called.
const uint64_t* itk::simple::Image::GetBufferAsUInt64 | ( | ) | const |
Get a pointer to the image buffer.
The size of the buffer is the number of components*Xsize*Ysize and then Zsize of a 3D image. The buffer should be accessed as a 1-D array. For example a 3D image buffer should be accessed:
The pointer to the buffer is not referenced counted. Additionally, while this image is made unique before returning the pointer, additional copying and usage may introduce unexpected aliasing of the image's buffer.
Vector and Complex pixel types are both accessed via the appropriate component type method.
The correct method for the current pixel type of the image must be called or else an exception will be generated. For vector pixel types the type of the component of the vector must be called.
uint8_t* itk::simple::Image::GetBufferAsUInt8 | ( | ) |
Get a pointer to the image buffer.
The size of the buffer is the number of components*Xsize*Ysize and then Zsize of a 3D image. The buffer should be accessed as a 1-D array. For example a 3D image buffer should be accessed:
The pointer to the buffer is not referenced counted. Additionally, while this image is made unique before returning the pointer, additional copying and usage may introduce unexpected aliasing of the image's buffer.
Vector and Complex pixel types are both accessed via the appropriate component type method.
The correct method for the current pixel type of the image must be called or else an exception will be generated. For vector pixel types the type of the component of the vector must be called.
const uint8_t* itk::simple::Image::GetBufferAsUInt8 | ( | ) | const |
Get a pointer to the image buffer.
The size of the buffer is the number of components*Xsize*Ysize and then Zsize of a 3D image. The buffer should be accessed as a 1-D array. For example a 3D image buffer should be accessed:
The pointer to the buffer is not referenced counted. Additionally, while this image is made unique before returning the pointer, additional copying and usage may introduce unexpected aliasing of the image's buffer.
Vector and Complex pixel types are both accessed via the appropriate component type method.
The correct method for the current pixel type of the image must be called or else an exception will be generated. For vector pixel types the type of the component of the vector must be called.
void* itk::simple::Image::GetBufferAsVoid | ( | ) |
Get a pointer to the image buffer.
The size of the buffer is the number of components*Xsize*Ysize and then Zsize of a 3D image. The buffer should be accessed as a 1-D array. For example a 3D image buffer should be accessed:
The pointer to the buffer is not referenced counted. Additionally, while this image is made unique before returning the pointer, additional copying and usage may introduce unexpected aliasing of the image's buffer.
Vector and Complex pixel types are both accessed via the appropriate component type method.
The correct method for the current pixel type of the image must be called or else an exception will be generated. For vector pixel types the type of the component of the vector must be called.
const void* itk::simple::Image::GetBufferAsVoid | ( | ) | const |
Get a pointer to the image buffer.
The size of the buffer is the number of components*Xsize*Ysize and then Zsize of a 3D image. The buffer should be accessed as a 1-D array. For example a 3D image buffer should be accessed:
The pointer to the buffer is not referenced counted. Additionally, while this image is made unique before returning the pointer, additional copying and usage may introduce unexpected aliasing of the image's buffer.
Vector and Complex pixel types are both accessed via the appropriate component type method.
The correct method for the current pixel type of the image must be called or else an exception will be generated. For vector pixel types the type of the component of the vector must be called.
unsigned int itk::simple::Image::GetDepth | ( | ) | const |
unsigned int itk::simple::Image::GetDimension | ( | ) | const |
Get the number of physical dimensions.
Only the spatial dimensions are considered here. These are the dimensions the origin, spacing and direction cosine matrix are applicable to. This does not include the pixels' vector index as a dimension.
Referenced by itk::simple::ProcessObject::CastImageToITK().
std::vector< double > itk::simple::Image::GetDirection | ( | ) | const |
Set/Get the Direction.
Internally, the Direction is represented by a matrix 2x2 for a 2D and 3x3 for a 3D image. The matrix is passed as a 1D array in row-major form.
unsigned int itk::simple::Image::GetHeight | ( | ) | const |
Get the number of pixels the Image is in the second dimension
itk::DataObject* itk::simple::Image::GetITKBase | ( | ) |
Get access to internal ITK data object.
The return value should immediately be assigned to as itk::SmartPointer.
In many cases the value may need to be dynamically casted to the actual image type. The GetPixelIDValue() method should return an PixelID which identifies the image type which the DataObject points to.
If this object has been moved, then nullptr is returned.
Referenced by itk::simple::ProcessObject::CastImageToITK().
const itk::DataObject* itk::simple::Image::GetITKBase | ( | ) | const |
Get access to internal ITK data object.
The return value should immediately be assigned to as itk::SmartPointer.
In many cases the value may need to be dynamically casted to the actual image type. The GetPixelIDValue() method should return an PixelID which identifies the image type which the DataObject points to.
If this object has been moved, then nullptr is returned.
std::string itk::simple::Image::GetMetaData | ( | const std::string & | key | ) | const |
Get the value of a meta-data dictionary entry as a string.
If the key is not in the dictionary then an exception is thrown.
string types in the dictionary are returned as their native strings. Other types are printed to string before returning.
std::vector<std::string> itk::simple::Image::GetMetaDataKeys | ( | ) | const |
get a vector of keys in from the meta-data dictionary
Returns a vector of keys to the key/value entries in the image's meta-data dictionary. Iterate through with these keys to get the values.
unsigned int itk::simple::Image::GetNumberOfComponentsPerPixel | ( | ) | const |
Get the number of components for each pixel.
For scalar images this methods returns 1. For vector images the number of components for each pixel is returned.
uint64_t itk::simple::Image::GetNumberOfPixels | ( | ) | const |
Get the number of pixels in the image.
To Calculate the total number of values stored continuously for the image's buffer, the NumberOfPixels should be multiplied by NumberOfComponentsPerPixel in order to account for multiple component images.
std::vector< double > itk::simple::Image::GetOrigin | ( | ) | const |
Get/Set the Origin in physical space
std::complex<float> itk::simple::Image::GetPixelAsComplexFloat32 | ( | const std::vector< uint32_t > & | idx | ) | const |
Get the value of a pixel.
Returns the value of a pixel for the given index. The index follows standard SimpleITK conventions for it's length. The correct method must be called for the underlying Image type, otherwise an exception will be thrown.
idx | the zero based index into the image. It's length must be at least the value of GetDimension(), additional elements will be ignored. Boundary checking is performed on idx, if it is out of bounds an exception will be thrown. |
std::complex<double> itk::simple::Image::GetPixelAsComplexFloat64 | ( | const std::vector< uint32_t > & | idx | ) | const |
Get the value of a pixel.
Returns the value of a pixel for the given index. The index follows standard SimpleITK conventions for it's length. The correct method must be called for the underlying Image type, otherwise an exception will be thrown.
idx | the zero based index into the image. It's length must be at least the value of GetDimension(), additional elements will be ignored. Boundary checking is performed on idx, if it is out of bounds an exception will be thrown. |
double itk::simple::Image::GetPixelAsDouble | ( | const std::vector< uint32_t > & | idx | ) | const |
Get the value of a pixel.
Returns the value of a pixel for the given index. The index follows standard SimpleITK conventions for it's length. The correct method must be called for the underlying Image type, otherwise an exception will be thrown.
idx | the zero based index into the image. It's length must be at least the value of GetDimension(), additional elements will be ignored. Boundary checking is performed on idx, if it is out of bounds an exception will be thrown. |
float itk::simple::Image::GetPixelAsFloat | ( | const std::vector< uint32_t > & | idx | ) | const |
Get the value of a pixel.
Returns the value of a pixel for the given index. The index follows standard SimpleITK conventions for it's length. The correct method must be called for the underlying Image type, otherwise an exception will be thrown.
idx | the zero based index into the image. It's length must be at least the value of GetDimension(), additional elements will be ignored. Boundary checking is performed on idx, if it is out of bounds an exception will be thrown. |
Get the value of a pixel.
Returns the value of a pixel for the given index. The index follows standard SimpleITK conventions for it's length. The correct method must be called for the underlying Image type, otherwise an exception will be thrown.
idx | the zero based index into the image. It's length must be at least the value of GetDimension(), additional elements will be ignored. Boundary checking is performed on idx, if it is out of bounds an exception will be thrown. |
Get the value of a pixel.
Returns the value of a pixel for the given index. The index follows standard SimpleITK conventions for it's length. The correct method must be called for the underlying Image type, otherwise an exception will be thrown.
idx | the zero based index into the image. It's length must be at least the value of GetDimension(), additional elements will be ignored. Boundary checking is performed on idx, if it is out of bounds an exception will be thrown. |
Get the value of a pixel.
Returns the value of a pixel for the given index. The index follows standard SimpleITK conventions for it's length. The correct method must be called for the underlying Image type, otherwise an exception will be thrown.
idx | the zero based index into the image. It's length must be at least the value of GetDimension(), additional elements will be ignored. Boundary checking is performed on idx, if it is out of bounds an exception will be thrown. |
Get the value of a pixel.
Returns the value of a pixel for the given index. The index follows standard SimpleITK conventions for it's length. The correct method must be called for the underlying Image type, otherwise an exception will be thrown.
idx | the zero based index into the image. It's length must be at least the value of GetDimension(), additional elements will be ignored. Boundary checking is performed on idx, if it is out of bounds an exception will be thrown. |
Get the value of a pixel.
Returns the value of a pixel for the given index. The index follows standard SimpleITK conventions for it's length. The correct method must be called for the underlying Image type, otherwise an exception will be thrown.
idx | the zero based index into the image. It's length must be at least the value of GetDimension(), additional elements will be ignored. Boundary checking is performed on idx, if it is out of bounds an exception will be thrown. |
Get the value of a pixel.
Returns the value of a pixel for the given index. The index follows standard SimpleITK conventions for it's length. The correct method must be called for the underlying Image type, otherwise an exception will be thrown.
idx | the zero based index into the image. It's length must be at least the value of GetDimension(), additional elements will be ignored. Boundary checking is performed on idx, if it is out of bounds an exception will be thrown. |
Get the value of a pixel.
Returns the value of a pixel for the given index. The index follows standard SimpleITK conventions for it's length. The correct method must be called for the underlying Image type, otherwise an exception will be thrown.
idx | the zero based index into the image. It's length must be at least the value of GetDimension(), additional elements will be ignored. Boundary checking is performed on idx, if it is out of bounds an exception will be thrown. |
Get the value of a pixel.
Returns the value of a pixel for the given index. The index follows standard SimpleITK conventions for it's length. The correct method must be called for the underlying Image type, otherwise an exception will be thrown.
idx | the zero based index into the image. It's length must be at least the value of GetDimension(), additional elements will be ignored. Boundary checking is performed on idx, if it is out of bounds an exception will be thrown. |
std::vector<float> itk::simple::Image::GetPixelAsVectorFloat32 | ( | const std::vector< uint32_t > & | idx | ) | const |
Get the value of a pixel.
Returns the value of a pixel for the given index. The index follows standard SimpleITK conventions for it's length. The correct method must be called for the underlying Image type, otherwise an exception will be thrown.
idx | the zero based index into the image. It's length must be at least the value of GetDimension(), additional elements will be ignored. Boundary checking is performed on idx, if it is out of bounds an exception will be thrown. |
std::vector<double> itk::simple::Image::GetPixelAsVectorFloat64 | ( | const std::vector< uint32_t > & | idx | ) | const |
Get the value of a pixel.
Returns the value of a pixel for the given index. The index follows standard SimpleITK conventions for it's length. The correct method must be called for the underlying Image type, otherwise an exception will be thrown.
idx | the zero based index into the image. It's length must be at least the value of GetDimension(), additional elements will be ignored. Boundary checking is performed on idx, if it is out of bounds an exception will be thrown. |
std::vector<int16_t> itk::simple::Image::GetPixelAsVectorInt16 | ( | const std::vector< uint32_t > & | idx | ) | const |
Get the value of a pixel.
Returns the value of a pixel for the given index. The index follows standard SimpleITK conventions for it's length. The correct method must be called for the underlying Image type, otherwise an exception will be thrown.
idx | the zero based index into the image. It's length must be at least the value of GetDimension(), additional elements will be ignored. Boundary checking is performed on idx, if it is out of bounds an exception will be thrown. |
std::vector<int32_t> itk::simple::Image::GetPixelAsVectorInt32 | ( | const std::vector< uint32_t > & | idx | ) | const |
Get the value of a pixel.
Returns the value of a pixel for the given index. The index follows standard SimpleITK conventions for it's length. The correct method must be called for the underlying Image type, otherwise an exception will be thrown.
idx | the zero based index into the image. It's length must be at least the value of GetDimension(), additional elements will be ignored. Boundary checking is performed on idx, if it is out of bounds an exception will be thrown. |
std::vector<int64_t> itk::simple::Image::GetPixelAsVectorInt64 | ( | const std::vector< uint32_t > & | idx | ) | const |
Get the value of a pixel.
Returns the value of a pixel for the given index. The index follows standard SimpleITK conventions for it's length. The correct method must be called for the underlying Image type, otherwise an exception will be thrown.
idx | the zero based index into the image. It's length must be at least the value of GetDimension(), additional elements will be ignored. Boundary checking is performed on idx, if it is out of bounds an exception will be thrown. |
std::vector<int8_t> itk::simple::Image::GetPixelAsVectorInt8 | ( | const std::vector< uint32_t > & | idx | ) | const |
Get the value of a pixel.
Returns the value of a pixel for the given index. The index follows standard SimpleITK conventions for it's length. The correct method must be called for the underlying Image type, otherwise an exception will be thrown.
idx | the zero based index into the image. It's length must be at least the value of GetDimension(), additional elements will be ignored. Boundary checking is performed on idx, if it is out of bounds an exception will be thrown. |
std::vector<uint16_t> itk::simple::Image::GetPixelAsVectorUInt16 | ( | const std::vector< uint32_t > & | idx | ) | const |
Get the value of a pixel.
Returns the value of a pixel for the given index. The index follows standard SimpleITK conventions for it's length. The correct method must be called for the underlying Image type, otherwise an exception will be thrown.
idx | the zero based index into the image. It's length must be at least the value of GetDimension(), additional elements will be ignored. Boundary checking is performed on idx, if it is out of bounds an exception will be thrown. |
std::vector<uint32_t> itk::simple::Image::GetPixelAsVectorUInt32 | ( | const std::vector< uint32_t > & | idx | ) | const |
Get the value of a pixel.
Returns the value of a pixel for the given index. The index follows standard SimpleITK conventions for it's length. The correct method must be called for the underlying Image type, otherwise an exception will be thrown.
idx | the zero based index into the image. It's length must be at least the value of GetDimension(), additional elements will be ignored. Boundary checking is performed on idx, if it is out of bounds an exception will be thrown. |
std::vector<uint64_t> itk::simple::Image::GetPixelAsVectorUInt64 | ( | const std::vector< uint32_t > & | idx | ) | const |
Get the value of a pixel.
Returns the value of a pixel for the given index. The index follows standard SimpleITK conventions for it's length. The correct method must be called for the underlying Image type, otherwise an exception will be thrown.
idx | the zero based index into the image. It's length must be at least the value of GetDimension(), additional elements will be ignored. Boundary checking is performed on idx, if it is out of bounds an exception will be thrown. |
std::vector<uint8_t> itk::simple::Image::GetPixelAsVectorUInt8 | ( | const std::vector< uint32_t > & | idx | ) | const |
Get the value of a pixel.
Returns the value of a pixel for the given index. The index follows standard SimpleITK conventions for it's length. The correct method must be called for the underlying Image type, otherwise an exception will be thrown.
idx | the zero based index into the image. It's length must be at least the value of GetDimension(), additional elements will be ignored. Boundary checking is performed on idx, if it is out of bounds an exception will be thrown. |
PixelIDValueEnum itk::simple::Image::GetPixelID | ( | ) | const |
Get the pixel type
The pixel type is set at construction type and can not be manually changed, unless by assignment. The value may be -1 or "Unknown".
std::string itk::simple::Image::GetPixelIDTypeAsString | ( | ) | const |
Return the pixel type as a human readable string value.
Referenced by itk::simple::ProcessObject::CastImageToITK().
PixelIDValueType itk::simple::Image::GetPixelIDValue | ( | ) | const |
std::vector< unsigned int > itk::simple::Image::GetSize | ( | ) | const |
Get the number of pixels the Image is in each dimension as a std::vector. The size of the vector is equal to the number of dimensions for the image.
std::vector< double > itk::simple::Image::GetSpacing | ( | ) | const |
unsigned int itk::simple::Image::GetWidth | ( | ) | const |
Get the number of pixels the Image is in the first dimension
bool itk::simple::Image::HasMetaDataKey | ( | const std::string & | key | ) | const |
Query the meta-data dictionary for the existence of a key.
|
private |
Method called by certain constructors to convert ITK images into simpleITK ones.
This is the single method which needs to be explicitly instantiated to separate the internal ITK and Pimple image from the external SimpleITK interface. Template parameters have been chosen carefully to flexibly enable this.
bool itk::simple::Image::IsUnique | ( | ) | const |
Returns true if no other SimpleITK Image object refers to the same internal data structure.
void itk::simple::Image::MakeUnique | ( | ) |
Performs actually coping if needed to make object unique.
The Image class by default performs lazy coping and assignment. This method make sure that coping actually happens to the itk::Image pointed to is only pointed to by this object.
void itk::simple::Image::SetDirection | ( | const std::vector< double > & | direction | ) |
Set/Get the Direction.
Internally, the Direction is represented by a matrix 2x2 for a 2D and 3x3 for a 3D image. The matrix is passed as a 1D array in row-major form.
void itk::simple::Image::SetMetaData | ( | const std::string & | key, |
const std::string & | value | ||
) |
Set an entry in the meta-data dictionary.
Replaces or creates an entry in the image's meta-data dictionary.
void itk::simple::Image::SetOrigin | ( | const std::vector< double > & | origin | ) |
Get/Set the Origin in physical space
void itk::simple::Image::SetPixelAsComplexFloat32 | ( | const std::vector< uint32_t > & | idx, |
const std::complex< float > | v | ||
) |
Set the value of a pixel.
Set the value of a pixel at the provided index. The index follows standard SimpleITK conventions for it's length. The correct method must be called which should match the underlying image type, otherwise an exception will be thrown.
idx | the zero based index into the image. It's length must be at least the value of GetDimension(), additional elements will be ignored. Boundary checking is performed on idx, if it is out of bounds an exception will be thrown. |
v | value to set the pixel to |
void itk::simple::Image::SetPixelAsComplexFloat64 | ( | const std::vector< uint32_t > & | idx, |
const std::complex< double > | v | ||
) |
Set the value of a pixel.
Set the value of a pixel at the provided index. The index follows standard SimpleITK conventions for it's length. The correct method must be called which should match the underlying image type, otherwise an exception will be thrown.
idx | the zero based index into the image. It's length must be at least the value of GetDimension(), additional elements will be ignored. Boundary checking is performed on idx, if it is out of bounds an exception will be thrown. |
v | value to set the pixel to |
void itk::simple::Image::SetPixelAsDouble | ( | const std::vector< uint32_t > & | idx, |
double | v | ||
) |
Set the value of a pixel.
Set the value of a pixel at the provided index. The index follows standard SimpleITK conventions for it's length. The correct method must be called which should match the underlying image type, otherwise an exception will be thrown.
idx | the zero based index into the image. It's length must be at least the value of GetDimension(), additional elements will be ignored. Boundary checking is performed on idx, if it is out of bounds an exception will be thrown. |
v | value to set the pixel to |
void itk::simple::Image::SetPixelAsFloat | ( | const std::vector< uint32_t > & | idx, |
float | v | ||
) |
Set the value of a pixel.
Set the value of a pixel at the provided index. The index follows standard SimpleITK conventions for it's length. The correct method must be called which should match the underlying image type, otherwise an exception will be thrown.
idx | the zero based index into the image. It's length must be at least the value of GetDimension(), additional elements will be ignored. Boundary checking is performed on idx, if it is out of bounds an exception will be thrown. |
v | value to set the pixel to |
Set the value of a pixel.
Set the value of a pixel at the provided index. The index follows standard SimpleITK conventions for it's length. The correct method must be called which should match the underlying image type, otherwise an exception will be thrown.
idx | the zero based index into the image. It's length must be at least the value of GetDimension(), additional elements will be ignored. Boundary checking is performed on idx, if it is out of bounds an exception will be thrown. |
v | value to set the pixel to |
Set the value of a pixel.
Set the value of a pixel at the provided index. The index follows standard SimpleITK conventions for it's length. The correct method must be called which should match the underlying image type, otherwise an exception will be thrown.
idx | the zero based index into the image. It's length must be at least the value of GetDimension(), additional elements will be ignored. Boundary checking is performed on idx, if it is out of bounds an exception will be thrown. |
v | value to set the pixel to |
Set the value of a pixel.
Set the value of a pixel at the provided index. The index follows standard SimpleITK conventions for it's length. The correct method must be called which should match the underlying image type, otherwise an exception will be thrown.
idx | the zero based index into the image. It's length must be at least the value of GetDimension(), additional elements will be ignored. Boundary checking is performed on idx, if it is out of bounds an exception will be thrown. |
v | value to set the pixel to |
Set the value of a pixel.
Set the value of a pixel at the provided index. The index follows standard SimpleITK conventions for it's length. The correct method must be called which should match the underlying image type, otherwise an exception will be thrown.
idx | the zero based index into the image. It's length must be at least the value of GetDimension(), additional elements will be ignored. Boundary checking is performed on idx, if it is out of bounds an exception will be thrown. |
v | value to set the pixel to |
Set the value of a pixel.
Set the value of a pixel at the provided index. The index follows standard SimpleITK conventions for it's length. The correct method must be called which should match the underlying image type, otherwise an exception will be thrown.
idx | the zero based index into the image. It's length must be at least the value of GetDimension(), additional elements will be ignored. Boundary checking is performed on idx, if it is out of bounds an exception will be thrown. |
v | value to set the pixel to |
Set the value of a pixel.
Set the value of a pixel at the provided index. The index follows standard SimpleITK conventions for it's length. The correct method must be called which should match the underlying image type, otherwise an exception will be thrown.
idx | the zero based index into the image. It's length must be at least the value of GetDimension(), additional elements will be ignored. Boundary checking is performed on idx, if it is out of bounds an exception will be thrown. |
v | value to set the pixel to |
Set the value of a pixel.
Set the value of a pixel at the provided index. The index follows standard SimpleITK conventions for it's length. The correct method must be called which should match the underlying image type, otherwise an exception will be thrown.
idx | the zero based index into the image. It's length must be at least the value of GetDimension(), additional elements will be ignored. Boundary checking is performed on idx, if it is out of bounds an exception will be thrown. |
v | value to set the pixel to |
Set the value of a pixel.
Set the value of a pixel at the provided index. The index follows standard SimpleITK conventions for it's length. The correct method must be called which should match the underlying image type, otherwise an exception will be thrown.
idx | the zero based index into the image. It's length must be at least the value of GetDimension(), additional elements will be ignored. Boundary checking is performed on idx, if it is out of bounds an exception will be thrown. |
v | value to set the pixel to |
void itk::simple::Image::SetPixelAsVectorFloat32 | ( | const std::vector< uint32_t > & | idx, |
const std::vector< float > & | v | ||
) |
Set the value of a pixel.
Set the value of a pixel at the provided index. The index follows standard SimpleITK conventions for it's length. The correct method must be called which should match the underlying image type, otherwise an exception will be thrown.
idx | the zero based index into the image. It's length must be at least the value of GetDimension(), additional elements will be ignored. Boundary checking is performed on idx, if it is out of bounds an exception will be thrown. |
v | value to set the pixel to |
void itk::simple::Image::SetPixelAsVectorFloat64 | ( | const std::vector< uint32_t > & | idx, |
const std::vector< double > & | v | ||
) |
Set the value of a pixel.
Set the value of a pixel at the provided index. The index follows standard SimpleITK conventions for it's length. The correct method must be called which should match the underlying image type, otherwise an exception will be thrown.
idx | the zero based index into the image. It's length must be at least the value of GetDimension(), additional elements will be ignored. Boundary checking is performed on idx, if it is out of bounds an exception will be thrown. |
v | value to set the pixel to |
void itk::simple::Image::SetPixelAsVectorInt16 | ( | const std::vector< uint32_t > & | idx, |
const std::vector< int16_t > & | v | ||
) |
Set the value of a pixel.
Set the value of a pixel at the provided index. The index follows standard SimpleITK conventions for it's length. The correct method must be called which should match the underlying image type, otherwise an exception will be thrown.
idx | the zero based index into the image. It's length must be at least the value of GetDimension(), additional elements will be ignored. Boundary checking is performed on idx, if it is out of bounds an exception will be thrown. |
v | value to set the pixel to |
void itk::simple::Image::SetPixelAsVectorInt32 | ( | const std::vector< uint32_t > & | idx, |
const std::vector< int32_t > & | v | ||
) |
Set the value of a pixel.
Set the value of a pixel at the provided index. The index follows standard SimpleITK conventions for it's length. The correct method must be called which should match the underlying image type, otherwise an exception will be thrown.
idx | the zero based index into the image. It's length must be at least the value of GetDimension(), additional elements will be ignored. Boundary checking is performed on idx, if it is out of bounds an exception will be thrown. |
v | value to set the pixel to |
void itk::simple::Image::SetPixelAsVectorInt64 | ( | const std::vector< uint32_t > & | idx, |
const std::vector< int64_t > & | v | ||
) |
Set the value of a pixel.
Set the value of a pixel at the provided index. The index follows standard SimpleITK conventions for it's length. The correct method must be called which should match the underlying image type, otherwise an exception will be thrown.
idx | the zero based index into the image. It's length must be at least the value of GetDimension(), additional elements will be ignored. Boundary checking is performed on idx, if it is out of bounds an exception will be thrown. |
v | value to set the pixel to |
void itk::simple::Image::SetPixelAsVectorInt8 | ( | const std::vector< uint32_t > & | idx, |
const std::vector< int8_t > & | v | ||
) |
Set the value of a pixel.
Set the value of a pixel at the provided index. The index follows standard SimpleITK conventions for it's length. The correct method must be called which should match the underlying image type, otherwise an exception will be thrown.
idx | the zero based index into the image. It's length must be at least the value of GetDimension(), additional elements will be ignored. Boundary checking is performed on idx, if it is out of bounds an exception will be thrown. |
v | value to set the pixel to |
void itk::simple::Image::SetPixelAsVectorUInt16 | ( | const std::vector< uint32_t > & | idx, |
const std::vector< uint16_t > & | v | ||
) |
Set the value of a pixel.
Set the value of a pixel at the provided index. The index follows standard SimpleITK conventions for it's length. The correct method must be called which should match the underlying image type, otherwise an exception will be thrown.
idx | the zero based index into the image. It's length must be at least the value of GetDimension(), additional elements will be ignored. Boundary checking is performed on idx, if it is out of bounds an exception will be thrown. |
v | value to set the pixel to |
void itk::simple::Image::SetPixelAsVectorUInt32 | ( | const std::vector< uint32_t > & | idx, |
const std::vector< uint32_t > & | v | ||
) |
Set the value of a pixel.
Set the value of a pixel at the provided index. The index follows standard SimpleITK conventions for it's length. The correct method must be called which should match the underlying image type, otherwise an exception will be thrown.
idx | the zero based index into the image. It's length must be at least the value of GetDimension(), additional elements will be ignored. Boundary checking is performed on idx, if it is out of bounds an exception will be thrown. |
v | value to set the pixel to |
void itk::simple::Image::SetPixelAsVectorUInt64 | ( | const std::vector< uint32_t > & | idx, |
const std::vector< uint64_t > & | v | ||
) |
Set the value of a pixel.
Set the value of a pixel at the provided index. The index follows standard SimpleITK conventions for it's length. The correct method must be called which should match the underlying image type, otherwise an exception will be thrown.
idx | the zero based index into the image. It's length must be at least the value of GetDimension(), additional elements will be ignored. Boundary checking is performed on idx, if it is out of bounds an exception will be thrown. |
v | value to set the pixel to |
void itk::simple::Image::SetPixelAsVectorUInt8 | ( | const std::vector< uint32_t > & | idx, |
const std::vector< uint8_t > & | v | ||
) |
Set the value of a pixel.
Set the value of a pixel at the provided index. The index follows standard SimpleITK conventions for it's length. The correct method must be called which should match the underlying image type, otherwise an exception will be thrown.
idx | the zero based index into the image. It's length must be at least the value of GetDimension(), additional elements will be ignored. Boundary checking is performed on idx, if it is out of bounds an exception will be thrown. |
v | value to set the pixel to |
void itk::simple::Image::SetSpacing | ( | const std::vector< double > & | spacing | ) |
std::string itk::simple::Image::ToString | ( | ) | const |
std::vector< double > itk::simple::Image::TransformContinuousIndexToPhysicalPoint | ( | const std::vector< double > & | index | ) | const |
Transform continuous index to physical point
std::vector< double > itk::simple::Image::TransformIndexToPhysicalPoint | ( | const std::vector< int64_t > & | index | ) | const |
Transform index to physical point
std::vector< double > itk::simple::Image::TransformPhysicalPointToContinuousIndex | ( | const std::vector< double > & | point | ) | const |
Transform physical point to continuous index
std::vector< int64_t > itk::simple::Image::TransformPhysicalPointToIndex | ( | const std::vector< double > & | point | ) | const |
Transform physical point to index
|
private |
Definition at line 540 of file sitkImage.h.