<div><div class="gmail_quote">On Fri, Feb 5, 2010 at 2:43 PM, Moreland, Kenneth <span dir="ltr"><<a href="mailto:kmorel@sandia.gov">kmorel@sandia.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">




<div>
<font face="Calibri, Verdana, Helvetica, Arial"><span style="font-size:11pt">In general and in principle I wholeheartedly agree.  I find it very frustrating to have a filter that does just want I want but that I cannot use because it is pointlessly implemented for a particular subclass I am not using.<br>

<br>
However, I do not think that applies to the append filter.  vtkAppendFilter necessarily writes everything out to an unstructured grid regardless of its input.  This is because vtkUnstructuredGrid can hold any of the elements thrown at it.  It will happily take a group of vtkPolyData objects, but the output will still be converted to vtkUnstructuredGrid.  Because you often want to merge a bunch of vtkPolyDatas into another vtkPolyData, there is a special filter to do this.<br>

<br>
It is not practical to change the behavior of vtkAppendFilter to try to follow the input because the behavior would become less predictable.  What happens if you combine a vtkPolyData with a vtkUnstructuredGrid.  What if you combine a vtkPolyData with a vtkImageData?  What if the image is 2D?  3D?  What if you combine two vtkImageDatas?  The logic becomes non-trivial and the behavior of the filter would become frustratingly non-obvious.<br>

<br>
-Ken<div><div></div><div class="h5"></div></div></span></font></div></blockquote></div><br></div><div><br></div><div>Pat - it is working now, thanks.<div><br></div><div>Ken - agreed. Variable output type could get confusing. My thought was to just have it be the data type of the "most complicated" input data type, but no need for this, just making it unstructured grid is ok.</div>
<div><br></div><div>My concern is just that it seems awkward to have to put my vtkPoints into a container to pass it to a filter that is going to operate only only the points.</div><div><br></div><div>vtkPoints* points = vtkPoints::New();</div>
<div>// ... fill points...</div><div><br></div><div>Currently one must do this:</div><div>vtkUnstructuredGrid* ug = vtkUnstructuredGrid::New(); //could also use polydata here</div><div>ug->SetPoints(points);</div><div>
vtkMyFilter* filter = vtkMyFilter::New();</div><div>filter->SetInput(ug);</div><div><br></div><div>Instead of just this:</div><div><div><br></div><div>vtkMyFilter* filter = vtkMyFilter::New();</div><div>filter->SetInput(points);</div>
<div><br></div><div>I guess the way things are setup there is no hope of changing this?</div><div><br></div>Thanks,<br><br>David<br></div></div>