Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VTK
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
NikitaKolebaev
VTK
Commits
700649df
Commit
700649df
authored
1 month ago
by
Ben Boeckel
Browse files
Options
Downloads
Patches
Plain Diff
vtkHDFUtilities: support `char` as unsigned
parent
ad3c8e73
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
IO/HDF/vtkHDFUtilities.cxx
+6
-0
6 additions, 0 deletions
IO/HDF/vtkHDFUtilities.cxx
IO/HDF/vtkHDFUtilities.txx
+4
-0
4 additions, 0 deletions
IO/HDF/vtkHDFUtilities.txx
IO/HDF/vtkHDFWriterImplementation.cxx
+2
-1
2 additions, 1 deletion
IO/HDF/vtkHDFWriterImplementation.cxx
with
12 additions
and
1 deletion
IO/HDF/vtkHDFUtilities.cxx
+
6
−
0
View file @
700649df
...
...
@@ -12,6 +12,7 @@
#include
"vtkLongArray.h"
#include
"vtkLongLongArray.h"
#include
"vtkShortArray.h"
#include
"vtkSignedCharArray.h"
#include
"vtkStringArray.h"
#include
"vtkUnsignedCharArray.h"
#include
"vtkUnsignedIntArray.h"
...
...
@@ -82,6 +83,10 @@ vtkDataArray* NewVtkDataArray()
{
return
vtkCharArray
::
New
();
}
else
if
(
std
::
is_same
<
T
,
signed
char
>::
value
)
{
return
vtkSignedCharArray
::
New
();
}
else
if
(
std
::
is_same
<
T
,
unsigned
char
>::
value
)
{
return
vtkUnsignedCharArray
::
New
();
...
...
@@ -227,6 +232,7 @@ using TypeReaderMap = std::map<::TypeDescription, ArrayReader*>;
::
TypeReaderMap
readerMap
;
readerMap
[
::
GetTypeDescription
(
H5T_NATIVE_CHAR
)]
=
&::
NewArray
<
char
>
;
readerMap
[
::
GetTypeDescription
(
H5T_NATIVE_SCHAR
)]
=
&::
NewArray
<
signed
char
>
;
readerMap
[
::
GetTypeDescription
(
H5T_NATIVE_UCHAR
)]
=
&::
NewArray
<
unsigned
char
>
;
readerMap
[
::
GetTypeDescription
(
H5T_NATIVE_SHORT
)]
=
&::
NewArray
<
short
>
;
readerMap
[
::
GetTypeDescription
(
H5T_NATIVE_USHORT
)]
=
&::
NewArray
<
unsigned
short
>
;
...
...
This diff is collapsed.
Click to expand it.
IO/HDF/vtkHDFUtilities.txx
+
4
−
0
View file @
700649df
...
...
@@ -107,6 +107,10 @@ hid_t vtkHDFUtilities::TemplateTypeToHdfNativeType()
{
return H5T_NATIVE_CHAR;
}
if (std::is_same<T, signed char>::value)
{
return H5T_NATIVE_SCHAR;
}
else if (std::is_same<T, unsigned char>::value)
{
return H5T_NATIVE_UCHAR;
...
...
This diff is collapsed.
Click to expand it.
IO/HDF/vtkHDFWriterImplementation.cxx
+
2
−
1
View file @
700649df
...
...
@@ -1243,7 +1243,8 @@ hsize_t vtkHDFWriter::Implementation::GetSubfileNumberOf(
std
::
vector
<
hsize_t
>
start
{
static_cast
<
unsigned
long
>
(
part
)
},
count
{
1
},
result
{
0
};
int
dimension
=
1
;
if
(
this
->
HdfType
==
"PolyData"
&&
primitive
!=
(
char
)
0xff
)
constexpr
char
INVALID_PRIMITIVE
=
0xff
;
if
(
this
->
HdfType
==
"PolyData"
&&
primitive
!=
INVALID_PRIMITIVE
)
{
start
.
emplace_back
(
static_cast
<
hsize_t
>
(
primitive
));
count
.
emplace_back
(
1
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment