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