[vtkusers] Different 3D View
Marco Dev
marco.dev.open at gmail.com
Thu Jul 30 04:42:11 EDT 2015
Hi dears,
why we have different 3D view from reading .mhd file or reading dicom files
through FixedPointVolumeRayCastMapperCT
for example :
dicom reader --> vtkDICOMImageReader *dicomReader = vtkDICOMImageReader::
New();
dicomReader->SetDirectoryName(dirname);
dicomReader->Update();
input=dicomReader->GetOutput();
reader=dicomReader;
.
.
..
colorFun->AddRGBPoint( -3024, 0, 0, 0, 0.5, 0.0 );
colorFun->AddRGBPoint( -1000, .62, .36, .18, 0.5, 0.0 );
colorFun->AddRGBPoint( -500, .88, .60, .29, 0.33, 0.45 );
colorFun->AddRGBPoint( 3071, .83, .66, 1, 0.5, 0.0 );
opacityFun->AddPoint(-3024, 0, 0.5, 0.0 );
opacityFun->AddPoint(-1000, 0, 0.5, 0.0 );
opacityFun->AddPoint(-500, 1.0, 0.33, 0.45 );
opacityFun->AddPoint(3071, 1.0, 0.5, 0.0);
mapper->SetBlendModeToComposite();
property->ShadeOn();
property->SetAmbient(0.1);
property->SetDiffuse(0.9);
property->SetSpecular(0.2);
property->SetSpecularPower(10.0);
property->SetScalarOpacityUnitDistance(0.8919);
===========================================================
mhd reader -- >
vtkMetaImageReader *metaReader = vtkMetaImageReader::New();
metaReader->SetFileName(fileName);
metaReader->Update();
input=metaReader->GetOutput();
reader=metaReader;
.
.
.
.
.
colorFun->AddRGBPoint( -3024, 0, 0, 0, 0.5, 0.0 );
colorFun->AddRGBPoint( -1000, .62, .36, .18, 0.5, 0.0 );
colorFun->AddRGBPoint( -500, .88, .60, .29, 0.33, 0.45 );
colorFun->AddRGBPoint( 3071, .83, .66, 1, 0.5, 0.0 );
opacityFun->AddPoint(-3024, 0, 0.5, 0.0 );
opacityFun->AddPoint(-1000, 0, 0.5, 0.0 );
opacityFun->AddPoint(-500, 1.0, 0.33, 0.45 );
opacityFun->AddPoint(3071, 1.0, 0.5, 0.0);
mapper->SetBlendModeToComposite();
property->ShadeOn();
property->SetAmbient(0.1);
property->SetDiffuse(0.9);
property->SetSpecular(0.2);
property->SetSpecularPower(10.0);
property->SetScalarOpacityUnitDistance(0.8919);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20150730/10451c4c/attachment.html>
More information about the vtkusers
mailing list