<font size="2"><font face="verdana,sans-serif">It is not possible to extract the heart perfectly using only intensity values. If you want to show only heart, you would have to segment it first, and then suppress the rest of the thorax (using heart's binary mask).</font></font> But segmenting the heart is a much larger beast than just displaying it using VTK.<br>
<br>Regards<br><br>2011/11/15 FanShanShan <span dir="ltr"><<a href="mailto:shanfshan@hotmail.com">shanfshan@hotmail.com</a>></span><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div dir="ltr">
<p class="MsoNormal" style="text-align:left;line-height:15pt" align="left"><font face="微软雅黑, sans-serif"></font></p><p class="MsoNormal" style="color:rgb(42, 42, 42);text-align:left;line-height:15pt" align="left"><font face="微软雅黑, sans-serif"><a name="133a57e316c7518e_OLE_LINK2"></a></font></p>
<p class="MsoNormal" style="text-align:left;line-height:15.0pt" align="left"><font face="微软雅黑, sans-serif"><a name="133a57e316c7518e_OLE_LINK2"></a><a name="133a57e316c7518e_OLE_LINK1"><span><span style="font-size:10.0pt;color:#2A2A2A" lang="EN-US">Hi,</span></span></a><span><span><span style="font-size:9.0pt;color:#2A2A2A" lang="EN-US"><u></u><u></u></span></span></span></font></p>
<font face="微软雅黑, sans-serif">
<p class="MsoNormal" style="text-align:left;line-height:16.5pt" align="left"><span><span><span style="font-size:10.0pt;color:#2A2A2A" lang="EN-US">I want to display a heat following the example(Medical1
or Medical2) which is described in VTK. In the example of Medical2 ,I get
that the contour value of skin is 500 and the contour value of bone is 1150,
but I don't know the contour value of heart, so I tried some numbers, but I
can't only extract the heart exactly, there is always some bones or skin
around it. I don't know whether the method which is used in head in Medical2 is
not suitable for heart extracting, or I don't get a right contour value of
heart, or the data I used is not good to me? I get the 4D Cardiac CT data
from </span></span></span><a href="http://pubimage.hcuge.ch:8080/" target="_blank"><span><span><span style="font-size:10.0pt;color:#0068CF" lang="EN-US">http://pubimage.hcuge.ch:8080/</span></span></span><span><span></span></span></a><span><span><span style="font-size:10.0pt;color:#2A2A2A" lang="EN-US"> and I just process one
folder . Please help me.</span></span></span><span><span><span style="font-size:10.0pt" lang="EN-US"><u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left;line-height:16.5pt" align="left"><span><span><span style="font-size:10.0pt;color:#2A2A2A" lang="EN-US"><u></u> <u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left;line-height:16.5pt" align="left"><span><span><span style="font-size:10.0pt;color:#2A2A2A" lang="EN-US">here is my code :<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><a name="133a57e316c7518e_OLE_LINK13"></a><a name="133a57e316c7518e_OLE_LINK14"></a><span><span style="font-size:10.0pt;color:blue" lang="EN-US">#include</span></span></span></span><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> </span></span></span><span><span><span style="font-size:10.0pt;color:#A31515" lang="EN-US">"itkImage.h"</span></span></span><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"><u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US">#include </span></span></span><span><span><span style="font-size:10.0pt;color:#A31515" lang="EN-US">"itkImageSeriesReader.h"</span></span></span><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"><u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US">#include </span></span></span><span><span><span style="font-size:10.0pt;color:#A31515" lang="EN-US">"itkImageFileWriter.h"</span></span></span><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"><u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US">#include </span></span></span><span><span><span style="font-size:10.0pt;color:#A31515" lang="EN-US">"itkNumericSeriesFileNames.h"</span></span></span><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"><u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:#A31515" lang="EN-US"> </span></span></span><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"><u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US">#include </span></span></span><span><span><span style="font-size:10.0pt;color:#A31515" lang="EN-US">"itkImageToVTKImageFilter.h"</span></span></span><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"><u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:#A31515" lang="EN-US"> </span></span></span><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"><u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US">#include </span></span></span><span><span><span style="font-size:10.0pt;color:#A31515" lang="EN-US"><vtkRenderer.h></span></span></span><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"><u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US">#include </span></span></span><span><span><span style="font-size:10.0pt;color:#A31515" lang="EN-US"><vtkRenderWindow.h></span></span></span><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"><u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US">#include </span></span></span><span><span><span style="font-size:10.0pt;color:#A31515" lang="EN-US"><vtkRenderWindowInteractor.h></span></span></span><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"><u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US">#include </span></span></span><span><span><span style="font-size:10.0pt;color:#A31515" lang="EN-US"><vtkPolyDataMapper.h></span></span></span><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"><u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US">#include </span></span></span><span><span><span style="font-size:10.0pt;color:#A31515" lang="EN-US"><vtkActor.h></span></span></span><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"><u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US">#include </span></span></span><span><span><span style="font-size:10.0pt;color:#A31515" lang="EN-US"><vtkOutlineFilter.h></span></span></span><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"><u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US">#include </span></span></span><span><span><span style="font-size:10.0pt;color:#A31515" lang="EN-US"><vtkCamera.h></span></span></span><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"><u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US">#include </span></span></span><span><span><span style="font-size:10.0pt;color:#A31515" lang="EN-US"><vtkProperty.h></span></span></span><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"><u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US">#include </span></span></span><span><span><span style="font-size:10.0pt;color:#A31515" lang="EN-US"><vtkPolyDataNormals.h></span></span></span><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"><u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US">#include </span></span></span><span><span><span style="font-size:10.0pt;color:#A31515" lang="EN-US"><vtkContourFilter.h></span></span></span><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"><u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US">#include </span></span></span><span><span><span style="font-size:10.0pt;color:#A31515" lang="EN-US"><vtkSmartPointer.h></span></span></span><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"><u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US">#include </span></span></span><span><span><span style="font-size:10.0pt;color:#A31515" lang="EN-US"><vtkStripper.h></span></span></span><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"><u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:#A31515" lang="EN-US"> </span></span></span><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"><u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US">int main( int argc, char * argv[] )<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US">{<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> typedef signed short PixelType;<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> const unsigned int Dimension = 3;<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> <u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> typedef itk::Image< PixelType, Dimension > ImageType;<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> typedef itk::ImageSeriesReader< ImageType >
ReaderType;<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> <u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> ReaderType::Pointer reader = ReaderType::New();<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> <u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> const unsigned int first = atoi( argv[2] );<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> const unsigned int last = atoi(
argv[3] );<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> <u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> typedef itk::NumericSeriesFileNames NameGeneratorType;<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> <u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> NameGeneratorType::Pointer nameGenerator =
NameGeneratorType::New();<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> <u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> nameGenerator->SetSeriesFormat( argv[1] );<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> <u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> nameGenerator->SetStartIndex( first );<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> nameGenerator->SetEndIndex( last );<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> nameGenerator->SetIncrementIndex( 1 );<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> std::vector<std::string> names =
nameGenerator->GetFileNames();<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"><u></u> <u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> std::vector<std::string>::iterator nit;<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> for (nit = names.begin();<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> nit != names.end();<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> nit++)<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> {<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> std::cout << </span></span></span><span><span><span style="font-size:10.0pt;color:#A31515" lang="EN-US">"File: "</span></span></span><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> << (*nit).c_str() <<
std::endl;<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> }<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> <u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> reader->SetFileNames( names );<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:green" lang="EN-US"> </span></span></span><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"><u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> ImageType::Pointer image = reader->GetOutput();<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> <u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> vtkSmartPointer<vtkRenderer> aRenderer =<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> vtkSmartPointer<vtkRenderer>::New();<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> vtkSmartPointer<vtkRenderWindow> renWin =<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> vtkSmartPointer<vtkRenderWindow>::New();<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> renWin->AddRenderer(aRenderer);<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> <u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> vtkSmartPointer<vtkRenderWindowInteractor> iren =<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> vtkSmartPointer<vtkRenderWindowInteractor>::New();<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> iren->SetRenderWindow(renWin);<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> <u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> typedef itk::ImageToVTKImageFilter<ImageType>
itkVtkConverter;<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> itkVtkConverter::Pointer
conv=itkVtkConverter::New();<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> conv->SetInput(image);<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> conv->Update();<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> </span></span></span><span><span><span style="font-size:10.0pt;color:#2A2A2A" lang="EN-US"><u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> vtkSmartPointer<vtkContourFilter>
heartExtractor =<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> vtkSmartPointer<vtkContourFilter>::New();<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> heartExtractor->SetInput(conv->GetOutput());<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> heartExtractor->SetValue(0,60);<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> heartExtractor->Update();<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> <u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> vtkSmartPointer<vtkPolyDataNormals> heartNormals =<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> vtkSmartPointer<vtkPolyDataNormals>::New();<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> heartNormals->SetInput(heartExtractor->GetOutput());<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> heartNormals->SetFeatureAngle(60.0);<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> <u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> vtkSmartPointer<vtkStripper> heartStripper =<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> vtkSmartPointer<vtkStripper>::New();<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> heartStripper->SetInput(heartNormals->GetOutput());<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> <u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> vtkSmartPointer<vtkPolyDataMapper> heartMapper =<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> vtkSmartPointer<vtkPolyDataMapper>::New();<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> heartMapper->SetInput(heartStripper->GetOutput());<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> heartMapper->ScalarVisibilityOff();<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> <u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> vtkSmartPointer<vtkActor> heart =<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> vtkSmartPointer<vtkActor>::New();<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> heart->SetMapper(skinMapper);<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> heart->GetProperty()->SetDiffuseColor(1, .49, .25);<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> heart->GetProperty()->SetSpecular(.3);<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> heart->GetProperty()->SetSpecularPower(20);<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> heart->GetProperty()->SetOpacity(1.0);<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> <u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> vtkSmartPointer<vtkContourFilter> boneExtractor =<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> vtkSmartPointer<vtkContourFilter>::New();<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> boneExtractor->SetInput(conv->GetOutput());<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> boneExtractor->SetValue(0,300);<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> <u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> vtkSmartPointer<vtkPolyDataNormals> boneNormals =<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> vtkSmartPointer<vtkPolyDataNormals>::New();<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> boneNormals->SetInput(boneExtractor->GetOutput());<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> boneNormals->SetFeatureAngle(60.0);<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> <u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> vtkSmartPointer<vtkStripper> boneStripper =<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> vtkSmartPointer<vtkStripper>::New();<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> boneStripper->SetInput(boneNormals->GetOutput());<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> <u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> vtkSmartPointer<vtkPolyDataMapper> boneMapper =<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> vtkSmartPointer<vtkPolyDataMapper>::New();<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> boneMapper->SetInput(boneStripper->GetOutput());<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> boneMapper->ScalarVisibilityOff();<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> <u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> vtkSmartPointer<vtkActor> bone =<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> vtkSmartPointer<vtkActor>::New();<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> bone->SetMapper(boneMapper);<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> bone->GetProperty()->SetDiffuseColor(1, 1, .9412);<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> bone->GetProperty()->SetOpacity(0.0);<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> <u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> vtkSmartPointer<vtkOutlineFilter> outlineData =<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> vtkSmartPointer<vtkOutlineFilter>::New();<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> outlineData->SetInput(conv->GetOutput());<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> <u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> vtkSmartPointer<vtkPolyDataMapper> mapOutline =<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> vtkSmartPointer<vtkPolyDataMapper>::New();<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> mapOutline->SetInput(outlineData->GetOutput());<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> <u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> vtkSmartPointer<vtkActor> outline =<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> vtkSmartPointer<vtkActor>::New();<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> outline->SetMapper(mapOutline);<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> outline->GetProperty()->SetColor(0,0,0);<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> <u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> vtkSmartPointer<vtkCamera> aCamera =<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> vtkSmartPointer<vtkCamera>::New();<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> aCamera->SetViewUp (0, 0, -1);<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> aCamera->SetPosition (0, 1, 0);<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> aCamera->SetFocalPoint (0, 0, 0);<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> aCamera->ComputeViewPlaneNormal();<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> aCamera->Azimuth(30.0);<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> aCamera->Elevation(30.0);<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"><u></u> <u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> aRenderer->AddActor(outline);<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> aRenderer->AddActor(heart);<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> aRenderer->AddActor(bone);<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> aRenderer->SetActiveCamera(aCamera);<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> aRenderer->ResetCamera ();<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> aCamera->Dolly(1.5);<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> <u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> aRenderer->SetBackground(.2, .3, .4);<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> renWin->SetSize(640, 480);<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> <u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> aRenderer->ResetCameraClippingRange ();<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> <u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> iren->Initialize();<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> iren->Start();<u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> <u></u><u></u></span></span></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> return EXIT_SUCCESS;<u></u><u></u></span></span></span></p>
<span><span><span style="font-size:10.0pt;color:blue" lang="EN-US"> }</span></span></span><p></p><p class="MsoNormal" style="text-align:left;line-height:15pt" align="left"><font color="#0000ff"><br></font></p><p class="MsoNormal" style="text-align:left;line-height:15pt" align="left">
<font color="#0000ff">Regards</font></p><p class="MsoNormal" style="text-align:left;line-height:15pt" align="left"><font color="#0000ff">Sally</font></p></font><p></p>                                            </div></div>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br>