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
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor 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
Alex W.
VTK
Commits
a70fdae4
Commit
a70fdae4
authored
11 years ago
by
Dave DeMarle
Browse files
Options
Downloads
Plain Diff
Merge branch 'fix-image-append-rel' into release
Change-Id: I8233c8cbb425523d774d32032956e767b64524a5
parents
227749cb
710ce99d
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Filters/Core/vtkImageAppend.cxx
+39
-25
39 additions, 25 deletions
Filters/Core/vtkImageAppend.cxx
with
39 additions
and
25 deletions
Filters/Core/vtkImageAppend.cxx
+
39
−
25
View file @
a70fdae4
...
...
@@ -418,35 +418,49 @@ void vtkImageAppend::InitOutput(int outExt[6], vtkImageData *outData)
int
typeSize
;
unsigned
char
*
outPtrZ
,
*
outPtrY
;
// This method needs to clear all point-data for the update-extent.
//TODO: This only bzero's the point scalars, other arrays should probably be
//cleared too.
typeSize
=
outData
->
GetScalarSize
();
outPtrZ
=
static_cast
<
unsigned
char
*>
(
outData
->
GetScalarPointerForExtent
(
outExt
));
// Get increments to march through data
outData
->
GetIncrements
(
outIncX
,
outIncY
,
outIncZ
);
outIncX
*=
typeSize
;
outIncY
*=
typeSize
;
outIncZ
*=
typeSize
;
// Find the region to loop over
rowLength
=
(
outExt
[
1
]
-
outExt
[
0
]
+
1
)
*
outData
->
GetNumberOfScalarComponents
();
rowLength
*=
typeSize
;
maxY
=
outExt
[
3
]
-
outExt
[
2
];
maxZ
=
outExt
[
5
]
-
outExt
[
4
];
// Loop through input pixels
for
(
idxZ
=
0
;
idxZ
<=
maxZ
;
idxZ
++
)
vtkPointData
*
pd
=
outData
->
GetPointData
();
for
(
int
arrayIdx
=
0
;
arrayIdx
<
pd
->
GetNumberOfArrays
();
arrayIdx
++
)
{
outPtrY
=
outPtrZ
;
for
(
idxY
=
0
;
idxY
<=
maxY
;
idxY
++
)
vtkDataArray
*
array
=
pd
->
GetArray
(
arrayIdx
)
;
if
(
!
array
)
{
memset
(
outPtrY
,
0
,
rowLength
);
outPtrY
+=
outIncY
;
continue
;
}
typeSize
=
vtkDataArray
::
GetDataTypeSize
(
array
->
GetDataType
());
outPtrZ
=
static_cast
<
unsigned
char
*>
(
outData
->
GetArrayPointerForExtent
(
array
,
outExt
));
// Get increments to march through data
vtkIdType
increments
[
3
];
outData
->
GetArrayIncrements
(
array
,
increments
);
outIncX
=
increments
[
0
];
outIncY
=
increments
[
1
];
outIncZ
=
increments
[
2
];
outIncX
*=
typeSize
;
outIncY
*=
typeSize
;
outIncZ
*=
typeSize
;
// Find the region to loop over
rowLength
=
(
outExt
[
1
]
-
outExt
[
0
]
+
1
)
*
array
->
GetNumberOfComponents
();
rowLength
*=
typeSize
;
maxY
=
outExt
[
3
]
-
outExt
[
2
];
maxZ
=
outExt
[
5
]
-
outExt
[
4
];
// Loop through input pixels
for
(
idxZ
=
0
;
idxZ
<=
maxZ
;
idxZ
++
)
{
outPtrY
=
outPtrZ
;
for
(
idxY
=
0
;
idxY
<=
maxY
;
idxY
++
)
{
memset
(
outPtrY
,
0
,
rowLength
);
outPtrY
+=
outIncY
;
}
outPtrZ
+=
outIncZ
;
}
outPtrZ
+=
outIncZ
;
}
}
...
...
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