MCPcopy Create free account
hub / github.com/MITK/MITK / SetMitkImage

Method SetMitkImage

Modules/DICOM/src/mitkDICOMImageBlockDescriptor.cpp:156–182  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

154}
155
156void 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
184mitk::Image::Pointer mitk::DICOMImageBlockDescriptor::GetMitkImage() const
185{

Calls 4

FixupSpacingMethod · 0.95
IsExpiredMethod · 0.80
emptyMethod · 0.45

Tested by 1