[vtkusers] Error using vtkXMLMultiBlockDataWriter

Adriano Gagliardi agagliardi at ara.co.uk
Wed Jun 2 10:52:33 EDT 2010


 
Just to say that this was using VTK 5.6.0. 

===================================

Adriano Gagliardi MEng PhD
Business Sector Leader
Computational Aerodynamics
Aircraft Research Association Ltd.
Manton Lane
Bedford

Tel: 01234 32 4644
E-mail: agagliardi at ara.co.uk
Url: www.ara.co.uk 
-----Original Message-----
From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf
Of Adriano Gagliardi
Sent: 01 June 2010 17:50
To: vtkusers at vtk.org
Subject: [vtkusers] Error using vtkXMLMultiBlockDataWriter


Dear Users,

I have been having an issue with the vtkXMLMultiBlockDataWriter class that
contain instances of vtkPolyData. The code follows. Note that this same
piece of code works fine if the data within the blocks is of type
vtkUnstructuredGrid:

####
//mbdata is a pointer to a vtkMultiBlockDataSet containing either
vtkPolyData or vtkUnstructuredGrid data sets
vtkXMLMultiBlockDataWriter* writer = vtkXMLMultiBlockDataWriter::New();
std::ostringstream ss;
ss << "debugFiles/data_out.vtm";
writer->SetFileName(ss.str().c_str());
writer->SetInput(mbdata);
writer->Write();
writer->Delete();
ss.str(std::string());
####

When using this, I get the following error message:

####
ERROR: In
/usr/people/gagliard/Paraview/FILES/VTK5.6/VTK/IO/vtkXMLWriter.cxx, line 607
vtkXMLPolyDataWriter (0x13473b00): Error opening output file "debugFiles"

ERROR: In
/usr/people/gagliard/Paraview/FILES/VTK5.6/VTK/IO/vtkXMLWriter.cxx, line 610
vtkXMLPolyDataWriter (0x13473b00): Error code "Is a directory"

ERROR: In
/usr/people/gagliard/Paraview/FILES/VTK5.6/VTK/Filtering/vtkExecutive.cxx,
line 757
vtkStreamingDemandDrivenPipeline (0x134743c0): Algorithm
vtkXMLPolyDataWriter(0x13473b00) returned failure for request:
vtkInformation (0x1347ac00)
  Debug: Off
  Modified Time: 45234
  Reference Count: 1
  Registered Events: (none)
  Request: REQUEST_DATA
  ALGORITHM_AFTER_FORWARD: 1
  FORWARD_DIRECTION: 0
  FROM_OUTPUT_PORT: -1
####

I am, however, able to write out each block separately using
vtkXMLPolyDataWriter:

####
for ( vtkIdType currBlk = 0; currBlk != mbdata->GetNumberOfBlocks();
++currBlk ) {
  vtkXMLPolyDataWriter* writer = vtkXMLPolyDataWriter::New();
  std::ostringstream ss;
  ss << "debugFiles/data_out" << currBlk << ".vtp";
  writer->SetFileName(ss.str().c_str());
  writer->SetInput(mbdata->GetBlock(currBlk));
  writer->Write();
  writer->Delete();
  ss.str(std::string());
}
####

I am wondering if I'm missing something fundamental that may cause that
error. Hopefully someone else can point out the error as I'm not seeing it.

Cheers,

Adriano

===================================

Adriano Gagliardi MEng PhD
Business Sector Leader
Computational Aerodynamics
Aircraft Research Association Ltd.
Manton Lane
Bedford

Tel: 01234 32 4644
E-mail: agagliardi at ara.co.uk
Url: www.ara.co.uk 


**********************************************************************
This email contains information that is private and confidential and is
intended only for the addressee.
If you are not the intended recipient please delete it and notify us
immediately by e-mailing the sender.
Note: All email sent to or from this address may be accessed by someone
other than the recipient, for system management and security reasons.
Aircraft Research Association Ltd.  Registered in England, Registration No
503668 Registered Office:
Manton Lane, Bedford MK41 7PF England VAT No GB 196351245

**********************************************************************
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at:
http://www.vtk.org/Wiki/VTK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers


**********************************************************************
This email contains information that is private and confidential and is intended only for the addressee.
If you are not the intended recipient please delete it and notify us immediately by e-mailing the sender.
Note: All email sent to or from this address may be accessed by someone other than the recipient, for
system management and security reasons.
Aircraft Research Association Ltd.  Registered in England, Registration No 503668 Registered Office:
Manton Lane, Bedford MK41 7PF England VAT No GB 196351245

**********************************************************************



More information about the vtkusers mailing list