Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
VTK
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
430
Issues
430
List
Boards
Labels
Milestones
Merge Requests
109
Merge Requests
109
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
VTK
VTK
Commits
895449f1
Commit
895449f1
authored
Dec 03, 2019
by
Ken Martin
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update protected ivar to avoid dll issues
dll linkage issues with ivar, made pointer instead
parent
1c35d1ae
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
27 deletions
+30
-27
Utilities/DICOMParser/DICOMAppHelper.cxx
Utilities/DICOMParser/DICOMAppHelper.cxx
+29
-26
Utilities/DICOMParser/DICOMAppHelper.h
Utilities/DICOMParser/DICOMAppHelper.h
+1
-1
No files found.
Utilities/DICOMParser/DICOMAppHelper.cxx
View file @
895449f1
...
...
@@ -90,6 +90,8 @@ struct gt_pair_float_string
DICOMAppHelper
::
DICOMAppHelper
()
{
this
->
HeaderFile
=
new
dicom_stream
::
ofstream
();
this
->
BitsAllocated
=
8
;
this
->
ByteSwapData
=
false
;
this
->
PixelSpacing
[
0
]
=
this
->
PixelSpacing
[
1
]
=
this
->
PixelSpacing
[
2
]
=
1.0
;
...
...
@@ -136,7 +138,8 @@ DICOMAppHelper::~DICOMAppHelper()
{
this
->
Clear
();
this
->
HeaderFile
.
close
();
this
->
HeaderFile
->
close
();
delete
this
->
HeaderFile
;
//
// Fix warning here.
...
...
@@ -372,26 +375,26 @@ void DICOMAppHelper::ArrayCallback(DICOMParser* parser, doublebyte group, double
char
ct2
=
static_cast
<
char
>
(
t2
);
char
ct1
=
static_cast
<
char
>
(
t1
);
HeaderFile
<<
"(0x"
;
*
this
->
HeaderFile
<<
"(0x"
;
HeaderFile
.
width
(
4
);
char
prev
=
HeaderFile
.
fill
(
'0'
);
this
->
HeaderFile
->
width
(
4
);
char
prev
=
this
->
HeaderFile
->
fill
(
'0'
);
HeaderFile
<<
dicom_stream
::
hex
<<
group
;
HeaderFile
<<
",0x"
;
*
this
->
HeaderFile
<<
dicom_stream
::
hex
<<
group
;
*
this
->
HeaderFile
<<
",0x"
;
HeaderFile
.
width
(
4
);
HeaderFile
.
fill
(
'0'
);
this
->
HeaderFile
->
width
(
4
);
this
->
HeaderFile
->
fill
(
'0'
);
HeaderFile
<<
dicom_stream
::
hex
<<
element
;
HeaderFile
<<
") "
;
*
this
->
HeaderFile
<<
dicom_stream
::
hex
<<
element
;
*
this
->
HeaderFile
<<
") "
;
HeaderFile
.
fill
(
prev
);
HeaderFile
<<
dicom_stream
::
dec
;
HeaderFile
<<
" "
<<
ct1
<<
ct2
<<
" "
;
HeaderFile
<<
"["
<<
len
<<
" bytes] "
;
this
->
HeaderFile
->
fill
(
prev
);
*
this
->
HeaderFile
<<
dicom_stream
::
dec
;
*
this
->
HeaderFile
<<
" "
<<
ct1
<<
ct2
<<
" "
;
*
this
->
HeaderFile
<<
"["
<<
len
<<
" bytes] "
;
HeaderFile
<<
desc
<<
" : "
;
*
this
->
HeaderFile
<<
desc
<<
" : "
;
unsigned
int
uival
=
0
;
float
fval
=
0
;
...
...
@@ -421,48 +424,48 @@ void DICOMAppHelper::ArrayCallback(DICOMParser* parser, doublebyte group, double
case
DICOMParser
:
:
VR_SQ
:
// sequence
case
DICOMParser
:
:
VR_SH
:
// strings
case
DICOMParser
:
:
VR_IS
:
HeaderFile
<<
val
;
*
this
->
HeaderFile
<<
val
;
break
;
case
DICOMParser
:
:
VR_FL
:
// float
fval
=
static_cast
<
float
>
(
atof
(
reinterpret_cast
<
char
*>
(
val
)));
HeaderFile
<<
fval
;
*
this
->
HeaderFile
<<
fval
;
break
;
case
DICOMParser
:
:
VR_FD
:
// float double
dval
=
static_cast
<
double
>
(
atof
(
reinterpret_cast
<
char
*>
(
val
)));
HeaderFile
<<
dval
;
*
this
->
HeaderFile
<<
dval
;
break
;
case
DICOMParser
:
:
VR_UL
:
// unsigned long
case
DICOMParser
:
:
VR_SL
:
// signed long
case
DICOMParser
:
:
VR_AT
:
HeaderFile
<<
uival
;
*
this
->
HeaderFile
<<
uival
;
break
;
// case DICOMParser::VR_IS:
// ival = DICOMFile::ReturnAsSignedLong(val,
// parser->GetDICOMFile()->GetPlatformIsBigEndian()); HeaderFile << ival; break;
// parser->GetDICOMFile()->GetPlatformIsBigEndian());
this->
HeaderFile << ival; break;
case
DICOMParser
:
:
VR_SS
:
ival
=
DICOMFile
::
ReturnAsSignedShort
(
val
,
parser
->
GetDICOMFile
()
->
GetPlatformIsBigEndian
());
HeaderFile
<<
ival
;
*
this
->
HeaderFile
<<
ival
;
break
;
case
DICOMParser
:
:
VR_US
:
// unsigned short
uival
=
DICOMFile
::
ReturnAsUnsignedShort
(
val
,
parser
->
GetDICOMFile
()
->
GetPlatformIsBigEndian
());
HeaderFile
<<
uival
;
*
this
->
HeaderFile
<<
uival
;
break
;
case
DICOMParser
:
:
VR_UNKNOWN
:
case
DICOMParser
:
:
VR_AW
:
default:
HeaderFile
<<
val
<<
dicom_stream
::
endl
;
*
this
->
HeaderFile
<<
val
<<
dicom_stream
::
endl
;
break
;
}
}
else
{
HeaderFile
<<
"NULL"
;
*
this
->
HeaderFile
<<
"NULL"
;
}
HeaderFile
<<
dicom_stream
::
dec
<<
dicom_stream
::
endl
;
HeaderFile
.
fill
(
prev
);
*
this
->
HeaderFile
<<
dicom_stream
::
dec
<<
dicom_stream
::
endl
;
this
->
HeaderFile
->
fill
(
prev
);
delete
[]
val
;
}
...
...
Utilities/DICOMParser/DICOMAppHelper.h
View file @
895449f1
...
...
@@ -356,7 +356,7 @@ protected:
typedef
dicom_stl
::
map
<
dicom_stl
::
pair
<
doublebyte
,
doublebyte
>
,
DICOMTagInfo
>
TagMapType
;
// TagMapType TagMap;
dicom_stream
::
ofstream
HeaderFile
;
dicom_stream
::
ofstream
*
HeaderFile
;
// 0 unsigned
// 1 2s complement (signed)
...
...
Ken Martin
@ken-martin
mentioned in commit
b3cb2825
·
Dec 03, 2019
mentioned in commit
b3cb2825
mentioned in commit b3cb2825a4f119938cc6d5a47ec2be39407cf3d3
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment