DGtal  0.9.3
testHyperRectDomain-snippet.cpp File Reference
#include <algorithm>
#include <iterator>
#include <iostream>
#include <DGtal/kernel/SpaceND.h>
#include <DGtal/kernel/domains/HyperRectDomain.h>
Include dependency graph for testHyperRectDomain-snippet.cpp:

Go to the source code of this file.

int main ()

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

Date
2010/05/25

This file is part of the DGtal library

Definition in file testHyperRectDomain-snippet.cpp.

## ◆ main()

 int main ( )

Definition at line 42 of file testHyperRectDomain-snippet.cpp.

43 {
44  //We create a digital Space based on 'int' integers and in dimension 4
45  typedef DGtal::SpaceND<4> Space4D;
46  typedef Space4D::Point Point4D;
47
48  const Space4D::Integer rawA[ ] = { 1, 2, 3 ,4};
49  const Space4D::Integer rawB[ ] = { 4, 4, 5 ,5};
50  Point4D A ( rawA );
51  Point4D B ( rawB );
52
53  //Domain construction from two points
54  HyperRectDomain<Space4D> myDomain ( A, B );
55
56  //We just iterate on the Domain points and print out the point coordinates.
57  std::copy ( myDomain.begin(),
58  myDomain.end(),
59  std::ostream_iterator<Point4D> ( std::cout, " " ) );
60 }
Aim: SpaceND is a utility class that defines the fundamental structure of a Digital Space in ND...
Definition: SpaceND.h:95
Aim: Parallelepidec region of a digital space, model of a &#39;CDomain&#39;.
MyPointD Point
Definition: testClone2.cpp:383