Commit 875e9481 authored by saubatn's avatar saubatn
Browse files

FIXED Improved DICOM Component to read anonymized images.

git-svn-id: svn+ssh:// ec899d31-69d1-42ba-9299-647d76f65fb3
parent 0ccb2686
......@@ -107,7 +107,7 @@ DicomComponent::DicomComponent(DicomSerie* dicomSerie) throw(AbortException) : I
vtkSmartPointer<vtkImageData> rawData = imageReader->GetOutput();
// TODO Store Image position patient as a CamiTK property?
/// TODO Store Image position patient as a CamiTK property?
// Update Z-spacing
// vtkGDCMImageReader missses this information, see:
......@@ -136,15 +136,17 @@ DicomComponent::DicomComponent(DicomSerie* dicomSerie) throw(AbortException) : I
// Retrieve image position patient information
/// TODO Retrieve image position patient information
// put back to the origin
vtkSmartPointer<vtkImageData> image = flipYFilter->GetOutput();
setImageData(image, false, orientation);
// Wait for the LUT update in CamiTK and / or support for color image
if(getLut()) // sometimes ImageComponent happens not to have a lut, strange behaviour
CAMITK_WARNING("DicomComponent", "Constructor", "Image's lut is null.");
......@@ -225,7 +225,12 @@ double DicomParser::getZSpacing(const std::vector<std::string> & serieFileNames)
std::string file =;
const char* value = scanner.GetValue(file.c_str(), zSpacingTag);
return atof(value);
CAMITK_ERROR("DicomParser", "getZSpacing", "No Z spacing found on image: " +;
return 1.0;
return atof(value);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment