def BuildImages():
	if xImageSequence == None:
		return ""
	xImages = xImageSequence.SelectSingleNode('ImageSequenceRecord/Images').Clone()
	for xImage in xImages.SelectNodes('Image'):
		xImage.Attributes['path'].Value = \
			Path.GetFullPath(Path.Combine(Config.ImageCutsRoot, param.cutDir +"/" + xImage.Attributes['path'].Value))
	
	return xImages.InnerXml

def CreateVln():
	cutDir = Path.GetFullPath(Path.Combine(Config.ImageCutsRoot, param.cutDir))
	return ImageSequence.createVln(xImageSequence, param.imageType, param.imageSize, cutDir)
	
def GetImageCount():
	if xImageSequence == None:
		return 0
	xImages = xImageSequence.SelectSingleNode('ImageSequenceRecord/Images').Clone()
	numImages = 0
	for xImage in xImages.SelectNodes('Image'):
		numImages = numImages + 1
	
	return numImages
		
xImageSequence = dal.Get("ImageSequenceRecord", param.imageType)