DGtal  1.3.beta
Functions
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.

Functions

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

Author
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
Date
2017/12/30

Functions for testing class MagickWriter.

This file is part of the DGtal library.

Definition in file testMagickWriter.cpp.

Function Documentation

◆ TEST_CASE()

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  }
61 
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 }

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

image
Image image(domain)
DGtal::HyperRectDomain< Space >
DGtal::ImageContainerBySTLVector
Definition: ImageContainerBySTLVector.h:126
DGtal::HueShadeColorMap
Aim: This class template may be used to (linearly) convert scalar values in a given range into a colo...
Definition: HueShadeColorMap.h:90
REQUIRE
REQUIRE(domain.isInside(aPoint))
Image
ImageContainerBySTLVector< Domain, Value > Image
Definition: testSimpleRandomAccessRangeFromPoint.cpp:45
DGtal::MagickWriter
Aim: Export image using Imagemagick backend.
Definition: MagickWriter.h:93
DGtal::Image
Aim: implements association bewteen points lying in a digital domain and values.
Definition: Image.h:69
domain
Domain domain
Definition: testProjection.cpp:88
SECTION
SECTION("Testing constant forward iterators")
Definition: testSimpleRandomAccessRangeFromPoint.cpp:66
Point
MyPointD Point
Definition: testClone2.cpp:383