[vtkusers] Re: What Is Wrong With My VTK Pipeline ?
Sylvain Jaume
sylvain.jaume at kitware.com
Wed Sep 19 09:27:12 EDT 2007
Hi Mark,
(Please keep your postings to vtkusers mailing list.)
vtkImageMandelbrotSource and vtkVolume16Reader are both sources, they
don't accept an input. They both produce a vtkImageData, so either use
one or the other for testing your application.
You can convert a vtkImageData to a vtkUnstructuredGrid using
vtkThreshold. For volume rendering a vtkUnstructuredGrid, have a look at
the vtkUnstructuredGridVolumeRayCastMapper. You'll find an example in
VTK/Examples/VolumeRendering/Tcl/IntermixedUnstructuredGrid.tcl
Sincerely,
Sylvain
JohnMark wrote:
> Hi , Sylvain ,
> thank you for your help within these days . and this is one problem
> that my friend ask me , but I
> still don't know why it is , even though I have read the vtk user guide
> and so on :
> I have been testing some examples of cells during these days . and I
> find an interesting class :
> vtkImageMandelbrotSource , because its output can be used by volume
> rendering , although the volume
> rendering is unstructured grid volume rendering .
> and I find it has an input method : SetInputConnection(vtkDataObject
> *) , so I think it may be OK
> if I take the output of class vtkVolume16Reader as its input , but ,
> luckily , I get an error :
> Attempt to connect input port index 0 for an algorithm with 0 input
> ports . but in other examples of
> volume rendering , there is not any error like this , and all of them
> work well . so I don't think
> there is 0 input ports .
> the codes is just as follows :
>
> vtkVolume16Reader *reader = vtkVolume16Reader::New();//**** the v16
> codes is no problem , I have test it many times .
> reader->SetDataDimensions(64,64);
> reader->SetImageRange(1,93);
> reader->SetDataByteOrderToLittleEndian();
> reader->SetFilePrefix("../headsq/quarter");
> reader->SetDataSpacing(3.2, 3.2, 1.5);
> vtkImageMandelbrotSource *input = vtkImageMandelbrotSource::New();
> input->SetInputConnection(reader->GetOutputPort());
>
> so there are the problems :
> 1、of course , vtkImageMandelbrotSource can create images by itself
> , is it real that
> vtkImageMandelbrotSource can not take other images as input ports ?
> 2、if it is so , all the unstructured grid volume rendering methods
> can not take random images
> as their input ports ? if it is not , what should I do before I send
> the images (like .dcm images) to
> vtkImageMandelbrotSource ?
> and I have tried vtkUnstructuredGridAlgorithm , it can transform the
> images to unstructured grid ,
> just as the unstructured grid volume rendering requires , but it doesn't
> work .
> or in other words , these methods , like
> vtkUnstructuredGridVolumeZSweepMapper , can not be used
> by the medical visualization system , so which field can they be used ?
>
> thank you with great regards !
>
> Mark
>
>
> ------------------------------------------------------------------------
> 使用新一代 Hotmail,更强大、更安全、更多存储空间! 立刻体验!
> <http://www.hotmail.com>
More information about the vtkusers
mailing list