RES: [vtkusers] Converting vtkMultiBlockDataSet into vtkDataObject

Renato N. Elias rnelias at nacad.ufrj.br
Thu Oct 11 21:34:17 EDT 2007


Thanks David, Jean and Berk for the help given. As I was in a hurry I used
the laziest method -- downloaded and compiled a vtk 5.0.3 version which
reads in all Ensight files as single block ;o)

I also tried the suggestions given by David and Jean but I'm not so skilled
with the vtk structure to overcome some compilation annoyances and nothing
worked (and I tried several combinations...). I have not given up yet, just
solved my urgent problem. 

The Berk's approach seems straightforward to write also multi block files
but, I guess, It will not be abled to write files as single blocks (.vtu in
my case). The key point here is that I can't use some ParaView's features
since my data is being treated as multi block even when I have only one
part.


>>> Berk: Just a comment regarding these new VTK's features:

These new features are being designed over the old classes. I guess that
It's a bit dangerous since there's a bunch of codes out there that will
simply stop working with the newest VTK's versions. There should be a kind
of vtkGenericMultBlockEnsightReader while the old vtkGenericEnsightReader is
kept for backward compatibility. Just a thought...

Regards

Renato.



-----Mensagem original-----
De: Berk Geveci [mailto:berk.geveci at kitware.com] 
Enviada em: quinta-feira, 11 de outubro de 2007 20:40
Para: Renato N. Elias
Cc: vtkusers at vtk.org
Assunto: Re: [vtkusers] Converting vtkMultiBlockDataSet into vtkDataObject

Try using vtkMultiGroupDataWriter. You have to use CVS VTK as I wrote that
after 5.0 branch. That should produce a .vtm file as well as one or more
.vtX files.
We will be focusing on multi-block support for the next version of ParaView.
Hopefully, you won't have to worry about this after 3.4.

-berk

On 10/11/07, Renato N. Elias <rnelias at nacad.ufrj.br> wrote:
>
> Hi folks,
>
> I'm facing the following problem:
>
> I'm trying to load an Ensight file and convert it into a VTK XML file. 
> The problem is that vtkGenericEnSightReader is treating my file as a 
> vtkMultiBlockDataSet, even for a file with only one piece of data (I 
> guess, it should not work in this way).
>
> The method of using 
> vtkfile->SetInputConection(reader->GetOutputPort()) does not work at 
> all and using vtkfile->SetInput(reader->GetOutput()) return me a
compilation error message which says:
>
> cannot convert parameter 1 from 'vtkMultiBlockDataSet *' to 
> 'vtkDataObject *'
>
> I already tried the forced method of using
> reinterpret_cast<vtkDataObject>(vtkMultiBlockDataSet) but it has not 
> worked
> -- I should confess that I'm just a Fortran (and ex-Object Pascal) 
> programmer playing a little bit with C++.
>
> I thought also about using the filter vtkMultiGroupDataExtractDataSets 
> but I have no idea how I could use it. It's not on my VTK book (I 
> guess, multi block data is a VTK-CVS feature). Ok, I could just 
> simplify my problem using previous versions of VTK but in the other 
> hand, I'd like to keep everything updated. Any ideas?
>
> Regards
>
> Renato.
>
> p.s.: In fact, I'm trying to overcome a ParaView problem by converting 
> my Ensight files into VTK single block data.
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: 
> http://www.vtk.org/Wiki/VTK_FAQ Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>




More information about the vtkusers mailing list