Skip to content

Commit

Permalink
ENH: checkpoint commit
Browse files Browse the repository at this point in the history
  • Loading branch information
fedorov committed May 14, 2017
1 parent fa9557b commit e1827fe
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 5 deletions.
3 changes: 3 additions & 0 deletions include/dcmqi/DICOMFrame.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ namespace dcmqi {

int getFrameNumber() const; // 0 for legacy datasets, 1 or above for enhanced objects
OFString getInstanceUID() const;
vnl_vector<double> getFrameIPP(){
return frameIPP;
};

private:

Expand Down
16 changes: 13 additions & 3 deletions libsrc/MultiframeObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,18 @@ int MultiframeObject::mapVolumeSlicesToDICOMFrames(ImageVolumeGeometry& volume,

std::vector<int> MultiframeObject::findIntersectingSlices(ImageVolumeGeometry &volume, dcmqi::DICOMFrame &frame) {
std::vector<int> intersectingSlices;


// for now, adopt a simple strategy that maps origin of the frame to index, and selects the slice corresponding
// to this index as the intersecting one
ImageVolumeGeometry::DummyImageType::Pointer itkvolume = volume.getITKRepresentation();
ImageVolumeGeometry::DummyImageType::PointType point;
ImageVolumeGeometry::DummyImageType::IndexType index;
vnl_vector<double> frameIPP = frame.getFrameIPP();
point[0] = frameIPP[0];
point[1] = frameIPP[1];
point[2] = frameIPP[2];

if(itkvolume->TransformPhysicalPointToIndex(point, index))
intersectingSlices.push_back(index[2]);

return intersectingSlices;
}
}
9 changes: 7 additions & 2 deletions libsrc/ParametricMapObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ int ParametricMapObject::initializeFromITK(Float32ITKImageType::Pointer inputIma

initializeVolumeGeometry();

// NB: the sequence of steps initializing different components of the object parallels that
// in the original converter function. It probably makes sense to revisit the sequence
// of these steps. It does not necessarily need to happen in this order.

// TODO: consider creating parametric map object after all FGs are initialized instead
createParametricMap();

Expand All @@ -40,7 +44,8 @@ int ParametricMapObject::initializeFromITK(Float32ITKImageType::Pointer inputIma
initializeFrameAnatomyFG();
initializeRWVMFG();


// initialize referenced instances
///initializeReferencedInstances();

return EXIT_SUCCESS;
}
Expand Down Expand Up @@ -195,7 +200,7 @@ int ParametricMapObject::initializeRWVMFG() {

if (!bval || !bvalUnits || !qCodeName)
{
return NULL;
return EXIT_FAILURE;
}

bval->setValueType(ContentItemMacro::VT_NUMERIC);
Expand Down

0 comments on commit e1827fe

Please sign in to comment.