# diffraction image processor class - dip

# FIXME this should really inherit from the autogenerated python class
# which describes this as a document?

class dip:
    '''A class to give a clean definition of the input that things which read
    diffraction images would find useful.'''

    def __init__(self):
        self._dip_template = None
        self._dip_directory = None
        self._dip_images = []
        self._dip_beam = None
        self._dip_distance = None

        return

    def unmarshal(self, xml):
        # FIXME do the unrolling of the input XML document - set the values
        # using get, set below. This is a separate job for the code camp ;o)
        return

    def marshal(self):
        # FIXME roll up and XML document from the input which has been set.
        return

    def set_dip_template(self, template):
        self._template = template
        return

    def get_dip_template(self):
        return self._template

    def set_dip_directory(self, directory):
        self._directory = directory
        return

    def get_dip_directory(self):
        return self._directory

    def set_dip_images(self, images):
        self._images = images
        return

    def get_dip_images(self):
        return self._images

    def set_dip_beam(self, beam):
        self._beam = beam
        return

    def get_dip_beam(self):
        return self._beam

    def set_dip_distance(self, distance):
        self._distance = distance
        return

    def get_dip_distance(self):
        return self._distance

    # FIXME can add lots of nice methods here - automatically unroll from a
    # given image, find matching images, determine template automatically,
    # read image headers, check files exist, cache files somewhere locally etc.
