From: Kelliher, T. P (Research) <kel...@cr...> - 2002-10-03 13:46:54
|
From the standpoint of enabling automated wrapping, a la VTK, separating out this way would appear to have an advantage. -----Original Message----- From: Pet...@es... [mailto:Pet...@es...] Sent: Thursday, October 03, 2002 8:05 AM To: vxl...@li...; mu...@le... Subject: Re: [Vxl-maintainers] Preference > eg vil2_algo_convolve_1d(src_im,DEST_IM,kernel,start_edge_option,end_edge_option) There IS an other possibility, which avoids confusion of argument order altogether. It requires however to turn these functions into classes. Then one could e.g. say: ------------ 8< vil2_algo_convolve_1d p; p.set_source_image(src_im); p.set_dest_image(DEST_IM); p.set_end_edge_option(end_edge_option); // implicitly set all other parameters to there default value p.run(); // This thus gives the user the possibility to use the default value // for *any* parameter (not just for the ones that happen to be last // in the list). // And even run the algo once again, without losing any // (possibly expensive) initialisation: for (i=-10; i<10; ++i) { kernel[0]=i; p.set_kernel(kernel); p.run(); } ------------- 8< Peter. ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Vxl-maintainers mailing list Vxl...@li... https://lists.sourceforge.net/lists/listinfo/vxl-maintainers ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Vxl-maintainers mailing list Vxl...@li... https://lists.sourceforge.net/lists/listinfo/vxl-maintainers |