[vtkusers] Problem with vtkImageAppend
Bill Lorensen
bill.lorensen at gmail.com
Sat Sep 12 13:29:02 EDT 2009
vtk uses a graphics convention (y=0 is lower left) for the vertical
axis, while DICOM uses an imaging convention (y=0 is upper left). You
will need to flip your images horizontally before you do the append.
Also, be aware that VTK does not take into account the direction
cosines stored in the DICOM file.
Bill
On Sat, Sep 12, 2009 at 1:14 PM, Sven Olaf Lüttmann
<sven at svenluettmann.de> wrote:
> Hey guys,
>
> I'm reading DICOM images into a std::vector of vtkImageData to apply
> some image processing.
>
> Now I like to take those images stored in the vector and append them
> using vtkImageAppend to get an 3D Image (Volume data).
>
> The problem that occurred is, when I apply visualisation Techniques like
> ray casting my volume is mirrored along the y-Axis. So everything is
> just inverted.
>
> As far as figured out the source must be the vtkImageAppend cause if I
> use vtkDICOMImageReader for instance everything works just fine.
>
> My Code looks like:
>
> if(!this->imageAppend)
> this->imageAppend = vtkSmartPointer<vtkImageAppend>::New();
>
> this->imageAppend->SetAppendAxis(2);
>
> for(int i=0; i < this->vtkImageSeriesContainer.size(); i++)
> {
> this->imageAppend->SetInput(i, this->vtkImageSeriesContainer.at(i));
> }
> this->imageAppend->Update();
>
> Any ideas on that???
>
> Thanks for help
>
> Cheers
> Sven
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK 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