[Insight-users] pass an ITK pointer to a Qt pointer
john smith
mkitkinsightuser at gmail.com
Thu Jun 16 09:04:04 EDT 2011
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20110616/e7005624/attachment.htm>
More information about the Insight-users
mailing list