Hi David,

sorry for the delayed reply. I include mitk-users to stay on the mailing list.


If the slope / intercept tags are not present, I think GDCM would apply slope 1 
and intercept 0, i.e. no scaling at all. Is this consistent with your 
observations?


Regards,
Daniel


--

Dr. Daniel Maleike, Mint Medical GmbH

Friedrich-Ebert-Straße 2, 69221 Dossenheim/Heidelberg
Geschäftsführer: Dr. Matthias Baumhauer, Registergericht Mannheim, HRB 709351
________________________________
From: david....@louisville.edu <david....@louisville.edu>
Sent: Wednesday, July 13, 2016 5:48 PM
To: Daniel Maleike
Subject: Re: [mitk-users] Reading DICOM file image data

Hello again,

I have implemented a function in 
MITK/Modules/Core/src/IO/mitkDicomSeriesReader.cpp that is modeled after 
ReadPhilips3DDicom to read the header of a given Dicom file path. I was able to 
find the PatientID tag (0010|0020) but not the Rescale Slope or Intercept tag 
(0028|1052 , 0028|1053). I'm not sure how a scaling is being applied to the 
pixel values if these tags are not present. Is there a default scaling that is 
performed?

Once again thank you for the help.

Best Regards,

David Exe

p.s. Here is the code for the implemented function:

bool
DicomSeriesReader::FindRescaleSlope(const std::string &filename)
{
  DcmIoType::Pointer io = DcmIoType::New();

  if (io->CanReadFile(filename.c_str()))
  {
    MITK_INFO << "File Read successful";
    //Look at header Tag for RescaleSlope
    gdcm::Reader reader;
    reader.SetFileName(filename.c_str());
    reader.Read();
    gdcm::DataSet &data_set = reader.GetFile().GetDataSet();
    gdcm::StringFilter sf;
    sf.SetFile(reader.GetFile());

    if (data_set.FindDataElement(gdcm::Tag(0x0028, 0x1053)))
    {
      return true;
    }
  }
  return false;
}


On Mon, Jul 4, 2016 at 3:05 AM Daniel Maleike 
<d.male...@mint-medical.de<mailto:d.male...@mint-medical.de>> wrote:
Hi David,

I am not sure about what MITK version you are using or the default way of 
loading now (can't look it up), but there is a good chance that your 
mitk::Image (not the mitk::DataNode) already has properties attached that 
describe the tags that you are looking for.

If you want to dig into the code, I recommend two entry points:
- DICOMReader/src/mitkDICOMTagHelper.cpp
- DICOMReaderServices/include/mitkDICOMTagsOfInterestService.h

Regards,
Daniel



--

Dr. Daniel Maleike, Mint Medical GmbH

Friedrich-Ebert-Straße 2, 69221 Dossenheim/Heidelberg
Geschäftsführer: Dr. Matthias Baumhauer, Registergericht Mannheim, HRB 709351
From: david....@louisville.edu<mailto:david....@louisville.edu> 
<david....@louisville.edu<mailto:david....@louisville.edu>>
Sent: Friday, July 1, 2016 7:11 PM
To: Daniel Maleike
Subject: Re: [mitk-users] Reading DICOM file image data

Hello again,

First, thank you for your quick response as I have been spending lots of time 
trying to tackle this problem.

By unaltered data I am referring to data that has not been scaled. It is 
important to get the unscaled data because I am attempting to access velocity 
data that is encoded in the pixel value.

Given that I cannot access this easily through MITK, I am now wondering how to 
go about accessing the tags (0028,1052 RescaleIntercept and 0028,1053 
RescaleSlope) from the data node to unscale the data. Is there an example of 
doing this that I could reference?

For context, I am going to eventually try to represent these velocity values as 
vectors drawn in the 3D window in the MITK Workbench as a way to visualize MRI 
flow data.

Thank you again for your time.

Best Regards,

David Exe



On Fri, Jul 1, 2016 at 12:06 PM Daniel Maleike 
<d.male...@mint-medical.de<mailto:d.male...@mint-medical.de>> wrote:

Hi David,


I am not sure to understand what unaltered data you refer to. Are you refering 
to the raw stored pixel values (7fe0,0010 Pixel data)?


MITK (gdcm in fact) already transforms this raw data through 0028,1052 
RescaleIntercept and 0028,1053 RescaleSlope. The motivation for this is storing 
of either negative or floating point values while keeping an integer data type 
for "Pixel data".


Within MITK you will not be able to access the stored pixel values. But you 
could unapply the transformation


image pixel value = intercept + slope * stored_value


Hope this helps,
Regards,

Daniel



--

Dr. Daniel Maleike, Mint Medical GmbH

Friedrich-Ebert-Straße 2, 69221 Dossenheim/Heidelberg
Geschäftsführer: Dr. Matthias Baumhauer, Registergericht Mannheim, HRB 709351
________________________________
From: David Exe <davide...@gmail.com<mailto:davide...@gmail.com>>
Sent: Friday, July 1, 2016 5:32 PM
To: mitk-users@lists.sourceforge.net<mailto:mitk-users@lists.sourceforge.net>
Subject: [mitk-users] Reading DICOM file image data

Hello,

I am trying to access the unaltered DICOM image data from a file loaded into 
MITK as a datanode through the data manager. I created a plugin to do this 
(using a dynamic cast to an image and then an ImagePixelReadAccesor then 
GetPixelByIndex) and found that the data that I am getting doesn't match the 
actual data (It seems to be larger by around 1064).

Does anyone know how to simply access the dicom image values from a datanode 
without any alteration of the values?

Thank you,

David Exe
------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape_______________________________________________
mitk-users mailing list
mitk-users@lists.sourceforge.net<mailto:mitk-users@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/mitk-users
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to