[vtkusers] correction of spacing

Bartosz Wiklak bwiklak at gmail.com
Tue Nov 25 02:24:35 EST 2008


> Plug a vtkImageChangeInformation object into your pipeline right after your reader. It'll look something like:

> vtkImageChangeInformation *changer = vtkImageChangeInformation::New();
> changer->SetOutputSpacing(xSpacing, ySpacing, zSpacing);
> changer->SetInputConnection(reader->GetOutputPort());
> ...
> vtkImageReslice *reslice = vtkImageReslice::New();
> reslice->SetInputConnection(changer->GetOutputPort());

> Hope that helps,

Yes, that is what I needed!

I find it quite confusing that SetSpacing does not work as I (new
user) expected.
I don't thing this is gdcm issue, it has nothing to do with dicom. Of
course it would be better if the reader had proper spacing at the
beginning.

This question was stated several times on vtk forum and I did not
found the wright answer.
Maybe this case should be stretch out on some FAQ?


Thank you all for help.

Bartosz Wiklak


On Tue, Nov 25, 2008 at 5:56 AM, Dean Inglis <dean.inglis at sympatico.ca> wrote:
> you are using a class from gdcm, not VTK.
>
> You should post to that user's list first.
>
>
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Dean Inglis, PhD
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> ~~~~ Center for Appendicular ~~~~~
>
> Magnetic Resonance Imaging Studies
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> 610 - 25 Charlton Ave. E.
>
> Hamilton, Ontario, L8N 1Y2
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Assistant Professor (Adjunct)
>
> Department of Civil Engineering
>
> McMaster University
>
> Hamilton, Ontario
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Software Demos:
>
> http://www.youtube.com/watch?v=_zYNtHC9-0s
>
>
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>



More information about the vtkusers mailing list