Giter VIP home page Giter VIP logo

Comments (3)

dgobbi avatar dgobbi commented on July 20, 2024

One problem with adding this index type is that it leads to a large number of similar get methods:

GetAttributeValue(tag)
GetAttributeValue(file_index, tag)
GetAttributeValue(file_index, frame_index, tag)
GetAttributeValue(vtkDICOMIndex tag)

The vtkDICOMMetaData interface is already too complicated. There's something nice about keeping the file and frame indices separate.

Perhaps the best solution is to make a new adapter class, like the vtkDICOMMetaDataAdapter. It could expose an interface that is specific to its use alongside vtkImageData (hence: slice, component indices rather than file, frame indices). Also, the adapter could keep the FileIndexArray and FrameIndexArray.

The idea here is that this adapter class would provide a "view" of the meta data that is better matched to its use within the VTK visualization pipeline.

Here's a crazy plan. I can turn the current MetaData class into something akin to vtkDICOMItem, i.e. no longer derived from vtkObjectBase, and I could rename it to vtkDICOMAttributes. Hence, it would become much less vtk-specific. Then, vtkDICOMMetaData would become a vtk-specific view to vtkDICOMAttributes. Indices would always be slice, component and enhanced vs. legacy files would "look" the same.

from vtk-dicom.

dgobbi avatar dgobbi commented on July 20, 2024

The adapter idea is very appealing to me, especially because I could simply modify the existing vtkDICOMMetaDataAdapter class. It would do much the same thing as the current adapter class, but would be able to take two indices: slice and component. It might be necessary to include the vtkImageData as part of its construction, so that it knows how many components the data has.

I suspect I will have to use two indices for component, "component j of n", like in my current GetFileIndex method. So it would be GetAttributeValue(int i, int j, int n, vtkDICOMTag attr). Alternatively, the value of "n" could be set in the adapter's constructor, or gotten from the image data information.

from vtk-dicom.

dgobbi avatar dgobbi commented on July 20, 2024

No progress on this yet (and it's 2017!) but here are some more thoughts.

The first, most important, consideration is that this new "index" type is going to be confusing to the users, so the only reason to add it is if it makes my own life easier when implementing sorting and so on.

Most users aren't going to care about the file/frame indices. Hence the utility of adapter classes, because the adapter can provide whatever sort of an indexing scheme is most applicable. An adapter can even make a vtkDICOMItem look like a vtkDICOMMetaData. Adapters can be made to be read-only (certainly the easiest) or read-write. People can write their own adapter classes if there isn't already an adapter that suits their needs.

from vtk-dicom.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.