00001
00002
00003
00004
00005
00006
00007
00008
00009 from sys import version_info
00010 if version_info >= (2,6,0):
00011 def swig_import_helper():
00012 from os.path import dirname
00013 import imp
00014 fp = None
00015 try:
00016 fp, pathname, description = imp.find_module('_regionmanager', [dirname(__file__)])
00017 except ImportError:
00018 import _regionmanager
00019 return _regionmanager
00020 if fp is not None:
00021 try:
00022 _mod = imp.load_module('_regionmanager', fp, pathname, description)
00023 finally:
00024 fp.close()
00025 return _mod
00026 _regionmanager = swig_import_helper()
00027 del swig_import_helper
00028 else:
00029 import _regionmanager
00030 del version_info
00031 try:
00032 _swig_property = property
00033 except NameError:
00034 pass
00035 def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
00036 if (name == "thisown"): return self.this.own(value)
00037 if (name == "this"):
00038 if type(value).__name__ == 'SwigPyObject':
00039 self.__dict__[name] = value
00040 return
00041 method = class_type.__swig_setmethods__.get(name,None)
00042 if method: return method(self,value)
00043 if (not static):
00044 self.__dict__[name] = value
00045 else:
00046 raise AttributeError("You cannot add attributes to %s" % self)
00047
00048 def _swig_setattr(self,class_type,name,value):
00049 return _swig_setattr_nondynamic(self,class_type,name,value,0)
00050
00051 def _swig_getattr(self,class_type,name):
00052 if (name == "thisown"): return self.this.own()
00053 method = class_type.__swig_getmethods__.get(name,None)
00054 if method: return method(self)
00055 raise AttributeError(name)
00056
00057 def _swig_repr(self):
00058 try: strthis = "proxy of " + self.this.__repr__()
00059 except: strthis = ""
00060 return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
00061
00062 try:
00063 _object = object
00064 _newclass = 1
00065 except AttributeError:
00066 class _object : pass
00067 _newclass = 0
00068
00069
00070 class regionmanager(_object):
00071 """Proxy of C++ casac::regionmanager class"""
00072 __swig_setmethods__ = {}
00073 __setattr__ = lambda self, name, value: _swig_setattr(self, regionmanager, name, value)
00074 __swig_getmethods__ = {}
00075 __getattr__ = lambda self, name: _swig_getattr(self, regionmanager, name)
00076 __repr__ = _swig_repr
00077 def __init__(self):
00078 """__init__(self) -> regionmanager"""
00079 this = _regionmanager.new_regionmanager()
00080 try: self.this.append(this)
00081 except: self.this = this
00082 __swig_destroy__ = _regionmanager.delete_regionmanager
00083 __del__ = lambda self : None;
00084 def absreltype(self, absrelvalue=0):
00085 """
00086 absreltype(self, absrelvalue=0) -> string
00087
00088 Summary
00089 Convert region type value to a string
00090
00091 Input Parameters:
00092 absrelvalue Region type value 0 Integer - 1, 2, 3, 4
00093
00094 --------------------------------------------------------------------------------
00095
00096 """
00097 return _regionmanager.regionmanager_absreltype(self, absrelvalue)
00098
00099 def box(self, *args, **kwargs):
00100 """
00101 box(self, blc=initialize_vector(1, (double)0), trc=initialize_vector(1, (double)-1), inc=initialize_vector(1, (double)1),
00102 absrel=string("abs"), frac=False, comment=string("")) -> record *
00103
00104 Summary
00105 Create a pixel box region
00106
00107 Input Parameters:
00108 blc blc of the box 0 Unity
00109 trc trc of the box -1 Shape
00110 inc increment 1
00111 absrel Absolute or relative coordinates relref relcen abs
00112 frac Pixel or fractional coordinates false F
00113 comment A comment stored with the region
00114
00115 --------------------------------------------------------------------------------
00116
00117 """
00118 return _regionmanager.regionmanager_box(self, *args, **kwargs)
00119
00120 def frombcs(self, *args, **kwargs):
00121 """
00122 frombcs(self, csys=initialize_record(""), shape=initialize_vector(1, (int)0), box=string(""), chans=string(""),
00123 stokes=string(""), stokescontrol=string("a"), region=initialize_variant("")) -> record *
00124
00125 Summary
00126 Create a world coordinate region based on box-chan-stokes input
00127
00128 Input Parameters:
00129 csys Coordinate system record. Must be specified.
00130 shape shape of the image. Necessary for boundedness checks. Must have the same number of dimensions as the associated coordinate system. Default = [] 0
00131 box Direction plane box specification as normally provided in image analysis tasks. '' means use entire directional plane as specified in shape. Default ''.
00132 chans Channel spec as normally provided to image analysis tasks. '' means use all channels, Default ''.
00133 stokes Stokes spec as normally provided to image analysis tasks. '' means use stokescontrol for setting stokes. Default ''.
00134 stokescontrol Polarization set to use if stokes parameter is not specified. Choices are 'a' (use all stokes) and 'f' (use first stokes). Default 'a'. a
00135 region Named region in the form imagename:regionname or region dictionary. Used only if box, chans, stokes not specified. Default ''.
00136
00137 --------------------------------------------------------------------------------
00138
00139 """
00140 return _regionmanager.regionmanager_frombcs(self, *args, **kwargs)
00141
00142 def complement(self, *args, **kwargs):
00143 """
00144 complement(self, region=initialize_variant(""), comment=string("")) -> record *
00145
00146 Summary
00147 Create the complement of a world region
00148
00149 Input Parameters:
00150 region The world region Region tool
00151 comment A comment stored with the region String
00152
00153 --------------------------------------------------------------------------------
00154
00155 """
00156 return _regionmanager.regionmanager_complement(self, *args, **kwargs)
00157
00158 def concatenation(self, *args, **kwargs):
00159 """
00160 concatenation(self, box=initialize_variant(""), regions=initialize_variant(""), comment=string("")) -> record *
00161
00162 Summary
00163 Concatenate world regions along a new axis
00164
00165 Input Parameters:
00166 box The axis to concatenate along world box region
00167 regions World regions Record containing world regions
00168 comment A comment stored with the region String
00169
00170 --------------------------------------------------------------------------------
00171
00172 """
00173 return _regionmanager.regionmanager_concatenation(self, *args, **kwargs)
00174
00175 def deletefromtable(self, *args, **kwargs):
00176 """
00177 deletefromtable(self, tablename=string(""), regionname=string("")) -> bool
00178
00179 Summary
00180 Delete regions from a Table
00181
00182 Input Parameters:
00183 tablename The table Image tool, table tool or String
00184 regionname Name(s) of the region(s) to delete Vector of strings
00185
00186 --------------------------------------------------------------------------------
00187
00188 """
00189 return _regionmanager.regionmanager_deletefromtable(self, *args, **kwargs)
00190
00191 def difference(self, *args, **kwargs):
00192 """
00193 difference(self, region1=initialize_record(""), region2=initialize_record(""), comment=string("")) -> record *
00194
00195 Summary
00196 Create the difference of two world regions
00197
00198 Input Parameters:
00199 region1 The first world region
00200 region2 The second world region Region tool
00201 comment A comment stored with the region String
00202
00203 --------------------------------------------------------------------------------
00204
00205 """
00206 return _regionmanager.regionmanager_difference(self, *args, **kwargs)
00207
00208 def done(self):
00209 """
00210 done(self) -> bool
00211
00212 Summary
00213 Destroy this regionmanager
00214 --------------------------------------------------------------------------------
00215
00216 """
00217 return _regionmanager.regionmanager_done(self)
00218
00219 def fromtextfile(self, *args, **kwargs):
00220 """
00221 fromtextfile(self, filename=string(""), shape=initialize_vector(1, (int)0), csys=initialize_record("")) -> record *
00222
00223 Summary
00224 Create a region dictionary from a region text file.
00225
00226 Input Parameters:
00227 filename List of text file containing the region description
00228 shape Image shape. 0
00229 csys Coordinate system record. Defaults to coordinate system used in rg.setcoordinates()
00230
00231 --------------------------------------------------------------------------------
00232
00233 """
00234 return _regionmanager.regionmanager_fromtextfile(self, *args, **kwargs)
00235
00236 def fromtext(self, *args, **kwargs):
00237 """
00238 fromtext(self, text=string(""), shape=initialize_vector(1, (int)1), csys=initialize_record("")) -> record *
00239
00240 Summary
00241 Create a region dictionary from a region text string.
00242
00243 Input Parameters:
00244 text region description
00245 shape Image shape, only used if first region is a difference. 1
00246 csys Coordinate system record. Defaults to coordinate system used in rg.setcoordinates()
00247
00248 --------------------------------------------------------------------------------
00249
00250 """
00251 return _regionmanager.regionmanager_fromtext(self, *args, **kwargs)
00252
00253 def fromfiletorecord(self, *args, **kwargs):
00254 """
00255 fromfiletorecord(self, filename=string(""), verbose=True, regionname=string("")) -> record *
00256
00257 Summary
00258 Create a region record(s) from a file(s).
00259
00260 Input Parameters:
00261 filename List of files containing the Image Regions File name(s)
00262 verbose Report successful saves true true
00263 regionname Name(s) of the region(s) when saved in the table Self naming
00264
00265 --------------------------------------------------------------------------------
00266
00267 """
00268 return _regionmanager.regionmanager_fromfiletorecord(self, *args, **kwargs)
00269
00270 def tofile(self, *args, **kwargs):
00271 """
00272 tofile(self, filename=string(""), region=initialize_record("")) -> bool
00273
00274 Summary
00275 Create a region record file that can be read by from filetorecord.
00276
00277 Input Parameters:
00278 filename List of files containing the Image Regions File name(s)
00279 region region record/dict to store in the file
00280
00281 --------------------------------------------------------------------------------
00282
00283 """
00284 return _regionmanager.regionmanager_tofile(self, *args, **kwargs)
00285
00286 def fromrecordtotable(self, *args, **kwargs):
00287 """
00288 fromrecordtotable(self, tablename=string(""), regionname=initialize_variant(""), regionrec=initialize_record(""),
00289 verbose=True) -> string
00290
00291 Summary
00292 Save regions stored in a record into a Table
00293
00294 Input Parameters:
00295 tablename The table Image tool, table tool or String
00296 regionname Name(s) of the region(s) when saved in the table Vector of strings
00297 regionrec Region(s) to save Record of region tool(s)
00298 verbose Report successful saves true True
00299
00300 --------------------------------------------------------------------------------
00301
00302 """
00303 return _regionmanager.regionmanager_fromrecordtotable(self, *args, **kwargs)
00304
00305 def fromtabletorecord(self, *args, **kwargs):
00306 """
00307 fromtabletorecord(self, tablename=string(""), regionname=initialize_variant(""), verbose=True) -> record *
00308
00309 Summary
00310 Restore regions from a Table to a record
00311
00312 Input Parameters:
00313 tablename The table Image tool, table tool or String
00314 regionname Name of the region(s) to restore All
00315 verbose Report successful restores true True
00316
00317 --------------------------------------------------------------------------------
00318
00319 """
00320 return _regionmanager.regionmanager_fromtabletorecord(self, *args, **kwargs)
00321
00322 def intersection(self, *args, **kwargs):
00323 """
00324 intersection(self, regions=initialize_variant(""), comment=string("")) -> record *
00325
00326 Summary
00327 Create the intersection of some world regions
00328
00329 Input Parameters:
00330 regions World regions and comment Region tools or record of region tools, and String
00331 comment A comment stored with the region String
00332
00333 --------------------------------------------------------------------------------
00334
00335 """
00336 return _regionmanager.regionmanager_intersection(self, *args, **kwargs)
00337
00338 def ispixelregion(self, *args, **kwargs):
00339 """
00340 ispixelregion(self, region=initialize_record("")) -> bool
00341
00342 Summary
00343 Is this region a pixel region ?
00344
00345 Input Parameters:
00346 region The region Region tool
00347
00348 --------------------------------------------------------------------------------
00349
00350 """
00351 return _regionmanager.regionmanager_ispixelregion(self, *args, **kwargs)
00352
00353 def isworldregion(self, *args, **kwargs):
00354 """
00355 isworldregion(self, region=initialize_record("")) -> bool
00356
00357 Summary
00358 Is this region a world region ?
00359
00360 Input Parameters:
00361 region The region Region tool
00362
00363 --------------------------------------------------------------------------------
00364
00365 """
00366 return _regionmanager.regionmanager_isworldregion(self, *args, **kwargs)
00367
00368 def namesintable(self, *args, **kwargs):
00369 """
00370 namesintable(self, tablename=string("")) -> std::vector< std::string >
00371
00372 Summary
00373 Find the names of the regions stored in a Table
00374
00375 Input Parameters:
00376 tablename The table Image tool, table tool or String
00377
00378 --------------------------------------------------------------------------------
00379
00380 """
00381 return _regionmanager.regionmanager_namesintable(self, *args, **kwargs)
00382
00383 def setcoordinates(self, *args, **kwargs):
00384 """
00385 setcoordinates(self, csys=initialize_record("")) -> bool
00386
00387 Summary
00388 Set new default Coordinate System
00389
00390 Input Parameters:
00391 csys Default Coordinate System for use in world regions Coordinate tool
00392
00393 --------------------------------------------------------------------------------
00394
00395 """
00396 return _regionmanager.regionmanager_setcoordinates(self, *args, **kwargs)
00397
00398 def makeunion(self, *args, **kwargs):
00399 """
00400 makeunion(self, regions=initialize_variant(""), comment=string("")) -> record *
00401
00402 Summary
00403 Create a union of world regions
00404
00405 Input Parameters:
00406 regions World regions and comment Record/dict of regions to be unionized (the key names are immaterial)
00407 comment A comment stored with the region
00408
00409 --------------------------------------------------------------------------------
00410
00411 """
00412 return _regionmanager.regionmanager_makeunion(self, *args, **kwargs)
00413
00414 def wbox(self, *args, **kwargs):
00415 """
00416 wbox(self, blc=initialize_variant(""), trc=initialize_variant(""), pixelaxes=initialize_vector(1, (int)-1),
00417 csys=initialize_record(""), absrel=string("'abs'"), comment=string("")) -> record *
00418
00419 Summary
00420 Create a world box region
00421
00422 Input Parameters:
00423 blc blc of the box ; a vector of quantities Unity
00424 trc trc of the box; a vector of quantities Shape
00425 pixelaxes Which pixel axes -1 [0,1,2,...]
00426 csys Coordinate System Private Coordinate System
00427 absrel Absolute or relative coordinates Vector of strings from 'abs', 'relref' and 'relcen' 'abs'
00428 comment A comment stored with the region
00429
00430 --------------------------------------------------------------------------------
00431
00432 """
00433 return _regionmanager.regionmanager_wbox(self, *args, **kwargs)
00434
00435 def wpolygon(self, *args, **kwargs):
00436 """
00437 wpolygon(self, x=initialize_variant(""), y=initialize_variant(""), pixelaxes=initialize_vector(1, (int)-1),
00438 csys=initialize_record(""), absrel=string("abs"), comment=string("")) -> record *
00439
00440 Summary
00441 Create a world polygon region with quantities
00442
00443 Input Parameters:
00444 x The x vector; a vector of quantities
00445 y The y vector; vector of quantities Quantity vector
00446 pixelaxes which pixel axes; vector of integers ..default -1 means [0,1] -1 [1,2]
00447 csys Coordinate System Private Coordinate System
00448 absrel Absolute or relative coordinates; possibilities are 'abs', 'rel', 'relcen' abs 'abs'
00449 comment A comment stored with the region
00450
00451 --------------------------------------------------------------------------------
00452
00453 """
00454 return _regionmanager.regionmanager_wpolygon(self, *args, **kwargs)
00455
00456 regionmanager_swigregister = _regionmanager.regionmanager_swigregister
00457 regionmanager_swigregister(regionmanager)
00458
00459
00460
00461