[Insight-users] pass an ITK pointer to a Qt pointer

robert tamburo robert.tamburo at gmail.com
Thu Jun 16 09:39:10 EDT 2011


This may be of some help to you:
http://www.itk.org/pipermail/insight-users/2008-May/025755.html

There is also a QtImageViewer in InsightApplications/Auxiliary that might
help.

On Thu, Jun 16, 2011 at 9:04 AM, john smith <mkitkinsightuser at gmail.com>wrote:

> Hello to all,
>
> In my application I am using ITK and Qt to create my Gui and display the
> results.I want to ask something that may be easy. I have created a pointer
> of ITK which includes the raw data of my image
>
>      ReaderType::Pointer reader = ReaderType::New();
>      reader->SetFileName(fileName.toStdString());
>
>       //get the size of image
>   reader->Update();
>   InputImageType::RegionType inputRegion =
>          reader->GetOutput()->GetLargestPossibleRegion();
>
>   InputImageType::SizeType size = inputRegion.GetSize();
>
>   // get the size of the hole 3D image
>    size_x = size[0];
>    size_y = size[1];
>
> InputImageType::Pointer image = reader->GetOutput();
>
> Now I want to pass this pointer to a pointer of Qt, which is responsible
> for displaying my image.But I do not want to use Get and Set pixel, but to
> use contents and address of memory.
>
> QImage *image_Qt = new QImage;
>
> I want to ask how could this be done. I hope somone could help me as I am
> confused.
>
> Thanks in advance
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20110616/2859ef50/attachment.htm>


More information about the Insight-users mailing list