golib
0.5
|
Access to sub-areas of goSignal3DBase
objects.
More...
#include <gosubsignal3d.h>
Public Member Functions | |
goSubSignal3D () | |
Constructor. More... | |
goSubSignal3D (goSignal3DBase< T > *p, goSize_t sizeX, goSize_t sizeY, goSize_t sizeZ) | |
goSubSignal3D (goSignal3DBase< T > *p, goSize_t sizeX, goSize_t sizeY, goSize_t sizeZ, goIndex_t posX, goIndex_t posY, goIndex_t posZ) | |
goSubSignal3D (goSignal3DBase< T > *p, const goSize3D &size) | |
virtual void | setBorderFlags (int axes=GO_X|GO_Y|GO_Z, int borderFlag=GO_PERIODIC_BORDER) |
Sets the border behaviour. More... | |
virtual void | setBorderFlags (const goFixedArray< int > &flags) |
void | setParent (goSignal3DBase< T > *p) |
goSignal3DBase< T > * | getParent () |
void | setPosition (goPosition &p) |
void | setPosition (goIndex_t x, goIndex_t y, goIndex_t z) |
void | setSkip (goSize_t skipX, goSize_t skipY, goSize_t skipZ) |
goPosition & | getPosition () |
void | move (int dir) |
void | shiftLeftDiff (int n, int axes=GO_X|GO_Y|GO_Z) |
Copies the last valid values from the block data into the borders. More... | |
void | shiftRightDiff (int n, int axes=GO_X|GO_Y|GO_Z) |
void | shiftLeftSize (int n, int axes=GO_X|GO_Y|GO_Z) |
void | shiftRightSize (int n, int axes=GO_X|GO_Y|GO_Z) |
![]() | |
virtual void | destroy () |
virtual goSize_t | memoryUsage () const |
Returns the size of this object or some measure of its memory consumption. More... | |
void | setChanged () |
goCaller0< void > & | getChangedCaller () |
void | setPtr (T *p) |
const goType & | getDataType () const |
void | setChannel (goSize_t c) |
goSize_t | getChannel () const |
goPtrdiff_t | getChannelOffset (goSize_t channel) const |
Get the pointer offset from a channel 0 element to the corresponding channel channel element. More... | |
const goFixedArray< int > & | getBorderFlags () const |
bool | setDataType (goTypeEnum t) |
goDouble | getValue (goIndex_t x, goIndex_t y=0, goIndex_t z=0, goSize_t channel=0) const |
Convenience function to get a value. More... | |
void | setValue (goDouble value, goIndex_t x, goIndex_t y=0, goIndex_t z=0, goSize_t channel=0) |
Convenience function to set a value. More... | |
T * | getPtr () |
const T * | getPtr () const |
const T * | getRealPtr () const |
T * | getRealPtr () |
T * | getPtr (goIndex_t x, goIndex_t y, goIndex_t z) |
const T * | getPtr (goIndex_t x, goIndex_t y, goIndex_t z) const |
const goPtrdiff_t * | getXDiff () const |
const goPtrdiff_t * | getYDiff () const |
const goPtrdiff_t * | getZDiff () const |
goPtrdiff_t * | getXDiff () |
goPtrdiff_t * | getYDiff () |
goPtrdiff_t * | getZDiff () |
const goPtrdiff_t * | getXJump () const |
const goPtrdiff_t * | getYJump () const |
const goPtrdiff_t * | getZJump () const |
goPtrdiff_t * | getXJump () |
goPtrdiff_t * | getYJump () |
goPtrdiff_t * | getZJump () |
void | setSize (goSize_t x, goSize_t y, goSize_t z, goSize_t channelCount=1) |
INTERNAL – DO NOT USE. More... | |
void | setSize (const goSize3D &sz) |
INTERNAL – DO NOT USE. More... | |
void | setSizeX (goSize_t s) |
INTERNAL – DO NOT USE. More... | |
void | setSizeY (goSize_t s) |
INTERNAL – DO NOT USE. More... | |
void | setSizeZ (goSize_t s) |
INTERNAL – DO NOT USE. More... | |
const goSize3D & | getSize () const |
const goSize3D & | getBlockSize () const |
const goSize3D & | getBorderSize () const |
void | resizeBorder (const goSize3D &size) |
Resize the border and re-initialise internal data structures accordingly. More... | |
goSize_t | getSizeX () const |
goSize_t | getSizeY () const |
goSize_t | getSizeZ () const |
goIndex_t | getBorderX () const |
goIndex_t | getBorderY () const |
goIndex_t | getBorderZ () const |
goSize_t | getBlockSizeX () const |
goSize_t | getBlockSizeY () const |
goSize_t | getBlockSizeZ () const |
goSize_t | getChannelCount () const |
const goSignal3DBase< T > & | reference (goSignal3DBase< T > &other) |
bool | operator== (goSignal3DBase< T > &other) |
goDouble | getMaximum () const |
goDouble | getMinimum () const |
void | getMinMax (goDouble &minRet, goDouble &maxRet) const |
virtual void | fill (const T *value) |
Fills the current channel. More... | |
virtual void | fill (goDouble value) |
void | rotateAxes () |
void | swapXY () |
void | flip (int axis) |
BROKEN. Fix when there's time. More... | |
const T * | getClosest (go3Vector< goFloat > &point) const |
goFloat | sample (go3Vector< goFloat > &point) |
goDouble | sum () const |
goSignal3DBase< T > & | operator+= (const goSignal3DBase< T > &other) |
Element-wise operator. More... | |
goSignal3DBase< T > & | operator-= (const goSignal3DBase< T > &other) |
Element-wise operator. More... | |
goSignal3DBase< T > & | operator*= (const goSignal3DBase< T > &other) |
Element-wise operator. More... | |
goSignal3DBase< T > & | operator/= (const goSignal3DBase< T > &other) |
Element-wise operator. More... | |
goSignal3DBase< T > & | operator+= (goFloat scalar) |
Element-wise operator. More... | |
goSignal3DBase< T > & | operator-= (goFloat scalar) |
Element-wise operator. More... | |
goSignal3DBase< T > & | operator*= (goFloat scalar) |
Element-wise operator. More... | |
goSignal3DBase< T > & | operator/= (goFloat scalar) |
Element-wise operator. More... | |
void | applyBorderFlags (int axis) |
void | applyBorderFlags () |
template<> | |
goDouble | getValue (goIndex_t x, goIndex_t y, goIndex_t z, goSize_t channel) const |
template<> | |
void | setValue (goDouble value, goIndex_t x, goIndex_t y, goIndex_t z, goSize_t channel) |
template<> | |
goFloat | sample (go3Vector< goFloat > &point) |
template<> | |
goDouble | getMaximum () const |
template<> | |
goDouble | getMaximum () const |
template<> | |
goDouble | getMinimum () const |
template<> | |
goDouble | getMinimum () const |
template<> | |
void | fill (goDouble v) |
template<> | |
goFloat | sample (go3Vector< goFloat > &point) |
template<> | |
goSignal3DBase< void * > & | operator+= (goFloat scalar) |
template<> | |
goSignal3DBase< void * > & | operator-= (goFloat scalar) |
template<> | |
goSignal3DBase< void * > & | operator*= (goFloat scalar) |
template<> | |
goSignal3DBase< void * > & | operator/= (goFloat scalar) |
![]() | |
goObjectBase () | |
Constructor. | |
virtual | ~goObjectBase () |
Destructor. More... | |
const char * | getClassName () const |
Returns the class name. More... | |
int | getClassID () const |
void | setObjectName (const char *name) |
Set name string for an object. More... | |
void | setObjectName (const goString &name) |
Set name string for an object. More... | |
const goString & | getObjectName () const |
Get the object name. More... | |
virtual bool | writeObjectFile (FILE *) const |
Write object to a file. More... | |
virtual bool | readObjectFile (FILE *) |
Read object from a file. More... | |
void | connectObject (goObjectBase *object) |
Connects an object to this object. More... | |
void | disconnectObject (const goObjectBase *object) |
Disconnects an object from this object. | |
virtual bool | callObjectMethod (int methodID, goObjectMethodParameters *param=NULL) |
Call an object method by identifier. More... | |
virtual bool | queueObjectMethod (int methodID, goObjectMethodParameters *param=NULL, bool blocking=false) |
Enqueue a method call to an internal list of methods. More... | |
bool | callQueuedMethods () |
Call all queued methods. More... | |
Additional Inherited Members | |
![]() | |
typedef goSignal3DIterator< T > | iterator |
![]() | |
const typedef goSignal3DIterator< T > | const_iterator |
![]() | |
goSignal3DBase (goSize_t x, goSize_t y, goSize_t z, goSize_t blocksize_x=32, goSize_t blocksize_y=32, goSize_t blocksize_z=32, goSize_t border_x=16, goSize_t border_y=16, goSize_t border_z=16, goSize_t channelCount=1) | |
goSignal3DBase (goSignal3DBase< T > &other) | |
bool | initializeDataType () |
bool | initialize (T *dataptr, goSize_t x, goSize_t y, goSize_t z, goSize_t blocksize_x=32, goSize_t blocksize_y=32, goSize_t blocksize_z=32, goSize_t border_x=16, goSize_t border_y=16, goSize_t border_z=16, goSize_t channelCount=1) |
void | cleanup () |
void | setBorder (goSize_t x, goSize_t y, goSize_t z) |
INTERNAL – DO NOT USE. More... | |
void | constantBorders (int axes=GO_X|GO_Y|GO_Z) |
void | periodicBorders (int axes=GO_X|GO_Y|GO_Z) |
template<> | |
bool | initializeDataType () INITIALIZE_DATATYPE_METHOD(GO_INT8) |
template<> | |
bool | initializeDataType () INITIALIZE_DATATYPE_METHOD(GO_INT16) |
template<> | |
bool | initializeDataType () INITIALIZE_DATATYPE_METHOD(GO_INT32) |
template<> | |
bool | initializeDataType () INITIALIZE_DATATYPE_METHOD(GO_UINT8) |
template<> | |
bool | initializeDataType () INITIALIZE_DATATYPE_METHOD(GO_UINT16) |
template<> | |
bool | initializeDataType () INITIALIZE_DATATYPE_METHOD(GO_UINT32) |
template<> | |
bool | initializeDataType () INITIALIZE_DATATYPE_METHOD(GO_FLOAT) |
template<> | |
bool | initializeDataType () INITIALIZE_DATATYPE_METHOD(GO_DOUBLE) |
template<> | |
bool | initializeDataType () INITIALIZE_DATATYPE_METHOD(GO_VOID_POINTER) |
template<> | |
bool | initializeDataType () INITIALIZE_DATATYPE_METHOD(GO_COMPLEX_SINGLE) |
![]() | |
void | setClassID (int id) |
Sets the class name. | |
void | printClassMessage (const char *msg) |
Sets the class name. More... | |
void | printClassMessage (goString &msg) |
Prints an informational message to the calling console. More... | |
void | sendObjectMessage (int messageID, void *data=NULL) |
Sends a message to all connected objects. | |
void | sendObjectMessage (goObjectBase *object, int messageID, void *data=NULL) |
Sends a message to a specific object. | |
virtual void | receiveObjectMessage (const goObjectMessage &message) |
Receive a message. More... | |
![]() | |
T * | ptr |
T * | real_ptr |
goPtrdiff_t * | xDiff |
goPtrdiff_t * | yDiff |
goPtrdiff_t * | zDiff |
goPtrdiff_t * | real_xDiff |
goPtrdiff_t * | real_yDiff |
goPtrdiff_t * | real_zDiff |
goPtrdiff_t * | myXJump |
goPtrdiff_t * | myYJump |
goPtrdiff_t * | myZJump |
goPtrdiff_t * | real_myXJump |
goPtrdiff_t * | real_myYJump |
goPtrdiff_t * | real_myZJump |
goPtrdiff_t * | myChannelOffset |
goSize3D | mySize |
goSize3D | myBorderSize |
goSize3D | myBlockSize |
goSize3D | myBlocks |
goType | myDataType |
goSize_t | myChannelCount |
goSize_t | myChannel |
goFixedArray< int > | myBorderFlags |
Access to sub-areas of goSignal3DBase
objects.
Enables access to sub signals of a given goSignal3DBase
. Being derived from it, goSubSignal3D
can do anything a goSignal3D
can. A parent must be set and the position is initialised to (0,0,0). move()
moves in one direction of
goSubSignal3D< T >::goSubSignal3D | ( | ) |
Constructor.
Default border is currently GO_CONSTANT_BORDER and standard bordersize is zero. GO_PARENT_BORDER should be default in the future and must still be implemented.
|
virtual |
Sets the border behaviour.
Not all axes need to have the same behaviour. If you mix behaviours, be aware that the values in the "corners" of the data set may not be what you expect. Currently they are just the values imposed by the last application of internal periodisation/constantisation functions. I.e. the last behaviour, probably of the z-axis, is mimicked.
axes | Axes to apply borderFlag to. One or more of {GO_X,GO_Y,GO_Z} or'ed together. Default is all axes. |
borderFlag | Flag to apply to the borders. One of {GO_PERIODIC_BORDER,GO_CONSTANT_BORDER}. Default is periodic for all axes. |
Reimplemented from goSignal3DBase< T >.
void goSubSignal3D< T >::setPosition | ( | goPosition & | p | ) |
Sets the position of the subblock in the parent block. Take care, this uses internal pointer differences for the parent which get invalid if you change the diffs in the parent.
Try out if borders are set correctly.
Enable own border flags or borders from parent as option. Should work easily, but try.
p | Position in the parent signal. |
|
virtual |
Copies the last valid values from the block data into the borders.
copies a side from the other signal in the border of this signal (border = 1) If you want to copy all sides and take the edges into account, take the order LEFT RIGHT TOP BOTTOM FRONT BACK to copy. See source code for details.
Reimplemented from goSignal3DBase< T >.