View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0013448VTK(No Category)public2012-09-12 05:512013-04-06 15:34
ReporterDominik Szczerba 
Assigned ToDavid Gobbi 
PriorityurgentSeverityminorReproducibilityhave not tried
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version5.10.1 
Summary0013448: vtkMetaImageWriter does not respect image spacing and always outputs 1/1/1
DescriptionvtkMetaImageWriter does not respect image spacing and always outputs 1/1/1
TagsNo tags attached.
ProjectTBD
Typeincorrect functionality
Attached Files

 Relationships

  Notes
(0029189)
Cory Quammen (developer)
2012-09-12 09:25

I'm currently using vtkMetaImageWriter in a project and it does output the correct image spacing. Could you provide a code sample that demonstrates the bug you are observing?
(0029190)
Dominik Szczerba (reporter)
2012-09-12 14:46
edited on: 2012-09-12 14:47

Hmmm if I create an artificial example then the spacing is indeed saved properly.
My case is as follows:

vox = vtkMyFilter()
# ...
vox.Update()

image = vox.GetOutput()
print image.GetSpacing()
writer = vtk.vtkMetaImageWriter()
writer.SetFileName(filename2)
writer.SetCompression(1)
writer.SetInput(image)
writer.Write()

image.GetSpacing reports correct spacing, but the one saved into the mhd file is always 1/1/1. If I replace the writer with the vtkXMLImageDataWriter then the spacing written in the vti file is correct. Please advise how to narrow down the hunt.

Dominik

(0029191)
Cory Quammen (developer)
2012-09-12 15:20

I'm using VTK from master. From your code sample, I can see you are using an older version of VTK. Perhaps there was a bug fixed between versions.

Could you try a new version of VTK and see if the error persists?
(0029192)
Dominik Szczerba (reporter)
2012-09-12 15:33

I am using the latest release version 5.10.0.
(0030378)
David Gobbi (developer)
2013-02-24 19:29

This was probably fixed by commit 1dfe95d3 on Oct 11, 2012, which is in the 5.10.1 release.
Can the original reporter try VTK 5.10.1 to see if the issue is resolved?
(0030538)
David Gobbi (developer)
2013-04-06 15:34

Closing because there has been no response from the original reporter and I believe that the problem has been fixed.

 Issue History
Date Modified Username Field Change
2012-09-12 05:51 Dominik Szczerba New Issue
2012-09-12 09:25 Cory Quammen Note Added: 0029189
2012-09-12 14:46 Dominik Szczerba Note Added: 0029190
2012-09-12 14:47 Dominik Szczerba Note Edited: 0029190
2012-09-12 15:20 Cory Quammen Note Added: 0029191
2012-09-12 15:33 Dominik Szczerba Note Added: 0029192
2013-02-24 19:19 David Gobbi Assigned To => David Gobbi
2013-02-24 19:19 David Gobbi Status backlog => tabled
2013-02-24 19:29 David Gobbi Note Added: 0030378
2013-04-06 15:34 David Gobbi Note Added: 0030538
2013-04-06 15:34 David Gobbi Status tabled => closed
2013-04-06 15:34 David Gobbi Resolution open => fixed
2013-04-06 15:34 David Gobbi Fixed in Version => 5.10.1


Copyright © 2000 - 2018 MantisBT Team