Vous avez reçu un message "Your GitLab account has been locked ..." ? Pas d'inquiétude : lisez cet article https://docs.gricad-pages.univ-grenoble-alpes.fr/help/unlock/

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

FIXED Improved DICOM Component to read anonymized images.

git-svn-id: svn+ssh://scm.forge.imag.fr/var/lib/gforge/chroot/scmrepos/svn/camitk/trunk/camitk@2015 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: http://gdcm.sourceforge.net/2.4/html/classvtkGDCMImageReader.html#details
......@@ -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 = serieFileNames.at(0);
const char* value = scanner.GetValue(file.c_str(), zSpacingTag);
return atof(value);
CAMITK_ERROR("DicomParser", "getZSpacing", "No Z spacing found on image: " + serieFileNames.at(0));
return 1.0;
return atof(value);
Markdown is supported
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