|
DGtal 1.4.2
|
#include "DGtalCatch.h"#include <DGtal/base/Common.h>#include <DGtal/kernel/SpaceND.h>#include <DGtal/kernel/domains/HyperRectDomain.h>#include <DGtal/images/ImageSelector.h>#include <DGtal/io/readers/RawReader.h>#include <DGtal/io/writers/RawWriter.h>#include <DGtal/kernel/domains/Linearizer.h>#include <ConfigTest.h>#include <string>Go to the source code of this file.
Functions | |
| template<typename Image > | |
| void | testImageOnRef (Image const &anImage) |
| template<DGtal::Dimension N> | |
| void | testRawReaderOnRef () |
| template<typename Image > | |
| void | generateRefImage (Image &anImage, typename Image::Value aSeed) |
| template<DGtal::Dimension N, typename T , template< typename > class RawIO> | |
| void | testWriteAndRead (T aSeed) |
| TEST_CASE ("Checking RawReader with reference files in 2D", "[reader][2D][raw][raw32][uint32]") | |
| TEST_CASE ("Checking RawReader with reference files in 3D", "[reader][3D][raw][raw32][uint32]") | |
| TEST_CASE ("Checking writing & reading uint8 in 2D with generic IO", "[reader][writer][2D][raw][uint8]") | |
| TEST_CASE ("Checking writing & reading uint8 in 2D with 8bits IO", "[reader][writer][2D][raw8][uint8]") | |
| TEST_CASE ("Checking writing & reading int8 in 2D with generic IO", "[reader][writer][2D][raw][int8]") | |
| TEST_CASE ("Checking writing & reading uint16 in 2D with generic IO", "[reader][writer][2D][raw][uint16]") | |
| TEST_CASE ("Checking writing & reading uint16 in 2D with 16bits IO", "[reader][writer][2D][raw16][uint16]") | |
| TEST_CASE ("Checking writing & reading int16 in 2D with generic IO", "[reader][writer][2D][raw][int16]") | |
| TEST_CASE ("Checking writing & reading uint32 in 2D with generic IO", "[reader][writer][2D][raw][uint32]") | |
| TEST_CASE ("Checking writing & reading uint32 in 2D with 32bits IO", "[reader][writer][2D][raw32][uint32]") | |
| TEST_CASE ("Checking writing & reading int32 in 2D with generic IO", "[reader][writer][2D][raw][int32]") | |
| TEST_CASE ("Checking writing & reading uint64 in 2D with generic IO", "[reader][writer][2D][raw][uint64]") | |
| TEST_CASE ("Checking writing & reading int64 in 2D with generic IO", "[reader][writer][2D][raw][int64]") | |
| TEST_CASE ("Checking writing & reading double in 1D with generic IO", "[reader][writer][1D][raw][double]") | |
| TEST_CASE ("Checking writing & reading double in 2D with generic IO", "[reader][writer][2D][raw][double]") | |
| TEST_CASE ("Checking writing & reading double in 3D with generic IO", "[reader][writer][3D][raw][double]") | |
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Functions for testing class RawReader.
This file is part of the DGtal library.
Definition in file testRawReader.cpp.
| void generateRefImage | ( | Image & | anImage, |
| typename Image::Value | aSeed ) |
Compares an image to a generated data.
| Image | Image type. |
| [out] | anImage | The image. |
| aSeed | Seed for the generator. |
Definition at line 130 of file testRawReader.cpp.
References DGtal::HyperRectDomain< TSpace >::begin(), DGtal::Image< TImageContainer >::domain(), domain, DGtal::HyperRectDomain< TSpace >::end(), and DGtal::Image< TImageContainer >::setValue().
Referenced by testWriteAndRead().
| TEST_CASE | ( | "Checking RawReader with reference files in 2D" | , |
| "" | [reader][2D][raw][raw32][uint32] ) |
Definition at line 246 of file testRawReader.cpp.
References testRawReaderOnRef().
| TEST_CASE | ( | "Checking RawReader with reference files in 3D" | , |
| "" | [reader][3D][raw][raw32][uint32] ) |
Definition at line 251 of file testRawReader.cpp.
References testRawReaderOnRef().
| TEST_CASE | ( | "Checking writing & reading double in 1D with generic IO" | , |
| "" | [reader][writer][1D][raw][double] ) |
Definition at line 316 of file testRawReader.cpp.
References testWriteAndRead().
| TEST_CASE | ( | "Checking writing & reading double in 2D with generic IO" | , |
| "" | [reader][writer][2D][raw][double] ) |
Definition at line 321 of file testRawReader.cpp.
References testWriteAndRead().
| TEST_CASE | ( | "Checking writing & reading double in 3D with generic IO" | , |
| "" | [reader][writer][3D][raw][double] ) |
Definition at line 326 of file testRawReader.cpp.
References testWriteAndRead().
| TEST_CASE | ( | "Checking writing & reading int16 in 2D with generic IO" | , |
| "" | [reader][writer][2D][raw][int16] ) |
Definition at line 283 of file testRawReader.cpp.
References testWriteAndRead().
| TEST_CASE | ( | "Checking writing & reading int32 in 2D with generic IO" | , |
| "" | [reader][writer][2D][raw][int32] ) |
Definition at line 299 of file testRawReader.cpp.
References testWriteAndRead().
| TEST_CASE | ( | "Checking writing & reading int64 in 2D with generic IO" | , |
| "" | [reader][writer][2D][raw][int64] ) |
Definition at line 310 of file testRawReader.cpp.
References testWriteAndRead().
| TEST_CASE | ( | "Checking writing & reading int8 in 2D with generic IO" | , |
| "" | [reader][writer][2D][raw][int8] ) |
Definition at line 267 of file testRawReader.cpp.
References testWriteAndRead().
| TEST_CASE | ( | "Checking writing & reading uint16 in 2D with 16bits IO" | , |
| "" | [reader][writer][2D][raw16][uint16] ) |
Definition at line 278 of file testRawReader.cpp.
References testWriteAndRead().
| TEST_CASE | ( | "Checking writing & reading uint16 in 2D with generic IO" | , |
| "" | [reader][writer][2D][raw][uint16] ) |
Definition at line 273 of file testRawReader.cpp.
References testWriteAndRead().
| TEST_CASE | ( | "Checking writing & reading uint32 in 2D with 32bits IO" | , |
| "" | [reader][writer][2D][raw32][uint32] ) |
Definition at line 294 of file testRawReader.cpp.
References testWriteAndRead().
| TEST_CASE | ( | "Checking writing & reading uint32 in 2D with generic IO" | , |
| "" | [reader][writer][2D][raw][uint32] ) |
Definition at line 289 of file testRawReader.cpp.
References testWriteAndRead().
| TEST_CASE | ( | "Checking writing & reading uint64 in 2D with generic IO" | , |
| "" | [reader][writer][2D][raw][uint64] ) |
Definition at line 305 of file testRawReader.cpp.
References testWriteAndRead().
| TEST_CASE | ( | "Checking writing & reading uint8 in 2D with 8bits IO" | , |
| "" | [reader][writer][2D][raw8][uint8] ) |
Definition at line 262 of file testRawReader.cpp.
References testWriteAndRead().
| TEST_CASE | ( | "Checking writing & reading uint8 in 2D with generic IO" | , |
| "" | [reader][writer][2D][raw][uint8] ) |
Definition at line 257 of file testRawReader.cpp.
References testWriteAndRead().
Compares an image to the reference data.
| Image | Image type. |
| anImage | The image to test. |
Definition at line 62 of file testRawReader.cpp.
References DGtal::HyperRectDomain< TSpace >::begin(), DGtal::Image< TImageContainer >::domain(), domain, DGtal::HyperRectDomain< TSpace >::end(), and REQUIRE().
Referenced by testRawReaderOnRef().
| void testRawReaderOnRef | ( | ) |
Reads and compares a raw file to the reference data.
| N | Dimension of the image. |
Definition at line 93 of file testRawReader.cpp.
References DGtal::RawReader< TImageContainer, TFunctor >::importRaw32(), REQUIRE(), and testImageOnRef().
Referenced by TEST_CASE(), and TEST_CASE().
| void testWriteAndRead | ( | T | aSeed | ) |
Checks reading a previously writed file.
| N | Dimension of the image. |
| T | Value type. |
| RawIO | Class with writer and reader, templated by the image type. |
| aSeed | Seed to generate image values. |
Definition at line 156 of file testRawReader.cpp.
References DGtal::HyperRectDomain< TSpace >::begin(), domain, DGtal::HyperRectDomain< TSpace >::end(), generateRefImage(), refImage(), and REQUIRE().
Referenced by TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), and TEST_CASE().