Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkGrabItkImageMemoryTest.cpp File Reference
#include "mitkITKImageImport.h"
#include "mitkTestingMacros.h"
#include "mitkImagePixelReadAccessor.h"
#include <itkThresholdImageFilter.h>
#include "mitkImageAccessByItk.h"

Go to the source code of this file.


template<typename TPixel , unsigned int VDimensions>
static void ItkThresholdFilter (const itk::Image< TPixel, VDimensions > *image, mitk::Image::Pointer &output, const double th[])
 [ItkThresholdFilter] More...
template<typename TPixel >
bool Assert_ItkImportWithinAccessByItkSucceded_ReturnsTrue ()
 [ItkThresholdFilter] More...
int mitkGrabItkImageMemoryTest (int, char *[])

Function Documentation

template<typename TPixel >
bool Assert_ItkImportWithinAccessByItkSucceded_ReturnsTrue ( )


Creates an mitk::Image, executes the binary threshold filter through AccessByItk and checks whether the image data was correctly imported back to an mitk::Image.



Definition at line 67 of file mitkGrabItkImageMemoryTest.cpp.

References AccessByItk_2, mitk::ImagePixelReadAccessor< TPixel, VDimension >::GetData(), ItkThresholdFilter(), MITK_INFO, MITK_TEST_CONDITION, and mitk::Image::New().

template<typename TPixel , unsigned int VDimensions>
static void ItkThresholdFilter ( const itk::Image< TPixel, VDimensions > *  image,
mitk::Image::Pointer output,
const double  th[] 


An ITK-based filter for thresholding.

The filter represents the typical usage of ITK-like filters inside MITK. It is to be called for an mitk::Image by using the AccessByItk macro. The filter executes the binary threshold filter and imports the result into the output by using the ImportItkImage method.

outputmitk::Image to hold the result of the filter
th[]two double values to set the lower/upper threshold

Definition at line 38 of file mitkGrabItkImageMemoryTest.cpp.

References mitk::GrabItkImageMemory(), MITK_TEST_FAILED_MSG, and mitk::New().

Referenced by Assert_ItkImportWithinAccessByItkSucceded_ReturnsTrue().

int mitkGrabItkImageMemoryTest ( int  ,
char *  [] 

Definition at line 115 of file mitkGrabItkImageMemoryTest.cpp.

References MITK_TEST_BEGIN(), and MITK_TEST_END().