[vtkusers] Axies image planes

Luca Picello luca.picello at libero.it
Mon May 31 15:59:02 EDT 2004


Thanks Dean.
This code looks familiar to me. I adapted only vtkImageMapToColors and 
vtkImageActor classes but the result is the one you can see in the 
screenshot!!!
It seems I cant have any result for this (beep)problem.
Black bar is here again....

Full code is, where vtkBorlandRenderWindow1 is hidden and 
vtkBorlandRenderWindow2 is the window in attachment:

  vtkRenderer* ren11 = vtkBorlandRenderWindow1->GetRenderer();
  vtkRenderer* ren12 = vtkBorlandRenderWindow2->GetRenderer();

  planeWidgetX->SetInput(v16->GetOutput());
  planeWidgetX->SetInteractor( vtkBorlandRenderWindow1->GetInteractor() );
  planeWidgetX->SetPlaneOrientationToXAxes();
  planeWidgetX->SetSliceIndex( TrackBarX->Position );
  planeWidgetX->TextureInterpolateOff();
  planeWidgetX->SetResliceInterpolateToNearestNeighbour();
  planeWidgetX->SetKeyPressActivationValue('x');
  planeWidgetX->GetPlaneProperty()->SetColor(1,0,0);
  planeWidgetX->DisplayTextOff();
  planeWidgetX->Off();

  vtkImageMapToColors* colorMap1 = vtkImageMapToColors::New();
  colorMap1->PassAlphaToOutputOff();
  colorMap1->SetActiveComponent(0);
  colorMap1->SetOutputFormatToLuminance();
  colorMap1->SetInput(planeWidgetX->GetResliceOutput());

  planeWidgetX->SetLookupTable(0);
  colorMap1->SetLookupTable(planeWidgetX->GetLookupTable());

  vtkImageActor* imageActor = vtkImageActor::New();
  imageActor->SetInput(colorMap1->GetOutput());

  ren11->ResetCamera();

  ren12->AddActor( imageActor );
  ren12->ResetCamera();

It seems the dimension of the area is not referred to 
SetPlaneOrientationToXAxes but to SetPlaneOrientationToZAxes !!!
Possible?
I added a trackbar where I update planeWidgetX->WindowLevel and it seems 
it changes all the image (including the black bar) and it makes me think 
it is related to planeWidgetX data.

Luca




dean.inglis at camris.ca wrote:

>Luca,
>
>here is an earlier post of mine, perhaps you
>can look further in the relevant thread...
>
>http://public.kitware.com/pipermail/vtkusers/2003-March/041527.html
>
>Dean
>
>_______________________________________________
>This is the private VTK discussion list. 
>Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
>Follow this link to subscribe/unsubscribe:
>http://www.vtk.org/mailman/listinfo/vtkusers
>.
>
>  
>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: DCCCCCCCCCCCCCC.JPG
Type: image/jpeg
Size: 3543 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20040531/79d1ee12/attachment.jpeg>


More information about the vtkusers mailing list