Source
99
99
100
100
// beginFreq and endFreq can both be 0, in which case
101
101
// all the spectral range is used if a spectral axis exists in
102
102
// <src>csys</csys>. If one of <src>beginFreq</src> or <src>endFreq</src>
103
103
// is given, the other must be given. Frequency units can either conform
104
104
// to Hz, m/s, or pix. If <src>beginFreq</src> and <src>endFreq</src> are not
105
105
// specifed or if they are specified in pixel units,
106
106
// <src>freqRefFrame</src>, <src>dopplerString</src>, and
107
107
// <src>restfreq</src> are ignored. If provided, <src>beginFreq</src>
108
108
// and <src>endFreq</src> must conform to the same units.
109
-
// <src>requireImageRegion</src> allows AnnRegion objects to be created
110
-
// even if the image region fails (usually outside the image)
109
+
// <src>requireImageRegion</src> indicates whether to rethrow the
110
+
// ToLCRegionConversionError exception when the region is outside the
111
+
// image, or to create the AnnRegion object even if the ImageRegion has no
112
+
// lattice region. The default (true) rethrows the exception to maintain
113
+
// the previous behavior.
114
+
// CAS-12631: added for CARTA, which can import regions outside an image.
111
115
AnnRegion(
112
116
const Type shape,
113
117
const casacore::String& dirRefFrameString,
114
118
const casacore::CoordinateSystem& csys,
115
119
const casacore::IPosition& imShape,
116
120
const casacore::Quantity& beginFreq,
117
121
const casacore::Quantity& endFreq,
118
122
const casacore::String& freqRefFrame,
119
123
const casacore::String& dopplerString,
120
124
const casacore::Quantity& restfreq,
176
180
177
181
static const casacore::String _class;
178
182
179
183
casacore::WCBox _makeExtensionBox(
180
184
const casacore::Vector<casacore::Quantity>& freqRange,
181
185
const casacore::Vector<casacore::Stokes::StokesTypes>& stokesRange,
182
186
const casacore::IPosition& pixelAxes
183
187
) const;
184
188
185
189
void _init();
186
-
casacore::Bool hasDirectionRegion();
190
+
191
+
casacore::Bool _hasDirectionRegion();
187
192
188
193
};
189
194
190
195
// Just need a identifable expection class, compiler can generate implementation implicitly
191
196
class ToLCRegionConversionError : public casacore::AipsError {
192
197
public:
193
198
ToLCRegionConversionError(casacore::String msg) : casacore::AipsError(msg) {}
194
199
};
195
200
196
201
}