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

David Gobbi david.gobbi at gmail.com
Mon May 25 08:25:31 EDT 2015


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/3463c029/attachment.html>


More information about the vtkusers mailing list