I'm terrible with names but..... If you would like to keep the default behavior the same then I would suggest an option to "Maintain structure".<div><br></div><div>Any good?</div><div><br></div><div>Thanks,</div>
<div>Paul<br><br><div class="gmail_quote">On 25 February 2010 15:09, Utkarsh Ayachit <span dir="ltr"><<a href="mailto:utkarsh.ayachit@kitware.com">utkarsh.ayachit@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Ah I c. I don't think there was any strong reason for trimming the<br>
tree down. We can definitely add that as an option as well. Any ideas<br>
what to call this new option :)?<br>
<font color="#888888"><br>
Utkarsh<br>
</font><div><div></div><div class="h5"><br>
On Thu, Feb 25, 2010 at 9:57 AM, Paul Edwards <<a href="mailto:paul.m.edwards@gmail.com">paul.m.edwards@gmail.com</a>> wrote:<br>
> Utkarsh,<br>
> If you do that you will end up with all the empty blocks in the structure.<br>
> I would like to just see the extracted blocks without losing the original<br>
> structure.<br>
> Regards,<br>
> Paul<br>
><br>
> On 25 February 2010 14:50, Utkarsh Ayachit <<a href="mailto:utkarsh.ayachit@kitware.com">utkarsh.ayachit@kitware.com</a>><br>
> wrote:<br>
>><br>
>> Paul,<br>
>><br>
>> If you don't want the ExtractBlock filter to prune the output, you can<br>
>> always simply uncheck the "Prune Output" checkbox.<br>
>><br>
>> Utkarsh<br>
>><br>
>> On Thu, Feb 18, 2010 at 9:45 AM, Paul Edwards <<a href="mailto:paul.m.edwards@gmail.com">paul.m.edwards@gmail.com</a>><br>
>> wrote:<br>
>> > Hi,<br>
>> > What is the reason for pruning the structure in the "Extract Block"<br>
>> > filter<br>
>> > when there is only one child item? I output the following structure<br>
>> > from<br>
>> > the custom reader:<br>
>> ><br>
>> > output (multi-block dataset)<br>
>> ><br>
>> > zone 1 (multi-block dataset)<br>
>> ><br>
>> > volume (unstructured grid)<br>
>> > boundaries (multi-block dataset)<br>
>> ><br>
>> > blade (poly data)<br>
>> > hub (poly data)<br>
>> > case (poly data)<br>
>> ><br>
>> > zone 2 (multi-block dataset)<br>
>> ><br>
>> > volume (unstructured grid)<br>
>> > boundaries (multi-block dataset)<br>
>> ><br>
>> > blade (poly data)<br>
>> > hub (poly data)<br>
>> > case (poly data)<br>
>> ><br>
>> > If I were to extract both the blades then the resulting structured would<br>
>> > be:<br>
>> ><br>
>> > output (multi-block dataset)<br>
>> ><br>
>> > blade (poly data)<br>
>> > blade (poly data)<br>
>> ><br>
>> > This has now lost all the information from the original structure.<br>
>> > Commenting out the section for the case when there is only one child<br>
>> > item<br>
>> > fixes this for me:<br>
>> ><br>
>> > 8<--------------------------------------------------------------------------------------------------<br>
>> > Index: ./VTK/Graphics/vtkExtractBlock.cxx<br>
>> > ===================================================================<br>
>> > RCS file:<br>
>> > /cvsroot/ParaView3/ParaView3/VTK/Graphics/vtkExtractBlock.cxx,v<br>
>> > retrieving revision 1.6<br>
>> > diff -r1.6 vtkExtractBlock.cxx<br>
>> > 239,251c239,251<br>
>> > < vtkMultiBlockDataSet* prunedBlock =<br>
>> > vtkMultiBlockDataSet::SafeDownCast(block);<br>
>> > < if (prunedBlock && prunedBlock->GetNumberOfBlocks()==1)<br>
>> > < {<br>
>> > < // shrink redundant branches.<br>
>> > < clone->SetBlock(index, prunedBlock->GetBlock(0));<br>
>> > < if (prunedBlock->HasMetaData(static_cast<unsigned int>(0)))<br>
>> > < {<br>
>> > < clone->GetMetaData(index)->Copy(prunedBlock->GetMetaData(<br>
>> > < static_cast<unsigned int>(0)));<br>
>> > < }<br>
>> > < }<br>
>> > < else<br>
>> > < {<br>
>> > ---<br>
>> >> // vtkMultiBlockDataSet* prunedBlock =<br>
>> >> vtkMultiBlockDataSet::SafeDownCast(block);<br>
>> >> // if (prunedBlock && prunedBlock->GetNumberOfBlocks()==1)<br>
>> >> // {<br>
>> >> // // shrink redundant branches.<br>
>> >> // clone->SetBlock(index, prunedBlock->GetBlock(0));<br>
>> >> // if (prunedBlock->HasMetaData(static_cast<unsigned int>(0)))<br>
>> >> // {<br>
>> >> // clone->GetMetaData(index)->Copy(prunedBlock->GetMetaData(<br>
>> >> // static_cast<unsigned int>(0)));<br>
>> >> // }<br>
>> >> // }<br>
>> >> // else<br>
>> >> // {<br>
>> > 257c257<br>
>> > < }<br>
>> > ---<br>
>> >> // }<br>
>> ><br>
>> > -------------------------------------------------------------------------------------------------->8<br>
>> > Could this case be removed in the main CVS or is there a good reason for<br>
>> > keeping it? (maybe an option could be added for it....)<br>
>> > Thanks,<br>
>> > Paul<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<br>
>> > <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 ParaView Wiki at:<br>
>> > <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
>> ><br>
>> > Follow this link to subscribe/unsubscribe:<br>
>> > <a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
>> ><br>
>> ><br>
><br>
><br>
</div></div></blockquote></div><br></div>