Page MenuHomePhabricator

Update of image documentation necessary
Closed, ResolvedPublic

Description

See http://docs.mitk.org/nightly-qt4/MitkImagePage.html#MitkImagePage_ImageAccessors


try
{

itk::Index<2> idx = {{ 12, 34 }};

mitk::ImagePixelReadAccessor<short,2> readAcces(image, image->GetSliceData(2));
short value = readAccess.GetPixelByIndex(idx);

mitk::ImagePixelWriteAccessor<short,2> writeAccess(image, image->GetSliceData(4));
writeAccess.SetPixelByIndex(idx, 42);

}
catch(mitk::Exception& e)
{

// deal with the situation not to have access

}

The mistake is not very obvious and I always keep looking for missing includes, however, there is an "s" missing in the declaration of "readAcces".

Event Timeline

Additionally to the typo in the ImageAccessor code snippet, an update of the cloning explanation is necessary.

New remote branch pushed: bug-14356-UpdateImageConceptDocumentation

[8a3be5]: Merge branch 'bug-14356-UpdateImageConceptDocumentation'

Merged commits:

2013-05-08 16:50:26 Joseph Görres [58f9cf]
fixed typo and altered cloning explanation