[Ves] Using KiwiViewer to load a DICOM file
Samuel Valdes G.
sovaldes at uc.cl
Wed Jul 25 20:23:19 EDT 2012
1. First I went to the vesKiwiDataLoader.cpp file and below the line 192 I
add this code
else if (this->hasEnding(filename, "dcm"))
{
vtkSmartPointer<vtkDICOMImageReader> reader =
vtkSmartPointer<vtkDICOMImageReader>::New();
reader->SetFileName(filename.c_str());
//return 0;
this->datasetFromAlgorithm(reader);
}
2. Then I added in the include area the vtkDICOMImageReader.h. In the line
27, I put
#include <vtkDICOMImageReader.h>
3. Afterwards I add DICOM file to the data folder (located in
/path/to/VES/Apps/iOS/Kiwi/Kiwi/Data) and I drag it to my project. The name
of my file is test.dcm
4. The I went to the vesKiwiViewer.cpp file and I add an option to open my
DICOM file in the dataset. I wrote in the line 192
this->addBuiltinDataset("Test", "test.dcm");
5. After that I compiled again in the mac terminal the ves-ios-simulator
and ves-ios-device folders (make ves-ios-simulator and make ves-ios-device)
in the /path/to//VES/Apps/iOS/CMakeBuild/build/CMakeExternals/Build path
and the I compiled all the kiwi project again.
Now the problem that I am having is that I am having a *memory acces problem
* when I tried to open the new file in the simulator. As I checkes, the
problem is related with the *datasetFromAlgorithm,* which is not letting me
to render the DICOM image. The error that I am having is in the
vtkPolyData.h at the line 78, when the program is trying to convert de
DICOM dataset to a vtkPolyData.
Do you have any solution for this?
Best Regards,
Samuel
On Wed, Jul 25, 2012 at 8:22 PM, Samuel Valdes G. <valdesgutierrez at gmail.com
> wrote:
> So I did this
>
> 1. First I went to the vesKiwiDataLoader.cpp file and below the line 192 I
> add this code
>
> else if (this->hasEnding(filename, "dcm"))
>
> {
>
> vtkSmartPointer<vtkDICOMImageReader> reader =
> vtkSmartPointer<vtkDICOMImageReader>::New();
>
> reader->SetFileName(filename.c_str());
>
> //return 0;
>
> this->datasetFromAlgorithm(reader);
>
> }
>
> 2. Then I added in the include area the vtkDICOMImageReader.h. In the line
> 27, I put
>
> #include <vtkDICOMImageReader.h>
>
> 3. Afterwards I add DICOM file to the data folder (located in
> /path/to/VES/Apps/iOS/Kiwi/Kiwi/Data) and I drag it to my project. The name
> of my file is test.dcm
>
> 4. The I went to the vesKiwiViewer.cpp file and I add an option to open my
> DICOM file in the dataset. I wrote in the line 192
>
> this->addBuiltinDataset("Test", "test.dcm");
>
> 5. After that I compiled again in the mac terminal the ves-ios-simulator
> and ves-ios-device folders (make ves-ios-simulator and make ves-ios-device)
> in the /path/to//VES/Apps/iOS/CMakeBuild/build/CMakeExternals/Build path
> and the I compiled all the kiwi project again.
>
> Now the problem that I am having is that I am having a *memory acces
> problem* when I tried to open the new file in the simulator. As I
> checkes, the problem is related with the *datasetFromAlgorithm,* which is
> not letting me to render the DICOM image. The error that I am having is in
> the vtkPolyData.h at the line 78, when the program is trying to convert de
> DICOM dataset to a vtkPolyData.
>
> Do you have any solution for this?
>
> Best Regards,
>
> Samuel
>
> On Wed, Jul 25, 2012 at 1:42 PM, Pat Marion <pat.marion at kitware.com>wrote:
>
>> Hi Samuel,
>>
>> The KiwiViewer app for Android and iPad does not have support for DICOM,
>> however, the VTK library that the app is based on does have DICOM I/O
>> support, so it should be straightforward to add a DICOM reader to
>> KiwiViewer. In theory, it should work with just a small amount of
>> additional code, but I have not tried it.
>>
>> If you decide to try yourself, first make sure you can build and run
>> KiwiViewer on your device. Next, edit the file
>> src/kiwi/vesKiwiDataLoader.cpp. Search for vtkXMLImageDataReader and
>> you'll see the code that handles vtk image files (.vti extension.) You
>> could insert similar code here to read DICOM files using the
>> vtkDICOMImageReader.
>>
>> Pat
>>
>> On Tue, Jul 24, 2012 at 7:35 PM, Samuel Valdes G. <sovaldes at uc.cl> wrote:
>>
>>> Had anyone had succes loading a DICOM file through Kiwiviewr? IS there
>>> any tutorial for doing that?
>>>
>>> Regards
>>>
>>> Samuel Valdés G.
>>> _______________________________________________
>>> Ves mailing list
>>> Ves at public.kitware.com
>>> http://public.kitware.com/cgi-bin/mailman/listinfo/ves
>>>
>>>
>>
>
>
> --
> Atte
>
> Samuel Valdés G.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/ves/attachments/20120725/febf3880/attachment-0001.html>
More information about the Ves
mailing list