Instrument Neutral Distributed Interface INDI  2.0.2
Functions
DSP API Stream type management functions

Functions

DLL_EXPORT void dsp_stream_alloc_buffer (dsp_stream_p stream, int len)
 Allocate a buffer with length len on the stream passed as argument. More...
 
DLL_EXPORT void dsp_stream_set_buffer (dsp_stream_p stream, void *buffer, int len)
 Set the buffer of the stream passed as argument to a specific memory location. More...
 
DLL_EXPORT dsp_tdsp_stream_get_buffer (dsp_stream_p stream)
 Return the buffer of the stream passed as argument. More...
 
DLL_EXPORT void dsp_stream_free_buffer (dsp_stream_p stream)
 Free the buffer of the DSP Stream passed as argument. More...
 
DLL_EXPORT dsp_stream_p dsp_stream_new (void)
 Allocate a new DSP stream type. More...
 
DLL_EXPORT void dsp_stream_free (dsp_stream_p stream)
 Free the DSP stream passed as argument. More...
 
DLL_EXPORT dsp_stream_p dsp_stream_copy (dsp_stream_p stream)
 Create a copy of the DSP stream passed as argument. More...
 
DLL_EXPORT void dsp_stream_add_child (dsp_stream_p stream, dsp_stream_p child)
 Add a child to the DSP Stream passed as argument. More...
 
DLL_EXPORT void dsp_stream_add_star (dsp_stream_p stream, dsp_star star)
 Add a star to the DSP Stream passed as argument. More...
 
DLL_EXPORT void dsp_stream_del_star (dsp_stream_p stream, int n)
 Remove the star with index n to a DSP stream. More...
 
DLL_EXPORT void dsp_stream_add_triangle (dsp_stream_p stream, dsp_triangle triangle)
 Add a triangle to the DSP Stream passed as argument. More...
 
DLL_EXPORT void dsp_stream_del_triangle (dsp_stream_p stream, int index)
 Remove the triangle with index n to a DSP stream. More...
 
DLL_EXPORT void dsp_stream_calc_triangles (dsp_stream_p stream)
 Calculate the triangles in the stream struct. More...
 
DLL_EXPORT void dsp_stream_del_child (dsp_stream_p stream, int n)
 Remove the child with index n to a DSP stream. More...
 
DLL_EXPORT void dsp_stream_add_dim (dsp_stream_p stream, int len)
 Add a dimension with length len to a DSP stream. More...
 
DLL_EXPORT void dsp_stream_set_dim (dsp_stream_p stream, int dim, int size)
 Set a dimension size to a DSP stream. More...
 
DLL_EXPORT void dsp_stream_del_dim (dsp_stream_p stream, int n)
 Remove the dimension with index n to a DSP stream. More...
 
DLL_EXPORT int dsp_stream_set_position (dsp_stream_p stream, int *pos)
 Obtain the position the DSP stream by parsing multidimensional indexes. More...
 
DLL_EXPORT int * dsp_stream_get_position (dsp_stream_p stream, int index)
 Return the multidimensional positional indexes of a DSP stream by specify a linear index. More...
 
DLL_EXPORT void * dsp_stream_exec (dsp_stream_p stream, void *args,...)
 Execute the function callback pointed by the func field of the passed stream. More...
 
DLL_EXPORT void dsp_stream_crop (dsp_stream_p stream)
 Crop the buffers of the stream passed as argument by reading the ROI field. More...
 
DLL_EXPORT void dsp_stream_rotate (dsp_stream_p stream)
 Rotate a stream around an axis and offset. More...
 
DLL_EXPORT void dsp_stream_translate (dsp_stream_p stream)
 Translate a stream. More...
 
DLL_EXPORT void dsp_stream_scale (dsp_stream_p stream)
 Scale a stream. More...
 
DLL_EXPORT void dsp_stream_align (dsp_stream_p in)
 Perform scale, translate and rotate transformations in-place. More...
 

Detailed Description

Function Documentation

◆ dsp_stream_add_child()

DLL_EXPORT void dsp_stream_add_child ( dsp_stream_p  stream,
dsp_stream_p  child 
)

Add a child to the DSP Stream passed as argument.

Parameters
streamthe target DSP stream.
childthe child to add to DSP stream.
See also
dsp_stream_new
dsp_stream_del_child

Add a child to the DSP Stream passed as argument.

Parameters
stream
child

Definition at line 296 of file stream.c.

◆ dsp_stream_add_dim()

DLL_EXPORT void dsp_stream_add_dim ( dsp_stream_p  stream,
int  size 
)

Add a dimension with length len to a DSP stream.

Parameters
streamthe target DSP stream.
lenthe size of the dimension to add
See also
dsp_stream_new
dsp_stream_del_dim

Add a dimension with length len to a DSP stream.

Parameters
stream
size

Definition at line 227 of file stream.c.

◆ dsp_stream_add_star()

DLL_EXPORT void dsp_stream_add_star ( dsp_stream_p  stream,
dsp_star  star 
)

Add a star to the DSP Stream passed as argument.

Parameters
streamthe target DSP stream.
starthe star to add to DSP stream.
See also
dsp_stream_new
dsp_stream_del_star

Add a star to the DSP Stream passed as argument.

Parameters
stream
star

Definition at line 329 of file stream.c.

◆ dsp_stream_add_triangle()

DLL_EXPORT void dsp_stream_add_triangle ( dsp_stream_p  stream,
dsp_triangle  triangle 
)

Add a triangle to the DSP Stream passed as argument.

Parameters
streamthe target DSP stream.
trianglethe triangle to add to DSP stream.
See also
dsp_stream_new
dsp_stream_del_triangle

Add a triangle to the DSP Stream passed as argument.

Parameters
stream
triangle

Definition at line 367 of file stream.c.

◆ dsp_stream_align()

DLL_EXPORT void dsp_stream_align ( dsp_stream_p  in)

Perform scale, translate and rotate transformations in-place.

Parameters
streamThe stream that will be transformed

Definition at line 495 of file stream.c.

◆ dsp_stream_alloc_buffer()

DLL_EXPORT void dsp_stream_alloc_buffer ( dsp_stream_p  stream,
int  len 
)

Allocate a buffer with length len on the stream passed as argument.

Parameters
streamthe target DSP stream.
lenthe new length of the buffer.

Definition at line 78 of file stream.c.

◆ dsp_stream_calc_triangles()

DLL_EXPORT void dsp_stream_calc_triangles ( dsp_stream_p  stream)

Calculate the triangles in the stream struct.

Parameters
streamthe target DSP stream.
See also
dsp_stream_new
dsp_stream_add_triangle

◆ dsp_stream_copy()

DLL_EXPORT dsp_stream_p dsp_stream_copy ( dsp_stream_p  stream)

Create a copy of the DSP stream passed as argument.

Parameters
streamthe DSP stream to copy.
Returns
the copy of the DSP stream
See also
dsp_stream_new

Create a copy of the DSP stream passed as argument.

Parameters
stream
Returns

Definition at line 192 of file stream.c.

◆ dsp_stream_crop()

DLL_EXPORT void dsp_stream_crop ( dsp_stream_p  stream)

Crop the buffers of the stream passed as argument by reading the ROI field.

Parameters
streamThe stream that will be cropped in-place

Definition at line 558 of file stream.c.

◆ dsp_stream_del_child()

DLL_EXPORT void dsp_stream_del_child ( dsp_stream_p  stream,
int  index 
)

Remove the child with index n to a DSP stream.

Parameters
streamthe target DSP stream.
nthe index of the child to remove
See also
dsp_stream_new
dsp_stream_add_child

Remove the child with index n to a DSP stream.

Parameters
stream
index

Definition at line 309 of file stream.c.

◆ dsp_stream_del_dim()

DLL_EXPORT void dsp_stream_del_dim ( dsp_stream_p  stream,
int  index 
)

Remove the dimension with index n to a DSP stream.

Parameters
streamthe target DSP stream.
nthe index of the dimension to remove
See also
dsp_stream_new
dsp_stream_add_dim

Remove the dimension with index n to a DSP stream.

Parameters
stream
index

Definition at line 272 of file stream.c.

◆ dsp_stream_del_star()

DLL_EXPORT void dsp_stream_del_star ( dsp_stream_p  stream,
int  index 
)

Remove the star with index n to a DSP stream.

Parameters
streamthe target DSP stream.
nthe index of the star to remove
See also
dsp_stream_new
dsp_stream_add_star

Remove the star with index n to a DSP stream.

Parameters
stream
index

Definition at line 347 of file stream.c.

◆ dsp_stream_del_triangle()

DLL_EXPORT void dsp_stream_del_triangle ( dsp_stream_p  stream,
int  index 
)

Remove the triangle with index n to a DSP stream.

Parameters
streamthe target DSP stream.
indexthe index of the triangle to remove
See also
dsp_stream_new
dsp_stream_add_triangle

Remove the triangle with index n to a DSP stream.

Parameters
stream
index

Definition at line 399 of file stream.c.

◆ dsp_stream_exec()

DLL_EXPORT void* dsp_stream_exec ( dsp_stream_p  stream,
void *  args,
  ... 
)

Execute the function callback pointed by the func field of the passed stream.

Parameters
streamthe target DSP stream.
argsThe arguments list to be passed to the callback
Returns
callback return value
See also
dsp_stream_new
dsp_stream_get_position
dsp_stream_set_position

◆ dsp_stream_free()

DLL_EXPORT void dsp_stream_free ( dsp_stream_p  stream)

Free the DSP stream passed as argument.

Parameters
streamthe target DSP stream.
See also
dsp_stream_new

Free the DSP stream passed as argument.

Parameters
stream

Definition at line 163 of file stream.c.

◆ dsp_stream_free_buffer()

DLL_EXPORT void dsp_stream_free_buffer ( dsp_stream_p  stream)

Free the buffer of the DSP Stream passed as argument.

Parameters
streamthe target DSP stream.

Definition at line 112 of file stream.c.

◆ dsp_stream_get_buffer()

DLL_EXPORT dsp_t* dsp_stream_get_buffer ( dsp_stream_p  stream)

Return the buffer of the stream passed as argument.

Parameters
streamthe target DSP stream.
Returns
the buffer

Definition at line 107 of file stream.c.

◆ dsp_stream_get_position()

DLL_EXPORT int* dsp_stream_get_position ( dsp_stream_p  stream,
int  index 
)

Return the multidimensional positional indexes of a DSP stream by specify a linear index.

Parameters
streamthe target DSP stream.
indexthe position of the index on a single dimension.
Returns
the the position of the index on each dimension.
See also
dsp_stream_new
dsp_stream_set_position
dsp_stream_exec
dsp_stream_exec_multidim

Return the multidimensional positional indexes of a DSP stream by specify a linear index.

Parameters
stream
index
Returns

Definition at line 420 of file stream.c.

◆ dsp_stream_new()

DLL_EXPORT dsp_stream_p dsp_stream_new ( void  )

Allocate a new DSP stream type.

Returns
the newly created DSP stream type
See also
dsp_stream_free

Allocate a new DSP stream type.

Returns

Definition at line 124 of file stream.c.

◆ dsp_stream_rotate()

DLL_EXPORT void dsp_stream_rotate ( dsp_stream_p  stream)

Rotate a stream around an axis and offset.

Parameters
streamThe stream that will be rotated in-place

Definition at line 700 of file stream.c.

◆ dsp_stream_scale()

DLL_EXPORT void dsp_stream_scale ( dsp_stream_p  stream)

Scale a stream.

Parameters
streamThe stream that will be scaled in-place

Definition at line 638 of file stream.c.

◆ dsp_stream_set_buffer()

DLL_EXPORT void dsp_stream_set_buffer ( dsp_stream_p  stream,
void *  buffer,
int  len 
)

Set the buffer of the stream passed as argument to a specific memory location.

Parameters
streamthe target DSP stream.
bufferthe new location of the buffer.
lenthe new length of the buffer.

Definition at line 101 of file stream.c.

◆ dsp_stream_set_dim()

DLL_EXPORT void dsp_stream_set_dim ( dsp_stream_p  stream,
int  dim,
int  size 
)

Set a dimension size to a DSP stream.

Parameters
streamthe target DSP stream.
dimthe index of the dimension to modify
sizethe size of the dimension to modify
See also
dsp_stream_new
dsp_stream_add_dim

Set a dimension size to a DSP stream.

Parameters
stream
dim
size

Definition at line 252 of file stream.c.

◆ dsp_stream_set_position()

DLL_EXPORT int dsp_stream_set_position ( dsp_stream_p  stream,
int *  pos 
)

Obtain the position the DSP stream by parsing multidimensional indexes.

Parameters
streamthe target DSP stream.
posthe position of the index on each dimension.
Returns
the position of the index on a single dimension.
See also
dsp_stream_new
dsp_stream_get_position
dsp_stream_exec
dsp_stream_exec_multidim

Obtain the position the DSP stream by parsing multidimensional indexes.

Parameters
stream
pos
Returns

Definition at line 440 of file stream.c.

◆ dsp_stream_translate()

DLL_EXPORT void dsp_stream_translate ( dsp_stream_p  stream)

Translate a stream.

Parameters
streamThe stream that will be translated in-place

Definition at line 582 of file stream.c.