Skip to content

Commit

Permalink
Fix CBICA#141: Save interactive seg as dicom if input is dicom
Browse files Browse the repository at this point in the history
  • Loading branch information
dboun committed Mar 12, 2020
1 parent d1e7769 commit d630ccd
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -361,9 +361,10 @@ CaPTkInteractiveSegmentation::RunThread(std::vector<mitk::Image::Pointer> &image

if (result->ok)
{
mitk::Image::Pointer segmNormal;
mitk::Image::Pointer segmNormal = mitk::Image::New();
mitk::CastToMitkImage(result->labelsImage, segmNormal);
segm->InitializeByLabeledImage(segmNormal);
segm->CopyInformation(seeds);
runResult.segmentation = segm;
}

Expand Down Expand Up @@ -449,7 +450,7 @@ CaPTkInteractiveSegmentation::RunThread(std::vector<mitk::Image::Pointer> &image

if (result->ok)
{
mitk::Image::Pointer segmNormal;
mitk::Image::Pointer segmNormal = mitk::Image::New();

// Convert to 3D
mitk::CastToMitkImage(result->labelsImage, segmNormal);
Expand All @@ -460,6 +461,7 @@ CaPTkInteractiveSegmentation::RunThread(std::vector<mitk::Image::Pointer> &image
segmNormal = filter->GetOutput();

segm->InitializeByLabeledImage(segmNormal);
segm->CopyInformation(seeds);
runResult.segmentation = segm;
}

Expand Down

0 comments on commit d630ccd

Please sign in to comment.