[ITK-users] QVtkWidget beginner questions

Matt McCormick matt.mccormick at kitware.com
Wed Aug 31 10:16:38 EDT 2016


Hello Ibraheem,

Welcome to ITK :-)

Please see comments inline below.

On Wed, Aug 31, 2016 at 3:01 AM, Ibraheem via Insight-users
<insight-users at itk.org> wrote:
> Dear all,
> I am writing some ITK examples while learning it following different
> tutorials . I have Ubuntu 14.04. I build these tools from the source: ITK
> 4.10, VTK 7.0, QT5.7 and CMake 3.6.1
> In example 2, I wrote a simple GUI application that read a DICOM volume from
> a folder, displays it in a QVtkWidget, thresholds the slice and displays it
> in another QVtkWidget. Save the resulted thresholded volume in a new folder.
> I had some problems that I was able to solve like the dark output and the
> flipping, see the bellow code comments.


Excellent. Thanks for sharing your efforts!


> My questions:
>   1- Is there a way to filter and write all the images at once instead of
> using the for loop?

To write to an image series in general, there is an itk::ImageSeriesWriter.


>   2- Writing the way I did make the output volume lost some origin
> information i.e value, 0,0 . What did I do wrong?

Writing DICOMs (correctly) is currently a very tricky endeavour. There
are currently some experiments underway to make this easier. However,
until that time, it is recommended to use another format, like
MetaImage, for writing files.


>   3- I read some posts about using QVtkWidget2 and  QVtkWidget3 but I
> couldn't find them in my vtk build, is there some options I missed when I
> built vtk?
>   4- How can I display a specific plane instead of the axial slices e.g.
> display a coronal slice.
>   5- How can I get the voxel information when I point in the QVTkWidget? I
> am not sure if the mapping I used is correct.

These questions are welcome, but the VTK mailing list is a better
place to discuss these issues.


Matt


More information about the Insight-users mailing list