[vtkusers] A VTK Bug

JohnMark zhaojunxp at hotmail.com
Wed Oct 10 06:18:33 EDT 2007


hello , vtk users and developers , 
    
    I find a vtk BUG now . and the bug is just as follows :
    I use VC++ and VTK to show a dcm image . and I build a project , its base class is CFormView . and 
then I use vtkDICOMImageReader and vtkImageViewer2 to show the image in an Picture of MFC . but here 
is the bug :
    all of my code are just : 
vtkDICOMImageReader * reader = vtkDICOMImageReader::New();
    reader->SetDataByteOrderToLittleEndian();
    reader->SetFileName("D:/Data");
    reader->Update();
vtkImageViewer2 * viewer = vtkImageViewer::New();
    viewer->SetInput(reader->GetOutput());
    viewer->SetSlice(0);
 
    and then I run it , I find the dcm image appears ! however , the dcm image is not in the Picture 
of MFC , but in a vtk render window . how surprising ! because I do not use the function Render ! at 
the same time , if I use vtkImageViewer , it will be OK . 
    So , I want to ask : is this a vtk BUG ? or vtkImageViewer2 can not show the dcm image ? but from 
the description of this class , we can see : vtkImageViewer2 is a convenience class for displaying a 
2D image . or this class is not perfect and we can not use this class now ?
    if this is not a bug , why does this happen ? and what is wrong with my code ? how can I use this 
class correctly ?
 
    thank you for any help !
 
    Mark
 
 
  
 
 
_________________________________________________________________
用 Live Search 搜尽天下资讯!
http://www.live.com/?searchOnly=true
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20071010/b3897b62/attachment.htm>


More information about the vtkusers mailing list