In the current implementation of CastToItk and accessByItk the macro always causes an mitk::ImageWriteAccessor to be created even if it is already clear that it is not needed and a ReadAccessor would be sufficient.
As it is not possible to have two writeAccessors at a time, this can cause problems at various points.
Examples:
You hold pointers to both the mitk::Image and the corresponding itk::Image in some class. When the itk::Image was created using the accessByItk macro, you already have created a WriteAccessor.
You add the mitk::Image to a DataNode int the next step. This will internally call SetDefaultNodeProperties() to configure the DataNode. As a part of this, the 'ideal' levelWindow is computed using some statistics. In order to compute the statistics, the image is cast to itk::Image and we got ourselves the second WriteAccessor, although the statistics will definitely NOT modify the data and write something.
Another point where this happened to me was when trying to write the mitk::Image to disk. This is done by itk::ImageIO and thus an itk::Image is needed. CastToItk creates a WriteAccessor although the image should not be modified when writing it to disk.
I'm not sure about how to adress this problem best but an alternative AccessByItkConst might be a solution.