/[escript]/tags/trunk_2172_checkpoint/pyvisi/py_src/position.py
ViewVC logotype

Annotation of /tags/trunk_2172_checkpoint/pyvisi/py_src/position.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1197 - (hide annotations)
Mon Jun 18 02:08:34 2007 UTC (13 years, 10 months ago) by jongui
Original Path: trunk/pyvisi/py_src/position.py
File MIME type: text/x-python
File size: 2134 byte(s)
Update the way movies are generated. Please refer to the examples. 

The user can now either specify the image range(first and last images inclusive):
mov.imageRange(input_directory = PYVISI_EXAMPLE_IMAGES_PATH,
        first_image = IMAGE_NAME + "000938.jpg",
		last_image = IMAGE_NAME + "000948.jpg")
mov.makeMovie(os.path.join(PYVISI_EXAMPLE_IMAGES_PATH, "movie.mpg"))

or the user can specify a list of images:

lst = ['image1.jpg', 'image5.jpg', 'image7.jpg]
mov.imageList(input_directory = PYVISI_EXAMPLE_IMAGES_PATH, image_list = lst)
mov.makeMovie(os.path.join(PYVISI_EXAMPLE_IMAGES_PATH, "movie.mpg"))


1 ksteube 1147 """
2 jongui 1197 @var __author__: name of author
3     @var __copyright__: copyrights
4     @var __license__: licence agreement
5     @var __url__: url entry point on documentation
6     @var __version__: version
7     @var __date__: date of the version
8 ksteube 1147 """
9    
10 jongui 1197 __author__="John Ngui, john.ngui@uq.edu.au"
11     __copyright__=""" Copyright (c) 2006 by ACcESS MNRF
12     http://www.access.edu.au
13     Primary Business: Queensland, Australia"""
14     __license__="""Licensed under the Open Software License version 3.0
15     http://www.opensource.org/licenses/osl-3.0.php"""
16     __url__="http://www.iservo.edu.au/esys"
17     __version__="$Revision$"
18     __date__="$Date$"
19    
20    
21 ksteube 1147 class LocalPosition:
22     """
23     Class that defines the local positioning coordiante system (2D).
24     """
25    
26     def __init__(self, x_coor, y_coor):
27     """
28     Initialise the local position.
29    
30     @type x_coor: Number
31     @param x_coor: x coordinate
32     @type y_coor: Number
33     @param y_coor: y coordinate
34     """
35    
36 jongui 1189 self.__x_coor = x_coor
37     self.__y_coor = y_coor
38 ksteube 1147 self.__position = [x_coor, y_coor]
39    
40 jongui 1189 def _getXCoor(self):
41     """
42     Return the X coordinate.
43    
44     @rtype: Number
45     @return: X coordinate
46     """
47    
48     return self.__x_coor
49    
50     def _getYCoor(self):
51     """
52     Return the Y coordinate.
53    
54     @rtype: Number
55     @return: Y coordinate
56     """
57    
58     return self.__y_coor
59    
60 ksteube 1147 def _getLocalPosition(self):
61     """
62     Return the local position.
63    
64     @rtype: Two column tuple containing numbers
65     @return: Tuple with the x and y coordinates
66     """
67    
68     return self.__position
69    
70    
71     ###############################################################################
72    
73    
74     class GlobalPosition:
75     """
76     Class that defines the global positioning coordinate system (3D)
77     """
78    
79     def __init__(self, x_coor, y_coor, z_coor):
80     """
81     Initialise the global position.
82    
83     @type x_coor: Number
84     @param x_coor: x coordinate
85     @type y_coor: Number
86     @param y_coor: y coordinate
87     @type z_coor: Number
88     @param z_coor: z coordinate
89     """
90    
91     self.__position = [x_coor, y_coor, z_coor]
92    
93     def _getGlobalPosition(self):
94     """
95     Return the global position.
96    
97     @rtype: Three column tuple containing numbers
98     @return: Tuple with the x, y and z coordinates
99     """
100    
101     return self.__position

  ViewVC Help
Powered by ViewVC 1.1.26