Orfeo Toolbox
3.16
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
OTB
Utilities
ITK
Code
Common
itkDirectory.cxx
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Insight Segmentation & Registration Toolkit
4
Module: $RCSfile: itkDirectory.cxx,v $
5
Language: C++
6
Date: $Date: 2008-10-07 09:09:39 $
7
Version: $Revision: 1.29 $
8
9
Copyright (c) Insight Software Consortium. All rights reserved.
10
See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
11
12
This software is distributed WITHOUT ANY WARRANTY; without even
13
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14
PURPOSE. See the above copyright notices for more information.
15
16
=========================================================================*/
17
#include "
itkDirectory.h
"
18
19
namespace
itk
20
{
21
25
Directory::Directory
()
26
{
27
m_Internal
=
new
itksys::Directory
;
28
}
29
33
Directory::~Directory
()
34
{
35
delete
m_Internal
;
36
}
37
41
void
Directory::PrintSelf
(std::ostream& os,
Indent
indent)
const
42
{
43
Superclass::PrintSelf
(os, indent);
44
os << indent <<
"Directory for: "
<<
m_Internal
->GetPath() <<
"\n"
;
45
os << indent <<
"Contains the following files:\n"
;
46
indent = indent.
GetNextIndent
();
47
unsigned
long
numFiles =
m_Internal
->GetNumberOfFiles();
48
for
(
unsigned
long
i = 0; i < numFiles; ++i)
49
{
50
os << indent <<
m_Internal
->GetFile(i) <<
"\n"
;
51
}
52
}
56
bool
Directory::Load
(
const
char
* dir)
57
{
58
return
m_Internal
->Load(dir);
59
}
60
64
std::vector<std::string>::size_type
Directory::GetNumberOfFiles
()
65
{
66
return
m_Internal
->GetNumberOfFiles();
67
}
68
72
const
char
*
Directory::GetFile
(
unsigned
int
index)
73
{
74
return
m_Internal
->GetFile(index);
75
}
76
77
}
// end namespace itk
Generated at Sat Feb 2 2013 23:35:26 for
Orfeo Toolbox
with
doxygen 1.8.1.1