Skip to content

File ImageList.h

File List > include > ImageList.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_IMAGELIST_H
#define FLIR_SPINNAKER_IMAGELIST_H

#include "Interface/IImageList.h"

namespace Spinnaker
{
    class SPINNAKER_API ImageList : public IImageList
    {
      public:
        ImageList(void);

        virtual ~ImageList(void);

        ImageList(const ImageList& iface);

        ImageList& operator=(const ImageList& iface);

        ImagePtr operator[](unsigned int index);
        const ImagePtr operator[](unsigned int index) const;

        /*
         * Releases all the images that were acquired calling camera->GetNextImageSync().
         *
         * @see Init()
         * @see CameraBase::GetNextImageSync( grabTimeout )
         */
        void Release();

        unsigned int GetSize() const;

        ImagePtr GetByIndex(unsigned int index) const;

        ImagePtr GetByPixelFormat(PixelFormatEnums pixelFormat) const;

        ImageList GetImagesByPixelFormat(PixelFormatEnums pixelFormat) const;

        ImagePtr GetByStreamIndex(const uint64_t streamIndex) const;

        ImagePtr GetByPayloadType(const ImagePayloadType payloadType) const;

        ImageList GetImagesByPayloadType(const ImagePayloadType payloadType) const;

        void Clear();

        void Add(ImagePtr image);

        void RemoveByIndex(unsigned int index);

        void RemoveByPixelFormat(PixelFormatEnums pixelFormat);

        void RemoveByStreamIndex(const uint64_t streamIndex);

        void RemoveByPayloadType(const ImagePayloadType payloadType);

        void Append(const ImageList& list);

        void Save(const char* filename);

        static ImageList Load(const char* filename);
    };

} // namespace Spinnaker

#endif // FLIR_SPINNAKER_IMAGELIST_H