Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
#include "mitkITKImageImport.h"
#include "mitkImageCast.h"
#include "mitkTestingMacros.h"
#include "mitkImagePixelReadAccessor.h"
#include <itkImageRegionConstIteratorWithIndex.h>
#include <itkRandomImageSource.h>
Go to the source code of this file.
Functions | |
template<typename TPixel , unsigned int VDimension> | |
itk::Image< TPixel, VDimension >::Pointer | CreateTestImageRandom (short int size) |
template<typename TPixel , unsigned int VDimension> | |
itk::VectorImage< TPixel, VDimension >::Pointer | CreateTestVectorImageFixedValue (vcl_size_t size, const itk::VariableLengthVector< TPixel > &value) |
template<typename TPixel , unsigned int VDimension> | |
itk::Image< TPixel, VDimension >::Pointer | CreateTestImageFixedValue (vcl_size_t size, TPixel value) |
template<typename ImageType > | |
bool | Assert_ImageMetaData_AreEqual (typename ImageType::Pointer itkImage, mitk::Image::Pointer mitkImage) |
template<typename TPixel , unsigned int VDimension> | |
void | Assert_ItkImageImportRandomValuesSucceded_ReturnsTrue () |
template<typename TPixel , unsigned int VDimension> | |
void | Assert_ItkImageImportSucceded_ReturnsTrue () |
void | Assert_ItkVectorImageImportAndCast_ReturnsTrue () |
int | mitkImportItkImageTest (int, char *[]) |
bool Assert_ImageMetaData_AreEqual | ( | typename ImageType::Pointer | itkImage, |
mitk::Image::Pointer | mitkImage | ||
) |
Compares the meta information of both given images for equality.
Definition at line 133 of file mitkImportItkImageTest.cpp.
References mitk::BaseGeometry::GetOrigin(), and MITK_TEST_CONDITION.
void Assert_ItkImageImportRandomValuesSucceded_ReturnsTrue | ( | ) |
Generates a random itk image and imports it to mitk image through ImportItkImage and compares the values voxel-wise afterwards
Definition at line 171 of file mitkImportItkImageTest.cpp.
References mitk::ImagePixelReadAccessor< TPixel, VDimension >::GetPixelByIndex(), mitk::ImportItkImage(), and MITK_TEST_CONDITION.
void Assert_ItkImageImportSucceded_ReturnsTrue | ( | ) |
Generates an itk image with fixed pixel value and imports it to mitk image through ImportItkImage and compares the values voxel-wise afterwards
Definition at line 215 of file mitkImportItkImageTest.cpp.
References mitk::ImagePixelReadAccessor< TPixel, VDimension >::GetPixelByIndex(), mitk::ImportItkImage(), min(), and MITK_TEST_CONDITION.
void Assert_ItkVectorImageImportAndCast_ReturnsTrue | ( | ) |
Definition at line 255 of file mitkImportItkImageTest.cpp.
References mitk::CastToItkImage(), mitk::CastToMitkImage(), mitk::PixelType::GetComponentType(), mitk::PixelType::GetPixelType(), mitk::ImportItkImage(), MITK_ASSERT_EQUAL, and MITK_TEST_CONDITION.
Referenced by mitkImportItkImageTest().
itk::Image<TPixel, VDimension>::Pointer CreateTestImageFixedValue | ( | vcl_size_t | size, |
TPixel | value | ||
) |
Create a test image with a single pixel value. The image size is determined by the input parameter.
value | the pixel value the created image is filled with |
size | the number of voxels in each dimension |
Definition at line 97 of file mitkImportItkImageTest.cpp.
References mitk::New().
itk::Image<TPixel, VDimension>::Pointer CreateTestImageRandom | ( | short int | size | ) |
Create a test image with random pixel values. The image size is determined by the input parameter.
size | the number of voxels in each dimension |
Definition at line 32 of file mitkImportItkImageTest.cpp.
References mitk::New().
itk::VectorImage<TPixel, VDimension>::Pointer CreateTestVectorImageFixedValue | ( | vcl_size_t | size, |
const itk::VariableLengthVector< TPixel > & | value | ||
) |
Create a test vector image (with two components) with a single pixel value. The image size is determined by the input parameter.
value | the pixel value the created image is filled with |
size | the number of voxels in each dimension |
Definition at line 56 of file mitkImportItkImageTest.cpp.
References mitk::New().
int mitkImportItkImageTest | ( | int | , |
char * | [] | ||
) |
Definition at line 289 of file mitkImportItkImageTest.cpp.
References Assert_ItkVectorImageImportAndCast_ReturnsTrue(), MITK_TEST_BEGIN(), and MITK_TEST_END().