Hello, I've got a question.
I've justed extracted the image value of dicom file without header.
Is there any way to get ROI of dcm file??
For example, I've got a series of dicom files which sizes are 672*672.
But I want dicom files of 256*256, around center.
From the help menu, I found DJCodecParameter class and GetROI function.
Is it right to use it??
If it is, how to use it.
I decleared like this.
DJCodecParameter *QQ=new DJCodecParameter(AA);
But it doesn't work.
I' m quite new in using DCMTK;
Please help me.
How to get ROI of dicom file?
Moderator: Moderator Team
-
- OFFIS DICOM Team
- Posts: 1444
- Joined: Tue, 2004-11-02, 17:22
- Location: Oldenburg, Germany
- Contact:
-
- Posts: 13
- Joined: Thu, 2008-03-13, 06:59
1 more question^^
m_strFileName.Format("DCT");
m_strFileName.Format(m_strFileName+"%3.4d",j);
m_strFileName.Format(m_strFileName+".dcm");
DicomImage *image = new DicomImage(m_strFileName);
image->createClippedImage(100,100,256,256,0);
XSize=image->getWidth();
YSize=image->getHeight();
Depth=image->getDepth();
if (image != NULL)
{
if (image->getStatus() == EIS_Normal)
{
Uint8 *pixelData = (Uint8 *)(image->getOutputData(8 /* bits per sample */));
if (pixelData != NULL)
{
for(int i=0;i<256*256;i++)
{
Data=0;
}
for(i=0;i<256*256;i++)
{
Data = pixelData;
}
}
}
}
I did like this.
But image is something wrong.
Can you tell me about problem??
m_strFileName.Format(m_strFileName+"%3.4d",j);
m_strFileName.Format(m_strFileName+".dcm");
DicomImage *image = new DicomImage(m_strFileName);
image->createClippedImage(100,100,256,256,0);
XSize=image->getWidth();
YSize=image->getHeight();
Depth=image->getDepth();
if (image != NULL)
{
if (image->getStatus() == EIS_Normal)
{
Uint8 *pixelData = (Uint8 *)(image->getOutputData(8 /* bits per sample */));
if (pixelData != NULL)
{
for(int i=0;i<256*256;i++)
{
Data=0;
}
for(i=0;i<256*256;i++)
{
Data = pixelData;
}
}
}
}
I did like this.
But image is something wrong.
Can you tell me about problem??
Who is online
Users browsing this forum: Ahrefs [Bot] and 1 guest