Revision c6d23f52bf7d7de2698a41518f6c2638decc9d6b authored by Konrad Werys on 26 October 2018, 15:54:52 UTC, committed by Konrad Werys on 26 October 2018, 15:54:52 UTC
1 parent 199c910
Raw File
itkColorbar2DImageFilter.h
//
//  itkColorbar2DImageFilter
//  OxShmolliLib
//
//  Created by Konrad Werys on 13/7/17.
//  Copyright © 2017 Konrad Werys. All rights reserved.
//

#ifndef OXSHMOLLILIB_ITKColorbar2DImageFilter_H
#define OXSHMOLLILIB_ITKColorbar2DImageFilter_H

#include "itkImageToImageFilter.h"
#include "itkImageRegionIteratorWithIndex.h"
#include "itkImageRegionConstIteratorWithIndex.h"

namespace itk {

    /**
     * \class Colorbar2DImageFilter
     * @tparam TImage
     */
    template<typename TImage>
    class Colorbar2DImageFilter : public ImageToImageFilter<TImage, TImage> {

    public:
        /** Standard class typedefs. */
        typedef Colorbar2DImageFilter Self;
        typedef ImageToImageFilter<TImage, TImage> Superclass;
        typedef SmartPointer<Self> Pointer;

        /** Method for creation through the object factory. */
        itkNewMacro(Self);

        /** Run-time type information (and related methods). */
        itkTypeMacro(OxColorbarImageFilter, ImageToImageFilter);

        typedef typename TImage::PixelType PixelTypeIn;
        typedef typename TImage::PixelType PixelTypeOut;

        itkSetMacro(ZerosInsteadOfColorbar, bool);
        itkGetMacro(ZerosInsteadOfColorbar, bool);

    protected:
        /** Constructor. */
        Colorbar2DImageFilter() {
            m_ZerosInsteadOfColorbar = false;
        };

        /** Destructor. */
        ~Colorbar2DImageFilter() {};

        /** Does the real work. */
        virtual void GenerateData() ITK_OVERRIDE;

    private:

        bool m_ZerosInsteadOfColorbar;

        ITK_DISALLOW_COPY_AND_ASSIGN(Colorbar2DImageFilter); //purposely not implemented

    };
} //namespace ITK

#ifndef ITK_MANUAL_INSTANTIATION
#include "itkColorbar2DImageFilter.txx"
#endif

#endif //OXSHMOLLILIB_ITKColorbar2DImageFilter_H
back to top