Instrument Neutral Distributed Interface INDI  1.9.5
Functions
stream.c File Reference
#include "dsp.h"

Go to the source code of this file.

Functions

void dsp_stream_alloc_buffer (dsp_stream_p stream, int len)
 Allocate a buffer with length len on the stream passed as argument. More...
 
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...
 
dsp_tdsp_stream_get_buffer (dsp_stream_p stream)
 Return the buffer of the stream passed as argument. More...
 
void dsp_stream_free_buffer (dsp_stream_p stream)
 Free the buffer of the DSP Stream passed as argument. More...
 
dsp_stream_p dsp_stream_new ()
 Allocate a new DSP stream type. More...
 
void dsp_stream_free (dsp_stream_p stream)
 Free the DSP stream passed as argument. More...
 
dsp_stream_p dsp_stream_copy (dsp_stream_p stream)
 Create a copy of the DSP stream passed as argument. More...
 
void dsp_stream_add_dim (dsp_stream_p stream, int size)
 Add a dimension with length len to a DSP stream. More...
 
void dsp_stream_del_dim (dsp_stream_p stream, int index)
 Remove the dimension with index n to a DSP stream. More...
 
void dsp_stream_add_child (dsp_stream_p stream, dsp_stream_p child)
 Add a child to the DSP Stream passed as argument. More...
 
void dsp_stream_del_child (dsp_stream_p stream, int index)
 Remove the child with index n to a DSP stream. More...
 
void dsp_stream_add_star (dsp_stream_p stream, dsp_star star)
 Add a star into the stream struct. More...
 
void dsp_stream_del_star (dsp_stream_p stream, int index)
 Remove the star with index n to a DSP stream. More...
 
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...
 
int dsp_stream_set_position (dsp_stream_p stream, int *pos)
 Obtain the position the DSP stream by parsing multidimensional indexes. More...
 
void dsp_stream_crop (dsp_stream_p in)
 Crop the buffers of the stream passed as argument by reading the ROI field. More...
 
void dsp_stream_traslate (dsp_stream_p in)
 Traslate a stream. More...
 
void dsp_stream_scale (dsp_stream_p in)
 Scale a stream. More...
 
void dsp_stream_rotate (dsp_stream_p in)
 Rotate a stream around an axis and offset. More...
 

Function Documentation

◆ dsp_stream_add_child()

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

Definition at line 141 of file stream.c.

◆ dsp_stream_add_dim()

void dsp_stream_add_dim ( dsp_stream_p  stream,
int  len 
)

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

Definition at line 111 of file stream.c.

◆ dsp_stream_add_star()

void dsp_stream_add_star ( dsp_stream_p  stream,
dsp_star  star 
)

Add a star into the stream struct.

Add a star to the DSP Stream passed as argument.

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

Definition at line 164 of file stream.c.

◆ dsp_stream_alloc_buffer()

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 21 of file stream.c.

◆ dsp_stream_copy()

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

Definition at line 89 of file stream.c.

◆ dsp_stream_crop()

void dsp_stream_crop ( dsp_stream_p  stream)

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

Parameters
streamthe target DSP stream.
Returns
the cropped DSP stream.
See also
dsp_stream_new

Definition at line 213 of file stream.c.

◆ dsp_stream_del_child()

void dsp_stream_del_child ( dsp_stream_p  stream,
int  n 
)

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

Definition at line 149 of file stream.c.

◆ dsp_stream_del_dim()

void dsp_stream_del_dim ( dsp_stream_p  stream,
int  n 
)

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

Definition at line 126 of file stream.c.

◆ dsp_stream_del_star()

void dsp_stream_del_star ( dsp_stream_p  stream,
int  n 
)

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

Definition at line 173 of file stream.c.

◆ dsp_stream_free()

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

Definition at line 76 of file stream.c.

◆ dsp_stream_free_buffer()

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 41 of file stream.c.

◆ dsp_stream_get_buffer()

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 36 of file stream.c.

◆ dsp_stream_get_position()

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

Definition at line 188 of file stream.c.

◆ dsp_stream_new()

dsp_stream_p dsp_stream_new ( )

Allocate a new DSP stream type.

Returns
the newly created DSP stream type
See also
dsp_stream_free

Definition at line 48 of file stream.c.

◆ dsp_stream_rotate()

void dsp_stream_rotate ( dsp_stream_p  stream)

Rotate a stream around an axis and offset.

Parameters
streamThe stream that need rotation
infoThe dsp_align_info structure pointer containing the rotation informations
Returns
The new dsp_stream_p structure pointer

Definition at line 364 of file stream.c.

◆ dsp_stream_scale()

void dsp_stream_scale ( dsp_stream_p  stream)

Scale a stream.

Parameters
streamThe stream that need scaling
infoThe dsp_align_info structure pointer containing the scaling informations
Returns
The new dsp_stream_p structure pointer

Definition at line 300 of file stream.c.

◆ dsp_stream_set_buffer()

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 30 of file stream.c.

◆ dsp_stream_set_position()

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

Definition at line 202 of file stream.c.

◆ dsp_stream_traslate()

void dsp_stream_traslate ( dsp_stream_p  stream)

Traslate a stream.

Parameters
streamThe stream that need traslation
infoThe dsp_align_info structure pointer containing the traslation informations
Returns
The new dsp_stream_p structure pointer

Definition at line 252 of file stream.c.