Commit f180b6ec54e4e869f365e8c9b3cb96495da17098

Authored by Arnaud Blanchard
1 parent 492e408c

Add the functionnalities blc_command_forwards_blc_channels allowing Reverse Polish notation

... ... @@ -62,7 +62,8 @@ int main(int argc, char **argv){
blc_program_add_parameter(&input_name, "blc_channel-in", 1, "element 2", NULL);
blc_program_init(&argc, &argv, blc_quit);
blc_command_forward_blc_channels();
SSCANF(1, maxes_nb_str, "%d", &maxes_nb);
SSCANF(1, offset_x_str, "%d", &offset_x);
SSCANF(1, offset_y_str, "%d", &offset_y);
... ...
... ... @@ -40,7 +40,8 @@ int main(int argc, char **argv){
blc_program_add_parameter(&input_name, "blc_channel-in", 1, "data to convolute ", NULL);
blc_program_add_parameter(&kernel_name, "blc_channel-in", 1, "kernel to use for convolution ", NULL);
blc_program_init(&argc, &argv, blc_quit);
blc_command_forward_blc_channels();
input.open(input_name, BLC_CHANNEL_READ);
if (input.dims_nb!=2) EXIT_ON_ARRAY_ERROR(&input, "It works only in 2D for now");
iwidth=input.dims[0].length;
... ...
... ... @@ -53,7 +53,8 @@ int main(int argc, char **argv){
blc_program_add_option(&output_name, 'o', "output", "blc_channel-out", "channel name", DEFAULT_OUTPUT_NAME);
blc_program_add_parameter(&input_name, "blc_channel-in", 1, "channel you want to find max", NULL);
blc_program_init(&argc, &argv, blc_quit);
blc_command_forward_blc_channels();
input.open(input_name, BLC_CHANNEL_READ);
blc_loop_try_add_waiting_semaphore(input.sem_new_data);
... ...
... ... @@ -70,7 +70,8 @@ int main(int argc, char **argv){
blc_program_add_parameter(&input1_name, "blc_channel-in", 1, "element 1", NULL);
blc_program_add_parameter(&input2_name, "blc_channel-in", 1, "element 2", NULL);
blc_program_init(&argc, &argv, blc_quit);
blc_command_forward_blc_channels();
input1.open(input1_name, BLC_CHANNEL_READ);
width=input1.dims[0].length;
height=input1.dims[1].length;
... ...
... ... @@ -30,6 +30,7 @@ int main(int argc, char **argv){
blc_program_add_option(&output_name, 'o', "output", "blc_channel-out", "channel name", DEFAULT_OUTPUT_NAME);
blc_program_add_parameter(&input_name, "blc_channel-in", 1, "image from where you want to find the points of interest", NULL);
blc_program_init(&argc, &argv, blc_quit);
blc_command_forward_blc_channels();
if (strcmp(output_name, DEFAULT_OUTPUT_NAME)==0) SYSTEM_ERROR_CHECK(asprintf((char**)&output_name,":point_of_interest%d", getpid()), -1, NULL);
... ...
... ... @@ -88,7 +88,8 @@ int main(int argc, char **argv){
/* blc_program_add_option(&xderivative_str, 'X', "xsigma", "real", "sigma for x axis", NULL);
blc_program_add_option(&yderivative_str, 'Y', "ysigma", "real", "sigma for y axis", NULL);*/
blc_program_init(&argc, &argv, blc_quit);
blc_command_forward_blc_channels();
if (derivative_str) prefix="d2";
else if(xderivative_str) prefix="dx";
else if(yderivative_str) prefix="dy";
... ...
... ... @@ -247,6 +247,8 @@ int main(int argc, char** argv){
blc_program_add_option(&toggle_mode, 'T', "toggle", NULL, "Set in toggle mode", NULL);
blc_program_init(&argc, &argv, blc_quit);
blc_command_forward_blc_channels();
atexit(blc_set_back_stdin_mode);
if (strlen(str_quitting_key)!=1) EXIT_ON_ERROR("You can only have one quitting key. You propose %s", str_quitting_key);
... ...
... ... @@ -62,7 +62,8 @@ int main(int argc, char **argv){
blc_program_add_option(&refresh_rate_str, 'r', "refresh", "real ", "refresh rate in ms", "10");
blc_program_add_option(&type_str, 't', "type", "FL32", "type of data", "FL32");
blc_program_init(&argc, &argv, blc_quit);
blc_command_forward_blc_channels();
// period=strtol(period_str, NULL, 10);
SSCANF(1, refresh_rate_str, "%f", &refresh_rate);
step=(double)refresh_rate/(double)period;
... ...
... ... @@ -85,7 +85,8 @@ int main(int argc, char** argv){
blc_program_add_option(&text, 't', "text", NULL, "Export the result as text instead of blc_channel", NULL);
blc_program_add_parameter(&filename, "file name", 1, "file to load", NULL);
blc_program_init(&argc, &argv, blc_quit);
blc_command_forward_blc_channels();
period=strtod(period_str, NULL);
if (text==NULL){
... ...