Example #1
0
    def read(self, fname, **kwds):
        """ read a ply file """
        try:
            from mayavi.sources.poly_data_reader import PolyDataReader
        except:
            from enthought.mayavi.sources.poly_data_reader import PolyDataReader

        my_reader = PolyDataReader()
        return generic_vtk_read(my_reader, fname, **kwds)
 def setup_reader(self):
     """"Setup the reader in here.  This is called after the engine
     has been created and started.  The engine is available as
     self.e.  This method is called by setUp().
     """
     # Read a OBJ data file.
     r = PolyDataReader()
     r.initialize(get_example_data('shuttle.obj'))
     self.e.add_source(r)
     self.bounds = (-7.65, 7.04, -4.68, 4.68, -1.35, 4.16)
 def setup_reader(self):
     """"Setup the reader in here.  This is called after the engine
     has been created and started.  The engine is available as
     self.e.  This method is called by setUp().
     """
     # Read a BYU data file.
     r = PolyDataReader()
     r.initialize(get_example_data('cow.g'))
     self.e.add_source(r)
     self.bounds = (-4.445, 5.998, -3.608, 2.760, -1.690, 1.690)
 def setup_reader(self):
     """"Setup the reader in here.  This is called after the engine
     has been created and started.  The engine is available as
     self.e.  This method is called by setUp().
     """
     # Read a SLC data file.
     r = PolyDataReader()
     r.initialize(get_example_data('nut.slc'))
     self.e.add_source(r)
     self.bounds = (0.0, 67.0, 0.0, 40.0, 0.0, 58.0)
 def setup_reader(self):
     """"Setup the reader in here.  This is called after the engine
     has been created and started.  The engine is available as
     self.e.  This method is called by setUp().
     """
     # Read a Facet data file.
     r = PolyDataReader()
     r.initialize(get_example_data('clown.facet'))
     self.e.add_source(r)
     self.bounds = (-0.5, 0.69, -0.49, 0.49, -1.09, 0.5)
 def setup_reader(self):
     """"Setup the reader in here.  This is called after the engine
     has been created and started.  The engine is available as
     self.e.  This method is called by setUp().
     """
     # Read a PDB data file.
     r = PolyDataReader()
     r.initialize(get_example_data('caffeine.pdb'))
     self.e.add_source(r)
     self.bounds = (3.10, 10.78, -2.39, 4.03, -10.60, -6.31)
 def setup_reader(self):
     """"Setup the reader in here.  This is called after the engine
     has been created and started.  The engine is available as
     self.e.  This method is called by setUp().
     """
     # Read a STL data file.
     r = PolyDataReader()
     r.initialize(get_example_data('humanoid_tri.stla'))
     self.e.add_source(r)
     self.bounds = (0.60, 3.47, -3.96, 3.95, 3.05, 17.39)
Example #8
0
    def setup_reader(self):

        """"Setup the reader in here.  This is called after the engine
        has been created and started.  The engine is available as
        self.e.  This method is called by setUp().
        """
        # Read a Particle data file.
        r = PolyDataReader()
        r.initialize(get_example_data('Particles.raw'))
        self.e.add_source(r)
        r.reader.set(data_byte_order='big_endian', data_type='float', file_type='binary')
        self.bounds = (817.33, 826.09, 545.02, 571.02, 1443.48, 1511.18)