Set image origin

        Arguments
        ---------
        new_origin : tuple or list
            updated origin for the image.
            should have one value for each dimension

        Returns
        -------
        None
1590
def set_origin(self, new_origin):
        
        if not isinstance(new_origin, (tuple, list)):
            raise ValueError('arg must be tuple or list')
        if len(new_origin) != self.dimension:
            raise ValueError('must give a origin value for each dimension (%i)' % self.dimension)

        libfn = utils.get_lib_fn('setOrigin%s'%self._libsuffix)
        libfn(self.pointer, new_origin)
1048045
def set_matrix_dimensions(self, *args):
        
        self._image = None
        super(FileImage, self).set_matrix_dimensions(*args)
959782
def center_origin(self):
        """"""
        self.set_origin(Vector2(self.image.get_width() / 2.0, self.image.get_height() / 2.0))
744943
def origin(self):
        '''
        
        '''
        try:
            return self._origin
        except AttributeError:
            pass
        self._origin = Point()
        return self._origin
1166783
def set_image(self, **kwargs):
        
        self.image = {
            'url': kwargs.get('url'),
            'proxy_url': kwargs.get('proxy_url'),
            'height': kwargs.get('height'),
            'width': kwargs.get('width'),
        }
804850
function(map, origin, originPoint) {
			this.writeDebug('originMarker',arguments);

			if (this.settings.originMarker !== true) {
				return;
			}

			var marker,
				originImg = '';

			if (typeof origin !== 'undefined') {
				if (this.settings.originMarkerImg !== null) {
					if (this.settings.originMarkerDim === null) {
						originImg = this.markerImage(this.settings.originMarkerImg);
					}
					else {
						originImg = this.markerImage(this.settings.originMarkerImg, this.settings.originMarkerDim.width, this.settings.originMarkerDim.height);
					}
				}
				else {
					originImg = {
						url: 'https://mt.googleapis.com/vt/icon/name=icons/spotlight/spotlight-waypoint-a.png'
					};
				}

				marker = new google.maps.Marker({
					position : originPoint,
					map      : map,
					icon     : originImg,
					draggable: false
				});
			}
		}
806638
def _load_new(self, img_data: str):
        
        self._image = tk.PhotoImage(data=img_data)
        self._image = self._image.subsample(int(200 / self._size),
                                            int(200 / self._size))
        self._canvas.delete('all')
        self._canvas.create_image(0, 0, image=self._image, anchor='nw')

        if self._user_click_callback is not None:
            self._user_click_callback(self._on)
1137655
def set_image(self, img, bgr=False):
        ''''''
        if not self.is_alive():
            return
        if bgr:
            img = cv.CloneImage(img)
            cv.CvtColor(img, img, cv.CV_BGR2RGB)
        self.in_queue.put(MPImageData(img))
762173
def plot_origin(self):  # TODO add attribute option to color vectors
        
        import matplotlib.cm as cm
        import matplotlib.pyplot as plt
        ax = plt.subplot(111)
        xlim = [self._dx.min(), self._dx.max()]
        ylim = [self._dy.min(), self._dy.max()]
        for x, y in zip(self._dx, self._dy):
            xs = [0, x]
            ys = [0, y]
            plt.plot(xs, ys, '-b')  # TODO change this to scale with attribute
        plt.axis('equal')
        plt.xlim(xlim)
        plt.ylim(ylim)
453853
def set_spacing(self, new_spacing):
        
        if not isinstance(new_spacing, (tuple, list)):
            raise ValueError('arg must be tuple or list')
        if len(new_spacing) != self.dimension:
            raise ValueError('must give a spacing value for each dimension (%i)' % self.dimension)

        libfn = utils.get_lib_fn('setSpacing%s'%self._libsuffix)
        libfn(self.pointer, new_spacing)
1326001
def setROI(self, *args):
        
        if len(args) == 4:
            x, y, w, h = args
        elif len(args) == 1:
            if isinstance(args[0], Region):
                x, y, w, h = args[0].getTuple()
            elif isinstance(args[0], tuple):
                x, y, w, h = args[0]
            else:
                raise TypeError("Unrecognized argument for Region()")
        else:
            raise TypeError("Unrecognized argument(s) for Region()")
        self.setX(x)
        self.setY(y)
        self.setW(w)
        self.setH(h)
690967
def origin(self):
        
        # TODO: add a keyword-only option for keeping user/pass maybe?
        if not self.is_absolute():
            raise ValueError("URL should be absolute")
        if not self._val.scheme:
            raise ValueError("URL should have scheme")
        v = self._val
        netloc = self._make_netloc(None, None, v.hostname, v.port, encode=False)
        val = v._replace(netloc=netloc, path="", query="", fragment="")
        return URL(val, encoded=True)
1353817
def set_url(self, url = None):
        
                
        if url is None or type(url) is not str:
            raise KPError("Need a new image number")
        else:
            self.url = url
            self.last_mod = datetime.now().replace(microsecond=0)
            return True
742163
def set_image(self, img):
        ''''''
        with warnings.catch_warnings():
            warnings.simplefilter('ignore')
            if hasattr(img, 'shape'):
                (width, height) = (img.shape[1], img.shape[0])
                self._bmp = wx.BitmapFromBuffer(width, height, np.uint8(img)) # http://stackoverflow.com/a/16866833/2559632
            elif hasattr(img, 'GetHeight'):
                self._bmp = wx.BitmapFromImage(img)
            else:
                print("Unsupported image type: %s" % type(img))
                return
            self.SetMinSize((self._bmp.GetWidth(), self._bmp.GetHeight()))
268615
def assign_item(self, item, origin):
        
        closest_cluster = origin
        for cluster in self.__clusters:
            if self.distance(item, centroid(cluster)) < self.distance(
                    item, centroid(closest_cluster)):
                closest_cluster = cluster

        if id(closest_cluster) != id(origin):
            self.move_item(item, origin, closest_cluster)
            return True
        else:
            return False
844644
public float originX () {
    if (isSet(Flag.ODIRTY)) {
      float width = width();
      if (width > 0) {
        this.originX = origin.ox(width);
        this.originY = origin.oy(height());
        setFlag(Flag.ODIRTY, false);
      }
    }
    return originX;
  }
663356
function(sx, sy, origin) {

            origin = this.origin().scale(sx, sy, origin);
            this.x = origin.x;
            this.y = origin.y;
            this.width *= sx;
            this.height *= sy;
            return this;
        }