[vtkusers] What Is Wrong With My VTK Pipeline ?
Amy Squillacote
amy.squillacote at kitware.com
Wed Sep 19 08:14:53 EDT 2007
Hi Mark,
vtkImageMandelbrotSource does not take any inputs, regardless of the
dataset type of the input. Looking in the constructor for that class,
the last line is the following.
this->SetNumberOfInputPorts(0);
That means that even though one of the superclasses of
vtkImageMandelbrotSource (vtkAlgorithm, specifically) has a
SetInputConnection method, it is ignored by the class you're using.
If you want to volume render the dataset output from vtkVolume16Reader,
use one of the subclasses of vtkVolumeMapper, not
vtkUnstructuredGridVolumeMapper. The subclasses of vtkVolumeMapper work
for vtkImageData, which the output of vtkVolume16Reader is.
- Amy
JohnMark wrote:
> Hi , vtkusers ,
> 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 my 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
>
>
> ------------------------------------------------------------------------
> 使用新一代 Windows Live Messenger 轻松交流和共享! 立即体验!
> <http://messenger.live.cn/>
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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
>
--
Amy Squillacote
Kitware, Inc.
28 Corporate Drive
Clifton Park, NY 12065
Phone: (518) 371-3971 x106
More information about the vtkusers
mailing list