# -*- coding: utf-8 -*-

"""
Created on Feb 20, 2014

@author: Aaron Ponti
"""

from ch.systemsx.cisd.openbis.dss.etl.dto.api import SimpleImageContainerDataConfig


class MicroscopyCompositeDatasetConfig(SimpleImageContainerDataConfig):
    """Image data configuration class for composite image files."""

    def createChannel(self, channelCode):
        """Create a channel from the channelCode with the name as read from
        the file via the MetadataReader and the color (RGB) as read.
     
        @param channelCode Code of the channel as generated by extractImagesMetadata().
        
        Returns a ch.systemsx.cisd.openbis.dss.etl.dto.api.Channel 
        """
 
        raise NotImplementedError()


    def extractImagesMetadata(self, imagePath, imageIdentifiers):
        """Overrides extractImageMetadata method making sure to store
        both series and channel indices in the channel code to be reused
        later to extract color information and other metadata.

        The channel code is in the form SERIES-(\d+)_CHANNEL-(\d+).

        Only metadata for the relevant series number is returned!

        @param imagePath Full path to the file to process
        @param imageIdentifiers Array of ImageIdentifier's

        @see constructor.
        """

        raise NotImplementedError()


    def _getChannelName(self, seriesIndx, channelIndx):
        """Returns the channel name (from the parsed metadata) for
        a given channel in a given series."
        """

        raise NotImplementedError()


    def _getChannelColor(self, seriesIndx, channelIndx):
        """Returns the channel color (from the parsed metadata) for
        a given channel in a given series.
        
        
        Returns a ch.systemsx.cisd.openbis.dss.etl.dto.api.ChannelColorRGB()
        """

        raise NotImplementedError()


    def _getSeriesAndChannelNumbers(self, channelCode):
        """Extract series and channel number from channel code in
        the form SERIES-(\d+)_CHANNEL-(\d+) to a tuple
        (seriesIndx, channelIndx).

        @param channelCode Code of the channel as generated by extractImagesMetadata().
        
        Returns seriesIndx, channelIndx
        """

        raise NotImplementedError()
