[ITK Community] [Insight-users] Problem using itk::Image
Kent Ogden
ogdenk at upstate.edu
Tue Mar 4 14:34:46 EST 2014
All,
I am trying to do something simple that is not working, I think this may be very simple but I'm stuck at the moment. I would like to create an itk::Image to store the results of a segmentation, so that I can change the seed point and re-run the segmentation without losing the initial results. I am using the DeepCopy example to create a copy of the segmentation filter output, this seems to work OK.
I run into problems when I try to use that image as input to a quickview object. A modified version of the Quickview demo will illustrate the problem:
#include "QuickView.h"
int main(int argc, char *argv[])
{
typedef itk::Image< short, 2> ImageType;
typedef itk::ImageFileReader<ImageType> ReaderType;
ReaderType::Pointer reader = ReaderType::New();
reader->SetFileName("d:\\CTChest.dcm");
ImageType::Pointer image = reader->GetOutput();
QuickView viewer;
viewer.AddImage(image);
viewer.Visualize();
return EXIT_SUCCESS;
}
This will not compile, the error is at the viewer.AddImage() line and says
"could not deduce template argument for 'TImage *' from 'itk::SmartPointer<TObjectType>'
Can someone explain this to me, and is there a way around this? Thanks . . .
Kent
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20140304/f31a4d95/attachment-0002.html>
-------------- next part --------------
_____________________________________
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.php
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
More information about the Community
mailing list