コード例 #1
0
ファイル: protocol_motioncorr.py プロジェクト: I2PC/scipion
 def writeZeroShifts(self, movie):
     # TODO: find another way to do this
     shiftsMd = self._getTmpPath('zero_shifts.xmd')
     pwutils.cleanPath(shiftsMd)
     xshifts = [0] * movie.getNumberOfFrames()
     yshifts = xshifts
     alignment = MovieAlignment(first=1, last=movie.getNumberOfFrames(),
                                xshifts=xshifts, yshifts=yshifts)
     roiList = [0, 0, 0, 0]
     alignment.setRoi(roiList)
     movie.setAlignment(alignment)
     writeShiftsMovieAlignment(movie, shiftsMd,
                               1, movie.getNumberOfFrames())
     return shiftsMd
コード例 #2
0
 def writeZeroShifts(self, movie):
     # TODO: find another way to do this
     shiftsMd = self._getTmpPath('zero_shifts.xmd')
     pwutils.cleanPath(shiftsMd)
     xshifts = [0] * movie.getNumberOfFrames()
     yshifts = xshifts
     alignment = MovieAlignment(first=1,
                                last=movie.getNumberOfFrames(),
                                xshifts=xshifts,
                                yshifts=yshifts)
     roiList = [0, 0, 0, 0]
     alignment.setRoi(roiList)
     movie.setAlignment(alignment)
     writeShiftsMovieAlignment(movie, shiftsMd, 1,
                               movie.getNumberOfFrames())
     return shiftsMd