[vtkusers] Oblique slice of 3D image data

Jothy jothybasu at gmail.com
Tue Sep 20 10:00:41 EDT 2011


Take a look at this example

http://vtk.org/gitweb?p=VTK.git;a=blob;f=Examples/ImageProcessing/Cxx/ImageSlicing.cxx

Jothy

On Tue, Sep 20, 2011 at 2:57 PM, Tijmen Klein <T.R.Klein at student.rug.nl>wrote:

> Could you elaborate a bit on this? I'm not sure how to create the correct
> 4x4 matrix from the normal and the origin.
>
> Cheers,
> Tijmen
>
> On Tue, Sep 20, 2011 at 3:44 PM, Jothy <jothybasu at gmail.com> wrote:
>
>> You could create a vtkMatrix4x4  and set this matrix to
>> vtkImageReslice->SetResliceAxes(matrix4x4).
>>
>> Jothy
>>
>>
>> On Tue, Sep 20, 2011 at 1:32 PM, Tijmen Klein <T.R.Klein at student.rug.nl>wrote:
>>
>>> Thank you for the thip, the combination of vtkImageReslice ->
>>> vtkImagemapToColors indeed gives an output that looks what I would expect :)
>>> But I am having troubles setting the correct value
>>> for setResliceAxesDirectionCosines(), since I only have an origin and normal
>>> (no point1 point2).
>>> Right now I just set the origin (SetResliceAxesOrigin()), but I don't set
>>> the Direction. One strange thing that I am seeing, is that the plane is
>>> rendered outside the original dataset... Would this be because I don't set a
>>> proper direction? Or could it have some other reason?
>>>
>>> Cheers,
>>> Tijmen
>>>
>>>
>>> On Tue, Sep 20, 2011 at 1:50 PM, Jothy <jothybasu at gmail.com> wrote:
>>>
>>>> I would recommed vtkImageReslice to cut the imageData and to use
>>>> vtkImagemapToColors with appropriate vtkLookUpTable , then map your data.
>>>>
>>>> Jothy
>>>>
>>>> On Tue, Sep 20, 2011 at 12:40 PM, Tijmen Klein <
>>>> T.R.Klein at student.rug.nl> wrote:
>>>>
>>>>> I'm currently lost on this one. I have some 3D scalar image data, and
>>>>> want to extract and display a 2D slice/cut from this. The origin and normal
>>>>> of the cutting plane are obtained externally. So I construct a vtkPlane with
>>>>> this information, and then apply this pipeline:
>>>>>
>>>>> vtkStructuredPointsReader -> vtkCutter (with vtkPlane as the cut
>>>>> function) -> vtkPolyDataMapper -> vtkActor
>>>>>
>>>>> However, the colors that are shown on the plane don't seem to be
>>>>> accurate. When I create a slice in Paraview of the same data, the colors on
>>>>> the plane look completely different. Is this because Paraview uses a
>>>>> textured plane for this? If so, how can I get this in VTK? I've looked at
>>>>> the vtkImageReslice, but it does not really seem to be handy when you work
>>>>> with an external normal and origin?
>>>>>
>>>>> Cheers,
>>>>> Tijmen
>>>>>
>>>>> _______________________________________________
>>>>> 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
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Jothybasu K Selvaraj
>>>> PhD Student
>>>> University of Liverpool
>>>> Liverpool,UK
>>>>
>>>>
>>>
>>
>>
>> --
>> Jothybasu K Selvaraj
>> PhD Student
>> University of Liverpool
>> Liverpool,UK
>>
>>
>


-- 
Jothybasu K Selvaraj
PhD Student
University of Liverpool
Liverpool,UK
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110920/ca1d8521/attachment.htm>


More information about the vtkusers mailing list