Getting Started Documentation Glish Learn More Programming Contact Us
Version 1.9 Build 1367
News FAQ
Search Home


next up previous
Next: Data System Up: Calibration, Imaging and Datasystems for AIPS++ - Report Previous: ImagingModel

Image Tools

ImageTools are used to contain (a) algorithms which do something to images, and (b) the parameters which must be remembered. Rather than derive a bloated set of descendents of Image for keeping results of operations on images, we chose to define a class ImageTool which is pointed to by ImageTool* in Image, and which contains parameters as attributes and the algorithm as a service.

ImageTool must be self-identifying via the ID attribute.

As an example, to use an ImageTool such as MEMDeconvolver, first instantiate the tool with the parameters as arguments to the constructor:

MEMDeconvolver mem (1E6, -0.00156, 1.0, 100) ;

It then can be used by invoking the Tool service:

MemImage = mem.Tool (DirtyImage, PSF, DefaultImage) ;
cout << "Alpha is " << mem.alpha << ", Beta is " << mem.beta << eol ;
if (!mem.converged)
{
  cout << "Not yet converged: doing 100 more iterations" << eol ;
  mem.niter += 100 ;
  MemImage = mem.Tool (DirtyImage, PSF, DefaultImage, MEMImage) ;
}

Note that we obtained the parameters from mem directly and were able to continue by incrementing niter.


next up previous
Next: Data System Up: Calibration, Imaging and Datasystems for AIPS++ - Report Previous: ImagingModel
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc., Washington, D.C.

Return to AIPS++ Home Page
2006-03-28