[Insight-users] Problems in rendering 3D volume data in VTK using ITK Image3D type

Jihoon Jeong jijeong at usc.edu
Mon, 23 Feb 2004 21:10:44 -0800


This is a multi-part message in MIME format.

--Boundary_(ID_oSVa4sZ1uONmB+RikJciAg)
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT

Hi ! folks,

 

Recently, I tried connecting ITK + VTK stuffs.

I completed successful examples using ITK Image3D type in rendering 2D
slices in vtkImageViewer.

But, I failed to render 3D volumes in VTK using same data. Compile and link
has no problem.

 

I got following messages from VTK output windows. 

 

ERROR: In vtkVolumeRayCastMapper.cxx, line 328

vtkOpenGLVolumeRayCastMapper (01BBB678): Cannot volume render data of type
unsigned int, only unsigned char or unsigned short.

 

Followings are code snippets.

 

#include "itkImageFileReader.h"

#include "itkImageToVTKImageFilter.h"

.

 

#include "vtkRenderer.h"

#include "vtkRenderWindow.h"

.

 

int main (int argc, char **argv ) {

typedef itk::Image<unsigned int,3>                  Image3DType;

  typedef itk::ImageToVTKImageFilter<Image3DType>    ConnectorType;

  

  itk::NumericSeriesFileNames::Pointer fileIter =
itk::NumericSeriesFileNames::New();

    fileIter->SetStartIndex(1);

    fileIter->SetEndIndex(107);

    fileIter->SetIncrementIndex(1);

    fileIter->SetSeriesFormat("1%03d.dcm");

 

  itk::ImageSeriesReader<Image3DType>::Pointer reader =
itk::ImageSeriesReader<Image3DType>::New();

    reader->SetFileNames(fileIter->GetFileNames());

  

  try {

        reader->Update();

  }

  catch (itk::ExceptionObject & err) {

    std::cout << "ExceptionObject caught !" << std::endl;

    std::cout << err << std::endl;

    return -1;

  }

 

  ConnectorType::Pointer connector = ConnectorType::New();

    connector->SetInput(reader->GetOutput());

 

  vtkRenderer* renderer = vtkRenderer::New();

  vtkRenderWindow* renWin = vtkRenderWindow::New();

    renWin->AddRenderer(renderer);

  vtkRenderWindowInteractor* iren = vtkRenderWindowInteractor::New();

    iren->SetRenderWindow(renWin);

 

  // Create transfer mapping scalar value to opacity

  vtkPiecewiseFunction* opacityTransferFunction =
vtkPiecewiseFunction::New();

        opacityTransferFunction->AddPoint(20.0, 0.0);

        opacityTransferFunction->AddPoint(255.0, 0.2);

 

  // The property describes how the data will look

  vtkVolumeProperty* volumeProperty = vtkVolumeProperty::New();

    volumeProperty->SetScalarOpacity(opacityTransferFunction);

    

  // The mapper / ray cast functions know how to render the data

  vtkVolumeRayCastCompositeFunction* compositeFunction =
vtkVolumeRayCastCompositeFunction::New();

  vtkVolumeRayCastMapper* volumeMapper = vtkVolumeRayCastMapper::New();

    volumeMapper->SetVolumeRayCastFunction(compositeFunction);

    volumeMapper->SetInput(connector->GetOutput());

 

  // The volume holds the mapper and the property and can be used to
position/orient the volume

  vtkVolume* volume = vtkVolume::New();

    volume->SetMapper(volumeMapper);

volume->SetProperty(volumeProperty);

 

  renderer->AddProp(volume);

  renWin->Render();

iren->Start();

 

.

 

Any Idea ?

 

Jihoon Jeong


--Boundary_(ID_oSVa4sZ1uONmB+RikJciAg)
Content-type: text/html; charset=us-ascii
Content-transfer-encoding: 7BIT

<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<style>
<!--
 /* Font Definitions */
  at font-face
	{font-family:Batang;
	panose-1:2 3 6 0 0 1 1 1 1 1;}
 at font-face
	{font-family:DotumChe;
	panose-1:2 11 6 9 0 1 1 1 1 1;}
 at font-face
	{font-family:DotumChe;
	panose-1:2 11 6 9 0 1 1 1 1 1;}
 at font-face
	{font-family:Batang;
	panose-1:2 3 6 0 0 1 1 1 1 1;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	text-autospace:none;
	word-break:break-hangul;
	font-size:10.0pt;
	font-family:Batang;}
a:link, span.MsoHyperlink
	{color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{color:purple;
	text-decoration:underline;}
span.EmailStyle17
	{mso-style-type:personal-compose;
	font-family:"Times New Roman";
	color:windowtext;}
 /* Page Definitions */
  at page Section1
	{size:612.1pt 792.1pt;
	margin:99.25pt 3.0cm 3.0cm 3.0cm;
	layout-grid:18.0pt;}
div.Section1
	{page:Section1;}
-->
</style>

</head>

<body lang=KO link=blue vlink=purple>

<div class=Section1 style='layout-grid:18.0pt'>

<p class=MsoNormal><font size=2 face="Times New Roman"><span lang=EN-US
style='font-size:11.0pt;font-family:"Times New Roman"'>Hi ! folks,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face="Times New Roman"><span lang=EN-US
style='font-size:11.0pt;font-family:"Times New Roman"'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face="Times New Roman"><span lang=EN-US
style='font-size:11.0pt;font-family:"Times New Roman"'>Recently, I tried
connecting ITK + VTK stuffs.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face="Times New Roman"><span lang=EN-US
style='font-size:11.0pt;font-family:"Times New Roman"'>I completed successful
examples using ITK Image3D type in rendering 2D slices in vtkImageViewer.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face="Times New Roman"><span lang=EN-US
style='font-size:11.0pt;font-family:"Times New Roman"'>But, I failed to render
3D volumes in VTK using same data. Compile and link has no problem.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face="Times New Roman"><span lang=EN-US
style='font-size:11.0pt;font-family:"Times New Roman"'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face="Times New Roman"><span lang=EN-US
style='font-size:11.0pt;font-family:"Times New Roman"'>I got following messages
from VTK output windows. <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face="Times New Roman"><span lang=EN-US
style='font-size:11.0pt;font-family:"Times New Roman"'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face="Times New Roman"><span lang=EN-US
style='font-size:11.0pt;font-family:"Times New Roman"'>ERROR: In
vtkVolumeRayCastMapper.cxx, line 328<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face="Times New Roman"><span lang=EN-US
style='font-size:11.0pt;font-family:"Times New Roman"'>vtkOpenGLVolumeRayCastMapper
(01BBB678): Cannot volume render data of type unsigned int, only unsigned char
or unsigned short.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face="Times New Roman"><span lang=EN-US
style='font-size:11.0pt;font-family:"Times New Roman"'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face="Times New Roman"><span lang=EN-US
style='font-size:11.0pt;font-family:"Times New Roman"'>Followings are code
snippets.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face="Times New Roman"><span lang=EN-US
style='font-size:11.0pt;font-family:"Times New Roman"'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;word-break:keep-all'><font
size=2 color=blue face=&#46027;&#50880;&#52404;><span lang=EN-US
style='font-size:10.0pt;font-family:DotumChe;color:blue'>#include</span></font><font
face=&#46027;&#50880;&#52404;><span lang=EN-US style='font-family:DotumChe'>
&quot;itkImageFileReader.h&quot;<o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;word-break:keep-all'><font
size=2 color=blue face=&#46027;&#50880;&#52404;><span lang=EN-US
style='font-size:10.0pt;font-family:DotumChe;color:blue'>#include</span></font><font
face=&#46027;&#50880;&#52404;><span lang=EN-US style='font-family:DotumChe'>
&quot;itkImageToVTKImageFilter.h&quot;<o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;word-break:keep-all'><font
size=2 face="Times New Roman"><span lang=EN-US style='font-size:10.0pt;
font-family:"Times New Roman"'>&#8230;</span></font><font face=&#46027;&#50880;&#52404;><span
lang=EN-US style='font-family:DotumChe'><o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;word-break:keep-all'><font
size=2 face=&#46027;&#50880;&#52404;><span lang=EN-US style='font-size:10.0pt;
font-family:DotumChe'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;word-break:keep-all'><font
size=2 color=blue face=&#46027;&#50880;&#52404;><span lang=EN-US
style='font-size:10.0pt;font-family:DotumChe;color:blue'>#include</span></font><font
face=&#46027;&#50880;&#52404;><span lang=EN-US style='font-family:DotumChe'>
&quot;vtkRenderer.h&quot;<o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;word-break:keep-all'><font
size=2 color=blue face=&#46027;&#50880;&#52404;><span lang=EN-US
style='font-size:10.0pt;font-family:DotumChe;color:blue'>#include</span></font><font
face=&#46027;&#50880;&#52404;><span lang=EN-US style='font-family:DotumChe'>
&quot;vtkRenderWindow.h&quot;<o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;word-break:keep-all'><font
size=2 face="Times New Roman"><span lang=EN-US style='font-size:10.0pt;
font-family:"Times New Roman"'>&#8230;</span></font><font face=&#46027;&#50880;&#52404;><span
lang=EN-US style='font-family:DotumChe'><o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;word-break:keep-all'><font
size=2 face=&#46027;&#50880;&#52404;><span lang=EN-US style='font-size:10.0pt;
font-family:DotumChe'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;word-break:keep-all'><font
size=2 color=blue face=&#46027;&#50880;&#52404;><span lang=EN-US
style='font-size:10.0pt;font-family:DotumChe;color:blue'>int</span></font><font
face=&#46027;&#50880;&#52404;><span lang=EN-US style='font-family:DotumChe'>
main (<font color=blue><span style='color:blue'>int</span></font> argc, <font
color=blue><span style='color:blue'>char</span></font> **argv ) {<o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;text-indent:10.0pt;
word-break:keep-all'><font size=2 color=blue face=&#46027;&#50880;&#52404;><span
lang=EN-US style='font-size:10.0pt;font-family:DotumChe;color:blue'>typedef</span></font><font
face=&#46027;&#50880;&#52404;><span lang=EN-US style='font-family:DotumChe'>
itk::Image&lt;<font color=blue><span style='color:blue'>unsigned</span></font> <font
color=blue><span style='color:blue'>int</span></font>,3&gt;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Image3DType;<o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;word-break:keep-all'><font
size=2 face=&#46027;&#50880;&#52404;><span lang=EN-US style='font-size:10.0pt;
font-family:DotumChe'>&nbsp; <font color=blue><span style='color:blue'>typedef</span></font>
itk::ImageToVTKImageFilter&lt;Image3DType&gt;&nbsp;&nbsp;&nbsp; ConnectorType;<o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;word-break:keep-all'><font
size=2 face=&#46027;&#50880;&#52404;><span lang=EN-US style='font-size:10.0pt;
font-family:DotumChe'>&nbsp; <o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;word-break:keep-all'><font
size=2 face=&#46027;&#50880;&#52404;><span lang=EN-US style='font-size:10.0pt;
font-family:DotumChe'>&nbsp; itk::NumericSeriesFileNames::Pointer fileIter =
itk::NumericSeriesFileNames::New();<o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;word-break:keep-all'><font
size=2 face=&#46027;&#50880;&#52404;><span lang=EN-US style='font-size:10.0pt;
font-family:DotumChe'>&nbsp; &nbsp;&nbsp;fileIter-&gt;SetStartIndex(1);<o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;word-break:keep-all'><font
size=2 face=&#46027;&#50880;&#52404;><span lang=EN-US style='font-size:10.0pt;
font-family:DotumChe'>&nbsp; &nbsp;&nbsp;fileIter-&gt;SetEndIndex(107);<o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;word-break:keep-all'><font
size=2 face=&#46027;&#50880;&#52404;><span lang=EN-US style='font-size:10.0pt;
font-family:DotumChe'>&nbsp; &nbsp;&nbsp;fileIter-&gt;SetIncrementIndex(1);<o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;word-break:keep-all'><font
size=2 face=&#46027;&#50880;&#52404;><span lang=EN-US style='font-size:10.0pt;
font-family:DotumChe'>&nbsp; &nbsp;&nbsp;fileIter-&gt;SetSeriesFormat(&quot;1%03d.dcm&quot;);<o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;word-break:keep-all'><font
size=2 face=&#46027;&#50880;&#52404;><span lang=EN-US style='font-size:10.0pt;
font-family:DotumChe'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;word-break:keep-all'><font
size=2 face=&#46027;&#50880;&#52404;><span lang=EN-US style='font-size:10.0pt;
font-family:DotumChe'>&nbsp; itk::ImageSeriesReader&lt;Image3DType&gt;::Pointer
reader = itk::ImageSeriesReader&lt;Image3DType&gt;::New();<o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;word-break:keep-all'><font
size=2 face=&#46027;&#50880;&#52404;><span lang=EN-US style='font-size:10.0pt;
font-family:DotumChe'>&nbsp; &nbsp;&nbsp;reader-&gt;SetFileNames(fileIter-&gt;GetFileNames());<o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;word-break:keep-all'><font
size=2 face=&#46027;&#50880;&#52404;><span lang=EN-US style='font-size:10.0pt;
font-family:DotumChe'>&nbsp; <o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;word-break:keep-all'><font
size=2 face=&#46027;&#50880;&#52404;><span lang=EN-US style='font-size:10.0pt;
font-family:DotumChe'>&nbsp; <font color=blue><span style='color:blue'>try</span></font>
{<o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;word-break:keep-all'><font
size=2 face=&#46027;&#50880;&#52404;><span lang=EN-US style='font-size:10.0pt;
font-family:DotumChe'>&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; reader-&gt;Update();<o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;word-break:keep-all'><font
size=2 face=&#46027;&#50880;&#52404;><span lang=EN-US style='font-size:10.0pt;
font-family:DotumChe'>&nbsp; }<o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;word-break:keep-all'><font
size=2 face=&#46027;&#50880;&#52404;><span lang=EN-US style='font-size:10.0pt;
font-family:DotumChe'>&nbsp; <font color=blue><span style='color:blue'>catch</span></font>
(itk::ExceptionObject &amp; err) {<o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;word-break:keep-all'><font
size=2 face=&#46027;&#50880;&#52404;><span lang=EN-US style='font-size:10.0pt;
font-family:DotumChe'>&nbsp;&nbsp;&nbsp; std::cout &lt;&lt;
&quot;ExceptionObject caught !&quot; &lt;&lt; std::endl;<o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;word-break:keep-all'><font
size=2 face=&#46027;&#50880;&#52404;><span lang=EN-US style='font-size:10.0pt;
font-family:DotumChe'>&nbsp;&nbsp;&nbsp; std::cout &lt;&lt; err &lt;&lt;
std::endl;<o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;word-break:keep-all'><font
size=2 face=&#46027;&#50880;&#52404;><span lang=EN-US style='font-size:10.0pt;
font-family:DotumChe'>&nbsp;&nbsp;&nbsp; <font color=blue><span
style='color:blue'>return</span></font> -1;<o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;word-break:keep-all'><font
size=2 face=&#46027;&#50880;&#52404;><span lang=EN-US style='font-size:10.0pt;
font-family:DotumChe'>&nbsp; }<o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;word-break:keep-all'><font
size=2 face=&#46027;&#50880;&#52404;><span lang=EN-US style='font-size:10.0pt;
font-family:DotumChe'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;word-break:keep-all'><font
size=2 face=&#46027;&#50880;&#52404;><span lang=EN-US style='font-size:10.0pt;
font-family:DotumChe'>&nbsp; ConnectorType::Pointer connector =
ConnectorType::New();<o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;word-break:keep-all'><font
size=2 face=&#46027;&#50880;&#52404;><span lang=EN-US style='font-size:10.0pt;
font-family:DotumChe'>&nbsp;&nbsp;&nbsp; connector-&gt;SetInput(reader-&gt;GetOutput());<o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;word-break:keep-all'><font
size=2 face=&#46027;&#50880;&#52404;><span lang=EN-US style='font-size:10.0pt;
font-family:DotumChe'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;word-break:keep-all'><font
size=2 face=&#46027;&#50880;&#52404;><span lang=EN-US style='font-size:10.0pt;
font-family:DotumChe'>&nbsp; vtkRenderer* renderer = vtkRenderer::New();<o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;word-break:keep-all'><font
size=2 face=&#46027;&#50880;&#52404;><span lang=EN-US style='font-size:10.0pt;
font-family:DotumChe'>&nbsp; vtkRenderWindow* renWin = vtkRenderWindow::New();<o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;word-break:keep-all'><font
size=2 face=&#46027;&#50880;&#52404;><span lang=EN-US style='font-size:10.0pt;
font-family:DotumChe'>&nbsp;&nbsp;&nbsp; renWin-&gt;AddRenderer(renderer);<o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;word-break:keep-all'><font
size=2 face=&#46027;&#50880;&#52404;><span lang=EN-US style='font-size:10.0pt;
font-family:DotumChe'>&nbsp; vtkRenderWindowInteractor* iren =
vtkRenderWindowInteractor::New();<o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;word-break:keep-all'><font
size=2 face=&#46027;&#50880;&#52404;><span lang=EN-US style='font-size:10.0pt;
font-family:DotumChe'>&nbsp;&nbsp;&nbsp; iren-&gt;SetRenderWindow(renWin);<o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;word-break:keep-all'><font
size=2 face=&#46027;&#50880;&#52404;><span lang=EN-US style='font-size:10.0pt;
font-family:DotumChe'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;word-break:keep-all'><font
size=2 face=&#46027;&#50880;&#52404;><span lang=EN-US style='font-size:10.0pt;
font-family:DotumChe'>&nbsp; <font color=green><span style='color:green'>//
Create transfer mapping scalar value to opacity<o:p></o:p></span></font></span></font></p>

<p class=MsoNormal align=left style='text-align:left;word-break:keep-all'><font
size=2 face=&#46027;&#50880;&#52404;><span lang=EN-US style='font-size:10.0pt;
font-family:DotumChe'>&nbsp; vtkPiecewiseFunction* opacityTransferFunction =
vtkPiecewiseFunction::New();<o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;word-break:keep-all'><font
size=2 face=&#46027;&#50880;&#52404;><span lang=EN-US style='font-size:10.0pt;
font-family:DotumChe'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; opacityTransferFunction-&gt;AddPoint(20.0,
0.0);<o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;word-break:keep-all'><font
size=2 face=&#46027;&#50880;&#52404;><span lang=EN-US style='font-size:10.0pt;
font-family:DotumChe'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; opacityTransferFunction-&gt;AddPoint(255.0,
0.2);<o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;word-break:keep-all'><font
size=2 face=&#46027;&#50880;&#52404;><span lang=EN-US style='font-size:10.0pt;
font-family:DotumChe'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;word-break:keep-all'><font
size=2 face=&#46027;&#50880;&#52404;><span lang=EN-US style='font-size:10.0pt;
font-family:DotumChe'>&nbsp; <font color=green><span style='color:green'>// The
property describes how the data will look<o:p></o:p></span></font></span></font></p>

<p class=MsoNormal align=left style='text-align:left;word-break:keep-all'><font
size=2 face=&#46027;&#50880;&#52404;><span lang=EN-US style='font-size:10.0pt;
font-family:DotumChe'>&nbsp; vtkVolumeProperty* volumeProperty =
vtkVolumeProperty::New();<o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;word-break:keep-all'><font
size=2 face=&#46027;&#50880;&#52404;><span lang=EN-US style='font-size:10.0pt;
font-family:DotumChe'>&nbsp;&nbsp;&nbsp;
volumeProperty-&gt;SetScalarOpacity(opacityTransferFunction);<o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;word-break:keep-all'><font
size=2 face=&#46027;&#50880;&#52404;><span lang=EN-US style='font-size:10.0pt;
font-family:DotumChe'>&nbsp; &nbsp;&nbsp;<o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;word-break:keep-all'><font
size=2 face=&#46027;&#50880;&#52404;><span lang=EN-US style='font-size:10.0pt;
font-family:DotumChe'>&nbsp; <font color=green><span style='color:green'>// The
mapper / ray cast functions know how to render the data<o:p></o:p></span></font></span></font></p>

<p class=MsoNormal align=left style='text-align:left;word-break:keep-all'><font
size=2 face=&#46027;&#50880;&#52404;><span lang=EN-US style='font-size:10.0pt;
font-family:DotumChe'>&nbsp; vtkVolumeRayCastCompositeFunction*
compositeFunction = vtkVolumeRayCastCompositeFunction::New();<o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;word-break:keep-all'><font
size=2 face=&#46027;&#50880;&#52404;><span lang=EN-US style='font-size:10.0pt;
font-family:DotumChe'>&nbsp; vtkVolumeRayCastMapper* volumeMapper =
vtkVolumeRayCastMapper::New();<o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;word-break:keep-all'><font
size=2 face=&#46027;&#50880;&#52404;><span lang=EN-US style='font-size:10.0pt;
font-family:DotumChe'>&nbsp;&nbsp;&nbsp;
volumeMapper-&gt;SetVolumeRayCastFunction(compositeFunction);<o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;word-break:keep-all'><font
size=2 face=&#46027;&#50880;&#52404;><span lang=EN-US style='font-size:10.0pt;
font-family:DotumChe'>&nbsp; &nbsp;&nbsp;volumeMapper-&gt;SetInput(connector-&gt;GetOutput());<o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;word-break:keep-all'><font
size=2 face=&#46027;&#50880;&#52404;><span lang=EN-US style='font-size:10.0pt;
font-family:DotumChe'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;word-break:keep-all'><font
size=2 face=&#46027;&#50880;&#52404;><span lang=EN-US style='font-size:10.0pt;
font-family:DotumChe'>&nbsp; <font color=green><span style='color:green'>// The
volume holds the mapper and the property and can be used to position/orient the
volume<o:p></o:p></span></font></span></font></p>

<p class=MsoNormal align=left style='text-align:left;word-break:keep-all'><font
size=2 face=&#46027;&#50880;&#52404;><span lang=EN-US style='font-size:10.0pt;
font-family:DotumChe'>&nbsp; vtkVolume* volume = vtkVolume::New();<o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;word-break:keep-all'><font
size=2 face=&#46027;&#50880;&#52404;><span lang=EN-US style='font-size:10.0pt;
font-family:DotumChe'>&nbsp;&nbsp;&nbsp; volume-&gt;SetMapper(volumeMapper);<o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;text-indent:20.0pt;
word-break:keep-all'><font size=2 face=&#46027;&#50880;&#52404;><span
lang=EN-US style='font-size:10.0pt;font-family:DotumChe'>volume-&gt;SetProperty(volumeProperty);<o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;word-break:keep-all'><font
size=2 face=&#46027;&#50880;&#52404;><span lang=EN-US style='font-size:10.0pt;
font-family:DotumChe'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;word-break:keep-all'><font
size=2 face=&#46027;&#50880;&#52404;><span lang=EN-US style='font-size:10.0pt;
font-family:DotumChe'>&nbsp; renderer-&gt;AddProp(volume);<o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;word-break:keep-all'><font
size=2 face=&#46027;&#50880;&#52404;><span lang=EN-US style='font-size:10.0pt;
font-family:DotumChe'>&nbsp; renWin-&gt;Render();<o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;text-indent:10.5pt;
word-break:keep-all'><font size=2 face=&#46027;&#50880;&#52404;><span
lang=EN-US style='font-size:10.0pt;font-family:DotumChe'>iren-&gt;Start();<o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;text-indent:10.5pt;
word-break:keep-all'><font size=2 face=&#46027;&#50880;&#52404;><span
lang=EN-US style='font-size:10.0pt;font-family:DotumChe'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;text-indent:10.5pt;
word-break:keep-all'><font size=2 face="Times New Roman"><span lang=EN-US
style='font-size:10.0pt;font-family:"Times New Roman"'>&#8230;</span></font><font
face=&#46027;&#50880;&#52404;><span lang=EN-US style='font-family:DotumChe'><o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;text-indent:10.5pt;
word-break:keep-all'><font size=2 face=&#46027;&#50880;&#52404;><span
lang=EN-US style='font-size:10.0pt;font-family:DotumChe'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;text-indent:10.5pt;
word-break:keep-all'><font size=2 face=&#46027;&#50880;&#52404;><span
lang=EN-US style='font-size:10.0pt;font-family:DotumChe'>Any Idea ?<o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;text-indent:10.5pt;
word-break:keep-all'><font size=2 face=&#46027;&#50880;&#52404;><span
lang=EN-US style='font-size:10.0pt;font-family:DotumChe'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;word-break:keep-all'><font
size=2 face="Times New Roman"><span lang=EN-US style='font-size:11.0pt;
font-family:"Times New Roman"'>Jihoon Jeong<o:p></o:p></span></font></p>

</div>

</body>

</html>

--Boundary_(ID_oSVa4sZ1uONmB+RikJciAg)--