<commit_before>/*=========================================================================

Program:   Medical Imaging & Interaction Toolkit
Language:  C++
Date:      $Date$
Version:   $Revision$

Copyright (c) German Cancer Research Center, Division of Medical and
Biological Informatics. All rights reserved.
See MITKCopyright.txt or http://www.mitk.org/copyright.html for details.

This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.  See the above copyright notices for more information.

=========================================================================*/


#include "AwesomeImageFilter.h"

#include <mitkImageAccessByItk.h>
#include <itkShiftScaleImageFilter.h>

template<typename TPixel, unsigned int VImageDimension>
void AddOffset(const itk::Image<TPixel, VImageDimension>* image, int offset, mitk::Image::Pointer outputImage)
{
  typedef itk::Image<TPixel, VImageDimension> ImageType;
  typedef itk::ShiftScaleImageFilter<ImageType, ImageType> FilterType;

  typename FilterType::Pointer filter = FilterType::New();
  filter->SetShift(offset);

  filter->SetInput(image);
  filter->Update();
  mitk::CastToMitkImage(filter->GetOutput(), outputImage);
}

AwesomeImageFilter::AwesomeImageFilter()
  : m_Offset(0)
{
  this->SetNumberOfRequiredInputs(1);<commit_msg>Adapt to changes from branch bug-17986-enable-mitk-image-itk-vectorimage.<commit_after>/*=========================================================================

Program:   Medical Imaging & Interaction Toolkit
Language:  C++
Date:      $Date$
Version:   $Revision$

Copyright (c) German Cancer Research Center, Division of Medical and
Biological Informatics. All rights reserved.
See MITKCopyright.txt or http://www.mitk.org/copyright.html for details.

This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.  See the above copyright notices for more information.

=========================================================================*/


#include "AwesomeImageFilter.h"

#include <mitkImageAccessByItk.h>
#include <mitkImageCast.h>
#include <itkShiftScaleImageFilter.h>

template<typename TPixel, unsigned int VImageDimension>
void AddOffset(const itk::Image<TPixel, VImageDimension>* image, int offset, mitk::Image::Pointer outputImage)
{
  typedef itk::Image<TPixel, VImageDimension> ImageType;
  typedef itk::ShiftScaleImageFilter<ImageType, ImageType> FilterType;

  typename FilterType::Pointer filter = FilterType::New();
  filter->SetShift(offset);

  filter->SetInput(image);
  filter->Update();
  mitk::CastToMitkImage(filter->GetOutput(), outputImage);
}

AwesomeImageFilter::AwesomeImageFilter()
  : m_Offset(0)
{
  this->SetNumberOfRequiredInputs(1);
{'fraction_non_alphanumeric': 0.19504424778761062, 'fraction_numerical': 0.003185840707964602, 'mean_word_length': 6.983050847457627, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 26, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4543954', 'n_tokens_mistral': 785, 'n_tokens_neox': 749, 'n_words': 208}