[vtkusers] vtkNIFTIImageReader.h: No such file or directory

Francisco Lopez de la Franca franciscolopezdelafranca at gmail.com
Mon May 25 08:35:49 EDT 2015


Hi.
Thanks a lot. I've just downloaded VTK 6.2.0 and I've realised that there
it is what I need.
But, I take advantage of this moment to tell about another problem.

I read a NIFTI file (abc.nii) through vtkNIFTIImageReader. Its output is
passed to either vtkHull or vtkDelaunay3D in order to get the convex hull
of the objects in the Nifti image.

And, in the end, I write their result with vtkNIFTIImageWriter.

The compilation goes right, but the execution (on a Windows system) does
not produce anything and I hardly see a "command prompt" window flashing
only once, but I am unable to read its content.

I think there must be some incompatibility between the output of
vtkNifitiImageReader and the input to vtkHull or vtkDelaunay3D, or
something similar.

Any suggestion on how to read a NIFTI file and get its convex hull and then
write it to another Nifti file.

Thank you very much.
/Francisco

2015-05-25 14:25 GMT+02:00 David Gobbi <david.gobbi at gmail.com>:

> Hi Francisco,
>
> The vtkNIFTIImageReader did not appear until VTK 6.2.
> There are two options that I can recommend:
>
> 1) Use the VTK git master, which has the most recent update to the NIFTI
> reader (the vtkNIFTIImageReader in VTK 6.2 gives the wrong sform offset in
> some situations, this is fixed in git master).
>
> 2) If you want to keep the VTK you have, then you can get the NIFTI reader
> separately by building the vtk-dicom package:
> https://github.com/dgobbi/vtk-dicom (the class is called "vtkNIFTIReader"
> in vtk-dicom, but is otherwise identical to the one in the VTK git master
> branch).
>
> Cheers,
>  - David
>
>
>
> On Mon, May 25, 2015 at 1:54 AM, Francisco Lopez de la Franca <
> franciscolopezdelafranca at gmail.com> wrote:
>
>> Hi everybody.
>> I'd like to read a NIFTI image from VTK.
>> I downloaded and compiled VTK 6.1.0, but when I include the
>> vtkNIFTIImageReader header file, the compilation gives the error "No such
>> file or directory".
>> I've searched for the header file into the VTK directory and it is true,
>> there is no such a file.
>>
>> I've tested with vtkImageReader2 and compilation goes fine, but the NIFTI
>> file read does not seem to go well.
>>
>> Does anybody know what the problem could be?
>>
>> Thanks a lot.
>> My best regards.
>> /Francisco
>>
>> P.D.: My CMakeLists.txt contains the next lines:
>>
>> cmake_minimum_required(VERSION 2.8)
>>
>> project(CV_TFM_CONVEX_HULL)
>>
>> # Find VTK.
>> find_package(VTK REQUIRED)
>> include(${VTK_USE_FILE})
>>
>> set(CV_TFM_CONVEX_HULL_SRC CV_TFM_ConvexHull.cxx)
>>
>> add_executable(CV_TFM_CONVEX_HULL ${CV_TFM_CONVEX_HULL_SRC})
>>
>> target_link_libraries(CV_TFM_CONVEX_HULL ${VTK_LIBRARIES})
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20150525/93b88384/attachment.html>


More information about the vtkusers mailing list