Hello,
I have a DICOM visualization using my kind of four pane view. Initially I used vtkImageViewer2, but wanted to show reslice cursor, so moved to vtkResliceImageViewer. After processing I want to select certain voxels with specified color (hard-coded red for now), so I’m setting custom lookup table:
imageViewer->GetWindowLevel()->SetOutputFormatToRGB();
auto lut = vtkLookupTable::New();
lut->SetAboveRangeColor(1, 0, 0, 1);
lut->SetUseAboveRangeColor(true);
lut->SetHueRange(0, 0);
lut->SetSaturationRange(0, 0);
lut->SetRange(SHRT_MIN, SHRT_MAX - 1); // leave the max value for selection
lut->Build();
imageViewer->GetWindowLevel()->SetLookupTable(lut);
The code worked for vtkImageViewer2, but is not working for vtkResliceImageViewer. Just as it would not use color above range.
I’m also using following code for sharing cursor between 3 projections view:
cbk = vtkSmartPointer<vtkResliceCursorCallback>::New();
for (int i = 0; i < 3; i++)
{
vtkResliceCursorLineRepresentation* rep =
vtkResliceCursorLineRepresentation::SafeDownCast(
riw[i]->GetResliceCursorWidget()->GetRepresentation());
riw[i]->SetResliceCursor(riw[0]->GetResliceCursor());
rep->GetResliceCursorActor()->
GetCursorAlgorithm()->SetReslicePlaneNormal(i);
cbk->RCW[i] = riw[i]->GetResliceCursorWidget();
riw[i]->GetResliceCursorWidget()->AddObserver(vtkResliceCursorWidget::ResliceAxesChangedEvent, cbk);
riw[i]->GetResliceCursorWidget()->AddObserver(vtkResliceCursorWidget::WindowLevelEvent, cbk);
riw[i]->GetResliceCursorWidget()->AddObserver(vtkResliceCursorWidget::ResliceThicknessChangedEvent, cbk);
riw[i]->GetResliceCursorWidget()->AddObserver(vtkResliceCursorWidget::ResetCursorEvent, cbk);
riw[i]->GetResliceCursorWidget()->SetEnabled(1);
}
riw[0]->GetResliceCursor()->SetThickness(1, 1, 1);
riw[0]->GetResliceCursor()->SetHole(0);
Any help would be appreciated!