Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
Home
Manual
API Reference
Download
Bugzilla
Groups
Namespace List
Class List
File List
Examples
File List
File Members
mitkBaseDataSerializer.cpp
Go to the documentation of this file.
1
/*===================================================================
2
3
The Medical Imaging Interaction Toolkit (MITK)
4
5
Copyright (c) German Cancer Research Center,
6
Division of Medical and Biological Informatics.
7
All rights reserved.
8
9
This software is distributed WITHOUT ANY WARRANTY; without
10
even the implied warranty of MERCHANTABILITY or FITNESS FOR
11
A PARTICULAR PURPOSE.
12
13
See LICENSE.txt or http://www.mitk.org for details.
14
15
===================================================================*/
16
17
#include "
mitkBaseDataSerializer.h
"
18
#include "
mitkStandardFileLocations.h
"
19
#include <itksys/SystemTools.hxx>
20
21
mitk::BaseDataSerializer::BaseDataSerializer
() : m_FilenameHint(
"unnamed"
), m_WorkingDirectory(
""
)
22
{
23
}
24
25
mitk::BaseDataSerializer::~BaseDataSerializer
()
26
{
27
}
28
29
std::string
mitk::BaseDataSerializer::Serialize
()
30
{
31
MITK_INFO
<< this->GetNameOfClass() <<
" is asked to serialize an object "
<< (
const
void
*)this->m_Data
32
<<
" into a directory "
<< m_WorkingDirectory <<
" using a filename hint "
<< m_FilenameHint;
33
34
return
""
;
35
}
36
37
std::string
mitk::BaseDataSerializer::GetUniqueFilenameInWorkingDirectory
()
38
{
39
// tmpname
40
static
unsigned
long
count = 0;
41
unsigned
long
n = count++;
42
std::ostringstream name;
43
for
(
int
i = 0; i < 6; ++i)
44
{
45
name << char(
'a'
+ (n % 26));
46
n /= 26;
47
}
48
std::string myname;
49
myname.append(name.str());
50
return
myname;
51
}
mitkStandardFileLocations.h
MITK_INFO
#define MITK_INFO
Definition:
mitkLogMacros.h:22
mitk::BaseDataSerializer::GetUniqueFilenameInWorkingDirectory
std::string GetUniqueFilenameInWorkingDirectory()
Definition:
mitkBaseDataSerializer.cpp:37
mitk::BaseDataSerializer::~BaseDataSerializer
virtual ~BaseDataSerializer()
Definition:
mitkBaseDataSerializer.cpp:25
mitk::BaseDataSerializer::BaseDataSerializer
BaseDataSerializer()
Definition:
mitkBaseDataSerializer.cpp:21
mitkBaseDataSerializer.h
mitk::BaseDataSerializer::Serialize
virtual std::string Serialize()
Serializes given BaseData object.
Definition:
mitkBaseDataSerializer.cpp:29
git
MITK
Modules
SceneSerializationBase
src
mitkBaseDataSerializer.cpp
Generated on Fri Feb 3 2017 20:51:53 for Medical Imaging Interaction Toolkit by
1.8.9.1