[Insight-users] Slice extraction in multiple axis

Wagner Sales wsales at gmail.com
Fri Dec 14 11:08:01 EST 2007


Hi Luis,

1 - I'm using PNG format to save.
2 - I'm using QImage from Qt (and I don't have other option by some project
issues). For more details: I'm just extracting the slice and creating a
QImage with the width and height that's are achieved from the
GetLargestPossibleRegion().GetSize() on the extracted slice. After that, I'm
using an image iterator to access the pixels populates the QImage.

B) You are using an image viewer that does not take pixel
    spacing into account.
    Yes, this image viewer or the approach aren't taking pixel spacing in
account. But, if I'm using VTK ( vtkImageReslice ) to extract slices, I can
set the output spacing and the interpolation algorithm that's will be used.
I think that's are a visualization task, but think that's are more safe if
I'll use an algorithm or approach from the toolkit, and not just "stretch"
the image by Qt ways. Then, have some approach using filters inside the
toolkit (like VTK does) that's take in account the spacing values and
returns to me an image that's I don't be care about spacing values? Of
course, this image will be used only for visualization, and the original
image will be intact to other processing tasks, like segmentation or
registration.

Thank's in advance,

Wagner Sales

2007/12/13, Luis Ibanez <luis.ibanez at kitware.com>:
>
>
> Hi Wagner,
>
> Two Questions:
>
>
> 1) What fileformat did you used for saving the slice images ?
>
> 2) What image viewer (software) are you using to display these
>     resulting slice image files ?
>
>
>
> It is very likely that:
>
>
> A) you choose to save the image in a file format that does not
>     support pixel spacing (e.g. PNG, JPEG...)
>
> and/or
>
> B) You are using an image viewer that does not take pixel
>     spacing into account.
>
>
> As a verification, in your slice extraction code you can
> add the call:
>
>
>    extractFilter->Update();
>    std::cout << "Input volume characteristics" << std::endl;
>    extractFilter->GetInput()->Print( std::cout );
>    std::cout << "Output slice characteristics" << std::endl;
>    extractFilter->GetOutput()->Print( std::cout );
>
>
> and with this output you should be able to verify if the
> original spacing of the image was respected on every slice.
>
>
> Please let us know your answers to questions (1) and (2).
>
>
>     Thanks
>
>
>         Luis
>
> ------------------
> Wagner Sales wrote:
> > Hi all,
> >
> > I'm extracting slices from DICOM datasets em multiple axis (X, Y, Z) by
> > using the ExtractImageFilter.
> > The code are really simple, and based on the example provided in ITK
> > Software Guide.
> > The slices in Z orientation (transversal) are fine, but the other axis (
> > X and Y ) appears to be not ok. This axis have an aspect little bit
> > compressed.
> > I was saved this images by using the ImageWriter to be sure that's not a
> > problem in visualization, and the problems occurs too.
> > I'm attaching a screen shot of the tree axis to illustrate this.
> > Can anyone helps me?
> >
> > Thks in advance,
> >
> > Wagner Sales
> > ------------------------------------------------------------------------
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Insight-users mailing list
> > Insight-users at itk.org
> > http://www.itk.org/mailman/listinfo/insight-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20071214/7dcda5a7/attachment.htm


More information about the Insight-users mailing list