[vtkusers] New to vtk- please

Femi Ayinde femi_folorunso at yahoo.com
Thu Apr 17 00:42:30 EDT 2008


My computer runs Vista, but I find it difficult to run
the vtk codes. Any help?
Femi
--- vtkusers-request at vtk.org wrote:

> Send vtkusers mailing list submissions to
> 	vtkusers at vtk.org
> 
> To subscribe or unsubscribe via the World Wide Web,
> visit
> 	http://www.vtk.org/mailman/listinfo/vtkusers
> or, via email, send a message with subject or body
> 'help' to
> 	vtkusers-request at vtk.org
> 
> You can reach the person managing the list at
> 	vtkusers-owner at vtk.org
> 
> When replying, please edit your Subject line so it
> is more specific
> than "Re: Contents of vtkusers digest..."
> 
> 
> Today's Topics:
> 
>    1. Needed advice on blending and reslice (Anka
> Kochanowska)
>    2. Re: Writing MultiBlock datasets (Renato N.
> Elias)
> 
> 
>
----------------------------------------------------------------------
> 
> Message: 1
> Date: Wed, 16 Apr 2008 10:44:01 -0400
> From: Anka Kochanowska <anka at bic.mni.mcgill.ca>
> Subject: [vtkusers] Needed advice on blending and
> reslice
> Cc: vtkusers at vtk.org
> Message-ID: <480610B1.3020305 at bic.mni.mcgill.ca>
> Content-Type: text/plain; charset=ISO-8859-1;
> format=flowed
> 
> Hi!
> I have two sets of vtkImageData, not mutually
> exclusive. I would like to 
> show them in 2 different colors and I would like to
> slice through both 
> at the same time and show blended slices.
> Should I blend the image data first and then use
> vtkImageReslice?
> Should I slice each one separately, then blend the
> resulting ImageReslices?
> 
> Could one of you advice me, please?
> Anka
> 
> 
> 
> 
> ------------------------------
> 
> Message: 2
> Date: Wed, 16 Apr 2008 11:56:01 -0300
> From: "Renato N. Elias" <rnelias at nacad.ufrj.br>
> Subject: Re: [vtkusers] Writing MultiBlock datasets
> To: vtkusers at vtk.org
> Message-ID: <48061381.3030901 at nacad.ufrj.br>
> Content-Type: text/plain; charset=ISO-8859-1;
> format=flowed
> 
> 
> Hooray, it works ;o)
> 
> For future references...
> 
> // Writing a MultiBlock dataset
>   vtkXMLMultiBlockDataWriter* mbw =
> vtkXMLMultiBlockDataWriter::New();
>   mbw->SetFileName("foo.vtm");
>   mbw->SetInput(MyMultiBlock);
>   mbw->Write();
> 
> P.S.: I was using VTK's head, so, the file created
> could only be read in 
> ParaView's head (it's not a major problem since you
> can load the blocks 
> piece-by-piece in previous ParaView's versions).
> 
> Thanks a lot Amy and Utkarsh
> 
> Renato.
> 
> 
> Utkarsh Ayachit wrote:
> > Oh another thing, you cannot directly instantiate 
> > vtkXMLCompositeDataWriter since it's an abstract
> class. So,
> >
> > ...
> > vtkXMLCompositeDataWriter* mbw  =
> vtkXMLMultiBlockDataWriter::New();
> > ...
> >
> > Utkarsh
> >
> > Utkarsh Ayachit wrote:
> >> You don't have to "get the output" from a
> vtkMultiBlockDataSet. 
> >> vtkMultiBlockDataSet is itself the dataobject
> that can be set as the 
> >> input to a filter/writer.
> >>
> >> To reiterate Amy, try:
> >>
> >> vtkMultiBlockDataSet* mb =
> vtkMultiBlockDataSet::New();
> >> ...
> >> vtkXMLCompositeDataWriter* mbw =
> vtkXMLCompositeDataWriter::New();
> >> mbw->SetInput(mb); // directly set "mb" as the
> input no need to 
> >> do                   // somethign like
> mb->GetOutput().
> >>
> >> Utkarsh
> >>
> >> Renato N. Elias wrote:
> >>>
> >>> yes, in fact, it was my first try. The problem
> is that I don't know 
> >>> how to get the output from vtkMultiBlockDataSet.
> How should 
> >>> classvtkXMLCompositeDataWriter and
> vtkMultiBlockDataSet be connected?
> >>>
> >>> Renato.
> >>>>
> >>>>
> >>>> Have you tried calling mbw->SetInput(mb)?
> >>>>
> >>>> - Amy
> >>>>
> >>>> Renato N. Elias wrote:
> >>>>> Hi folks,
> >>>>>
> >>>>> does anybody could give me a hand in writing a
> 
> >>>>> vtkMultiBlockDataSet. I saw there's a 
> vtkXMLCompositeDataWriter 
> >>>>>
>
<http://www.vtk.org/doc/nightly/html/classvtkXMLCompositeDataWriter.html#f2b96e41718dcb0bc93db39ad82675ad>
> 
> >>>>> and a derived vtkXMLMultiBlockDataWriter 
> >>>>>
>
<http://www.vtk.org/doc/nightly/html/classvtkXMLMultiBlockDataWriter.html>
> 
> >>>>> the problem is that I can't do something like:
> >>>>>
> >>>>> // creating a multiblock object
> >>>>> vtkMultiBlockDataSet* mb=
> vtkMultiBlockDataSet::New();
> >>>>>
> >>>>> // Assign some stuffs
> >>>>> mb->SetBlock(0, ???)
> >>>>> mb->SetBlock(1, ???)
> >>>>> mb->SetBlock(2, ???)
> >>>>>
> >>>>> // Create the writer
> >>>>> vtkXMLCompositeDataWriter* mbw =
> vtkXMLCompositeDataWriter::New();
> >>>>>
> >>>>> // Set the filename
> >>>>> mbw->SetFileName("test.vtm");
> >>>>>
> >>>>> // Setting up the connection <--- HERE'S MY
> DOUBT
> >>>>> mbw->SetInputConnection(mb->GetOutput());
> >>>>>
> >>>>> // Write the data
> >>>>> mbw->Write();
> >>>>>
> >>>>> since vtkMultiBlockDataSet does not have a
> "GetOutput" method.
> >>>>>
> >>>>> Does anyone could supply an example?
> >>>>>
> >>>>> Thanks
> >>>>>
> >>>>> Renato.
> >>>>>
> _______________________________________________
> >>>>> 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
> >>>>>
> >>>>>
> >>>>
> >>>
> >>> _______________________________________________
> >>> This is the private VTK discussion list.
> >>> Please keep messages on-topic. Check the FAQ at:
> 
> 
=== message truncated ===



      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ



More information about the vtkusers mailing list