Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

  • f99a844
  • /
  • lib
  • /
  • itkSortInvTimesImageFilter.h
Raw File Download
Permalinks

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
content badge Iframe embedding
swh:1:cnt:0c76ed1da404ed47b98934848a72b4e8f1d1f8c7
directory badge Iframe embedding
swh:1:dir:7f21c9a4b7dfafd29925be862d8bd559b684364d
Citations

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
itkSortInvTimesImageFilter.h
//
//  itkOxSortInvTimesImageFilter
//  OxShmolliLib
//
//  Created by Konrad Werys on 5/6/17.
//  Copyright © 2017 Konrad Werys. All rights reserved.
//

#ifndef OXSHMOLLILIB_ITKOXSORTINVTIMESIMAGEFILTER_H
#define OXSHMOLLILIB_ITKOXSORTINVTIMESIMAGEFILTER_H

#include "CmakeConfigForTomato.h"
#ifdef USE_ITK

#include <vnl/vnl_index_sort.h>

#include "itkImageToImageFilter.h"
#include "itkImageLinearIteratorWithIndex.h"

namespace itk {
    template<typename TImageIn, typename TImageOut>
    class SortInvTimesImageFilter : public ImageToImageFilter<TImageIn, TImageOut> {
    public:
        /** Standard class typedefs. */
        typedef SortInvTimesImageFilter Self;
        typedef ImageToImageFilter<TImageIn, TImageOut> Superclass;
        typedef SmartPointer<Self> Pointer;

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

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

        typedef typename TImageIn::PixelType  PixelTypeIn;
        typedef typename TImageOut::PixelType PixelTypeOut;

        itkSetMacro( InvTimesNonSorted, vnl_vector<PixelTypeIn> );
        itkGetMacro( InvTimesNonSorted, vnl_vector<PixelTypeIn> );
        //itkSetMacro( InvTimesSorted, vnl_vector<PixelTypeIn> );
        itkGetMacro( InvTimesSorted, vnl_vector<PixelTypeIn> );

        itkSetMacro( RepTimesNonSorted, vnl_vector<PixelTypeIn> );
        itkGetMacro( RepTimesNonSorted, vnl_vector<PixelTypeIn> );
        //itkSetMacro( RepTimesSorted, vnl_vector<PixelTypeIn> );
        itkGetMacro( RepTimesSorted, vnl_vector<PixelTypeIn> );

        itkSetMacro( RelAcqTimesNonSorted, vnl_vector<PixelTypeIn> );
        itkGetMacro( RelAcqTimesNonSorted, vnl_vector<PixelTypeIn> );
        //itkSetMacro( RelAcqTimesSorted, vnl_vector<PixelTypeIn> );
        itkGetMacro( RelAcqTimesSorted, vnl_vector<PixelTypeIn> );

        //itkSetMacro( Indices, vnl_vector<int> );
        itkGetMacro( Indices, vnl_vector<int> );

    protected:
        /** Constructor. */
        SortInvTimesImageFilter() {};

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

        /** Does the real work. */
        virtual void GenerateData() ITK_OVERRIDE;
    private:
        ITK_DISALLOW_COPY_AND_ASSIGN(SortInvTimesImageFilter); //purposely not implemented

        vnl_vector<typename TImageIn::PixelType> m_InvTimesNonSorted;
        vnl_vector<typename TImageIn::PixelType> m_InvTimesSorted;
        vnl_vector<typename TImageIn::PixelType> m_RepTimesNonSorted;
        vnl_vector<typename TImageIn::PixelType> m_RepTimesSorted;
        vnl_vector<typename TImageIn::PixelType> m_RelAcqTimesNonSorted;
        vnl_vector<typename TImageIn::PixelType> m_RelAcqTimesSorted;
        vnl_vector<int> m_Indices;
    };

} //namespace ITK

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

#endif //USE_ITK

#endif //OXSHMOLLILIB_ITKOXSORTINVTIMESIMAGEFILTER_H

Software Heritage — Copyright (C) 2015–2025, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Contact— JavaScript license information— Web API

back to top