SMIL  0.9.1
NumpyInt< T > Class Template Reference

Numpy Array Interface. More...

#include <DNumpyInterface.hpp>

+ Inheritance diagram for NumpyInt< T >:
+ Collaboration diagram for NumpyInt< T >:

Public Types

typedef SharedImage< T > parentClass
 
- Public Types inherited from SharedImage< T >
typedef Image< T >::lineType lineType
 
typedef Image< T > parentClass
 
- Public Types inherited from Image< T >
typedef ImDtTypes< T >::lineType lineType
 
typedef ImDtTypes< T >::pixelType pixelType
 
typedef ImDtTypes< T >::restrictLineType restrictLineType
 
typedef ImDtTypes< T >::sliceType sliceType
 
typedef ImDtTypes< T >::volType volType
 
- Public Types inherited from BaseObject
typedef void parentClass
 
typedef void(BaseObject::* voidMemberFunc) ()
 

Public Member Functions

 NumpyInt (PyObject *obj)
 Constructor.
 
- Public Member Functions inherited from SharedImage< T >
virtual RES_T attach (lineType dataPtr, size_t width, size_t height, size_t depth=1)
 
virtual RES_T attach (const Image< T > &im)
 
virtual RES_T attach (lineType dataPtr)
 
virtual RES_T clone (const SharedImage< T > &rhs)
 
virtual RES_T detach ()
 
SharedImage< T > & operator= (const SharedImage< T > &rhs)
 
 SharedImage ()
 Default constructor.
 
 SharedImage (const Image< T > &img)
 
 SharedImage (lineType dataPtr, size_t width, size_t height, size_t depth=1)
 
 SharedImage (const SharedImage< T > &img)
 
- Public Member Functions inherited from Image< T >
template<>
RES_T allocate (void)
 
template<>
RES_T allocate (void)
 
template<>
RES_T allocate ()
 
template<>
void clone (const Image< Bit > &rhs)
 
template<>
void clone (const Image< Bit > &rhs)
 
virtual void clone (const Image< T > &rhs)
 Clone from a given image (set same size and copy content)
 
template<class T2 >
void clone (const Image< T2 > &rhs)
 
virtual Image< T > clone (bool cloneData=true)
 Create a clone of the image (with same size and content )
 
template<>
RES_T deallocate (void)
 
template<>
RES_T deallocate (void)
 
template<>
RES_T deallocate ()
 
void drain (Image< T > *im, bool deleteSrc=false)
 Replace container. Drain memory from image im to this.
 
void fromArray (const T inArray[])
 Copy pixel values from a given array.
 
void fromCharArray (const signed char inArray[])
 Copy pixel values from a given char array.
 
void fromIntArray (const int inArray[])
 Copy pixel values from a given int array.
 
void fromIntVector (const vector< int > inVector)
 Copy pixel values from a given int vector.
 
void fromString (string pixVals)
 Import pixel values from string.
 
virtual const char * getInfoString (const char *indent="") const
 Get the description of the image as a string.
 
sliceType getLines () const
 Get an array containing the start offset of each line.
 
getPixel (size_t x, size_t y, size_t z=0) const
 Return the value of the pixel at pos x,y(,z)
 
getPixel (size_t offset) const
 Return the value of the pixel at a given offset.
 
getPixelNoCheck (size_t offset) const
 
lineType getPixels () const
 Get the pixels as a 1D array.
 
SharedImage< T > getSlice (size_t sliceNum) const
 Get a 2D slice of a 3D image. It doesn't create an image, but returns a 2D SharedImage using the same data.
 
volType getSlices () const
 Get an array containing the start offset of each slice.
 
virtual const char * getTypeAsString ()
 Get the image type. More...
 
virtual ImageViewer< T > * getViewer ()
 Get the image viewer (create one if needed)
 
template<>
void * getVoidPointer (void)
 Get the void* data array.
 
template<>
void * getVoidPointer (void)
 Get the void* data array.
 
template<>
void * getVoidPointer ()
 Get the void* data array.
 
virtual void * getVoidPointer (void)
 Get pixels as a void pointer.
 
virtual void hide ()
 Hide image.
 
 Image ()
 Default constructor.
 
 Image (size_t w, size_t h, size_t d=1)
 Contruction with a given size (automatic allocation)
 
 Image (const char *fileName)
 Contruction from a file.
 
 Image (const Image< T > &rhs, bool cloneData=false)
 Copy constructor.
 
template<class T2 >
 Image (const Image< T2 > &rhs, bool cloneData=false)
 
 Image (const ResImage< T > &rhs, bool cloneData=true)
 
 Image (BaseImage *_im, bool stealIdentity=false)
 
template<>
void init ()
 
template<>
void init ()
 
template<>
void init ()
 
virtual void init ()
 
virtual bool isVisible ()
 Check if the image is visible. More...
 
virtual RES_T load (const char *fileName)
 Load from file.
 
virtual void modified ()
 Trigger modified event (allows to force display update)
 
template<>
 operator bool ()
 
 operator bool ()
 Boolean operator. More...
 
ResImage< T > operator!= (const Image< T > &rhs)
 Diff boolean operator (see equ()).
 
ResImage< T > operator& (const Image< T > &rhs)
 
ResImage< T > operator& (const T &value)
 
Image< T > & operator&= (const Image< T > &rhs)
 
Image< T > & operator&= (const T &value)
 
ResImage< T > operator* (const Image< T > &rhs)
 Multiply by image.
 
ResImage< T > operator* (const T &value)
 Multiply by value.
 
Image< T > & operator*= (const Image< T > &rhs)
 Image multiplication assignment.
 
Image< T > & operator*= (const T &value)
 Value multiplication assignment.
 
ResImage< T > operator+ (const Image< T > &rhs)
 Add image.
 
ResImage< T > operator+ (const T &value)
 Add value.
 
Image< T > & operator+= (const Image< T > &rhs)
 Image addition assignment.
 
Image< T > & operator+= (const T &value)
 Value addition assignment.
 
ResImage< T > operator- () const
 
ResImage< T > operator- (const Image< T > &rhs)
 Sub image.
 
ResImage< T > operator- (const T &value)
 Sub value.
 
Image< T > & operator-= (const Image< T > &rhs)
 Image subtraction assignment.
 
Image< T > & operator-= (const T &value)
 Value subtraction assignment.
 
ResImage< T > operator/ (const Image< T > &rhs)
 Divide by image.
 
ResImage< T > operator/ (const T &value)
 Divide by value.
 
Image< T > & operator/= (const Image< T > &rhs)
 Image division assignment.
 
Image< T > & operator/= (const T &value)
 Value division assignment.
 
ResImage< T > operator< (const Image< T > &rhs)
 Lower boolean operator (see low())
 
ResImage< T > operator< (const T &value)
 Lower boolean operator (see low())
 
Image< T > & operator<< (const Image< T > &rhs)
 Copy image.
 
Image< T > & operator<< (const T &value)
 Fill image.
 
Image< T > & operator<< (vector< T > &vect)
 Import image data from a vector.
 
Image< T > & operator<< (const lineType &tab)
 Import image data from an array.
 
Image< T > & operator<< (const char *s)
 
Image< T > & operator<< (const string s)
 
ResImage< T > operator<= (const Image< T > &rhs)
 Lower or equal boolean operator (see lowOrEqu())
 
ResImage< T > operator<= (const T &value)
 Lower or equal boolean operator (see lowOrEqu())
 
Image< T > & operator= (const Image< T > &rhs)
 
ResImage< T > operator== (const Image< T > &rhs)
 Equal boolean operator (see equ()).
 
ResImage< T > operator> (const Image< T > &rhs)
 Greater boolean operator (see grt())
 
ResImage< T > operator> (const T &value)
 Greater boolean operator (see grt())
 
ResImage< T > operator>= (const Image< T > &rhs)
 Greater or equal boolean operator (see grt())
 
ResImage< T > operator>= (const T &value)
 Greater or equal boolean operator (see grt())
 
Image< T > & operator>> (vector< T > &vect)
 Export image data to a vector.
 
Image< T > & operator>> (const char *s)
 
Image< T > & operator>> (const string s)
 
T & operator[] (size_t i)
 
ResImage< T > operator| (const Image< T > &rhs)
 
ResImage< T > operator| (const T &value)
 
Image< T > & operator|= (const Image< T > &rhs)
 
Image< T > & operator|= (const T &value)
 
ResImage< T > operator~ () const
 Negate image.
 
void printSelf (ostream &os, bool displayPixVals, bool hexaGrid=false, string indent="") const
 Print a description of the image. More...
 
virtual void printSelf (ostream &os=std::cout, string indent="") const
 
void printSelf (bool displayPixVals, bool hexaGrid=false)
 
virtual RES_T save (const char *fileName)
 Save to file.
 
virtual void setName (const char *_name)
 Set the name of the image.
 
template<>
RES_T setPixel (size_t offset, const Bit &value)
 
RES_T setPixel (size_t x, size_t y, size_t z, const T &value)
 Set the value of the pixel at pos x,y,z (for 3D image)
 
template<>
RES_T setPixel (size_t offset, const Bit &value)
 
RES_T setPixel (size_t x, size_t y, const T &value)
 Set the value of the pixel at pos x,y.
 
RES_T setPixel (size_t offset, const T &value)
 Set the value of the pixel at a given offset.
 
void setPixelNoCheck (size_t offset, const T &value)
 
virtual RES_T setSize (size_t s[3], bool doAllocate=true)
 Set the size of image.
 
virtual RES_T setSize (const BaseImage &rhs, bool doAllocate=true)
 Set the size of image.
 
virtual RES_T setSize (const vector< UINT > s, bool doAllocate=true)
 Set the size of image.
 
virtual void show (const char *_name=NULL, bool labelImage=false)
 Show the default viewer associated with the image.
 
virtual void showLabel (const char *_name=NULL)
 Show the default viewer associated with the image using a color lookup table.
 
virtual void showNormal (const char *_name=NULL)
 
void toArray (T outArray[])
 Copy pixel values to a given array.
 
void toCharArray (signed char outArray[])
 Copy pixel values to a given char array.
 
char * toCharArray ()
 
void toIntArray (int outArray[])
 Copy pixel values to a given int array.
 
vector< int > toIntVector ()
 Copy pixel values to a given int vector.
 
string toString ()
 Export pixel values to a string.
 
- Public Member Functions inherited from BaseImage
 BaseImage (const char *_className="BaseImage")
 
 BaseImage (const BaseImage &rhs)
 
virtual size_t getAllocatedSize () const
 Get memory size (bytes)
 
void getCoordsFromOffset (size_t off, size_t &x, size_t &y, size_t &z) const
 Get x,y(,z) coordinates for a given offset.
 
size_t getDepth () const
 Get image depth (Z)
 
UINT getDimension () const
 Get dimension (2D or 3D)
 
size_t getHeight () const
 Get image height.
 
size_t getLineCount () const
 Get the number of lines.
 
size_t getOffsetFromCoords (size_t x, size_t y, size_t z=1) const
 Get an offset for given x,y(,z) coordinates.
 
size_t getPixelCount () const
 Get the number of pixels.
 
void getSize (size_t *w, size_t *h, size_t *d) const
 
void getSize (size_t s[3]) const
 Get image size.
 
void getSize (int s[3]) const
 
size_t getSliceCount () const
 Get the number of slices(for 3D images)
 
size_t getWidth () const
 Get image width.
 
bool isAllocated () const
 Check if the image is allocated.
 
BaseImageoperator= (const BaseImage &rhs)
 
- Public Member Functions inherited from BaseObject
 BaseObject (const char *_className, bool _register=true)
 
 BaseObject (const BaseObject &rhs, bool _register=true)
 
virtual const char * getClassName () const
 
CoregetCoreInstance ()
 
virtual const char * getName () const
 
BaseObjectoperator= (const BaseObject &rhs)
 

Additional Inherited Members

- Static Public Member Functions inherited from Image< T >
static T getDataTypeMax ()
 
static T getDataTypeMin ()
 
- Public Attributes inherited from BaseImage
Signal onModified
 
Signal onShow
 
bool updatesEnabled
 
- Public Attributes inherited from BaseObject
bool triggerEvents
 
- Protected Member Functions inherited from SharedImage< T >
template<>
RES_T allocate ()
 Allocate image.
 
template<>
RES_T allocate ()
 Allocate image.
 
virtual RES_T allocate ()
 Allocate image.
 
virtual RES_T deallocate ()
 Deallocate image.
 
virtual RES_T setSize (size_t w, size_t h, size_t d=1, bool=true)
 Set the size of image.
 
- Protected Member Functions inherited from Image< T >
void createViewer ()
 
template<>
RES_T restruct (void)
 
template<>
RES_T restruct (void)
 
template<>
RES_T restruct (void)
 
RES_T restruct (void)
 
- Protected Attributes inherited from SharedImage< T >
bool attached
 
- Protected Attributes inherited from Image< T >
dumPixel
 
sliceType lines
 
lineType pixels
 
volType slices
 
ImageViewer< T > * viewer
 
- Protected Attributes inherited from BaseImage
bool allocated
 
size_t allocatedSize
 
size_t dataTypeSize
 
size_t depth
 
size_t height
 
size_t lineCount
 
size_t pixelCount
 
size_t sliceCount
 
size_t width
 
- Protected Attributes inherited from BaseObject
string className
 
string name
 
bool registered
 

Detailed Description

template<class T>
class smil::NumpyInt< T >

Numpy Array Interface.


The documentation for this class was generated from the following file: