Source
xxxxxxxxxx
Vector<Quantity> qCenter(2);
qCenter[0] = Quantity(coords[0], "rad");
qCenter[1] = Quantity(coords[1], "rad");
try {
WCEllipsoid inner(qCenter, _innerRadius, _getDirectionAxes(), getCsys(), RegionType::Abs);
WCEllipsoid outer(qCenter, _outerRadius, _getDirectionAxes(), getCsys(), RegionType::Abs);
WCDifference annulus(outer, inner);
_setDirectionRegion(annulus);
_extend();
} catch (ToLCRegionConversionError& err) {
} catch (const ToLCRegionConversionError& err) {
if (_requireImageRegion) {
throw(err);
} else {
ImageRegion defaultRegion;
_setDirectionRegion(defaultRegion);
_imageRegion = _directionRegion;
}
}
}