[IGSTK-Users] Re: Problems visualizing Differents DICOM sets

Patrick Cheng cheng at isis.georgetown.edu
Wed May 3 14:44:00 EDT 2006


Hi Manuel,

I have tried your code, and the problem is:
For View2D, you need to specify a viewing orientation so that it will 
know what to put the camera.

After Line 99 in your viewerGUI.cxx code, you need add a line like:
   Display->RequestSetOrientation( igstk::View2D::Axial);

Also notice that, it's better to call
   Display->RequestResetCamera();
After
   Display->RequestAddObject( representation );

The way VTK reset camera works is, it put the camera in a proper 
position that will accommodate all actors in the scene. So you have add 
the representation to the Display first, and then call RequestResetCamera.

so from the line 99, you code should look like:

   Display->RequestSetOrientation( igstk::View2D::Axial);
   Display->RequestEnableInteractions();
   Display->RequestAddObject( representation );
   Display->RequestResetCamera();
   Display->Update();

This should solve your problem.

Patrick

	

Manuel Ricardo Galindo Moreno wrote:
> Hello Patrick,
> 
> I've been stuck for while with a visualizing problem, the only DICOM set 
> that partially works is the E000192(CT), found in the testing directory 
> of IGSTK. Only in the Axial view i can visualize different slices (only 
> 5 slices, 0 to 4), in the others views i can't navigate through the 
> slices and the visualization is stuck in one image.
> 
> Apparently in every DICOM set i use (others than E000192), they are 
> opened correctly because the logger shows the correct name, modality, 
> etc. But it does not visualize anything in the igstk::View2D display. 
> The vtk logger does not show any error either.
> 
> My porgram is based on the test 
> "igstkCTImageSpatialObjectReadingAndRepresentationTest", and i am using 
> the release-7 (not cvs).
> 
> I attach my code. In viewerGUI.cxx the function igstk_declarations() 
> there are all the lines corresponding to the readers, spatial objects, etc.
> 
> I hope you could help me. Thanks
> 
> Manuel
> 



More information about the IGSTK-Users mailing list