def _create_pixel_and_world_components(self): for i in range(self.ndim): comp = CoordinateComponent(self, i) label = pixel_label(i, self.ndim) cid = self.add_component(comp, "Pixel %s" % label, hidden=True) self._pixel_component_ids.append(cid) if self.coords: for i in range(self.ndim): comp = CoordinateComponent(self, i, world=True) label = self.coords.axis_label(i) cid = self.add_component(comp, label, hidden=True) self._world_component_ids.append(cid)
def _update_pixel_components(self, ndim): for i in range(ndim): comp = CoordinateComponent(self, i) label = pixel_label(i, ndim) cid = PixelComponentID(i, "Pixel Axis %s" % label, parent=self) self.add_component(comp, cid) self._pixel_component_ids.append(cid)
def _create_pixel_and_world_components(self, ndim): for i in range(ndim): comp = CoordinateComponent(self, i) label = pixel_label(i, ndim) cid = PixelComponentID(i, "Pixel Axis %s" % label, parent=self) self.add_component(comp, cid) self._pixel_component_ids.append(cid) if self.coords: for i in range(ndim): comp = CoordinateComponent(self, i, world=True) label = self.coords.axis_label(i) cid = self.add_component(comp, label) self._world_component_ids.append(cid) self._set_up_coordinate_component_links(ndim)
def _update_world_components(self, ndim): for cid in self._world_component_ids[:]: self.remove_component(cid) self._world_component_ids.remove(cid) if self.coords: for i in range(ndim): comp = CoordinateComponent(self, i, world=True) label = self.coords.axis_label(i) cid = self.add_component(comp, label) self._world_component_ids.append(cid) self._set_up_coordinate_component_links(ndim)