示例#1
0
def full_volume():
  'Change volume subregion to show full data'
  from volumedialog import active_volume
  v = active_volume()
  if v:
    ijk_min = (0,0,0)
    ijk_max = [n-1 for n in v.data.size]
    v.new_region(ijk_min, ijk_max, show = v.shown())
def full_volume():
    'Change volume subregion to show full data'
    from volumedialog import active_volume
    v = active_volume()
    if v:
        ijk_min = (0, 0, 0)
        ijk_max = [n - 1 for n in v.data.size]
        v.new_region(ijk_min, ijk_max, show=v.shown())
def show_volume():
    'Show active volume viewer volume'
    from volumedialog import active_volume
    v = active_volume()
    if v:
        if v.representation is None:
            v.set_representation('surface')
        v.initialize_thresholds()
        v.show()
示例#4
0
def show_volume():
  'Show active volume viewer volume'
  from volumedialog import active_volume
  v = active_volume()
  if v:
    if v.representation is None:
      v.set_representation('surface')
    v.initialize_thresholds()
    v.show()
def clip_volume():

    from volumedialog import active_volume
    v = active_volume()
    if v:
        if v.useClipPlane:
            v.useClipPlane = False
        else:
            from chimera import tkgui
            tkgui.setClipModel(v)
示例#6
0
def clip_volume():

  from volumedialog import active_volume
  v = active_volume()
  if v:
    if v.useClipPlane:
      v.useClipPlane = False
    else:
      from chimera import tkgui
      tkgui.setClipModel(v)
示例#7
0
def zone_volume(outside = False):

  from volumedialog import active_volume
  v = active_volume()
  if v is None:
    from chimera.replyobj import status
    status('No volume shown in volume dialog')
    return

  mv = v.copy_zone(outside)
  if mv is None:
    from chimera.replyobj import status
    status('No zone for volume %s' % v.name)
示例#8
0
def invert_map():

  from volumedialog import active_volume
  v = active_volume()
  if v is None:
    return
  wv = v.writable_copy()

  m = wv.data.full_matrix()
  from VolumeData import invert_matrix
  invert_matrix(m)
  wv.data.values_changed()
  wv.show()
def invert_map():

    from volumedialog import active_volume
    v = active_volume()
    if v is None:
        return
    wv = v.writable_copy()

    m = wv.data.full_matrix()
    from VolumeData import invert_matrix
    invert_matrix(m)
    wv.data.values_changed()
    wv.show()
def zone_volume(outside=False):

    from volumedialog import active_volume
    v = active_volume()
    if v is None:
        from chimera.replyobj import status
        status('No volume shown in volume dialog')
        return

    mv = v.copy_zone(outside)
    if mv is None:
        from chimera.replyobj import status
        status('No zone for volume %s' % v.name)
def bounding_map(pad=5.0):

    from chimera.selection import currentAtoms
    atoms = currentAtoms()
    if len(atoms) == 0:
        from chimera.replyobj import status
        status('No atoms selected')
        return

    from volumedialog import active_volume
    v = active_volume()
    if v is None:
        from chimera.replyobj import status
        status('No volume shown in volume dialog')
        return

    from volume import map_covering_atoms
    bv = map_covering_atoms(atoms, pad, v)
    bv.show()
    v.show(show=False)
示例#12
0
def bounding_map(pad = 5.0):

    from chimera.selection import currentAtoms
    atoms = currentAtoms()
    if len(atoms) == 0:
        from chimera.replyobj import status
        status('No atoms selected')
        return

    from volumedialog import active_volume
    v = active_volume()
    if v is None:
        from chimera.replyobj import status
        status('No volume shown in volume dialog')
        return

    from volume import map_covering_atoms
    bv = map_covering_atoms(atoms, pad, v)
    bv.show()
    v.show(show = False)
示例#13
0
def mrc_signed8_to_unsigned8():

  from volumedialog import active_volume
  v = active_volume()
  if v == None:
    from chimera.replyobj import status
    status('No volume shown in volume viewer dialog.')
    return

  data = v.data
  if not hasattr(data, 'signed8_to_unsigned8'):
    from chimera.replyobj import status
    status('Volume is not MRC format.')
    return

  from numpy import int8
  if data.value_type != int8:
    from chimera.replyobj import status
    status('MRC volume is not 8-bit integers.')
    return

  data.signed8_to_unsigned8()

  v.show()
def mrc_signed8_to_unsigned8():

    from volumedialog import active_volume
    v = active_volume()
    if v == None:
        from chimera.replyobj import status
        status('No volume shown in volume viewer dialog.')
        return

    data = v.data
    if not hasattr(data, 'signed8_to_unsigned8'):
        from chimera.replyobj import status
        status('Volume is not MRC format.')
        return

    from numpy import int8
    if data.value_type != int8:
        from chimera.replyobj import status
        status('MRC volume is not 8-bit integers.')
        return

    data.signed8_to_unsigned8()

    v.show()
    def volume(self):

        from volumedialog import active_volume
        v = active_volume()
        return v
示例#16
0
def hide_volume():
  'Hide active volume viewer volume'
  from volumedialog import active_volume
  v = active_volume()
  if v:
    v.unshow()
def remove_volume():
    'Remove active volume viewer volume'
    from volumedialog import active_volume
    v = active_volume()
    if v:
        v.close()
def writable_volume():

    from volumedialog import active_volume
    v = active_volume()
    if v:
        v.writable_copy(require_copy=True)
示例#19
0
def writable_volume():

  from volumedialog import active_volume
  v = active_volume()
  if v:
    v.writable_copy(require_copy = True)
示例#20
0
def remove_volume():
  'Remove active volume viewer volume'
  from volumedialog import active_volume
  v = active_volume()
  if v:
    v.close()
def hide_volume():
    'Hide active volume viewer volume'
    from volumedialog import active_volume
    v = active_volume()
    if v:
        v.unshow()