T-FLASH TENSOR VISUALIZATION IN MEDICAL STUDIO

更新时间:2023-04-27 06:44:02 阅读量: 实用文档 文档下载

说明:文章内容仅供预览,部分内容可能不全。下载后的文档,内容与下面显示的完全一致。下载之前请确认下面内容是否您想要的,是否完整无缺。

Similar NoE Tensor Workshop,Las Palmas,November2006

T-FLASH:TENSOR VISUALIZATION IN MEDICAL STUDIO

J.Wiklund1,V.Nicolas2,P.Rondao Alface2,M.Andersson1and H.Knutsson1

1Link¨o ping University

Department of Biomedical Engineering

Medical Informatics

University Hospital SE-58185Link¨o ping Sweden

{jowi,matsa,knutte}@imt.liu.se

2Universit′e catholique de Louvain

Communications and Remote Sensing Lab.

Place du Levant,2,B-1348Louvain-La-Neuve,Belgium

vincent.nicolas@uclouvain.be,patrice.rondao@uclouvain.be

ABSTRACT

Tensor valued data are frequently used in medical imaging.For a3-dimensional second or-der tensor such data imply at least six degrees of freedom for each voxel.The operators ability to perceive this information is of outmost importance and in many cases a limiting factor for the inter-pretation of the data.In this paper we propose a decomposition of such tensor?elds using the T?ash tensor glyphs that intuitively conveys important tensor features to a human observer.A matlab imple-mentation for visualization of single tensors are described in detail and a VTK/ITK implementation for visualization of tensor?elds have been developed as a Medical Studio component.

1.INTRODUCTION

An ef?cient system development process is crucially dependent on the designers ability to interpret system behavior.In the present case the system output is a tensor?eld and the channel chosen to convey the information is the designers visual system.It is equally important that the information is presented in a way that is easily understood by the end user.In a medical setting it is paramount that the visualization techniques used are able to reduce the complicated tensor?eld information to relevant parameters that are useful in the clinical environment.

Tensor valued image data are frequently used to represent targeted structures in modern medical imaging analysis,e.g.diffusion tensors,strain tensors and local structure tensors.For second order tensors,the by far most common type today,the information stored in each voxel is a3x3tensor for3-dimensional data.In the simple case of symmetric tensors this implies6degrees of freedom (inner dimensions).Vqisualizing such tensor?elds is not a trivial task,showing volume slices of individual tensor components will,for example,not make much sense to a human.The tensor visualization problem is well recognized and a number of approaches have been presented,e.g.[3].

This paper presents new tensor visualization software,including a tensor glyph generator,that we believe to be preferable in many situations.

2.THE TFLASH TENSOR GLYPH

The tensor visualization tool presented in this paper is designed for visualization of2:nd order sym-metric tensor?elds.Normally the tensor?elds are dense.The standard way of decomposing a symmetric second order tensor is

T=λ1e1e T1+λ2e2e T2+λ3e3e T3λ1≥λ2≥λ3

1

Similar NoE Tensor Workshop,Las Palmas,November2006

Fig.1.Left:T?ash tensor glyph forλ1=1.00λ2=0.50λ3=0.25,see text for details.Right: an almost isotropic tensor,λ1=0.67λ2=0.63λ3=0.59

whereλi are the eigenvalues and e i the corresponding eigenvectors.

The glyph is inspired by the traditional decomposition of the(symmetric second order)local structure tensor into three parts,the linear part,T1,the planar part,T2,and the isotropic part,T3 where

T=T1+T2+T3

where

T1=(λ1?λ2)e1e T1

T2=(λ2?λ3)(e1e T1+e2e T2)

T3=λ3(e1e T1+e2e T2+e3e T3)

The tensor glyph is based on a parametric sphere surface rendering.The magnitude of the isotropic part corresponds to the radius of the sphere.The sphere is rendered in green,see?g.1. The poles of the sphere are oriented in the direction of e1and the planar part is visualized as a red spear through the poles where the length of the spear is proportional to the magnitude of T1.The red part of the glyph is generated by expanding the segments of the sphere located around the poles. Finally T2is visualized by an expansion of the two longitudes of the sphere that corresponds to a plane orthogonal e3.This area of the glyph is rendered in yellow,see?g.1.

Since the T?ash glyph is based on ad distorted sphere the visualization becomes very ef?cient and the distinct shape together with the coloring improves the observers ability to perceive the ge-ometry of the glyph from all views.The dif?culties in perceiving the correct geometry using more fundamental glyphs as e.g.an ellipsoid is one of the main reasons for the introduction of the T?ash glyph.

To the right in?g.1another example of the T?ash tensor glyph is shown.The eigenvectors are identical to the left tensor but the distribution of the eigenvalues correspond to a much more isotropic tensor withλ1=0.67λ2=0.63λ3=0.59.For the left tensor in?g.2the planar part,T2,is dominant(λ1=0.95λ2=0.90λ3=0.85).The yellow part is oriented in a direction orthogonal to e3.

As the local structure tensor describes the directed energy distribution the Fourier domain there exists no physical interpretation of an inde?nite local tensor.Negative eigenvalues(λ3<0)may, however,occur due to e.g.phase interference within the?lters in complex or low SNR signal

2

Similar NoE Tensor Workshop,Las Palmas,November2006

Fig.2.Left:Planar part,T2,is dominant,λ1=0.90λ2=0.85λ3=0.35.Right:a negativeλ3 is visualized by a change in color of the isotropic part,λ1=1λ2=0.6λ3=?0.30 neighborhoods.Although this is a relatively rare event it indicates that the second order tensor model is not suf?cient to represent such a neighborhood and it is important to convey this information to the observer of the tensor glyph.

The shape of the T?ash tensor glyph is based on the absolute value of the eigenvalues but a negative sign of the eigenvalues cause a distinct change in the color rendering.In the right part of ?g.2λ1=1λ2=0.6λ3=?0.30which introduce a blue haze in the isotropic part.It would be straight forward to let the sign of the eigenvalues affect the shape of the glyph as well.This would on the other hand make the glyph more dif?cult to interpret and could cause ambiguities in certain views.

3.IMPLEMENTATION AS A MEDICALSTUDIO COMPONENT

MedicalStudio is a crossplatform framework for visualization,interaction and processing of medical images.It is based on popular open source libraries such as VTK for visualization,ITK for image processing,GTKmm for graphical user interface and DCMTK for Dicom compatibility.Intended to be?exible,the implementation allows an easy integration of new components.Mono and multi-modal registration,atlas-based segmentation,3D reconstruction,augmented visualization are some examples of the already available components.

Tensor?eld visualization by T?ash glyphs has been implemented on the basis of the vtkTensor-Glyph class of VTK.Starting from a parameterized sphere primitive,the spear and circle are created by displacing the poles and a meridian in the normal direction according to the eigenvalues(see Fig.

3).The color code is implemented by adding face color attributes.The?nal orientation of the glyph is then obtained through a transform matrix de?ned by the tensor eigenvectors.

The integration into MedicalStudio is done by creating only one graphical component.This component drives the new T?ashGlyphFilter and exposes its parameters to the user,which allows to easily test several con?gurations according to the loaded data.Visualization of the generated glyphs, navigation through the volume,data management,interaction management,...a lot of components are already implemented into MedicalStudio,letting the programmer to concentrate on its main task.

4.RESULT

Figure4represents the T?ash glyph on a phantom regular grid with various eigenvalues sets and slowly varying orientations.This?gure shows the capability of the T?ash to naturally highlight

3

Similar NoE Tensor Workshop,Las Palmas,November2006

Fig.3.A single glyph represented in MedicalStudio

global principal directions as well as to illustrate the various local properties of the tensor data.An illustration of the T?ash glyph on DTI tensor data is represented on Fig.5.

When compared to other glyphs,the T?ash necessitates a very small amount of polygons to be rendered(i.e.as many as the well-known minimalist ellipsoids)while describing as much in-formation as the superquadrics glyph[2].This point facilitates a fast and?uid rendering of the tensor data.However,there is still no objective way to compare tensor visualization tools.Actually, benchmarking tools are strongly needed to test the performances of the state of the art tensor visual-ization techniques.Their performances mainly relate to the psycho-visual ef?cicacy as well as to the rendering ef?ciency.This is an open issue that deserves a common effort of the tensor processing community.

5.CONCLUSION

This paper has presented the T?ash glyph as an ef?cient tool to visualize tensor data.This glyph enables to univocally represent tensor eigenvector directions as well as the relative amplitudes of tensor eigenvalues in a very simple3D model.The generation of the glyph is very simple and fast since it only necessitates the morphing of a very small number of points of a generic sphere.The color code is also simple and clear.This paper has also presented the MedicalStudio platform as well as the easy integration of the T?ash as a component.

4

Similar NoE Tensor Workshop,Las Palmas,November2006

Fig.4.Phantom regular grid illustrating some of the many possible con?gurations of a tensor glyph

Fig.5.T?ash and DTI tensor visualization in MedicalStudio

5

Similar NoE Tensor Workshop,Las Palmas,November2006

A.MATLAB CODE FOR TFLASH

function[ht,hxy,hxz,hyz]=Tflash(Lambda,EigVec,norm)

%[ht,hxy,hxz,hyz]=Tflash(Lambda,EigVec,norm)

%

%Tflash visualizes a symmetric2nd order3dimensional tensor.The

%object consists of three parts corresponding to the eigenvalues.The

%absolute value of the eigenvalues in descending order maps to a

%spear,a disc and a sphere.The orientation of the different parts are %given by the corresponding eigenvectors.For positive eigenvalues the %spear is red,the disc yellow and the sphere green.A negative

%eigenvalue will change the color to hazy purple.

%

%Lambda:Eigenvalues(3component row vector[l1,l2,l3])

%EigVec:Corresponding eigenvectors(3x3matrix[e1;e2;e3])

%norm:normalize with largest eigenvalue

%ht:Handle to tensor shape object

%hxy:Handle to xy-plane object

%hxz:Handle to xy-plane object

%hyz:Handle to xy-plane object

%

%Author:Johan Wiklund,jowi@isy.liu.se

%Department of Medical Engineering

%Link¨o ping University

if nargin?=3

help Tflash

return

end

%Check sign of Lambda

Ls=Lambda>=0;

Lambda=abs(Lambda);

%Normalize EigVec

EigVec=diag(sum(EigVec’.?2+eps).?-0.5)*EigVec;

%Sort in descending order

[Lambda,I]=sort(Lambda,’descend’);

EigVec=EigVec(:,I);

Ls=Ls(I);

N=24;

if norm

L0=1.0;

L1=Lambda(2)/Lambda(1);

L2=Lambda(3)/Lambda(1);

else

L0=Lambda(1);

L1=Lambda(2);

L2=Lambda(3);

6

Similar NoE Tensor Workshop,Las Palmas,November2006 end

if L2==0

L2=eps;

end

gr=[0.950.85 1.0];

%Define colormap

if Ls(3)

csphere=[010];

else

csphere=gr;

end

if Ls(2)

cdiscus=[110];

else

cdiscus=gr;

end

if Ls(1)

cspear=[100];

else

cspear=gr;

end

cgrid=[000];

colormap([csphere;cdiscus;cspear;cgrid]);

%Sphere controlled by L2

[X,Y,Z]=sphere(N);

X=L2*X;

Y=L2*Y;

Z=L2*Z;

%Discus controlled by L1

edge=L1/L2;

long0=1;

long1=N/2+1;

long2=N+1;

X(:,long0)=edge*X(:,long0);

X(:,long1)=edge*X(:,long1);

X(:,long2)=edge*X(:,long2);

Z(:,long0)=edge*Z(:,long0);

Z(:,long1)=edge*Z(:,long1);

Z(:,long2)=edge*Z(:,long2);

%Spear controlled by L0

Z(1,:)=-L0;

Z(N+1,:)=L0;

%Rotate shape

v1=EigVec(:,1)’;

v2=EigVec(:,2)’;

v3=EigVec(:,3)’;

7

Similar NoE Tensor Workshop,Las Palmas,November2006

T=[v2;v3;v1];

NC=[X(:)Y(:)Z(:)]*T;

X=reshape(NC(:,1),N+1,N+1);

Y=reshape(NC(:,2),N+1,N+1);

Z=reshape(NC(:,3),N+1,N+1);

%Set colors

C=zeros([N,N]);

C(:,1)=1;

C(:,N/2)=1;

C(:,N/2+1)=1;

C(:,N)=1;

C(1,:)=2;

C(N,:)=2;

%Double longitudes at discontinuities

C1=N/2;

C2=N/2+1;

C3=N/2+2;

X=[X(:,1:2)X(:,2:C1)X(:,C1:C2)X(:,C2:C3)X(:,C3:N)X(:,N:N+1)]; Y=[Y(:,1:2)Y(:,2:C1)Y(:,C1:C2)Y(:,C2:C3)Y(:,C3:N)Y(:,N:N+1)]; Z=[Z(:,1:2)Z(:,2:C1)Z(:,C1:C2)Z(:,C2:C3)Z(:,C3:N)Z(:,N:N+1)]; C=[C(:,1:2)C(:,2:C1)C(:,C1:C2)C(:,C2:C3)C(:,C3:N)C(:,N)];

%Double latitudes at discontinuities

X=[X(1:2,:);X(2:N,:);X(N:N+1,:)];

Y=[Y(1:2,:);Y(2:N,:);Y(N:N+1,:)];

Z=[Z(1:2,:);Z(2:N,:);Z(N:N+1,:)];

C=[C(1,:);C(1:N,:);C(N,:)];

%Render surface

ht=surf(X,Y,Z,C);

caxis([03]);

set(ht,’FaceLighting’,’phong’)

%set(ht,’EdgeColor’,’none’);

set(ht,’EdgeColor’,cgrid);

%set(ht,’AmbientStrength’,0.5);

%set(ht,’DiffuseStrength’,0.8);

%set(ht,’SpecularStrength’, 1.0);

%set(ht,’SpecularCol\orReflectance’,0.7);

%set(ht,’BackFaceLighting’,’lit’);

%set(ht,’FaceLighting’,’phong’,...

%’EdgeColor’,[0.00.00.0],...

%’AmbientStrength’,0.9,...

%’DiffuseStrength’,0.8,...

%’SpecularStrength’, 1.0,...

%’SpecularColorReflectance’,0.7,...

%’BackFaceLighting’,’lit’);

axis([-11-11-11]);

axis vis3d;

axis off;

8

Similar NoE Tensor Workshop,Las Palmas,November2006

%Render eigenvectors

%v1=1.5*v1;

%v2=1.5*v2;\

%patch([0v1(1)],[0v1(2)],[0v1(3)],[1.0 1.0 1.0]);

%patch([0v2(1)],[0v2(2)],[0v2(3)],[1.0 1.0 1.0]);

%Render coordinate axis

as=0.95;

aw=0.01;

vert1=[-1.0 1.0as as as as]’;

vert2=[0.00.0aw aw-aw-aw]’;

vert3=[0.00.0aw-aw-aw aw]’;

faces=[122;234;245;256;263];

%X-axis

hx=patch(’Vertices’,[vert1vert2vert3],’Faces’,faces,’FaceColor’,[000]); set(hx,’LineWidth’, 1.0);

%Y-axis

hy=patch(’Vertices’,[vert2vert1vert3],’Faces’,faces,’FaceColor’,[000]); set(hy,’LineWidth’, 1.0);

%Z-axis

hz=patch(’Vertices’,[vert2vert3vert1],’Faces’,faces,’FaceColor’,[000]); set(hz,’LineWidth’, 1.0);

%Labels

text(1.1,0,0,’\bf X’,’HorizontalAlignment’,’Center’);

text(0, 1.1,0,’\bf Y’,’HorizontalAlignment’,’Center’);

text(0,0, 1.1,’\bf Z’,’HorizontalAlignment’,’Center’);

%Axis planes

hold on

coord=[-1:0.1:1]’*ones(1,21);

zc=zeros([21,21]);

C=3*ones([21,21]Tflash(L,E));

%XY plane

X=coord;

Y=coord’;

Z=zc;

%Check matlab version

verstr=version;

ver=str2num(verstr(1:3));

if ver<6

hxy=mesh(X,Y,Z,C);

set(hxy,’Visible’,’off’);

%XZ plane

hxz=mesh(X,Z,Y,C);

set(hxz,’Visible’,’off’);

%YZ plane

hyz=mesh(Z,X,Y,C);

9

Similar NoE Tensor Workshop,Las Palmas,November2006

set(hyz,’Visible’,’off’);

else

hxy=mesh(X,Y,Z,C);

set(hxy,’Visible’,’off’,’FaceAlpha’,0.5,’EdgeAlpha’,0.5);

%XZ plane

hxz=mesh(X,Z,Y,C);

set(hxz,’Visible’,’off’,’FaceAlpha’,0.5,’EdgeAlpha’,0.5);

%YZ plane

hyz=mesh(Z,X,Y,C);

set(hyz,’Visible’,’off’,’FaceAlpha’,0.5,’EdgeAlpha’,0.5); end

hold off

%Camera properties

camproj(’perspective’);

camva(7);

%Light!

l1=light(’Position’,v3);

l2=light(’Position’,-v3);

rotate3d on;

B.REFERENCES

[1]G.H.Granlund and H.Knutsson.Signal Processing for Computer Vision.Kluwer Academic

Publishers,1995.ISBN0-7923-9530-1.

[2]Gordon Kindlmann.Superquadric tensor glyphs.In Proceeding of The Joint Eurographics-

IEEE TCVG Symposium on Visualization,pages147–154,May2004.

[3]Gordon Kindlmann.Visualization and Analysis of Diffusion Tensor Fields.PhD thesis,Univer-

sity of Utah,2004.

[4]H.Knutsson.Representing local structure using tensors.In The6th Scandinavian Conference

on Image Analysis,pages244–251,Oulu,Finland,June1989.Report LiTH–ISY–I–1019,Com-puter Vision Laboratory,Link¨o ping University,Sweden,1989.

[5]V.Nicolas and B.Macq.Medical Studio.d35742d076eeaeaad1f330a8.

10

本文来源:https://www.bwwdw.com/article/9grq.html

Top