Comments (3)
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.
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.
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)
- Dealing with RescaleSlope in MRI HOT 1
- Zeros at end of file cause infinite loop HOT 1
- Tilted-gantry CT rectification requires SetMemoryRowOrderToFileNative() HOT 2
- BUILD date not included HOT 1
- vtkDICOMDirectory cannot find files in DICOM folder HOT 2
- Get metadata from vtkNIFTIReader HOT 3
- CMake minimum version update HOT 1
- Possible to have any python example? HOT 5
- Additional Query Attributes
- Vtk dicom
- dicomtonifti.exe fails when dicoms in series differ in bit depth HOT 4
- vtkDICOMParser cannot read DICOM files with non-ASCII characters in the filename HOT 7
- Bug in vtkDICOMReader.cxx at Line 2511 HOT 1
- Instrument directory search tools
- VS 2020 compile issue HOT 2
- Hello, can you update the latest version to vcpkg? HOT 1
- Could not find a package configuration file provided by "DICOM" with any of the following names HOT 3
- Compile error? HOT 1
- Reading multi-pass CT series HOT 3
- Localizers cause confusion with dicomtocsv output HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vtk-dicom.