def handlePictureEvent(self, pict_type): """ Take pictures at/around each section location. """ movie_queue = [] # Single picture at each section. if (pict_type == "s1"): for item in self.sectionsStandardItemIterator(): movie_queue.append(item.getSectionItem().getLocation()) # Three picture spiral at each section. elif (pict_type == "s3"): for item in self.sectionsStandardItemIterator(): movie_queue.append(item.getSectionItem().getLocation()) movie_queue += imageCapture.createSpiral(3) # Five picture spiral at each section. elif (pict_type == "s5"): for item in self.sectionsStandardItemIterator(): movie_queue.append(item.getSectionItem().getLocation()) movie_queue += imageCapture.createSpiral(5) # Picture grid at each section. elif (pict_type == "g"): for item in self.sectionsStandardItemIterator(): movie_queue.append(item.getSectionItem().getLocation()) movie_queue += imageCapture.createGrid( *self.image_capture.getGridSize()) if (len(movie_queue) > 0): self.image_capture.takeMovies(movie_queue)
def handleTakeGrid(self): """ Handle taking a grid pattern. """ movie_queue = [] # Starting point. movie_queue.append( coord.Point(self.mosaic_event_coord.x_um, self.mosaic_event_coord.y_um, "um")) # Grid. movie_queue += imageCapture.createGrid(self.ui.xSpinBox.value(), self.ui.ySpinBox.value()) self.image_capture.takeMovies(movie_queue)
def handleImageGridButton(self, ignored): """ Handle taking a grid pattern when the 'Acquire' button is clicked. """ movie_queue = [] # Starting point. x_start_um = self.ui.xStartPosSpinBox.value() y_start_um = self.ui.yStartPosSpinBox.value() movie_queue.append(coord.Point(x_start_um, y_start_um, "um")) # Grid. movie_queue += imageCapture.createGrid(self.ui.xSpinBox.value(), self.ui.ySpinBox.value()) self.ui.imageGridButton.setText("Abort") self.ui.imageGridButton.setStyleSheet("QPushButton { color: red }") self.image_capture.takeMovies(movie_queue)