00001 //# ImageMask.h 00002 //# Copyright (C) 1998,1999,2000,2001 00003 //# Associated Universities, Inc. Washington DC, USA. 00004 //# 00005 //# This library is free software; you can redistribute it and/or modify it 00006 //# under the terms of the GNU Library General Public License as published by 00007 //# the Free Software Foundation; either version 2 of the License, or (at your 00008 //# option) any later version. 00009 //# 00010 //# This library 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 Library General Public 00013 //# License for more details. 00014 //# 00015 //# You should have received a copy of the GNU Library General Public License 00016 //# along with this library; if not, write to the Free Software Foundation, 00017 //# Inc., 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 00027 #ifndef IMAGEANALYSIS_IMAGEMASK_H 00028 #define IMAGEANALYSIS_IMAGEMASK_H 00029 00030 #include <casacore/images/Images/ImageInterface.h> 00031 00032 #include <imageanalysis/ImageTypedefs.h> 00033 00034 namespace casa { 00035 00036 // <summary> 00037 // Static functions for interrogating image masks 00038 // </summary> 00039 00040 00041 class ImageMask { 00042 00043 public: 00044 ImageMask() = delete; 00045 00046 virtual ~ImageMask(); 00047 00048 // check the mask piecemeal because loading it all into memory will crash 00049 // for very large images 00050 template <class T> static Bool isAllMaskFalse(const ImageInterface<T>& image); 00051 00052 // is the image's mask all true valued? 00053 template <class T> static Bool isAllMaskTrue(const MaskedLattice<T>& image); 00054 00055 static Bool isAllMaskTrue(const Lattice<Bool>& mask); 00056 00057 }; 00058 00059 } 00060 00061 #ifndef AIPS_NO_TEMPLATE_SRC 00062 #include <imageanalysis/ImageAnalysis/ImageMask2.tcc> 00063 #endif 00064 00065 #endif