X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vv%2FvvSlicer.cxx;h=6b52ea1abc1e7b5f737946df19c1e2748bc7cf64;hb=6f9b6f5da142c3c2e7c8a2ff8d0a517b90b240d3;hp=74f2fc570fa9e160d84b68b0d9171d061fce1ae5;hpb=a79509f4d3341ffe986a70aed2bd4565b3c416e7;p=clitk.git diff --git a/vv/vvSlicer.cxx b/vv/vvSlicer.cxx index 74f2fc5..6b52ea1 100644 --- a/vv/vvSlicer.cxx +++ b/vv/vvSlicer.cxx @@ -98,22 +98,6 @@ vvSlicer::vvSlicer() mVFColor[1] = 1; mVFColor[2] = 0; - std::string text = "F1 = sagital; F2 = coronal; F3 = axial\n"; - text += "F5 = horizontal flip; F6 = vertical flip\n\n"; - text += "0,1,2,3,4,5 : preset windowing\n"; - text += "6,7,8,9 : preset colormap\n"; - text += "z : local windowing\n"; - text += "r : reset view\n"; - text += "l : reload image\n"; - text += "f : fly to mouse position\n"; - text += "g : go to cross hair position\n\n"; - text += "Up,down : change slice\n"; - text += "Left,right : change tenporal slice\n\n"; - text += "Scrollbar (or w/x) : zoom in/out\n"; - text += "left button : synchronize all views\n"; - text += "middle button : grab image\n"; - text += "right button : change windowing\n"; - crossCursor = vtkSmartPointer::New(); crossCursor->AllOff(); crossCursor->AxesOn(); @@ -172,7 +156,7 @@ vvBlendImageActor* vvSlicer::GetOverlayActor() //------------------------------------------------------------------------------ -vtkImageMapToWindowLevelColors* vvSlicer::GetFusionMapper() +vtkImageMapToColors* vvSlicer::GetFusionMapper() { return mFusionMapper.GetPointer(); } @@ -408,7 +392,14 @@ void vvSlicer::SetFusion(vvImage::Pointer fusion) mFusionReslice->SetInput(0, mFusion->GetFirstVTKImageData()); if (!mFusionMapper) - mFusionMapper = vtkSmartPointer::New(); + mFusionMapper = vtkSmartPointer::New(); + + vtkSmartPointer lut = vtkLookupTable::New(); + lut->SetRange(0, 1); + lut->SetValueRange(0, 1); + lut->SetSaturationRange(0, 0); + lut->Build(); + mFusionMapper->SetLookupTable(lut); mFusionMapper->SetInput(mFusionReslice->GetOutput()); if (!mFusionActor) { @@ -786,6 +777,7 @@ void vvSlicer::AdjustResliceToSliceOrientation(vtkImageReslice *reslice) reslice->SetOutputOrigin(origin); reslice->SetOutputSpacing(spacing); reslice->UpdateInformation(); + reslice->GetOutput()->UpdateInformation(); } //------------------------------------------------------------------------------ @@ -829,8 +821,8 @@ void vvSlicer::UpdateDisplayExtent() // Overlay image actor if (mOverlay && mOverlayActor->GetVisibility()) { + AdjustResliceToSliceOrientation(mOverlayReslice); int overExtent[6]; - mOverlayReslice->GetOutput()->UpdateInformation(); this->ConvertImageToImageDisplayExtent(input, w_ext, mOverlayReslice->GetOutput(), overExtent); ClipDisplayedExtent(overExtent, mOverlayMapper->GetInput()->GetWholeExtent()); mOverlayActor->SetDisplayExtent( overExtent ); @@ -838,8 +830,8 @@ void vvSlicer::UpdateDisplayExtent() // Fusion image actor if (mFusion && mFusionActor->GetVisibility()) { + AdjustResliceToSliceOrientation(mFusionReslice); int fusExtent[6]; - mFusionReslice->GetOutput()->UpdateInformation(); this->ConvertImageToImageDisplayExtent(input, w_ext, mFusionReslice->GetOutput(), fusExtent); ClipDisplayedExtent(fusExtent, mFusionMapper->GetInput()->GetWholeExtent()); mFusionActor->SetDisplayExtent(fusExtent);