[vtkusers] in java

Gururajan gururajan.r at raster.in
Tue Jul 28 11:59:46 EDT 2009


Hi
Sercanfile:///home/gururaj/eclipse%20Project/SimpleVTK/SimpleVtk/src/DicomVTK/SimpleVTK.java

i apologize for that, here after i will add vtkusers.

the below code only i used in my java programme,
the problem is
"reader.SetDirectoryName(directoryPath); " is not reading the series of
files, it reads only one file. that is my bug.

Please help me on it.

Thank  you so much. Please see the attached my main programme.

once again thanks for your kind reply
Guru




vtkImageWriter writer = new vtkImageWriter();
writer.SetInput(imageData);
writer.SetFileName("image.vtk");
writer.SetFileDimensionality(3); //for 3d datasets
writer.Write();

And you can read DICOM files like this:

vtkDICOMImageReader reader = new vtkDICOMImageReader();
reader.SetDirectoryName(directoryPath);
reader.SetDataScalarTypeToUnsignedChar(); //or whatever you want
reader.Update();




Sercani wrote:
> Hi Guru;
> Always remember to keep the discussion on vtk user list, don't forget
> to add the vtkusers at vtk.org to your mail header...There a lot of
> writers in vtk, for example if you want to write imagedata to .vtk
> file you can use it like this:
>
> vtkImageWriter writer = new vtkImageWriter();
> writer.SetInput(imageData);
> writer.SetFileName("image.vtk");
> writer.SetFileDimensionality(3); //for 3d datasets
> writer.Write();
>
> And you can read DICOM files like this:
>
> vtkDICOMImageReader reader = new vtkDICOMImageReader();
> reader.SetDirectoryName(directoryPath);
> reader.SetDataScalarTypeToUnsignedChar(); //or whatever you want
> reader.Update();
>
> I don't use itk, so i don't have the jar...
> Namaste
> Sercan...
>
>
>
> Gururajan wrote:
>> hi Sercan,
>>
>> Thanks for your kind reply .
>>
>> Actually i have Vtk.jar , and i configure in Eclipse environment,
>> My objective is
>>
>>     I haveto  read series of dicom files and then convert into 3d format
>> (.vtk) or any format to display that readed files in 3D view.
>>
>> i have configured the vtk.jar in eclipse.
>>
>> Please help me, or if u have itk.jar plz give it to me.
>> Thank you so much
>> Namaste
>> Guru Rajan.r
>>
>>
>> Sercani wrote:
>>  
>>> Hi Guru,
>>> What do you exactly mean by 3d view? MIP? MINIP? VRT? SSD? MPR? Have
>>> you built vtk with java wrapping on?
>>> Namaste,
>>> Sercan...
>>>
>>>
>>> Gururajan wrote:
>>>    
>>>> Hi all,
>>>>
>>>> am a programmer in java, i want to read dicom series of files &
>>>> then it
>>>> should display in 3d view using Vtk.
>>>>
>>>> Please any one can help me.
>>>>
>>>> Thanks
>>>> Guru
>>>> _______________________________________________
>>>> 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
>>>>
>>>>         
>>
>>
>>   
>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: SimpleVTK.java
Type: text/x-java
Size: 5607 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090728/ed8e5769/attachment.java>


More information about the vtkusers mailing list