DGtal  1.2.0
testMagickWriter.cpp File Reference
#include <iostream>
#include "DGtal/base/Common.h"
#include "ConfigTest.h"
#include "DGtalCatch.h"
#include "DGtal/helpers/StdDefs.h"
#include "DGtal/io/writers/MagickWriter.h"
#include "DGtal/images/ImageContainerBySTLVector.h"
#include "DGtal/io/colormaps/HueShadeColorMap.h"
Include dependency graph for testMagickWriter.cpp:

Go to the source code of this file.


 TEST_CASE ("Testing MagickWriter")

Detailed Description

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/.

David Coeurjolly (david.nosp@m..coe.nosp@m.urjol.nosp@m.ly@l.nosp@m.iris..nosp@m.cnrs.nosp@m..fr ) Laboratoire d'InfoRmatique en Image et Systemes d'information - LIRIS (CNRS, UMR 5205), CNRS, France

Functions for testing class MagickWriter.

This file is part of the DGtal library.

Definition in file testMagickWriter.cpp.

Function Documentation


TEST_CASE ( "Testing MagickWriter )

Definition at line 48 of file testMagickWriter.cpp.

49 {
50  //Create an image
51  Domain domain(Point(0,0), Point(64,48));
54  unsigned char t=0;
55  for(auto p: image.domain())
56  {
57  image.setValue(p, t);
58  t = ((int)t + 1)%255;
59  }
62  SECTION("Testing feature io/writers/ of MagickWriter")
63  {
64  REQUIRE(( MagickWriter<Image,HueShadeColorMap<unsigned char,2>>::exportMagick("magickwriter.png", image, cmap ) ));
65  REQUIRE(( MagickWriter<Image,HueShadeColorMap<unsigned char,2>>::exportMagick("magickwriter.jpg", image, cmap ) ));
66  REQUIRE(( MagickWriter<Image,HueShadeColorMap<unsigned char,2>>::exportMagick("magickwriter.gif", image, cmap ) ));
67  REQUIRE(( MagickWriter<Image,HueShadeColorMap<unsigned char,2>>::exportMagick("magickwriter.bmp", image, cmap ) ));
68  }
69 }
Aim: This class template may be used to (linearly) convert scalar values in a given range into a colo...
Aim: implements association bewteen points lying in a digital domain and values.
Definition: Image.h:70
Aim: Export image using Imagemagick backend.
Definition: MagickWriter.h:94
MyPointD Point
Definition: testClone2.cpp:383
Domain domain
Image image(domain)
ImageContainerBySTLVector< Domain, Value > Image
SECTION("Testing constant forward iterators")

References domain, image(), REQUIRE(), and SECTION().