| 154 | } |
| 155 | |
| 156 | void mitk::DICOMImageBlockDescriptor::SetMitkImage( Image::Pointer image ) |
| 157 | { |
| 158 | if ( m_MitkImage != image ) |
| 159 | { |
| 160 | if ( m_TagCache.IsExpired() ) |
| 161 | { |
| 162 | MITK_ERROR << "Unable to describe MITK image with properties without a tag-cache object!"; |
| 163 | m_MitkImage = nullptr; |
| 164 | return; |
| 165 | } |
| 166 | |
| 167 | if ( m_ImageFrameList.empty() ) |
| 168 | { |
| 169 | MITK_ERROR << "Unable to describe MITK image with properties without a frame list!"; |
| 170 | m_MitkImage = nullptr; |
| 171 | return; |
| 172 | } |
| 173 | |
| 174 | // Should verify that the image matches m_ImageFrameList and m_TagCache |
| 175 | // however, this is hard to do without re-analyzing all |
| 176 | // TODO we should at least make sure that the number of frames is identical (plus rows/columns, |
| 177 | // orientation) |
| 178 | // without gantry tilt correction, we can also check image origin |
| 179 | |
| 180 | m_MitkImage = this->DescribeImageWithProperties( this->FixupSpacing( image ) ); |
| 181 | } |
| 182 | } |
| 183 | |
| 184 | mitk::Image::Pointer mitk::DICOMImageBlockDescriptor::GetMitkImage() const |
| 185 | { |