<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>


<meta http-equiv="Content-Type" content="text/html; charset=unicode">
<meta name="Generator" content="Microsoft SafeHTML">
<style>
.hmmessage P
{margin:0px;padding:0px;}
body.hmmessage
{font-size:10pt;font-family:Verdana;}
</style>





<style>
.hmmessage P
{margin:0px;padding:0px;}
body.hmmessage
{font-size:10pt;font-family:Verdana;}
</style>





<style>
.hmmessage P
{margin:0px;padding:0px;}
body.hmmessage
{font-size:10pt;font-family:Verdana;}
</style>

Thanks you for the advice about vtkAppendDataset but I seem to only run across vtkAppendCompositeDataLeaves, vtkAppendFilter, vtkAppendPoints, vtkAppendPolyData, and vtkAppendSelection.&nbsp; I tried to use vtkAppendPolyData but when I use 30 files of my data the only result I get back is the last file filtered from my 30, which is just a 2D image.&nbsp; I also get same results with vtkMergeFilter.&nbsp; Here's a piece of code where I'm performing the merge maybe you can see something that I am not doing right.&nbsp; I defined everything here so hopefully you can understand my approach a little better.&nbsp; Any thing else you can or anybody else can suggest in order for me to merge my filtered files into one 3D image?<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int index = 0;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int MAX_FILES = 30;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; string filename;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; const char *modfilename;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vtkContourFilter *skinExtractor = vtkContourFilter::New();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vtkPolyDataConnectivityFilter *connect = vtkPolyDataConnectivityFilter::New();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vtkAppendPolyData *append = vtkAppendPolyData::New();<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; while(index &lt; MAX_FILES)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //SKIN RENDER---<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; skinExtractor-&gt;SetInputConnection(reader-&gt;GetOutputPort());<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; skinExtractor-&gt;SetValue(0, -400);<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //CONNECTIVITY---extract largest region<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; connect-&gt;SetInputConnection(skinExtractor-&gt;GetOutputPort());<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; connect-&gt;SetExtractionModeToLargestRegion();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; connect-&gt;Update();<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //MERGE DATA<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; append-&gt;AddInputConnection(connect-&gt;GetOutputPort());<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //Read Next File<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; index++;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if(index &lt; MAX_FILES)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; filename = DATADIR + files-&gt;GetValue(index);&nbsp; //files-&gt;GetValue(index) --- returnes the file name from data directory.<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; modfilename = filename.c_str();<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; reader-&gt;SetFileName(modfilename);&nbsp; //using vtkDICOMImageReader.h<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; reader-&gt;Update();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br><br>//Then...on setting up my Actor and window for my 3D image of the new merged data.&nbsp; using the variable "append-&gt;GetOutputPort()" down /the pipeline with all the filtered files.<br><br>Thank you,<br>Chris<br><br>&gt; CC: vtkusers@vtk.org<br>&gt; From: mike.jackson@bluequartz.net<br>&gt; To: alucard006@msn.com<br>&gt; Subject: Re: [vtkusers] Addition Assign AlgorithmOutput? Merge?<br>&gt; Date: Wed, 3 Jun 2009 12:19:31 -0400<br>&gt; <br>&gt; vtkAppendDataset.<br>&gt; <br>&gt; _________________________________________________________<br>&gt; Mike Jackson                  mike.jackson@bluequartz.net<br>&gt; BlueQuartz Software                    www.bluequartz.net<br>&gt; Principal Software Engineer                  Dayton, Ohio<br>&gt; <br>&gt; <br>&gt; <br>&gt; On Jun 3, 2009, at 12:03 PM, Chris N wrote:<br>&gt; <br>&gt; &gt; I have an idea about filtering all my DICOM images of a human head  <br>&gt; &gt; in the format of *.DCM before creating my actor from  <br>&gt; &gt; vtkAlgorithmOutput, one feature I'm not sure about is if or how vtk  <br>&gt; &gt; can perform an addition assign like operation with AlgorithmOutput.   <br>&gt; &gt; Or somehow merge the two different datas into one AlgorithmOutput.   <br>&gt; &gt; Anyway, here's my idea of what I'm trying to do.  Using VTK, C++,  <br>&gt; &gt; and I am new to VTK.<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt; LOOP(imagenumber &lt; maximagenumber)<br>&gt; &gt; {<br>&gt; &gt;     //Reads in one 2D DICOM image<br>&gt; &gt;     vtkDICOMImageReader::SetFileName( "DICOMdata" imagenumber++);<br>&gt; &gt;<br>&gt; &gt;     //Set value for skin data only from my DICOM data<br>&gt; &gt;     vtkContourFilter *skinExtractor = vtkContourFilter::New();<br>&gt; &gt;     skinExtractor-&gt;SetInputConnection(reader-&gt;GetOutputPort());<br>&gt; &gt;     skinExtractor-&gt;SetValue(0, -400);<br>&gt; &gt;<br>&gt; &gt;     //Extract the largest Region<br>&gt; &gt;     vtkPolyDataConnectivityFilter *connect =  <br>&gt; &gt; vtkPolyDataConnectivityFilter::New();<br>&gt; &gt;     connect-&gt;SetInputConnection(skinExtractor-&gt;GetOutputPort());<br>&gt; &gt;     connect-&gt;SetExtractionModeToLargestRegion();<br>&gt; &gt;<br>&gt; &gt;     //Here is where I would like to build a final algorithmoutput  <br>&gt; &gt; from the accumulation<br>&gt; &gt;     //of each image after its been filtered.<br>&gt; &gt;     //Would like the following line to perform like an Addition  <br>&gt; &gt; assign operator but is<br>&gt; &gt;     //there a function or something to create this effect?<br>&gt; &gt;<br>&gt; &gt;     (*FinalAlgorithmOutput) += (*CurrentImageFilterAlgorithmOutput);<br>&gt; &gt;<br>&gt; &gt;     //REPEAT<br>&gt; &gt; }<br>&gt; &gt;<br>&gt; &gt; Now once out of the loop, i create my actors and windows then I  <br>&gt; &gt; build my DICOM code.  Once data is displayed it should show the  <br>&gt; &gt; filtered 3d head.  Any advice, suggestions, ideas about this is  <br>&gt; &gt; welcomed, thanks!<br>&gt; &gt;<br>&gt; &gt; Lauren found her dream laptop. Find the PC that’s right for you.  <br>&gt; &gt; _______________________________________________<br>&gt; &gt; Powered by www.kitware.com<br>&gt; &gt;<br>&gt; &gt; Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html<br>&gt; &gt;<br>&gt; &gt; Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ<br>&gt; &gt;<br>&gt; &gt; Follow this link to subscribe/unsubscribe:<br>&gt; &gt; http://www.vtk.org/mailman/listinfo/vtkusers<br>&gt; <br><br /><hr />Microsoft brings you a new way to search the web. <a href='http://windowslive.com/explore?ocid=TXT_TAGLM_WL_BR_life_in_synch_062009' target='_new'>Try  Bing™ now</a></body>
</html>