[IGSTK-Users] Visualizing CT Image
Patrick Cheng
cheng at isis.georgetown.edu
Tue Jun 3 12:05:18 EDT 2008
Hi Chris,
You need to connect the View and ImageSpatialObject in a scene graph
tree, so the View knows where the image is.
http://public.kitware.com/IGSTKWIKI/index.php/Needle_Biopsy#How_to_connect_the_scene_graph
Please take a look at the above example.
Patrick
Chris Heath wrote:
> Hello all,
>
> I am having trouble visualizing a CT Image and I am not sure what I'm
> doing wrong:
>
> First I add an observer to my CT Image Reader Object:
>
> m_ImageReader->AddObserver(igstk::CTImageReader::ImageModifiedEvent(),m_CTImageObserver);
>
>
> Then, I read the CT Image:
> m_ImageReader->RequestSetDirectory( directoryName );
> m_ImageReader->RequestReadImage();
> m_ImageReader->RequestGetImage();
>
> Then, I create my spatial object and attach it to my spatial object
> representation:
> m_CTImageSpatialObject = m_CTImageObserver->GetCTImage();
>
> m_CTImageSpatialObjectRepresentation->RequestSetImageSpatialObject(
> m_ImageSpatialObject );
>
> Then I add my igst2DView object to my fltk widget (Fl_box)
> this->DisplayCTWidget->RequestSetView( ctView );
>
> Then I add my image representation to my view
> ctView->RequestRemoveObject( m_CTImageSpatialObjectRepresentation );
> ctView->RequestAddObject( m_CTImageSpatialObjectRepresentation );
>
> Finally, I set my slice number using the get slice bounds method from
> "FourViewsTrackingWithCT.cxx"
> m_CTImageSpatialObjectRepresentation->RequestSetSliceNumber(
> slice );
>
> My log contains no errors, my CT image is being succesfully read (I can
> view patient name, and my slider sets the correct bounds on the number
> of slices) but I don't see any image. What am I missing? Any help
> would be appreciated.
>
> Thanks,
> Chris Heath
>
>
>
> Christopher C. Heath
> Vanderbilt University School of Engineering
> christopher.c.heath at vanderbilt.edu
> _______________________________________________
> IGSTK-Users mailing list
> IGSTK-Users at public.kitware.com
> http://public.kitware.com/cgi-bin/mailman/listinfo/igstk-users
>
>
More information about the IGSTK-Users
mailing list