MITK-IGT
IGT Extension of MITK
Toggle main menu visibility
Main Page
Related Pages
Topics
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
m
n
o
p
s
t
u
Functions
Variables
Typedefs
Enumerations
Enumerator
a
b
e
f
h
i
m
n
o
s
t
u
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
~
Variables
_
a
b
c
d
e
f
h
i
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Typedefs
b
c
d
e
f
h
i
k
l
m
n
o
p
q
r
s
t
u
v
Enumerations
a
b
d
e
f
h
i
m
n
o
p
r
s
t
v
w
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Related Symbols
Files
File List
File Members
All
_
a
b
c
d
e
f
g
i
j
l
m
o
p
r
s
t
u
v
w
Functions
a
c
d
f
g
j
m
o
r
s
w
Variables
c
e
g
l
m
p
t
Typedefs
b
c
i
l
m
o
t
u
v
Enumerations
Enumerator
Macros
_
a
b
c
e
f
g
i
m
o
p
r
s
t
Examples
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
Loading...
Searching...
No Matches
mitkUSImage.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 (DKFZ)
6
All rights reserved.
7
8
Use of this source code is governed by a 3-clause BSD license that can be
9
found in the LICENSE file.
10
11
============================================================================*/
12
13
#include "
mitkUSImage.h
"
14
#include <mitkStringProperty.h>
15
#include <mitkProperties.h>
16
#include <mitkImageReadAccessor.h>
17
18
19
mitk::USImage::USImage
() :
mitk
::Image()
20
{
21
this->
SetMetadata
(mitk::USImageMetadata::New());
22
}
19
mitk::USImage::USImage
() :
mitk
::Image() {
…
}
23
24
mitk::USImage::USImage
(mitk::Image::Pointer image) :
mitk
::Image()
25
{
26
try
27
{
28
this->Initialize(image);
29
mitk::ImageReadAccessor imgA(image, image->GetVolumeData(0));
30
this->SetVolume(imgA.GetData());
31
}
32
catch
(mitk::Exception& e)
33
{
34
mitkReThrow(e) <<
"Cannot access image data while constructing US image"
;
35
}
36
}
24
mitk::USImage::USImage
(mitk::Image::Pointer image) :
mitk
::Image() {
…
}
37
38
mitk::USImage::~USImage
()
39
{
40
41
}
38
mitk::USImage::~USImage
() {
…
}
42
43
mitk::USImageMetadata::Pointer
mitk::USImage::GetMetadata
()
const
{
44
mitk::USImageMetadata::Pointer result = mitk::USImageMetadata::New();
45
46
result->SetDeviceManufacturer(this->GetProperty(
mitk::USImageMetadata::PROP_DEV_MANUFACTURER
)->GetValueAsString());
47
result->SetDeviceModel( this->GetProperty(
mitk::USImageMetadata::PROP_DEV_MODEL
)->GetValueAsString());
48
result->SetDeviceComment( this->GetProperty(
mitk::USImageMetadata::PROP_DEV_COMMENT
)->GetValueAsString());
49
result->SetDeviceIsVideoOnly( this->GetProperty(
mitk::USImageMetadata::PROP_DEV_ISVIDEOONLY
));
50
result->SetDeviceIsCalibrated(this->GetProperty(
mitk::USImageMetadata::PROP_DEV_ISCALIBRATED
));
51
result->SetProbeName( this->GetProperty(
mitk::USImageMetadata::PROP_PROBE_NAME
)->GetValueAsString());
52
result->SetProbeFrequency( this->GetProperty(
mitk::USImageMetadata::PROP_PROBE_FREQUENCY
)->GetValueAsString());
53
result->SetZoom( this->GetProperty(
mitk::USImageMetadata::PROP_ZOOM
)->GetValueAsString());
54
55
return
result;
56
}
43
mitk::USImageMetadata::Pointer
mitk::USImage::GetMetadata
()
const
{
…
}
57
58
59
void
mitk::USImage::SetMetadata
(mitk::USImageMetadata::Pointer metadata){
60
this->SetProperty(
mitk::USImageMetadata::PROP_DEV_MANUFACTURER
, mitk::StringProperty::New(metadata->GetDeviceManufacturer()));
61
this->SetProperty(
mitk::USImageMetadata::PROP_DEV_MODEL
, mitk::StringProperty::New(metadata->GetDeviceModel()));
62
this->SetProperty(
mitk::USImageMetadata::PROP_DEV_COMMENT
, mitk::StringProperty::New(metadata->GetDeviceComment()));
63
this->SetProperty(
mitk::USImageMetadata::PROP_DEV_ISVIDEOONLY
, mitk::BoolProperty::New(metadata->GetDeviceIsVideoOnly()));
64
this->SetProperty(
mitk::USImageMetadata::PROP_DEV_ISCALIBRATED
, mitk::BoolProperty::New(metadata->GetDeviceIsCalibrated()));
65
this->SetProperty(
mitk::USImageMetadata::PROP_PROBE_NAME
, mitk::StringProperty::New(metadata->GetProbeName()));
66
this->SetProperty(
mitk::USImageMetadata::PROP_PROBE_FREQUENCY
, mitk::StringProperty::New(metadata->GetProbeFrequency()));
67
this->SetProperty(
mitk::USImageMetadata::PROP_ZOOM
, mitk::StringProperty::New(metadata->GetZoom()));
68
}
59
void
mitk::USImage::SetMetadata
(mitk::USImageMetadata::Pointer metadata) {
…
}
69
mitk::USImageMetadata::PROP_DEV_ISVIDEOONLY
static const char * PROP_DEV_ISVIDEOONLY
Definition
mitkUSImageMetadata.h:61
mitk::USImageMetadata::PROP_PROBE_NAME
static const char * PROP_PROBE_NAME
Definition
mitkUSImageMetadata.h:63
mitk::USImageMetadata::PROP_DEV_MODEL
static const char * PROP_DEV_MODEL
Definition
mitkUSImageMetadata.h:59
mitk::USImageMetadata::PROP_DEV_ISCALIBRATED
static const char * PROP_DEV_ISCALIBRATED
Definition
mitkUSImageMetadata.h:62
mitk::USImageMetadata::PROP_ZOOM
static const char * PROP_ZOOM
Definition
mitkUSImageMetadata.h:65
mitk::USImageMetadata::PROP_PROBE_FREQUENCY
static const char * PROP_PROBE_FREQUENCY
Definition
mitkUSImageMetadata.h:64
mitk::USImageMetadata::PROP_DEV_MANUFACTURER
static const char * PROP_DEV_MANUFACTURER
Definition
mitkUSImageMetadata.h:58
mitk::USImageMetadata::PROP_DEV_COMMENT
static const char * PROP_DEV_COMMENT
Definition
mitkUSImageMetadata.h:60
mitk::USImage::USImage
USImage()
This constructor creates an empty USImage. The Metadata are set to default.
Definition
mitkUSImage.cpp:19
mitk::USImage::SetMetadata
void SetMetadata(mitk::USImageMetadata::Pointer metadata)
Writes the information of the metadata object into the image's properties.
Definition
mitkUSImage.cpp:59
mitk::USImage::GetMetadata
mitk::USImageMetadata::Pointer GetMetadata() const
Reads out this image's Metadata set from the properties and returns a corresponding USImageMetadata o...
Definition
mitkUSImage.cpp:43
mitk::USImage::~USImage
~USImage() override
Definition
mitkUSImage.cpp:38
mitkUSImage.h
mitk
IGT Exceptions.
Definition
mitkAlgorithm.h:16
Modules
US
USModel
mitkUSImage.cpp
Generated by
1.12.0