Skip to content

File ImageProcessor.h

File List > include > ImageProcessor.h

Go to the documentation of this file

//=============================================================================
// Copyright (c) 2026 FLIR Integrated Imaging Solutions, Inc. All Rights Reserved.
//
// This software is the confidential and proprietary information of FLIR
// Integrated Imaging Solutions, Inc. ("Confidential Information"). You
// shall not disclose such Confidential Information and shall use it only in
// accordance with the terms of the license agreement you entered into
// with FLIR Integrated Imaging Solutions, Inc. (FLIR).
//
// FLIR MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
// SOFTWARE, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE, OR NON-INFRINGEMENT. FLIR SHALL NOT BE LIABLE FOR ANY DAMAGES
// SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
// THIS SOFTWARE OR ITS DERIVATIVES.
//=============================================================================

#ifndef FLIR_SPINNAKER_IMAGE_PROCESSOR_H
#define FLIR_SPINNAKER_IMAGE_PROCESSOR_H

#include "Interface/IImageProcessor.h"
#include "SpinnakerPlatform.h"
#include "CameraDefs.h"
#include "SpinnakerDefs.h"

namespace Spinnaker
{
    class ImagePtr;
    class ImageList;
    class Image;

    class SPINNAKER_API ImageProcessor : public IImageProcessor
    {
      public:
        ImageProcessor();

        virtual ~ImageProcessor();

        ImageProcessor(const ImageProcessor& processor);

        ImageProcessor& operator=(const ImageProcessor& processor);

        void SetColorProcessing(ColorProcessingAlgorithm colorAlgorithm);

        ColorProcessingAlgorithm GetColorProcessing();

        void SetNumDecompressionThreads(unsigned int numThreads);

        unsigned int GetNumDecompressionThreads();

        ImagePtr Convert(const ImagePtr& srcImage, PixelFormatEnums destFormat) const;

        void Convert(const ImagePtr& srcImage, ImagePtr& destImage, PixelFormatEnums destFormat) const;

        ImagePtr Convert(const ImageList& srcImageList, PixelFormatEnums destFormat) const;

        void Convert(const ImageList& srcImageList, ImagePtr& destImage, PixelFormatEnums destFormat) const;

        ImagePtr ApplyGamma(const ImagePtr& srcImage, float gamma, bool applyGammaInverse = false) const;

        void ApplyGamma(const ImagePtr& srcImage, ImagePtr& destImage, float gamma, bool applyGammaInverse = false)
            const;

      protected:
        friend class ImageFiler;

        void Convert(const Image* pSrcImage, Image* pDestImage, PixelFormatEnums destFormat) const;
    };

} // namespace Spinnaker

#endif // FLIR_SPINNAKER_IMAGE_PROCESSOR_H