<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<body bgcolor="#FFFFFF">
Not checked everything, but for sure SetDataSpacing(1,1,1) is wrong.
<p>First check the attributes of the original DICOM files.
<br>( Sante Viewer LE for example, at <a href="http://users.forthnet.gr/ath/mkanell/applications.html#SanteViewerLE">http://users.forthnet.gr/ath/mkanell/applications.html#SanteViewerLE,</a>
is a freeware Windows DICOM viewer. Or you can use again Dicom2 to convert
into readable text. )
<p>Find tags <0028,0030> "Pixel Spacing" and <0018,0050> "Slice Thickness"
(in truth, better you check <0020,1041> "Slice Location" as well, to
see if slice thickness is really the distance between two adiacent images).
<br>Then do "SetDataSpacing(xPixelSpacing, yPixelSpacing, SliceDistance)".
<p>Regards
<br> Stefano Mininel
<p>P.S.: To Sebastian Barré: I'm humbly sorry!! I didn't remember
Dicom2 was for Linux too. It's a great tool! I didn't mean to underestimate
it. :-)
<p>cspl wrote:
<blockquote TYPE=CITE><style></style>
<font face="Arial"><font size=-1>Dear
friends,</font></font> <font face="Arial"><font size=-1>I converted
my DICOM files into .raw files using DICOM2 tool.After that I read
the data using vtkVolume16Reader.But I am not getting exact volume.I have
written code as follows.Total 51 files.Image size is 512kb.</font></font> <font face="Arial"><font size=-1>vtkRenderer
*ren1 = vtkRenderer::New();</font></font>
<br><font face="Arial"><font size=-1>vtkRenderWindow *renWin = vtkRenderWindow::New();</font></font>
<br><font face="Arial"><font size=-1>renWin->AddRenderer(ren1);</font></font>
<br><font face="Arial"><font size=-1>vtkRenderWindowInteractor *iren1 =
vtkRenderWindowInteractor::New();</font></font>
<br><font face="Arial"><font size=-1>iren1->SetRenderWindow(renWin);</font></font>
<br><font face="Arial"><font size=-1>vtkVolume16Reader *reader = vtkVolume16Reader::New();</font></font>
<br><font face="Arial"><font size=-1> reader->SetDataByteOrderToLittleEndian();</font></font>
<br><font face="Arial"><font size=-1> reader->SetFilePrefix("C:\\DicomFiles\\DownLoad\\xyz\\6554888");</font></font>
<br><font face="Arial"><font size=-1> reader->SetFilePattern("C:\\DicomFiles\\DownLoad\\xyz\\6554888.raw");</font></font>
<br><font face="Arial"><font size=-1> reader->SetImageRange(6554888,6555788);</font></font>
<br><font face="Arial"><font size=-1> reader->SetDataSpacing(1,1,1);</font></font>
<br><font face="Arial"><font size=-1> reader->SetDataDimensions(256,256);</font></font> <font face="Arial"><font size=-1> vtkImageActor
*Actor=vtkImageActor::New();</font></font>
<br><font face="Arial"><font size=-1> Actor->SetInput(reader->GetOutput());</font></font>
<br><font face="Arial"><font size=-1> renWin->SetSize(300,300);</font></font>
<br><font face="Arial"><font size=-1> ren1->SetBackground(0.1, 0.2,
0.4);</font></font>
<br><font face="Arial"><font size=-1> ren1->AddActor(Actor);</font></font>
<br><font face="Arial"><font size=-1> iren1->Initialize();</font></font>
<br><font face="Arial"><font size=-1> renWin->Render();</font></font>
<br><font face="Arial"><font size=-1> SAVEIMAGE( renWin );</font></font>
<br><font face="Arial"><font size=-1> iren1->Start();</font></font>
<br><font face="Arial"><font size=-1>If anybody knows pls.help me .</font></font> <font face="Arial"><font size=-1>Regards,</font></font><font face="Arial"><font size=-1>Ramakrishna</font></font></blockquote>
</body>
</html>