- strOperation = "Subtract Images";
- for (int ix = 0; ix < nx; ix++) {
- ImageFileColumn in1 = v1[ix];
- ImageFileColumn in2 = v2[ix];
- ImageFileColumn out = vout[ix];
- for (int iy = 0; iy < ny; iy++)
- *out++ = *in1++ - *in2++;
- }
- } else if (opt_mul) {
- strOperation = "Multiply Images";
- for (int ix = 0; ix < nx; ix++) {
- ImageFileColumn in1 = v1[ix];
- ImageFileColumn in2 = v2[ix];
- ImageFileColumn out = vout[ix];
- for (int iy = 0; iy < ny; iy++)
- *out++ = *in1++ * *in2++;
- }
- }
+ strOperation = "Subtract Images";\r
+ im_in1.subtractImages (im_in2, *pim_out);\r
+ } else if (opt_mul) {\r
+ strOperation = "Multiply Images";\r
+ im_in1.multiplyImages (im_in2, *pim_out);\r
+ } else if (opt_divide) {\r
+ strOperation = "Divide Images";\r
+ im_in1.divideImages (im_in2, *pim_out);\r
+ }\r