Output attached. Works properly when I convert my input surfaces to unstructured.<div><br></div><div><div>FileName: foot3.vtm</div><div>FilePath: ./</div><div>FilePrefix: foot3</div><div>PieceFileName: ./</div><div>ERROR: In /home/domel/pack/vtk-5.6.0/IO/vtkXMLWriter.cxx, line 607</div>
<div>vtkXMLPolyDataWriter (0x945fa38): Error opening output file ""</div><div><br></div><div>ERROR: In /home/domel/pack/vtk-5.6.0/IO/vtkXMLWriter.cxx, line 610</div><div>vtkXMLPolyDataWriter (0x945fa38): Error code "No such file or directory"</div>
<div><br></div><div>ERROR: In /home/domel/pack/vtk-5.6.0/Filtering/vtkExecutive.cxx, line 757</div><div>vtkStreamingDemandDrivenPipeline (0x945f958): Algorithm vtkXMLPolyDataWriter(0x945fa38) returned failure for request: vtkInformation (0x96352d0)</div>
<div> Debug: Off</div><div> Modified Time: 166820</div><div> Reference Count: 1</div><div> Registered Events: (none)</div><div> Request: REQUEST_DATA</div><div> ALGORITHM_AFTER_FORWARD: 1</div><div> FROM_OUTPUT_PORT: -1</div>
<div> FORWARD_DIRECTION: 0</div><div><br></div><div>[more errors follow]</div><br><div class="gmail_quote">On Fri, Jun 4, 2010 at 7:46 PM, 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;">You can apply the attached patch and then post the generated output?<br>
<br>
Thanks<br>
<font color="#888888">Utkarsh<br>
</font><div><div></div><div class="h5"><br>
On Thu, Jun 3, 2010 at 3:36 PM, Dominik Szczerba <<a href="mailto:dominik@itis.ethz.ch">dominik@itis.ethz.ch</a>> wrote:<br>
> Same issue here, vtk 5.6, linux.<br>
> Dominik<br>
><br>
> On Thu, Jun 3, 2010 at 3:32 PM, Adriano Gagliardi <<a href="mailto:agagliardi@ara.co.uk">agagliardi@ara.co.uk</a>><br>
> wrote:<br>
>><br>
>> Unfortunately, it's in serial. I tried it out with a simple piece of code<br>
>> (mostly taken from the VTK Examples page) and the same thing happened. The<br>
>> version of VTK was the one supplied in the ParaView-3.8.0-RC2, but I'll<br>
>> try<br>
>> with the official release to see if there is any difference. If anyone<br>
>> else<br>
>> has this working, I'd be interested in seeing an example.<br>
>><br>
>> =========================================================================<br>
>> mbwritertest.cxx:<br>
>> =========================================================================<br>
>> #include <sstream><br>
>><br>
>> #include <vtkSphereSource.h><br>
>> #include <vtkPolyData.h><br>
>> #include <vtkMultiBlockDataSet.h><br>
>> #include <vtkXMLPolyDataWriter.h><br>
>> #include <vtkXMLMultiBlockDataWriter.h><br>
>> #include <vtkSmartPointer.h><br>
>><br>
>> int main(int, char *[])<br>
>> {<br>
>> vtkSmartPointer<vtkMultiBlockDataSet> MBPolyData =<br>
>> vtkSmartPointer<vtkMultiBlockDataSet>::New();<br>
>> MBPolyData->SetNumberOfBlocks(4);<br>
>><br>
>> for ( vtkIdType currBlk = 0; currBlk != MBPolyData->GetNumberOfBlocks();<br>
>> ++currBlk ) {<br>
>><br>
>> //Create a sphere.<br>
>> vtkSmartPointer<vtkSphereSource> sphereSource =<br>
>> vtkSmartPointer<vtkSphereSource>::New();<br>
>> sphereSource->SetCenter(currBlk, 0.0, 0.0);<br>
>> sphereSource->SetRadius(5.0);<br>
>> sphereSource->Update();<br>
>><br>
>> vtkSmartPointer<vtkPolyData> poly = sphereSource->GetOutput();<br>
>><br>
>> MBPolyData->SetBlock(currBlk, poly);<br>
>><br>
>> //Write the PolyData to file<br>
>> std::ostringstream ss;<br>
>> ss << "sphere" << currBlk+1 << ".vtp";<br>
>> vtkSmartPointer<vtkXMLPolyDataWriter> writer =<br>
>> vtkSmartPointer<vtkXMLPolyDataWriter>::New();<br>
>> writer->SetInput(poly);<br>
>> writer->SetFileName(ss.str().c_str());<br>
>> writer->Write();<br>
>> }<br>
>><br>
>> //Write the MultiBlockData with PolyData to file<br>
>> vtkSmartPointer<vtkXMLMultiBlockDataWriter> writer2 =<br>
>> vtkSmartPointer<vtkXMLMultiBlockDataWriter>::New();<br>
>> writer2->SetInput(MBPolyData);<br>
>> writer2->SetFileName("all-spheres-PD.vtm");<br>
>> writer2->Write();<br>
>><br>
>> return EXIT_SUCCESS;<br>
>> }<br>
>><br>
>> =========================================================================<br>
>> CMakeLists.txt:<br>
>> =========================================================================<br>
>> cmake_minimum_required(VERSION 2.6)<br>
>><br>
>> PROJECT (MBWriterTest)<br>
>><br>
>> INCLUDE (${CMAKE_ROOT}/Modules/FindVTK.cmake)<br>
>> IF (USE_VTK_FILE)<br>
>> INCLUDE(${USE_VTK_FILE})<br>
>> ENDIF (USE_VTK_FILE)<br>
>><br>
>> LINK_LIBRARIES(<br>
>> vtkHybrid<br>
>> )<br>
>><br>
>> ADD_EXECUTABLE(mbwritertest mbwritertest.cxx)<br>
>><br>
>><br>
>> ===================================<br>
>><br>
>> Adriano Gagliardi MEng PhD<br>
>> Business Sector Leader<br>
>> Computational Aerodynamics<br>
>> Aircraft Research Association Ltd.<br>
>> Manton Lane<br>
>> Bedford<br>
>><br>
>> Tel: 01234 32 4644<br>
>> E-mail: <a href="mailto:agagliardi@ara.co.uk">agagliardi@ara.co.uk</a><br>
>> Url: <a href="http://www.ara.co.uk" target="_blank">www.ara.co.uk</a><br>
>> -----Original Message-----<br>
>> From: Berk Geveci [mailto:<a href="mailto:berk.geveci@kitware.com">berk.geveci@kitware.com</a>]<br>
>> Sent: 03 June 2010 13:20<br>
>> To: <a href="mailto:agagliardi@ara.co.uk">agagliardi@ara.co.uk</a><br>
>> Cc: <a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a><br>
>> Subject: Re: [vtkusers] Error using vtkXMLMultiBlockDataWriter<br>
>><br>
>> Is this in parallel by any chance?<br>
>><br>
>> On Wed, Jun 2, 2010 at 10:52 AM, Adriano Gagliardi <<a href="mailto:agagliardi@ara.co.uk">agagliardi@ara.co.uk</a>><br>
>> wrote:<br>
>> ><br>
>> > Just to say that this was using VTK 5.6.0.<br>
>> ><br>
>> > ===================================<br>
>> ><br>
>> > Adriano Gagliardi MEng PhD<br>
>> > Business Sector Leader<br>
>> > Computational Aerodynamics<br>
>> > Aircraft Research Association Ltd.<br>
>> > Manton Lane<br>
>> > Bedford<br>
>> ><br>
>> > Tel: 01234 32 4644<br>
>> > E-mail: <a href="mailto:agagliardi@ara.co.uk">agagliardi@ara.co.uk</a><br>
>> > Url: <a href="http://www.ara.co.uk" target="_blank">www.ara.co.uk</a><br>
>> > -----Original Message-----<br>
>> > From: <a href="mailto:vtkusers-bounces@vtk.org">vtkusers-bounces@vtk.org</a> [mailto:<a href="mailto:vtkusers-bounces@vtk.org">vtkusers-bounces@vtk.org</a>] On<br>
>> > Behalf Of Adriano Gagliardi<br>
>> > Sent: 01 June 2010 17:50<br>
>> > To: <a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a><br>
>> > Subject: [vtkusers] Error using vtkXMLMultiBlockDataWriter<br>
>> ><br>
>> ><br>
>> > Dear Users,<br>
>> ><br>
>> > I have been having an issue with the vtkXMLMultiBlockDataWriter class<br>
>> > that contain instances of vtkPolyData. The code follows. Note that<br>
>> > this same piece of code works fine if the data within the blocks is of<br>
>> > type<br>
>> > vtkUnstructuredGrid:<br>
>> ><br>
>> > ####<br>
>> > //mbdata is a pointer to a vtkMultiBlockDataSet containing either<br>
>> > vtkPolyData or vtkUnstructuredGrid data sets<br>
>> > vtkXMLMultiBlockDataWriter* writer =<br>
>> > vtkXMLMultiBlockDataWriter::New();<br>
>> > std::ostringstream ss;<br>
>> > ss << "debugFiles/data_out.vtm";<br>
>> > writer->SetFileName(ss.str().c_str());<br>
>> > writer->SetInput(mbdata);<br>
>> > writer->Write();<br>
>> > writer->Delete();<br>
>> > ss.str(std::string());<br>
>> > ####<br>
>> ><br>
>> > When using this, I get the following error message:<br>
>> ><br>
>> > ####<br>
>> > ERROR: In<br>
>> > /usr/people/gagliard/Paraview/FILES/VTK5.6/VTK/IO/vtkXMLWriter.cxx,<br>
>> > line 607 vtkXMLPolyDataWriter (0x13473b00): Error opening output file<br>
>> "debugFiles"<br>
>> ><br>
>> > ERROR: In<br>
>> > /usr/people/gagliard/Paraview/FILES/VTK5.6/VTK/IO/vtkXMLWriter.cxx,<br>
>> > line 610 vtkXMLPolyDataWriter (0x13473b00): Error code "Is a directory"<br>
>> ><br>
>> > ERROR: In<br>
>> > /usr/people/gagliard/Paraview/FILES/VTK5.6/VTK/Filtering/vtkExecutive.<br>
>> > cxx,<br>
>> > line 757<br>
>> > vtkStreamingDemandDrivenPipeline (0x134743c0): Algorithm<br>
>> > vtkXMLPolyDataWriter(0x13473b00) returned failure for request:<br>
>> > vtkInformation (0x1347ac00)<br>
>> > Debug: Off<br>
>> > Modified Time: 45234<br>
>> > Reference Count: 1<br>
>> > Registered Events: (none)<br>
>> > Request: REQUEST_DATA<br>
>> > ALGORITHM_AFTER_FORWARD: 1<br>
>> > FORWARD_DIRECTION: 0<br>
>> > FROM_OUTPUT_PORT: -1<br>
>> > ####<br>
>> ><br>
>> > I am, however, able to write out each block separately using<br>
>> > vtkXMLPolyDataWriter:<br>
>> ><br>
>> > ####<br>
>> > for ( vtkIdType currBlk = 0; currBlk != mbdata->GetNumberOfBlocks();<br>
>> > ++currBlk ) {<br>
>> > vtkXMLPolyDataWriter* writer = vtkXMLPolyDataWriter::New();<br>
>> > std::ostringstream ss;<br>
>> > ss << "debugFiles/data_out" << currBlk << ".vtp";<br>
>> > writer->SetFileName(ss.str().c_str());<br>
>> > writer->SetInput(mbdata->GetBlock(currBlk));<br>
>> > writer->Write();<br>
>> > writer->Delete();<br>
>> > ss.str(std::string());<br>
>> > }<br>
>> > ####<br>
>> ><br>
>> > I am wondering if I'm missing something fundamental that may cause<br>
>> > that error. Hopefully someone else can point out the error as I'm not<br>
>> seeing it.<br>
>> ><br>
>> > Cheers,<br>
>> ><br>
>> > Adriano<br>
>> ><br>
>> > ===================================<br>
>> ><br>
>> > Adriano Gagliardi MEng PhD<br>
>> > Business Sector Leader<br>
>> > Computational Aerodynamics<br>
>> > Aircraft Research Association Ltd.<br>
>> > Manton Lane<br>
>> > Bedford<br>
>> ><br>
>> > Tel: 01234 32 4644<br>
>> > E-mail: <a href="mailto:agagliardi@ara.co.uk">agagliardi@ara.co.uk</a><br>
>> > Url: <a href="http://www.ara.co.uk" target="_blank">www.ara.co.uk</a><br>
>> ><br>
>> ><br>
>> > **********************************************************************<br>
>> > This email contains information that is private and confidential and<br>
>> > is intended only for the addressee.<br>
>> > If you are not the intended recipient please delete it and notify us<br>
>> > immediately by e-mailing the sender.<br>
>> > Note: All email sent to or from this address may be accessed by<br>
>> > someone other than the recipient, for system management and security<br>
>> reasons.<br>
>> > Aircraft Research Association Ltd. Registered in England,<br>
>> > Registration No<br>
>> > 503668 Registered Office:<br>
>> > Manton Lane, Bedford MK41 7PF England VAT No GB 196351245<br>
>> ><br>
>> > **********************************************************************<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 VTK FAQ at:<br>
>> > <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>
>> ><br>
>> > **********************************************************************<br>
>> > This email contains information that is private and confidential and is<br>
>> intended only for the addressee.<br>
>> > If you are not the intended recipient please delete it and notify us<br>
>> immediately by e-mailing the sender.<br>
>> > Note: All email sent to or from this address may be accessed by<br>
>> > someone other than the recipient, for system management and security<br>
>> reasons.<br>
>> > Aircraft Research Association Ltd. Registered in England, Registration<br>
>> > No<br>
>> 503668 Registered Office:<br>
>> > Manton Lane, Bedford MK41 7PF England VAT No GB 196351245<br>
>> ><br>
>> > **********************************************************************<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 VTK FAQ at:<br>
>> > <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>
>><br>
>><br>
>> **********************************************************************<br>
>> This email contains information that is private and confidential and is<br>
>> intended only for the addressee.<br>
>> If you are not the intended recipient please delete it and notify us<br>
>> immediately by e-mailing the sender.<br>
>> Note: All email sent to or from this address may be accessed by someone<br>
>> other than the recipient, for<br>
>> system management and security reasons.<br>
>> Aircraft Research Association Ltd. Registered in England, Registration No<br>
>> 503668 Registered Office:<br>
>> Manton Lane, Bedford MK41 7PF England VAT No GB 196351245<br>
>><br>
>> **********************************************************************<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 VTK FAQ at:<br>
>> <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>
><br>
><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 VTK FAQ at:<br>
> <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>
><br>
</div></div></blockquote></div><br></div>