Get filter.
        Often, the regions files implicitly assume the lower-left
        corner of the image as a coordinate (1,1). However, the python
        convetion is that the array index starts from 0. By default
        (``origin=1``), coordinates of the returned mpl artists have
        coordinate shifted by (1, 1). If you do not want this shift,
        use ``origin=0``.

        Parameters
        ----------
        header : `astropy.io.fits.Header`
            FITS header
        origin : {0, 1}
            Pixel coordinate origin

        Returns
        -------
        filter : TODO
            Filter object

def get_filter(self, header=None, origin=1):
        """Get filter.
        Often, the regions files implicitly assume the lower-left
        corner of the image as a coordinate (1,1). However, the python
        convetion is that the array index starts from 0. By default
        (``origin=1``), coordinates of the returned mpl artists have
        coordinate shifted by (1, 1). If you do not want this shift,
        use ``origin=0``.

        Parameters
        ----------
        header : `astropy.io.fits.Header`
            FITS header
        origin : {0, 1}
            Pixel coordinate origin

        Returns
        -------
        filter : TODO
            Filter object
        """

        from .region_to_filter import as_region_filter

        if header is None:
            if not self.check_imagecoord():
                raise RuntimeError("the region has non-image coordinate. header is required.")
            reg_in_imagecoord = self
        else:
            reg_in_imagecoord = self.as_imagecoord(header)

        region_filter = as_region_filter(reg_in_imagecoord, origin=origin)

        return region_filter