ImageConcatenator.h

Go to the documentation of this file.
00001 //# tSubImage.cc: Test program for class SubImage
00002 //# Copyright (C) 1998,1999,2000,2001,2003
00003 //# Associated Universities, Inc. Washington DC, USA.
00004 //#
00005 //# This program is free software; you can redistribute it and/or modify it
00006 //# under the terms of the GNU General Public License as published by the Free
00007 //# Software Foundation; either version 2 of the License, or (at your option)
00008 //# any later version.
00009 //#
00010 //# This program is distributed in the hope that it will be useful, but WITHOUT
00011 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00012 //# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
00013 //# more details.
00014 //#
00015 //# You should have received a copy of the GNU General Public License along
00016 //# with this program; if not, write to the Free Software Foundation, Inc.,
00017 //# 675 Massachusetts Ave, Cambridge, MA 02139, USA.
00018 //#
00019 //# Correspondence concerning AIPS++ should be addressed as follows:
00020 //#        Internet email: aips2-request@nrao.edu.
00021 //#        Postal address: AIPS++ Project Office
00022 //#                        National Radio Astronomy Observatory
00023 //#                        520 Edgemont Road
00024 //#                        Charlottesville, VA 22903-2475 USA
00025 //#
00026 //# $Id: tSubImage.cc 20567 2009-04-09 23:12:39Z gervandiepen $
00027 
00028 #ifndef IMAGEANALYSIS_IMAGECONCATENATOR_H
00029 #define IMAGEANALYSIS_IMAGECONCATENATOR_H
00030 
00031 #include <imageanalysis/ImageAnalysis/ImageTask.h>
00032 #include <casa/namespace.h>
00033 
00034 namespace casa {
00035 
00036 template <class T> class ImageConcat;
00037 
00038 template <class T>  class ImageConcatenator : public ImageTask<T> {
00039         // <summary>
00040         // Top level interface for concatenating images
00041         // </summary>
00042 
00043         // <reviewed reviewer="" date="" tests="" demos="">
00044         // </reviewed>
00045 
00046         // <prerequisite>
00047         // </prerequisite>
00048 
00049         // <etymology>
00050         // Concatenate an image
00051         // </etymology>
00052 
00053         // <synopsis>
00054         // High level interface for concatenating images.
00055         // </synopsis>
00056 
00057 public:
00058 
00059         // <src>image</src> should be the first image in the list of images to be concatenated.
00060         ImageConcatenator(
00061                 SPCIIT image,
00062                 const String& outname, Bool overwrite
00063         );
00064 
00065         // destructor
00066         ~ImageConcatenator();
00067 
00068         // Perform the concatenation.
00069         SPIIT concatenate(const vector<String>& imageNames);
00070 
00071         // Set the axis along which to do the concatenation. A negative value
00072         // of <src>axis</src> means use the spectral axis. An exception is thrown
00073         // if <src>axis</src> is negative and the image has no spectral axis.
00074         void setAxis(Int axis);
00075 
00076         void setTempClose(Bool b) { _tempClose = b; }
00077 
00078         void setRelax(Bool b) { _relax = b; }
00079 
00080         void setReorder(Bool b) { _reorder = b; }
00081 
00082         String getClass() const;
00083 
00084 protected:
00085         inline  CasacRegionManager::StokesControl _getStokesControl() const {
00086                 return CasacRegionManager::USE_ALL_STOKES;
00087         }
00088 
00089         inline vector<Coordinate::Type> _getNecessaryCoordinates() const {
00090                 return vector<Coordinate::Type>(0);
00091         }
00092 
00093 private:
00094         Int _axis;
00095         Bool _tempClose, _relax, _reorder;
00096         static const String _class;
00097 
00098         // disallow default constructor
00099         ImageConcatenator();
00100 
00101         // returns True if world coordinate values increase with pixel coordinate values
00102         Bool _minMaxAxisValues(
00103                 Double& min, Double& max, uInt ndim,
00104                 const CoordinateSystem& csys, const IPosition& shape
00105         ) const;
00106 
00107         void _addImage(std::unique_ptr<ImageConcat<T> >& pConcat, const String& name) const;
00108 
00109 };
00110 }
00111 
00112 #ifndef AIPS_NO_TEMPLATE_SRC
00113 #include <imageanalysis/ImageAnalysis/ImageConcatenator.tcc>
00114 #endif //# AIPS_NO_TEMPLATE_SRC
00115 
00116 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1