Wrapping/WrapITK/Python/itkExtras/__init__.py
def index_to_physical_point( imageOrFilter, idx ):
  """Get the pysical point in an image from an index
  
  imageOrFilter is the image where the physical point must be computed
  idx is the index used to compute the physical point. It can be a continuous index.
  """
  from __builtin__ import range # required because range is overladed in this module
  # get the image if needed
  img = image( imageOrFilter )
  dim = img.GetImageDimension()
  o = origin( img )
  s = spacing( img )
  
  # use the typemaps to really get a continuous index
  import itk
  idx = itk.ContinuousIndex[ itk.D, dim ]( idx )
  
  # create the output object
  p = itk.Point[ itk.D, dim ]()
  for i in range( 0, dim ):
    p.SetElement( i, s.GetElement(i) * idx.GetElement(i) + o.GetElement(i) )
  return p
Get the pysical point in an image from an index
  
  imageOrFilter is the image where the physical point must be computed
  idx is the index used to compute the physical point. It can be a continuous index.
  
Get the pysical point in an image from an index
imageOrFilter is the image where the physical point must be computed
idx is the index used to compute the physical point. It can be a continuous index.
Get the pysical point in an image from an index imageOrFilter is the image where the physical point must be computed idx is the index used to compute the physical point . It can be a continuous index .
def index_to_physical_point( imageOrFilter, idx ):
  from __builtin__ import range 
  img = image( imageOrFilter )
  dim = img.GetImageDimension()
  o = origin( img )
  s = spacing( img )
  import itk
  idx = itk.ContinuousIndex[ itk.D, dim ]( idx )
  p = itk.Point[ itk.D, dim ]()
  for i in range( 0, dim ):
    p.SetElement( i, s.GetElement(i) * idx.GetElement(i) + o.GetElement(i) )
  return p
def index_to_physical_point ( imageOrFilter , idx ) : from __builtin__ import range img = image ( imageOrFilter ) dim = img . GetImageDimension ( ) o = origin ( img ) s = spacing ( img ) import itk idx = itk . ContinuousIndex [ itk . D , dim ] ( idx ) p = itk . Point [ itk . D , dim ] ( ) for i in range ( 0 , dim ) : p . SetElement ( i , s . GetElement ( i ) * idx . GetElement ( i ) + o . GetElement ( i ) ) return p
Get the pysical point in an image from an index
imageOrFilter is the image where the physical point must be computed
idx is the index used to compute the physical point.
Get the pysical point in an image from an index imageOrFilter is the image where the physical point must be computed idx is the index used to compute the physical point .
"""Get the pysical point in an image from an index
  
  imageOrFilter is the image where the physical point must be computed
  idx is the index used to compute the physical point. It can be a continuous index.
  """ # required because range is overladed in this module # get the image if needed # use the typemaps to really get a continuous index # create the output object
imageOrFilter
idx